1 |
chutzpah 14/06/27 22:27:42 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: jython-2.7_beta2.ebuild |
5 |
Log: |
6 |
Version bump. |
7 |
|
8 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xE3F69979BB4B8928DA78E3D17CBF44EF) |
9 |
|
10 |
Revision Changes Path |
11 |
1.92 dev-java/jython/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/ChangeLog?rev=1.92&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/ChangeLog?rev=1.92&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/ChangeLog?r1=1.91&r2=1.92 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v |
20 |
retrieving revision 1.91 |
21 |
retrieving revision 1.92 |
22 |
diff -u -r1.91 -r1.92 |
23 |
--- ChangeLog 24 Apr 2014 22:55:35 -0000 1.91 |
24 |
+++ ChangeLog 27 Jun 2014 22:27:42 -0000 1.92 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for dev-java/jython |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.91 2014/04/24 22:55:35 chutzpah Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.92 2014/06/27 22:27:42 chutzpah Exp $ |
30 |
+ |
31 |
+*jython-2.7_beta2 (27 Jun 2014) |
32 |
+ |
33 |
+ 27 Jun 2014; Patrick McLean <chutzpah@g.o> +jython-2.7_beta2.ebuild: |
34 |
+ Version bump. |
35 |
|
36 |
24 Apr 2014; Patrick McLean <chutzpah@g.o> jython-2.5.3-r3.ebuild, |
37 |
jython-2.7_beta1.ebuild: |
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-java/jython/jython-2.7_beta2.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/jython-2.7_beta2.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/jython-2.7_beta2.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: jython-2.7_beta2.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2014 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.7_beta2.ebuild,v 1.1 2014/06/27 22:27:42 chutzpah Exp $ |
51 |
|
52 |
EAPI=5 |
53 |
JAVA_PKG_IUSE="doc examples source" |
54 |
|
55 |
inherit eutils java-pkg-2 java-ant-2 python-utils-r1 flag-o-matic |
56 |
|
57 |
MY_PV=${PV/_beta/-b} |
58 |
MY_P=${PN}-${MY_PV} |
59 |
|
60 |
DESCRIPTION="An implementation of Python written in Java" |
61 |
HOMEPAGE="http://www.jython.org" |
62 |
SRC_URI="http://search.maven.org/remotecontent?filepath=org/python/${PN}/${MY_PV}/${MY_P}-sources.jar" |
63 |
|
64 |
LICENSE="PSF-2" |
65 |
SLOT="2.7" |
66 |
KEYWORDS="~amd64 ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos" |
67 |
IUSE="+readline test" |
68 |
REQUIRED_USE="test? ( readline )" |
69 |
|
70 |
COMMON_DEP=" |
71 |
dev-java/antlr:3 |
72 |
dev-java/asm:4 |
73 |
dev-java/commons-compress:0 |
74 |
dev-java/guava:13 |
75 |
>=dev-java/java-config-2.1.11-r3 |
76 |
dev-java/jffi:1.2 |
77 |
dev-java/jline:0 |
78 |
dev-java/icu4j:52 |
79 |
dev-java/jnr-constants:0 |
80 |
dev-java/jnr-posix:2.1 |
81 |
dev-java/stringtemplate:0 |
82 |
dev-java/xerces:2 |
83 |
java-virtuals/script-api:0 |
84 |
java-virtuals/servlet-api:2.5 |
85 |
readline? ( >=dev-java/libreadline-java-0.8.0:0 )" |
86 |
RDEPEND="${COMMON_DEP} |
87 |
>=virtual/jre-1.5" |
88 |
DEPEND="${COMMON_DEP} |
89 |
>=virtual/jdk-1.5 |
90 |
app-arch/unzip |
91 |
test? ( |
92 |
dev-java/junit:4 |
93 |
dev-java/ant-junit:0 |
94 |
)" |
95 |
|
96 |
S=${WORKDIR} |
97 |
|
98 |
RESTRICT="test" |
99 |
|
100 |
JAVA_ANT_REWRITE_CLASSPATH="yes" |
101 |
EANT_GENTOO_CLASSPATH="asm-4,commons-compress,guava-13,jffi-1.2,jline,jnr-constants" |
102 |
EANT_GENTOO_CLASSPATH+=",script-api,servlet-api-2.5,stringtemplate,xerces-2,icu4j-52" |
103 |
JAVA_ANT_CLASSPATH_TAGS+=" java" |
104 |
|
105 |
EANT_BUILD_TARGET="developer-build" |
106 |
EANT_TEST_EXTRA_ARGS="-Dpython.home=dist" |
107 |
|
108 |
# jdbc-informix and jdbc-oracle-bin (requires registration) aren't exposed. |
109 |
# Uncomment and add to COMMON_DEP if you want either of them |
110 |
#EANT_GENTOO_CLASSPATH+=",jdbc-informix" EANT_EXTRA_ARGS+=" -Dinformix.present" |
111 |
#EANT_GENTOO_CLASSPATH+=",jdbc-oracle-bin" EANT_EXTRA_ARGS+=" -Doracle.present" |
112 |
|
113 |
java_prepare() { |
114 |
find \( -name '*.jar' -o -name '*.class' \ |
115 |
-o -name '*.pyc' -o -name '*.exe' \) -delete |
116 |
|
117 |
epatch "${FILESDIR}"/${PN}-2.5.2-distutils_scripts_location.patch |
118 |
epatch "${FILESDIR}"/${PN}-2.5.2-respect_PYTHONPATH.patch |
119 |
epatch "${FILESDIR}"/${PN}-2.7_beta1-ant.patch |
120 |
epatch "${FILESDIR}"/${PN}-2.7_beta1-dont-always-recompile-classes.patch |
121 |
|
122 |
if ! use readline; then |
123 |
rm -v src/org/python/util/ReadlineConsole.java || die |
124 |
fi |
125 |
|
126 |
# needed for launchertest |
127 |
chmod +x tests/shell/test-jython.sh || die |
128 |
|
129 |
# apparently this can cause problems |
130 |
append-flags -fno-stack-protector |
131 |
} |
132 |
|
133 |
src_compile() { |
134 |
use readline && EANT_GENTOO_CLASSPATH+=",libreadline-java" |
135 |
|
136 |
EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --with-dependencies antlr-3,jnr-posix-2.1)" |
137 |
EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only ant-core)" |
138 |
|
139 |
sed -i -e "1 a\ |
140 |
CLASSPATH=\"$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}\"" \ |
141 |
src/shell/jython || die |
142 |
|
143 |
java-pkg-2_src_compile |
144 |
} |
145 |
|
146 |
src_test() { |
147 |
java-pkg-2_src_test |
148 |
} |
149 |
|
150 |
src_install() { |
151 |
local instdir=/usr/share/${PN}-${SLOT} |
152 |
|
153 |
java-pkg_newjar dist/${PN}-dev.jar |
154 |
|
155 |
java-pkg_register-optional-dependency jdbc-mysql |
156 |
java-pkg_register-optional-dependency jdbc-postgresql |
157 |
|
158 |
insinto ${instdir} |
159 |
doins -r dist/{Lib,registry} |
160 |
|
161 |
dodoc ACKNOWLEDGMENTS NEWS README.txt |
162 |
|
163 |
use doc && java-pkg_dojavadoc dist/Doc/javadoc |
164 |
use source && java-pkg_dosrc src/* |
165 |
use examples && java-pkg_doexamples Demo/* |
166 |
|
167 |
local java_args=( |
168 |
-Dpython.home="${EPREFIX}"/usr/share/${PN}-${SLOT} |
169 |
-Dpython.executable="${EPREFIX}"/usr/bin/jython${SLOT} |
170 |
-Dpython.cachedir="\${HOME}/.jythoncachedir" |
171 |
) |
172 |
|
173 |
java-pkg_dolauncher jython${SLOT} \ |
174 |
--main org.python.util.jython \ |
175 |
--java_args "${java_args[*]}" |
176 |
|
177 |
if use readline; then |
178 |
sed \ |
179 |
-e "s/#\(python.console=org.python.util.ReadlineConsole\)/\1/" \ |
180 |
-e "/#python.console.readlinelib=JavaReadline/a python.console.readlinelib=GnuReadline" \ |
181 |
-i "${ED}"/usr/share/${PN}-${SLOT}/registry || die |
182 |
fi |
183 |
|
184 |
# we need a wrapper to help python_optimize |
185 |
cat <<-EOF > "${T}"/jython |
186 |
exec java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \ |
187 |
-Dpython.home="${ED}${instdir}" \ |
188 |
-Dpython.cachedir="${T}/.jythoncachedir" \ |
189 |
-Duser.home="${T}" \ |
190 |
org.python.util.jython "\${@}" |
191 |
EOF |
192 |
chmod +x "${T}"/jython || die |
193 |
|
194 |
python_export jython${SLOT} EPYTHON PYTHON_SITEDIR |
195 |
local PYTHON="${T}"/jython |
196 |
|
197 |
# compile tests (everything else is compiled already) |
198 |
# we're keeping it quiet since jython reports errors verbosely |
199 |
# and some of the tests are supposed to trigger compile errors |
200 |
python_optimize "${ED}${instdir}"/Lib/test &>/dev/null |
201 |
|
202 |
# for python-exec |
203 |
echo "EPYTHON='${EPYTHON}'" > epython.py |
204 |
python_domodule epython.py |
205 |
|
206 |
# some of the class files end up with newer timestamps than the files they |
207 |
# were generated from, make sure this doesn't happen |
208 |
find "${ED}${instdir}"/Lib/ -name '*.class' | xargs touch |
209 |
} |
210 |
|
211 |
pkg_postinst() { |
212 |
if ! has_version dev-java/jython ; then |
213 |
elog |
214 |
elog "readline can be configured in the registry:" |
215 |
elog |
216 |
elog "python.console=org.python.util.ReadlineConsole" |
217 |
elog "python.console.readlinelib=GnuReadline" |
218 |
elog |
219 |
elog "Global registry: '${EROOT}usr/share/${PN}-${SLOT}/registry'" |
220 |
elog "User registry: '~/.jython'" |
221 |
elog "See http://www.jython.org/docs/registry.html for more information." |
222 |
elog |
223 |
fi |
224 |
} |