dev-python/e4u: New package
authorConrad Kostecki <conrad@kostecki.com>
Wed, 16 May 2018 12:28:06 +0000 (14:28 +0200)
committerMichał Górny <mgorny@gentoo.org>
Fri, 18 May 2018 15:00:51 +0000 (17:00 +0200)
Closes: https://bugs.gentoo.org/652256
Closes: https://github.com/gentoo/gentoo/pull/7779
Package-Manager: Portage-2.3.36, Repoman-2.3.9

dev-python/e4u/Manifest [new file with mode: 0644]
dev-python/e4u/e4u-0.1_rc4.ebuild [new file with mode: 0644]
dev-python/e4u/files/change-emoji4unicode-url.patch [new file with mode: 0644]
dev-python/e4u/files/initialize-e4u-tests.patch [new file with mode: 0644]
dev-python/e4u/metadata.xml [new file with mode: 0644]

diff --git a/dev-python/e4u/Manifest b/dev-python/e4u/Manifest
new file mode 100644 (file)
index 0000000..c3f34aa
--- /dev/null
@@ -0,0 +1 @@
+DIST e4u-0.1rc4.tar.gz 50266 BLAKE2B 2cb878837ca34c7839e026b1f742ec23d9ee2c046406084ef10fca4c565b4661237ddf9f76620abc8db968dd5c521be4219752ff8ec4017326b57dc5de9b4ef0 SHA512 8ca0a0a160ddd1425be4f8a941d9767edac89edfaf5f5f14af840f3460ad91344186f8111711e0fb7af212d15af1f766d592e887511f820770b9f66818896a1d
diff --git a/dev-python/e4u/e4u-0.1_rc4.ebuild b/dev-python/e4u/e4u-0.1_rc4.ebuild
new file mode 100644 (file)
index 0000000..93b757a
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+MY_PV="${PV/_/}"
+
+DESCRIPTION="A library for handling unicode emoji and carrier's emoji"
+HOMEPAGE="https://github.com/lambdalisue/e4u"
+SRC_URI="https://github.com/lambdalisue/e4u/archive/${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="BSD"
+SLOT="0"
+IUSE="test"
+
+RDEPEND="dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
+       dev-python/setuptools[${PYTHON_USEDEP}]"
+
+DEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+PATCHES=( "${FILESDIR}/change-emoji4unicode-url.patch" "${FILESDIR}/initialize-e4u-tests.patch" )
+
+python_test() {
+       esetup.py test
+}
+
+python_install_all() {
+       insinto /usr/share/e4u
+       doins e4u/data/emoji4unicode.xml
+
+       distutils-r1_python_install_all
+}
diff --git a/dev-python/e4u/files/change-emoji4unicode-url.patch b/dev-python/e4u/files/change-emoji4unicode-url.patch
new file mode 100644 (file)
index 0000000..d356e7d
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/e4u/__init__.py  2013-06-13 09:14:06.000000000 +0200
++++ b/e4u/__init__.py  2018-05-18 15:35:49.000000000 +0200
+@@ -11,15 +11,15 @@
+ _loader = None
+-def load(filename=None,
+-        url=r"http://emoji4unicode.googlecode.com/svn/trunk/data/emoji4unicode.xml",
++def load(filename=r"/usr/share/e4u/emoji4unicode.xml",
++        url=None,
+         loader_class=None):
+     u"""load google's `emoji4unicode` project's xml file. must call this method first to use `e4u` library. this method never work twice if you want to reload, use `e4u.reload()` insted."""
+     if not has_loaded():
+         reload(filename, url, loader_class)
+         
+-def reload(filename=None,
+-        url=r"http://emoji4unicode.googlecode.com/svn/trunk/data/emoji4unicode.xml",
++def reload(filename=r"/usr/share/e4u/emoji4unicode.xml",
++        url=None,
+         loader_class=None):
+     u"""reload google's `emoji4unicode` project's xml file. must call this method first to use `e4u` library."""
+     if loader_class is None:
+--- a/e4u/loader.py    2013-06-13 09:14:06.000000000 +0200
++++ b/e4u/loader.py    2018-05-18 15:36:01.000000000 +0200
+@@ -32,7 +32,7 @@
+         self._translate_dictionaries = create_translate_dictionaries(self.symbols)
+         
+         
+-    def load(self, filename=None, url=r"http://emoji4unicode.googlecode.com/svn/trunk/data/emoji4unicode.xml"):
++    def load(self, filename=r"/usr/share/e4u/emoji4unicode.xml", url=None):
+         if filename:
+             xml = open(filename, 'r').read()
+         else:
diff --git a/dev-python/e4u/files/initialize-e4u-tests.patch b/dev-python/e4u/files/initialize-e4u-tests.patch
new file mode 100644 (file)
index 0000000..4d9a25d
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/test/test.py     2013-06-13 09:14:06.000000000 +0200
++++ b/test/test.py     2018-05-16 13:40:22.000000000 +0200
+@@ -7,6 +7,8 @@
+ import unittest
+ import e4u
++e4u.load(filename=r"./e4u/data/emoji4unicode.xml")
++
+ DISPLAY_INFO = False
+ class TestCaseAbstract(object):
diff --git a/dev-python/e4u/metadata.xml b/dev-python/e4u/metadata.xml
new file mode 100644 (file)
index 0000000..5e75240
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>ck+gentoo@bl4ckb0x.de</email>
+               <name>Conrad Kostecki</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>proxy-maint@gentoo.org</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
+       <upstream>
+               <bugs-to>https://github.com/lambdalisue/e4u/issues</bugs-to>
+               <remote-id type="github">lambdalisue/e4u</remote-id>
+       </upstream>
+       <longdescription>
+               A library for handling unicode emoji and carrier's emoji.
+               The main feature is conversion unicode emoji to carrier's emoji
+               and conversion carrier's emoji to unicode emoji.
+       </longdescription>
+</pkgmetadata>