From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-dicts/opendict/Manifest | 8 ++ .../opendict/files/opendict-0.6.3-pyxml.patch | 144 +++++++++++++++++++++ app-dicts/opendict/metadata.xml | 11 ++ app-dicts/opendict/opendict-0.6.3-r1.ebuild | 91 +++++++++++++ app-dicts/opendict/opendict-0.6.7.ebuild | 89 +++++++++++++ 5 files changed, 343 insertions(+) create mode 100644 app-dicts/opendict/Manifest create mode 100644 app-dicts/opendict/files/opendict-0.6.3-pyxml.patch create mode 100644 app-dicts/opendict/metadata.xml create mode 100644 app-dicts/opendict/opendict-0.6.3-r1.ebuild create mode 100644 app-dicts/opendict/opendict-0.6.7.ebuild (limited to 'app-dicts/opendict') diff --git a/app-dicts/opendict/Manifest b/app-dicts/opendict/Manifest new file mode 100644 index 000000000000..cc74bec30eb7 --- /dev/null +++ b/app-dicts/opendict/Manifest @@ -0,0 +1,8 @@ +AUX opendict-0.6.3-pyxml.patch 4271 SHA256 57133ff36d363efbd999f19e66fd9ce85e00553132bad18f9b3d5a5a5fea5116 SHA512 f214ae06130f768811c74b5eadd51d6caa7b182d44d9423bf694b7a04e06a45fc1ffa3cb8f9551312cb75195184a8291a3dd55e12404e5a691814b97484c13e1 WHIRLPOOL b070e809110de43a0867dfbb4f0dbb113ec1338bef98f95dfb4bac630d137a76395ba98127b4800359702cae3c958cd0d11b9a1183d61674da3906a6407f0548 +DIST opendict-0.6.3.tar.gz 132515 SHA256 dad7723512768aeae65fead0f06a3c973b161a86658b94a66c4945beb12f45dc SHA512 687afba45f9fd271acee9f72fd3971fbc624588fe0f4194ad4499e2e64259a59c516854a7b0b1c02b3e214bf6e77e52b5b0713430e3cd5e0127c5b3c8fc02f5c WHIRLPOOL 06a48141bb1da7557d616deda3c4c18500171d4c158cb5f5cc83ca9f1f8037584ade85a742c88a4b6ab667bd6586492fed075e6a4e69fa51c8e37ece75880a62 +DIST opendict-0.6.7.tar.gz 169580 SHA256 d376c8a81e5747e40775214177df9d0f04d6441acaea7435e0cb7e770b6c460f SHA512 ef97ec84591bda4d8d4746fa4532de109cf03d89dfd5aa20e1775224c687b503759c020b2286e5cedd395ebce5db3b2a10495adc31fcc31dbd4fddfca6fee1f8 WHIRLPOOL 215a3f9ec80bf07c662f5cc35f1e698cfabbb74edd8c641681b562bc6a4a47b4b2fe1e889288abb8e5f213441cd501cf9c6d2ad4581501a5c90bb0048623c3d7 +EBUILD opendict-0.6.3-r1.ebuild 2146 SHA256 c2c2ff7333e8e9b3f8840b0f4c07be9cd6078913b3484e48dc8902669e00eeca SHA512 7940c30bf7fb0e12e325b38f48eb17b106a42789d2ccda9d30d269767a1529cdae7a1b49c6845f953bcd0b935174f4e0c304d891103990c07ca16fbda6afbe2f WHIRLPOOL e600476af6b8ab8cef05b8145419f57df4899654c5a0e345eb87910a08a5820aa1137491d37652b1438225fb6d7e43057f5125cae0df753b17d659fcdbc85fc9 +EBUILD opendict-0.6.7.ebuild 2052 SHA256 112939922e2c4e4369182e4796c2e0152749dae030239801501a663f6c19fe8e SHA512 000469bac4079e922b128bcffe603a40ec8c9755347996d8ae4bf0f69413ba99d8547312a60e98306710069115f57dc08b55b3631d1765fc9b9cd18efd0e88ab WHIRLPOOL b7684009333e58a1228f1ffe5dec0a812569c066ae5d8568b9b3ad21f0c2d797a634944794fb2d9a03b04e73d28bb09890441ab50864f6cd7fde4f20a60321df +MISC ChangeLog 3018 SHA256 b26a6cbcded8c46dd7a7fa55b542bd9b0d0b823a4b8c4f51404f6869701d9c39 SHA512 9b26565a1210b046af002b3b68526a82a06b62a6cd8a95b864dd13beb316fba65663b03e6168cc53f670ac2043a6f75554c498363248b55a61d25efea571672d WHIRLPOOL 1f9ef48d0b0b7dd344b50ef9b42c26ea671f0f3d817c93f7a878bbabb7157cfbaff9b7e21ba14a36e5d538208bc0d4b581215a931d5c4711a9567c1df304a3da +MISC ChangeLog-2015 4318 SHA256 321c9d6eff448e6dd61cb83eaf4ff94a2ce5065b4db2e189435688009bb1f0d3 SHA512 a519614479b15133964eb1ec59349b4a7cf86bd7d2a3fa2b4344e463bebf56e02c946acbe4c2926f13f49c11468a5b095cb2cbc8c712056a97de8080bd09d8e7 WHIRLPOOL 770641c7bd233032fd26bcb5c0aaa9e1b3eb63552bc2863d6ffdfcd4efc655600c4fd20f7f27363be5fe70eabad9cfab44a576a91cc65c9ba2a64d379e91377c +MISC metadata.xml 339 SHA256 f76f1bdabe350ce2a9ab82c40a74d2353d2a5a12091bfc7363e856dc3dca5351 SHA512 49affe3fdde01f9c9726abbf3088e9332fd2aad7c47cb7591eee9d23dd18caf4877c2858e457b236bfec2318baa5e3cbf8184ae431825d6d28a01557a58daf98 WHIRLPOOL 1fd51147caa331f1c2b2a52e6df4212826e187c3ff5b7ad8e3c0046088d7908bc70e88dba33c2c5ba62503ef0484155a27a47d9658f639403b8791a66d7c7466 diff --git a/app-dicts/opendict/files/opendict-0.6.3-pyxml.patch b/app-dicts/opendict/files/opendict-0.6.3-pyxml.patch new file mode 100644 index 000000000000..902e4f822158 --- /dev/null +++ b/app-dicts/opendict/files/opendict-0.6.3-pyxml.patch @@ -0,0 +1,144 @@ +Use native python instead of external pyxml dependency. Patch from Debian. + +https://bugs.gentoo.org/367733 + + +--- a/README.txt ++++ b/README.txt +@@ -15,9 +15,8 @@ universal and easy to use for desktop users and developers. + Requirements + ~~~~~~~~~~~~ + +- - Python >= 2.3 +- - wxPython 2.6 +- - python-xml (PyXML) ++ - Python >= 2.4 ++ - wxPython >= 2.6 + - gettext >= 0.14 + + +--- a/lib/xmltools.py ++++ b/lib/xmltools.py +@@ -20,7 +20,6 @@ + # + + import xml.dom.minidom +-import xml.dom.ext + + from lib import meta + +@@ -30,7 +29,7 @@ def _textData(element): + + text = '' + for node in element.childNodes: +- text = node.data ++ text = node.data.strip() + + return text + +@@ -99,7 +98,7 @@ class RegisterConfigGenerator: + or '')) + + return doc +- ++ + + def generatePlainDictConfig(**args): + """Generate configuration and return DOM object""" +@@ -113,10 +112,11 @@ def generatePlainDictConfig(**args): + def writePlainDictConfig(doc, path): + """Write XML file""" + +- fd = open(path, 'w') +- xml.dom.ext.PrettyPrint(doc, fd) ++ import codecs ++ fd = codecs.open(path, 'w', 'utf-8') ++ doc.writexml(fd, addindent = " ", newl = "\n", encoding = "UTF-8") + fd.close() +- ++ + + + class RegisterConfigParser: +@@ -144,32 +144,32 @@ class RegisterConfigParser: + + for nameElement in registerElement.getElementsByTagName('name'): + for node in nameElement.childNodes: +- name = node.data ++ name = node.data.strip() + + for formatElement in registerElement.getElementsByTagName('format'): + for node in formatElement.childNodes: +- format = node.data ++ format = node.data.strip() + + for pathElement in registerElement.getElementsByTagName('path'): + for node in pathElement.childNodes: +- path = node.data ++ path = node.data.strip() + + for versionElement in registerElement.getElementsByTagName('version'): + for node in versionElement.childNodes: + version = node.data.strip() + + for authorElement in registerElement.getElementsByTagName('author'): +- authors.append({'name': authorElement.getAttribute('name'), +- 'email': authorElement.getAttribute('email')}) ++ authors.append({'name': authorElement.getAttribute('name').strip(), ++ 'email': authorElement.getAttribute('email').strip()}) + + for md5Element in registerElement.getElementsByTagName('md5'): + for node in md5Element.childNodes: +- md5 = node.data ++ md5 = node.data.strip() + + for encodingElement in \ + registerElement.getElementsByTagName('encoding'): + for node in encodingElement.childNodes: +- encoding = node.data ++ encoding = node.data.strip() + + for licenceElement in \ + registerElement.getElementsByTagName('licence'): +@@ -241,8 +241,9 @@ def generateIndexFile(index): + def writeIndexFile(doc, path): + """Write XML file""" + +- fd = open(path, 'wb') +- xml.dom.ext.PrettyPrint(doc, fd) ++ import codecs ++ fd = codecs.open(path, 'wb', 'utf-8') ++ doc.writexml(fd, addindent = " ", newl = "\n", encoding = "UTF-8") + fd.close() + + +@@ -511,7 +512,8 @@ def generateMainConfig(props): + def writeConfig(doc, path): + """Write XML file""" + +- fd = open(path, 'w') +- xml.dom.ext.PrettyPrint(doc, fd) ++ import codecs ++ fd = codecs.open(path, 'w', 'utf-8') ++ doc.writexml(fd, addindent = " ", newl = "\n", encoding = "UTF-8") + fd.close() + +--- a/opendict.py ++++ b/opendict.py +@@ -53,16 +53,6 @@ except ImportError: + print >> sys.stderr, "**" + sys.exit(1) + +- +-try: +- import xml.dom.ext +-except ImportError: +- print >> sys.stderr, "**" +- print >> sys.stderr, "** Error: Python/XML library not found" +- print >> sys.stderr, "** Please install python-xml (PyXML) to run OpenDict" +- print >> sys.stderr, "**" +- sys.exit(1) +- + # get_main_dir() returns the directory name of the script or the + # directory name of the exe + def get_main_dir(): diff --git a/app-dicts/opendict/metadata.xml b/app-dicts/opendict/metadata.xml new file mode 100644 index 000000000000..e41fb4b553e3 --- /dev/null +++ b/app-dicts/opendict/metadata.xml @@ -0,0 +1,11 @@ + + + + + wxwidgets@gentoo.org + Gentoo wxWidgets Project + + + opendict + + diff --git a/app-dicts/opendict/opendict-0.6.3-r1.ebuild b/app-dicts/opendict/opendict-0.6.3-r1.ebuild new file mode 100644 index 000000000000..abb4dbf2ad13 --- /dev/null +++ b/app-dicts/opendict/opendict-0.6.3-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +GCONF_DEBUG="no" # We skip gnome2_src_configure entirely +PYTHON_COMPAT=( python2_7 ) + +inherit eutils gnome2 python-single-r1 readme.gentoo + +DESCRIPTION="OpenDict is a free cross-platform dictionary program" +HOMEPAGE="http://opendict.sourceforge.net/" +SRC_URI="http://opendict.idiles.com/files/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +IUSE="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + dev-python/wxpython:2.8[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND}" + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS="If you want system-wide plugins, unzip them into +${ROOT}usr/share/${PN}/dictionaries/plugins + +Some are available from http://opendict.sourceforge.net/?cid=3" + +src_prepare() { + epatch "${FILESDIR}"/${P}-pyxml.patch + + sed -e "s:), '..')):), '../../../../..', 'share', 'opendict')):g" \ + -i "${S}/lib/info.py" + + gnome2_src_prepare +} + +src_configure() { + # override gnome2_src_configure + default +} + +src_compile() { + # evil makefile + : +} + +src_install() { + # makefile is broken, do it manually + + dodir /usr/share/${PN}/dictionaries/plugins # global dictionary plugins folder + + # Needed by GUI + insinto /usr/share/${PN} + doins "${S}"/copying.html + + insinto /usr/share/${PN}/pixmaps + doins "${S}"/pixmaps/* + + DHOME="$(python_get_sitedir)/opendict" + insinto "${DHOME}/lib" + doins -r "${S}"/lib/* + exeinto "${DHOME}" + python_fix_shebang opendict.py + doexe opendict.py + + dosym "${DHOME}/opendict.py" /usr/bin/opendict + + domenu misc/${PN}.desktop + + insinto /usr/share/icons/hicolor/24x24/apps/ + newins "${S}/pixmaps/icon-24x24.png" opendict.png + insinto /usr/share/icons/hicolor/32x32/apps/ + newins "${S}/pixmaps/icon-32x32.png" opendict.png + insinto /usr/share/icons/hicolor/48x48/apps/ + newins "${S}/pixmaps/icon-48x48.png" opendict.png + insinto /usr/share/icons/hicolor/scalable/apps/ + newins "${S}/pixmaps/SVG/icon-rune.svg" opendict.svg + + doman opendict.1 + dodoc README.txt TODO.txt doc/Plugin-HOWTO.html + + readme.gentoo_create_doc +} + +pkg_postinst() { + gnome2_pkg_postinst + readme.gentoo_print_elog +} diff --git a/app-dicts/opendict/opendict-0.6.7.ebuild b/app-dicts/opendict/opendict-0.6.7.ebuild new file mode 100644 index 000000000000..026546d15248 --- /dev/null +++ b/app-dicts/opendict/opendict-0.6.7.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) + +inherit gnome2 python-single-r1 readme.gentoo-r1 + +DESCRIPTION="OpenDict is a free cross-platform dictionary program" +HOMEPAGE="http://opendict.sourceforge.net/" +SRC_URI="mirror://sourceforge/opendict/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +IUSE="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + dev-python/wxpython:3.0[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND}" + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS="If you want system-wide plugins, unzip them into +${ROOT}usr/share/${PN}/dictionaries/plugins + +Some are available from http://opendict.sourceforge.net/?cid=3" + +src_prepare() { + sed -e "s:), '..')):), '../../../../..', 'share', 'opendict')):g" \ + -i "${S}/lib/info.py" + + gnome2_src_prepare +} + +src_configure() { + # override gnome2_src_configure + default +} + +src_compile() { + # evil makefile + : +} + +src_install() { + # makefile is broken, do it manually + + dodir /usr/share/${PN}/dictionaries/plugins # global dictionary plugins folder + + # Needed by GUI + insinto /usr/share/${PN} + doins "${S}"/copying.html + + insinto /usr/share/${PN}/pixmaps + doins "${S}"/pixmaps/* + + DHOME="$(python_get_sitedir)/opendict" + insinto "${DHOME}/lib" + doins -r "${S}"/lib/* + exeinto "${DHOME}" + python_fix_shebang opendict.py + doexe opendict.py + + dosym "${DHOME}/opendict.py" /usr/bin/opendict + + domenu misc/${PN}.desktop + + insinto /usr/share/icons/hicolor/24x24/apps/ + newins "${S}/pixmaps/icon-24x24.png" opendict.png + insinto /usr/share/icons/hicolor/32x32/apps/ + newins "${S}/pixmaps/icon-32x32.png" opendict.png + insinto /usr/share/icons/hicolor/48x48/apps/ + newins "${S}/pixmaps/icon-48x48.png" opendict.png + insinto /usr/share/icons/hicolor/scalable/apps/ + newins "${S}/pixmaps/SVG/icon-rune.svg" opendict.svg + + doman opendict.1 + dodoc README.txt TODO.txt doc/Plugin-HOWTO.html + + readme.gentoo_create_doc +} + +pkg_postinst() { + gnome2_pkg_postinst + readme.gentoo_print_elog +} -- cgit v1.2.3