diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-dicts/opendict | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-dicts/opendict')
-rw-r--r-- | app-dicts/opendict/Manifest | 1 | ||||
-rw-r--r-- | app-dicts/opendict/files/opendict-0.6.3-pyxml.patch | 144 | ||||
-rw-r--r-- | app-dicts/opendict/metadata.xml | 5 | ||||
-rw-r--r-- | app-dicts/opendict/opendict-0.6.3-r1.ebuild | 92 |
4 files changed, 242 insertions, 0 deletions
diff --git a/app-dicts/opendict/Manifest b/app-dicts/opendict/Manifest new file mode 100644 index 000000000000..c953cafe80cf --- /dev/null +++ b/app-dicts/opendict/Manifest @@ -0,0 +1 @@ +DIST opendict-0.6.3.tar.gz 132515 SHA256 dad7723512768aeae65fead0f06a3c973b161a86658b94a66c4945beb12f45dc SHA512 687afba45f9fd271acee9f72fd3971fbc624588fe0f4194ad4499e2e64259a59c516854a7b0b1c02b3e214bf6e77e52b5b0713430e3cd5e0127c5b3c8fc02f5c WHIRLPOOL 06a48141bb1da7557d616deda3c4c18500171d4c158cb5f5cc83ca9f1f8037584ade85a742c88a4b6ab667bd6586492fed075e6a4e69fa51c8e37ece75880a62 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..d89f137c9768 --- /dev/null +++ b/app-dicts/opendict/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>wxwidgets</herd> +</pkgmetadata> 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..fab01ea13927 --- /dev/null +++ b/app-dicts/opendict/opendict-0.6.3-r1.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 +} |