summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Sennhauser <sera@gentoo.org>2012-07-31 08:44:48 +0000
committerRalph Sennhauser <sera@gentoo.org>2012-07-31 08:44:48 +0000
commit187a40b9ced8c5ab676a33c430984e933a50ddb2 (patch)
treec27776c3b47a6a45ddd1a41eac4f422da122c7ae /dev-java/jython
parentfix SRC_URI (diff)
downloadhistorical-187a40b9ced8c5ab676a33c430984e933a50ddb2.tar.gz
historical-187a40b9ced8c5ab676a33c430984e933a50ddb2.tar.bz2
historical-187a40b9ced8c5ab676a33c430984e933a50ddb2.zip
Backport upstream sax fix, needed for javatoolkit and possibly others.
JYTHON_SYSTEM_CACHEDIR is buggy, every ebuild not inheriting python.eclass and calling python_pkg_setup would have to set it, also it's a per user system cache dir and so with reduced previleges can't even be created -> drop it. Install sandbox control file as the jvm opens the classfiles rw. Compile class files during src phases instead of creating orphans. Package-Manager: portage-2.1.11.9/cvs/Linux x86_64
Diffstat (limited to 'dev-java/jython')
-rw-r--r--dev-java/jython/ChangeLog14
-rw-r--r--dev-java/jython/Manifest18
-rw-r--r--dev-java/jython/files/jython-2.5.2-sax-parser-fix.patch94
-rw-r--r--dev-java/jython/jython-2.5.2-r1.ebuild140
4 files changed, 257 insertions, 9 deletions
diff --git a/dev-java/jython/ChangeLog b/dev-java/jython/ChangeLog
index fbcae0f2ef65..35070d2bdd7b 100644
--- a/dev-java/jython/ChangeLog
+++ b/dev-java/jython/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for dev-java/jython
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.75 2012/07/18 10:30:29 sera Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.76 2012/07/31 08:44:48 sera Exp $
+
+*jython-2.5.2-r1 (31 Jul 2012)
+
+ 31 Jul 2012; Ralph Sennhauser <sera@gentoo.org> +jython-2.5.2-r1.ebuild,
+ +files/jython-2.5.2-sax-parser-fix.patch:
+ Backport upstream sax fix, needed for javatoolkit and possibly others.
+ JYTHON_SYSTEM_CACHEDIR is buggy, every ebuild not inheriting python.eclass
+ and calling python_pkg_setup would have to set it, also it's a per user
+ system cache dir and so with reduced previleges can't even be created -> drop
+ it.
+ Install sandbox control file as the jvm opens the classfiles rw.
+ Compile class files during src phases instead of creating orphans.
*jython-2.5.2 (18 Jul 2012)
diff --git a/dev-java/jython/Manifest b/dev-java/jython/Manifest
index c06a9b082daa..192ea7b3eae2 100644
--- a/dev-java/jython/Manifest
+++ b/dev-java/jython/Manifest
@@ -12,6 +12,7 @@ AUX jython-2.5.2-build.xml.patch 1079 SHA256 52de2b89ff7a6e9e6f8df13a855c5791f50
AUX jython-2.5.2-distutils_byte_compilation.patch 2954 SHA256 f2f2cbc01a138eccdcb38e07fdf4b45ee97393a740d778a69e6900a1e8567c04 SHA512 8706425ae61852c02ed5aa35d0e22f81e8768472f4096d42a4d15238a7d828c8a66764125270e37634999805135d0dff1a18a62c7036f16f0d39c9daa116f6c6 WHIRLPOOL 5a0aa0447ddd1689325b225e29645bbd87d0249f526f076626ab0615132a085a5a20f4ec0c141bbea54d20c9849b145e36da2ebefaafc2ff97f222516ac395fb
AUX jython-2.5.2-distutils_scripts_location.patch 346 SHA256 240cc2c51aa23738f559a874cc65d9c7de4a4c1d786edece3e865d7922fd6f90 SHA512 e3c96d614f16ab4d0fd3b8c6ce7f1ec7478fc36069f4b4d78f5bc4fe586e6dfd41c2afaf1092abd74bf0a61c352ce6e5328dee1c308493bd8d38fa6452705808 WHIRLPOOL 0c6cdf265094ce4a13d59edd5b5e2d74c91d08cc69514fcf7915b6e11ca8c85188c1d29440a3103348303dce9afb55d9531544b546554666b0e7725d2b25613a
AUX jython-2.5.2-respect_PYTHONPATH.patch 547 SHA256 23d5008763e4abb6bd3b491b74a7428ae29f629b4c87f1a65659a3c46d51620c SHA512 516943ee4f5a2774695e5eb49d1cebbacb1a55ff0ba3e59a36033f1612f6c73f1ce1e45895fbda1deaec756efcfed9a4de5bc3cadf57ceeffa8990de0a58a0f5 WHIRLPOOL 54e38f603bf2e628bd56aaef8629ed2e6320b9d25519663e1991defc733c4326c08fde576287061183c1bc2f6b225821cdefe3e2b111b17ab5f940ca04a4e398
+AUX jython-2.5.2-sax-parser-fix.patch 3865 SHA256 ad7ceca1bc974432220c7ec699e768657ca39da2f3a4aad0fcff25da454bc0f4 SHA512 b56a539c4b63aca1305aca07aa5ebcabcd479687a5a991cf19a26574c06ef6664d0390c0b82e1c1aadaec23c0b7c44913ca8a816af7a8358ab6b4071c668f092 WHIRLPOOL e771ffcac7f9d59f87b97ae699a0b8cd91c0ec26a877131649c8dfdf920d1a3f08b84256b785605075e833c4aeb1bc7a498a8f00d298fc0344df902913904f12
AUX python-2.5.5-distutils_byte_compilation.patch 1208 SHA256 b520641c4b4117a231b4798c82a60ac458081cca71c56e9838dd8a9c51116fc8 SHA512 5e82e7d1c683a035105403282d61dab9af0f4fe4400fbdecaee5e676924e77ea57cd2b4d589c6e91b16a20fafcd4988b4d0127c3b2c3238228c706198001a306 WHIRLPOOL 13d1c5d88f12dbfd1b4574e38658062df2320e6a4c9ef233b234522c8cc45208009d9311ad54a58a20de643ddbcd799da69ef06fd408d64f81bf1cfb44b126f5
DIST Python-2.2.3.tgz 6709556 SHA256 a8f92e6b89d47359fff0d1fbfe47f104afc77fd1cd5143e7332758b7bc100188 SHA512 2e2c881f8819ed3d91b3e98e7087b23ced9715c80eb9e5fe4144cca5b82220e035d0f50ac4a098b3bbdca3c588f70b8021f68a5d52f653c013470579342943e4 WHIRLPOOL dbef6f9f0545f4f4ddf6e4535b67bb936a2ef596f17a1ff6acca89755729420588d845bc291eed0d19b433b3eff017166c7d68a1a352a5612b00da2f8f0c20d7
DIST Python-2.5.5.tgz 11606370 SHA256 03be1019c4fe93daeb53ba9e4294bf22a8ed4cb854cbd57e24e16f6bf63e2392 SHA512 787b3e99386e3b52bca63c3191ccb90418e8c5eb5eef3f4c4d8bda76cc5dd558aa28d8146a610ee66e58c1e3967516d073986b073df326685170143f191c152c WHIRLPOOL ac504a4afe70b706b5f3bf19314d97f1ecdb49067feb0137455dfc02c010cb99a145fd4afeef230bb9e2991309499b68e81a91b4e6da588af3fe40bfdb29a60c
@@ -22,17 +23,18 @@ DIST jython_installer-2.5.2.jar 18435770 SHA256 1b7168b961e31ddd89012a36cde611c3
EBUILD jython-2.1-r11.ebuild 2934 SHA256 9ce1e028309ecc0d8f804fad81ce80f9ed81ef9f089aa01c26c17a47b79baf3f SHA512 73056839842a49593083e5d22babe1fd4aaa2ed64305208129e5b7c981f3f6a5782627ac7ab819fa1305250b3bd23e7da3fb7c3bac262bb3dd8e5692b5c24a62 WHIRLPOOL 11e1f46dbbbb80058ae1a059782c5e0fa9cef25d39b5320742c5eff220e209b11b818d7429a7af8a83f8726e58e83c17cc85518cf9e949b930d09cffbb37e102
EBUILD jython-2.2.1-r1.ebuild 3769 SHA256 936d381297b273398a608fc879331f147f555ea19174ff12722003c4ec90cd9f SHA512 61d10d83cc2e56818d069ba3d0e0262cb21082b96fdb89e5704912fee4457048c8e390a6eaba55664bf15fe581321da517e7fe70260143cf62e3129a40eacf7f WHIRLPOOL 49705b431243688cac0558fcf87b7b492ceb4d90100d7ff80608b4faeb4d53801a8055bacb6b62f4ddfb5b82279eb9e1973d6ae1d9c21bb716d389add06688bd
EBUILD jython-2.5.1-r2.ebuild 5606 SHA256 a6c0b84a70d266616ffe73062986615502e60ed39426d517f6089640fdc689ec SHA512 5eaa7bb9c03e947945be8248c1db5e1024654c1d11e61471a1b7686845719da21544369d40cabf31240f6beecab6e9eae169f29c05dcf9846ecec51b8f269356 WHIRLPOOL 55d0bceda9d789ceba4ab54b63bc976e319e8a30307f53e0754b4d6b8bae93845368012bb8b06033ea1ebdfc4ce6831ad0552457c8d6d535ef5e10c7b74823ad
+EBUILD jython-2.5.2-r1.ebuild 4108 SHA256 52a82a533b26b064f83a8aca66dc3580fb725444c1c704fb2c3433847d83c3be SHA512 640ae9c1284e851a7cb500f8b54851aee5d8d2f32bdd9e5676a30a69a1b37d33e44148e016d7f42a5d759cd7350ea92ec2065b89c50a1758a133ee2fc6b99325 WHIRLPOOL 9d8d42e17fba52a2ca1e3f65082e9cf11e4d72371b41bcf5e15505c609746c48f14768fd21b6a118b4371039d0c9f81a18b9abd4848230092b28907318be7b87
EBUILD jython-2.5.2.ebuild 3994 SHA256 02c73bb9608f0df1062be34efc1a64c10f85ba9a1a7281aaaa002951d35af457 SHA512 4c733f032f346bd70741baf1d95f961a900c6f80c9397de8e78d34d8ccfe4a709a9f8c2f38588abb4769feb81ca418e3c07ddd6ad3dc56356184f418a22036c8 WHIRLPOOL 3df09b4f18fc1f896c507cdf9f7ec4ae0b7fccd2441857d031d7bad445eb76fbdf197e0c89c8e655d8ba411b5a1ec947755c20354c84aec946541746531179c8
-MISC ChangeLog 11716 SHA256 88d5005d63bc1ad5db8ee15da853cfe038d39210dad77d928c934a3b3118fa1a SHA512 e23f1b6f306f912db5151559910432ca5a4a1cf09bfefaebbdab32c9fd4dbf0bb948e703d92bc4d251164bc421a9170ffae24c9dde1f03bfb4f083c48c5b6a5c WHIRLPOOL ed9192d2290dfef18a40cbda8af782d9af2936f8b5cc74693b7fdefeaeed26a284658c6e0316adfb2f5227dd0bf6d4371f1e46b83792a950f4979f801e6b800b
+MISC ChangeLog 12314 SHA256 533ec3c34eb9518f4bca15ad2181d99c96331556ea666c665a5d80a3a6cf7079 SHA512 a491f2a333d59e241fe4673b1488f568c2e6fb42ea61fec8b9bc086808f8ca9d2bf9b36cd4efd29fe6579ea3f560f1a512247d55d8c6e8bbd3d77fa56dff9099 WHIRLPOOL 05c0155462a1f934ebbf9863eb39c6a50efd0ca29e0d1c4371cef0ddfe74b2a772d41c129d41c8773c8f31a112dae121127630537fefadd188d993abd1f61b88
MISC metadata.xml 315 SHA256 03b5b706f53aa9de54b5296c58699a4ad543ee0b7fb5b8fc6cf2ab89ac487198 SHA512 756be0e6a24eea5544801dd33f0a5fdaf7b28c9bbef05baac97ab304e00879066d19ef5f02370640364df05a91e509992155a13e185b2b7e9806e554aac7c92a WHIRLPOOL 9a5ffdfa34b9ebf36b7392b8bb81f607bc482a267be083c0c765ccf7c1af18e2621370bfdb26b200581a5d3cbb28221a8f275a6f3acd2ec683e31ab59e06a951
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQEcBAEBCAAGBQJQBpBTAAoJEIUJ+svaV1634AYH/1Fs/bO63atlDzme5zmqRZsK
-MkMKjMMTWEI+wlk4q6u6KSVqBudC9ZNHeGk6uyCJ9NNn7+NxgAa1E9RzEOP8ppe2
-zyrHMqvLH+F1C8dH6xhunvpAuQ4uQ/IaRSk0gU3KEBfV5aZlfjr1af35Kb80d96N
-3THG9jvzGMOzYCCkycIbEa+abLO8ut5OQ2JaFzeC3HsSUuV5dQOhVxfTJbN+OAtv
-/8tcNB5KY9pIDqBNEZQSE2DBVb+ZNMGJjXi20Ms8Ce5MVHzcihQ2DKQeNpD5sTPf
-2G0oLxIzNbDO5i7ALQ5lsURMauKDcRjHuyXjJKlojlPrMV2eHTE+J96zYUXQ2S4=
-=Wkz1
+iQEcBAEBCAAGBQJQF5sOAAoJEIUJ+svaV163VCAH/RlNLqUXRuRJbdkQU6iKSgco
+t8fyiAQrwbmn6y6jHK3bRKrBXDJ/7CBhclBOn+zsPpYYsM7KOS34Sh/I+INZGWab
+0AwD1CDE5gT/+l30aLA4gzSLL80/2ZaSeYExdD9O/j8tJOj8A0A2u8t7dbfK3Feg
+xlrkeRugTditfZtb0q5v01I/jmKKeZedGRSukj4fsSf32emcvBsoHW6wnhQfCLBb
+KSJspbXqXJSx4Em/DK3JgUlsUT6sIKMnoCz5mGfZ+XHWch/QEWCbVrWNZFxMYmi2
+ZpPvqPHnUJaMpH2xp/3cDJGL3JSnekXSop/8fHUq4D9k0Ye3vscKtNRVBnLl0F0=
+=Xnng
-----END PGP SIGNATURE-----
diff --git a/dev-java/jython/files/jython-2.5.2-sax-parser-fix.patch b/dev-java/jython/files/jython-2.5.2-sax-parser-fix.patch
new file mode 100644
index 000000000000..99abc2d7864b
--- /dev/null
+++ b/dev-java/jython/files/jython-2.5.2-sax-parser-fix.patch
@@ -0,0 +1,94 @@
+
+# HG changeset patch
+# User Alan Kennedy <jython-dev@xhaus.com>
+# Date 1319980040 0
+# Node ID 936bd1b132eb9c591cf915b060c6567ae8e16914
+# Parent 71b3f883f6c5f0f39f0ae8aff097a439d4970f46
+Fix for xml attribute namespaces issue
+http://bugs.jython.org/issue1768
+
+diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
+--- a/Lib/test/test_sax.py
++++ b/Lib/test/test_sax.py
+@@ -390,22 +390,23 @@ def test_expat_nsattrs_wattr():
+ gather = AttrGatherer()
+ parser.setContentHandler(gather)
+
+- parser.parse(StringIO("<doc xmlns:ns='%s' ns:attr='val'/>" % ns_uri))
++ a_name = "id" ; a_val = "val"
++ parser.parse(StringIO("<doc xmlns:ns='%s' ns:%s='%s'/>" % (ns_uri, a_name, a_val) ))
+
+ attrs = gather._attrs
+
+ return attrs.getLength() == 1 and \
+- attrs.getNames() == [(ns_uri, "attr")] and \
+- attrs.getQNames() == ["ns:attr"] and \
++ attrs.getNames() == [(ns_uri, a_name)] and \
++ attrs.getQNames() == ["ns:%s" % a_name] and \
+ len(attrs) == 1 and \
+- attrs.has_key((ns_uri, "attr")) and \
+- attrs.keys() == [(ns_uri, "attr")] and \
+- attrs.get((ns_uri, "attr")) == "val" and \
+- attrs.get((ns_uri, "attr"), 25) == "val" and \
+- attrs.items() == [((ns_uri, "attr"), "val")] and \
+- attrs.values() == ["val"] and \
+- attrs.getValue((ns_uri, "attr")) == "val" and \
+- attrs[(ns_uri, "attr")] == "val"
++ attrs.has_key((ns_uri, a_name)) and \
++ attrs.keys() == [(ns_uri, a_name)] and \
++ attrs.get((ns_uri, a_name)) == a_val and \
++ attrs.get((ns_uri, a_name), 25) == a_val and \
++ attrs.items() == [((ns_uri, a_name), a_val)] and \
++ attrs.values() == [a_val] and \
++ attrs.getValue((ns_uri, a_name)) == a_val and \
++ attrs[(ns_uri, a_name)] == a_val
+
+ def test_expat_nsattrs_no_namespace():
+ parser = make_parser()
+@@ -413,22 +414,23 @@ def test_expat_nsattrs_no_namespace():
+ gather = AttrGatherer()
+ parser.setContentHandler(gather)
+
+- parser.parse(StringIO("<doc attr='val'/>"))
++ a_name = "id" ; a_val = "val"
++ parser.parse(StringIO("<doc %s='%s'/>" % (a_name, a_val) ))
+
+ attrs = gather._attrs
+
+ return attrs.getLength() == 1 and \
+- attrs.getNames() == [(None, "attr")] and \
+- attrs.getQNames() == ["attr"] and \
++ attrs.getNames() == [(None, a_name)] and \
++ attrs.getQNames() == [a_name] and \
+ len(attrs) == 1 and \
+- attrs.has_key((None, "attr")) and \
+- attrs.keys() == [(None, "attr")] and \
+- attrs.get((None, "attr")) == "val" and \
+- attrs.get((None, "attr"), 25) == "val" and \
+- attrs.items() == [((None, "attr"), "val")] and \
+- attrs.values() == ["val"] and \
+- attrs.getValue((None, "attr")) == "val" and \
+- attrs[(None, "attr")] == "val"
++ attrs.has_key((None, a_name)) and \
++ attrs.keys() == [(None, a_name)] and \
++ attrs.get((None, a_name)) == a_val and \
++ attrs.get((None, a_name), 25) == a_val and \
++ attrs.items() == [((None, a_name), a_val)] and \
++ attrs.values() == [a_val] and \
++ attrs.getValue((None, a_name)) == a_val and \
++ attrs[(None, a_name)] == a_val
+
+ # ===== InputSource support
+
+diff --git a/Lib/xml/sax/drivers2/drv_javasax.py b/Lib/xml/sax/drivers2/drv_javasax.py
+--- a/Lib/xml/sax/drivers2/drv_javasax.py
++++ b/Lib/xml/sax/drivers2/drv_javasax.py
+@@ -238,7 +238,7 @@ class JavaSAXParser(xmlreader.XMLReader,
+ pass # TODO
+
+ def _fixTuple(nsTuple, frm, to):
+- if len(nsTuple) == 2:
++ if isinstance(nsTuple, tuple) and len(nsTuple) == 2:
+ nsUri, localName = nsTuple
+ if nsUri == frm:
+ nsUri = to
diff --git a/dev-java/jython/jython-2.5.2-r1.ebuild b/dev-java/jython/jython-2.5.2-r1.ebuild
new file mode 100644
index 000000000000..c817a7279238
--- /dev/null
+++ b/dev-java/jython/jython-2.5.2-r1.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/jython-2.5.2-r1.ebuild,v 1.1 2012/07/31 08:44:48 sera Exp $
+
+EAPI="4"
+
+JAVA_PKG_IUSE="doc examples source"
+
+inherit eutils java-pkg-2 java-ant-2 python
+
+PYTHON_ABI="${SLOT}-jython"
+
+DESCRIPTION="An implementation of Python written in Java"
+HOMEPAGE="http://www.jython.org"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${PN}_installer-${PV}.jar"
+
+LICENSE="PSF-2"
+SLOT="2.5"
+KEYWORDS="~amd64 ~x86"
+IUSE="readline"
+
+# Missing in installer jar.
+RESTRICT="test"
+
+COMMON_DEP="
+ !<=dev-java/freemarker-2.3.10
+ dev-java/antlr:3
+ dev-java/asm:3
+ dev-java/guava:0
+ >=dev-java/java-config-2.1.11-r3
+ dev-java/jffi:1.0
+ dev-java/jline:0
+ dev-java/jnr-constants:0
+ dev-java/jnr-posix:1.1
+ java-virtuals/script-api:0
+ java-virtuals/servlet-api:2.5
+ readline? ( >=dev-java/libreadline-java-0.8.0:0 )"
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.5"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.5
+ app-arch/unzip"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ python_pkg_setup
+}
+
+java_prepare() {
+ # src/META-INF/services missing - taking from prebuilt jar
+ pushd src > /dev/null || die
+ jar -xf ../${PN}.jar META-INF/services || die
+ popd > /dev/null
+
+ find \( -name '*.jar' -o -name '*.class' -o -name '*.pyc' -o -name '*.exe' \) -exec rm -v {} + || die
+
+ epatch "${FILESDIR}/${P}-build.xml.patch"
+
+ epatch "${FILESDIR}/${P}-sax-parser-fix.patch"
+
+ epatch "${FILESDIR}/${P}-distutils_byte_compilation.patch"
+ epatch "${FILESDIR}/${P}-distutils_scripts_location.patch"
+ epatch "${FILESDIR}/${P}-respect_PYTHONPATH.patch"
+
+ use readline || rm -v src/org/python/util/ReadlineConsole.java || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+JAVA_ANT_CLASSPATH_TAGS+=" java"
+
+EANT_BUILD_TARGET="developer-build"
+EANT_GENTOO_CLASSPATH="asm-3,guava,jffi-1.0,jline,jnr-constants,script-api,servlet-api-2.5"
+
+# jdbc-informix and jdbc-oracle-bin (requires registration) aren't exposed.
+# Uncomment and add to COMMON_DEP if you want either of them
+#EANT_GENTOO_CLASSPATH+=",jdbc-informix" EANT_EXTRA_ARGS+=" -Dinformix.present"
+#EANT_GENTOO_CLASSPATH+=",jdbc-oracle-bin" EANT_EXTRA_ARGS+=" -Doracle.present"
+
+src_compile() {
+ use readline && EANT_GENTOO_CLASSPATH+=",libreadline-java"
+
+ EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --with-dependencies antlr-3,jnr-posix-1.1)"
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only ant-core)"
+
+ sed -i -e "1 a\
+ CLASSPATH=\"$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}\"" \
+ bin/jython || die
+
+ java-pkg-2_src_compile
+}
+
+EANT_TEST_EXTRA_ARGS="-Dpython.home=dist"
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar dist/${PN}-dev.jar
+
+ java-pkg_register-optional-dependency jdbc-mysql
+ java-pkg_register-optional-dependency jdbc-postgresql
+
+ insinto /usr/share/${PN}-${SLOT}
+ doins -r dist/{Lib,registry}
+ python_clean_installation_image -q
+
+ dodoc ACKNOWLEDGMENTS NEWS README.txt
+
+ use doc && java-pkg_dojavadoc dist/Doc/javadoc
+ use source && java-pkg_dosrc src/*
+ use examples && java-pkg_doexamples Demo/*
+
+ local java_args=(
+ -Dpython.home="${EPREFIX}"/usr/share/${PN}-${SLOT}
+ -Dpython.executable="${EPREFIX}"/usr/bin/jython${SLOT}
+ -Dpython.cachedir="\${HOME}/.jythoncachedir"
+ )
+ java-pkg_dolauncher jython${SLOT} \
+ --main org.python.util.jython \
+ --java_args "${java_args[*]}"
+
+ if use readline; then
+ sed -i -e "/#python.console.readlinelib=JavaReadline/a \
+ python.console=org.python.util.ReadlineConsole\npython.console.readlinelib=GnuReadline" \
+ "${ED}"/usr/share/${PN}-${SLOT}/registry || die
+ fi
+
+ # the jvm opens classfiles rw ...
+ dodir /etc/sandbox.d
+ echo "SANDBOX_PREDICT=/usr/share/${PN}-${SLOT}" > "${ED}/etc/sandbox.d/20${P}-${SLOT}"
+
+ # compile aot
+ java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \
+ -Dpython.home="${ED}"/usr/share/${PN}-${SLOT} \
+ -Dpython.cachedir="${T}/.jythoncachedir" \
+ org.python.util.jython -m compileall -f -q -x "/test/" "${ED}" || die
+}