1 |
--- |
2 |
gx86/dev-java/jython/jython-2.5.3-r2.ebuild | 23 +++++++++++++++++------ |
3 |
1 file changed, 17 insertions(+), 6 deletions(-) |
4 |
|
5 |
diff --git a/gx86/dev-java/jython/jython-2.5.3-r2.ebuild b/gx86/dev-java/jython/jython-2.5.3-r2.ebuild |
6 |
index 2dbdb9c..751d143 100644 |
7 |
--- a/gx86/dev-java/jython/jython-2.5.3-r2.ebuild |
8 |
+++ b/gx86/dev-java/jython/jython-2.5.3-r2.ebuild |
9 |
@@ -6,7 +6,7 @@ EAPI="4" |
10 |
|
11 |
JAVA_PKG_IUSE="doc examples source" |
12 |
|
13 |
-inherit eutils java-pkg-2 java-ant-2 |
14 |
+inherit eutils java-pkg-2 java-ant-2 python-utils-r1 |
15 |
|
16 |
DESCRIPTION="An implementation of Python written in Java" |
17 |
HOMEPAGE="http://www.jython.org" |
18 |
@@ -121,9 +121,20 @@ src_install() { |
19 |
dodir /etc/sandbox.d |
20 |
echo "SANDBOX_PREDICT=/usr/share/${PN}-${SLOT}" > "${ED}/etc/sandbox.d/20${P}-${SLOT}" |
21 |
|
22 |
- # compile aot |
23 |
- java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \ |
24 |
- -Dpython.home="${ED}"/usr/share/${PN}-${SLOT} \ |
25 |
- -Dpython.cachedir="${T}/.jythoncachedir" \ |
26 |
- org.python.util.jython -m compileall -f -q -x "/test/" "${ED}" || die |
27 |
+ # we need a wrapper to help python_optimize |
28 |
+ cat > "${T}"/jython <<_EOF_ || die |
29 |
+exec java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \ |
30 |
+ -Dpython.home="${ED}"/usr/share/${PN}-${SLOT} \ |
31 |
+ -Dpython.cachedir="${T}/.jythoncachedir" \ |
32 |
+ org.python.util.jython "\${@}" |
33 |
+_EOF_ |
34 |
+ chmod +x "${T}"/jython || die |
35 |
+ |
36 |
+ python_export jython${SLOT} EPYTHON PYTHON_SITEDIR |
37 |
+ local PYTHON="${T}"/jython |
38 |
+ |
39 |
+ # compile tests (everything else is compiled already) |
40 |
+ # we're keeping it quiet since jython reports errors verbosely |
41 |
+ # and some of the tests are supposed to trigger compile errors |
42 |
+ python_optimize "${ED}"/usr/share/jython-${SLOT}/Lib/test &>/dev/null |
43 |
} |
44 |
-- |
45 |
1.8.0 |