1 |
mgorny 12/12/02 10:16:55 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: jython-2.5.3-r2.ebuild |
5 |
Log: |
6 |
Minor cleanup. Get rid of python.eclass, install epython.py for python-exec. |
7 |
|
8 |
(Portage version: 2.2.0_alpha144/cvs/Linux x86_64, signed Manifest commit with key 42B9401D) |
9 |
|
10 |
Revision Changes Path |
11 |
1.82 dev-java/jython/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/ChangeLog?rev=1.82&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/ChangeLog?rev=1.82&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/ChangeLog?r1=1.81&r2=1.82 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v |
20 |
retrieving revision 1.81 |
21 |
retrieving revision 1.82 |
22 |
diff -u -r1.81 -r1.82 |
23 |
--- ChangeLog 27 Sep 2012 14:47:27 -0000 1.81 |
24 |
+++ ChangeLog 2 Dec 2012 10:16:55 -0000 1.82 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for dev-java/jython |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.81 2012/09/27 14:47:27 sera Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.82 2012/12/02 10:16:55 mgorny Exp $ |
30 |
+ |
31 |
+*jython-2.5.3-r2 (02 Dec 2012) |
32 |
+ |
33 |
+ 02 Dec 2012; Michał Górny <mgorny@g.o> +jython-2.5.3-r2.ebuild: |
34 |
+ Minor cleanup. Get rid of python.eclass, install epython.py for python-exec. |
35 |
|
36 |
*jython-2.2.1-r2 (27 Sep 2012) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-java/jython/jython-2.5.3-r2.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/jython-2.5.3-r2.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/jython-2.5.3-r2.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: jython-2.5.3-r2.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2012 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/jython-2.5.3-r2.ebuild,v 1.1 2012/12/02 10:16:55 mgorny Exp $ |
51 |
|
52 |
EAPI="4" |
53 |
|
54 |
JAVA_PKG_IUSE="doc examples source" |
55 |
|
56 |
inherit eutils java-pkg-2 java-ant-2 python-utils-r1 |
57 |
|
58 |
DESCRIPTION="An implementation of Python written in Java" |
59 |
HOMEPAGE="http://www.jython.org" |
60 |
SRC_URI="http://central.maven.org/maven2/org/python/${PN}-installer/${PV}/${PN}-installer-${PV}.jar" |
61 |
|
62 |
LICENSE="PSF-2" |
63 |
SLOT="2.5" |
64 |
KEYWORDS="~amd64 ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos" |
65 |
IUSE="readline" |
66 |
|
67 |
# Missing in installer jar. |
68 |
RESTRICT="test" |
69 |
|
70 |
COMMON_DEP=" |
71 |
!<=dev-java/freemarker-2.3.10 |
72 |
dev-java/antlr:3 |
73 |
dev-java/asm:3 |
74 |
dev-java/guava:0 |
75 |
>=dev-java/java-config-2.1.11-r3 |
76 |
dev-java/jffi:1.0 |
77 |
dev-java/jline:0 |
78 |
dev-java/jnr-constants:0 |
79 |
dev-java/jnr-posix:1.1 |
80 |
java-virtuals/script-api:0 |
81 |
java-virtuals/servlet-api:2.5 |
82 |
readline? ( >=dev-java/libreadline-java-0.8.0:0 )" |
83 |
RDEPEND="${COMMON_DEP} |
84 |
>=virtual/jre-1.5" |
85 |
DEPEND="${COMMON_DEP} |
86 |
>=virtual/jdk-1.5 |
87 |
app-arch/unzip" |
88 |
|
89 |
S="${WORKDIR}" |
90 |
|
91 |
java_prepare() { |
92 |
# src/META-INF/services missing - taking from prebuilt jar |
93 |
pushd src > /dev/null || die |
94 |
jar -xf ../${PN}.jar META-INF/services || die |
95 |
popd > /dev/null |
96 |
|
97 |
find \( -name '*.jar' -o -name '*.class' \ |
98 |
-o -name '*.pyc' -o -name '*.exe' \) -delete |
99 |
|
100 |
epatch "${FILESDIR}/${PN}-2.5.2-build.xml.patch" |
101 |
|
102 |
epatch "${FILESDIR}/${PN}-2.5.2-distutils_byte_compilation.patch" |
103 |
epatch "${FILESDIR}/${PN}-2.5.2-distutils_scripts_location.patch" |
104 |
epatch "${FILESDIR}/${PN}-2.5.2-respect_PYTHONPATH.patch" |
105 |
|
106 |
if ! use readline; then |
107 |
rm -v src/org/python/util/ReadlineConsole.java || die |
108 |
fi |
109 |
} |
110 |
|
111 |
JAVA_ANT_REWRITE_CLASSPATH="yes" |
112 |
JAVA_ANT_CLASSPATH_TAGS+=" java" |
113 |
|
114 |
EANT_BUILD_TARGET="developer-build" |
115 |
EANT_GENTOO_CLASSPATH="asm-3,guava,jffi-1.0,jline,jnr-constants,script-api,servlet-api-2.5" |
116 |
|
117 |
# jdbc-informix and jdbc-oracle-bin (requires registration) aren't exposed. |
118 |
# Uncomment and add to COMMON_DEP if you want either of them |
119 |
#EANT_GENTOO_CLASSPATH+=",jdbc-informix" EANT_EXTRA_ARGS+=" -Dinformix.present" |
120 |
#EANT_GENTOO_CLASSPATH+=",jdbc-oracle-bin" EANT_EXTRA_ARGS+=" -Doracle.present" |
121 |
|
122 |
src_compile() { |
123 |
use readline && EANT_GENTOO_CLASSPATH+=",libreadline-java" |
124 |
|
125 |
EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --with-dependencies antlr-3,jnr-posix-1.1)" |
126 |
EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only ant-core)" |
127 |
|
128 |
sed -i -e "1 a\ |
129 |
CLASSPATH=\"$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}\"" \ |
130 |
bin/jython || die |
131 |
|
132 |
java-pkg-2_src_compile |
133 |
} |
134 |
|
135 |
EANT_TEST_EXTRA_ARGS="-Dpython.home=dist" |
136 |
|
137 |
src_test() { |
138 |
java-pkg-2_src_test |
139 |
} |
140 |
|
141 |
src_install() { |
142 |
java-pkg_newjar dist/${PN}-dev.jar |
143 |
|
144 |
java-pkg_register-optional-dependency jdbc-mysql |
145 |
java-pkg_register-optional-dependency jdbc-postgresql |
146 |
|
147 |
insinto /usr/share/${PN}-${SLOT} |
148 |
doins -r dist/{Lib,registry} |
149 |
|
150 |
dodoc ACKNOWLEDGMENTS NEWS README.txt |
151 |
|
152 |
use doc && java-pkg_dojavadoc dist/Doc/javadoc |
153 |
use source && java-pkg_dosrc src/* |
154 |
use examples && java-pkg_doexamples Demo/* |
155 |
|
156 |
local java_args=( |
157 |
-Dpython.home="${EPREFIX}"/usr/share/${PN}-${SLOT} |
158 |
-Dpython.executable="${EPREFIX}"/usr/bin/jython${SLOT} |
159 |
-Dpython.cachedir="\${HOME}/.jythoncachedir" |
160 |
) |
161 |
java-pkg_dolauncher jython${SLOT} \ |
162 |
--main org.python.util.jython \ |
163 |
--java_args "${java_args[*]}" |
164 |
|
165 |
if use readline; then |
166 |
sed -i -e "/#python.console.readlinelib=JavaReadline/a \ |
167 |
python.console=org.python.util.ReadlineConsole\npython.console.readlinelib=GnuReadline" \ |
168 |
"${ED}"/usr/share/${PN}-${SLOT}/registry || die |
169 |
fi |
170 |
|
171 |
# the jvm opens classfiles rw ... |
172 |
dodir /etc/sandbox.d |
173 |
echo "SANDBOX_PREDICT=/usr/share/${PN}-${SLOT}" > "${ED}/etc/sandbox.d/20${P}-${SLOT}" |
174 |
|
175 |
# we need a wrapper to help python_optimize |
176 |
cat > "${T}"/jython <<_EOF_ || die |
177 |
exec java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \ |
178 |
-Dpython.home="${ED}"/usr/share/${PN}-${SLOT} \ |
179 |
-Dpython.cachedir="${T}/.jythoncachedir" \ |
180 |
org.python.util.jython "\${@}" |
181 |
_EOF_ |
182 |
chmod +x "${T}"/jython || die |
183 |
|
184 |
python_export jython${SLOT} EPYTHON PYTHON_SITEDIR |
185 |
local PYTHON="${T}"/jython |
186 |
|
187 |
# compile tests (everything else is compiled already) |
188 |
# we're keeping it quiet since jython reports errors verbosely |
189 |
# and some of the tests are supposed to trigger compile errors |
190 |
python_optimize "${ED}"/usr/share/jython-${SLOT}/Lib/test &>/dev/null |
191 |
|
192 |
# for python-exec |
193 |
echo "EPYTHON='${EPYTHON}'" > epython.py |
194 |
python_domodule epython.py |
195 |
} |