Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/jython/
Date: Mon, 05 Sep 2022 08:00:44
Message-Id: 1662364829.ad57118c772796532563168fa867352e0cae7669.flow@gentoo
1 commit: ad57118c772796532563168fa867352e0cae7669
2 Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
3 AuthorDate: Mon Sep 5 04:54:43 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 5 08:00:29 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad57118c
7
8 dev-java/jython: drop 2.7.0-r6
9
10 Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
11 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
12
13 dev-java/jython/jython-2.7.0-r6.ebuild | 156 ---------------------------------
14 1 file changed, 156 deletions(-)
15
16 diff --git a/dev-java/jython/jython-2.7.0-r6.ebuild b/dev-java/jython/jython-2.7.0-r6.ebuild
17 deleted file mode 100644
18 index d2b1a1703775..000000000000
19 --- a/dev-java/jython/jython-2.7.0-r6.ebuild
20 +++ /dev/null
21 @@ -1,156 +0,0 @@
22 -# Copyright 1999-2022 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=7
26 -
27 -JAVA_PKG_IUSE="doc source"
28 -MAVEN_ID="org.python:jython:2.7.0"
29 -
30 -inherit java-pkg-2 java-ant-2 python-utils-r1 flag-o-matic
31 -
32 -MY_PV=${PV/_beta/-b}
33 -MY_P=${PN}-${MY_PV}
34 -
35 -DESCRIPTION="An implementation of Python written in Java"
36 -HOMEPAGE="https://www.jython.org"
37 -SRC_URI="https://search.maven.org/remotecontent?filepath=org/python/${PN}/${MY_PV}/${MY_P}-sources.jar"
38 -
39 -LICENSE="PSF-2"
40 -SLOT="2.7"
41 -KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux"
42 -IUSE="examples test"
43 -
44 -CP_DEPEND="dev-java/antlr:3
45 - dev-java/netty:0
46 - dev-java/asm:9
47 - dev-java/commons-compress:0
48 - dev-java/guava:0
49 - dev-java/jffi:1.2
50 - dev-java/jline:2
51 - dev-java/icu4j:70
52 - dev-java/jnr-constants:0
53 - dev-java/jnr-posix:3.0
54 - dev-java/jnr-netdb:1.0
55 - dev-java/stringtemplate:0
56 - dev-java/xerces:2
57 - java-virtuals/servlet-api:3.0"
58 -RDEPEND="${CP_DEPEND}
59 - >=virtual/jre-1.8:*"
60 -DEPEND="${CP_DEPEND}
61 - >=virtual/jdk-1.8:*
62 - dev-java/ant-core:0
63 - test? (
64 - dev-java/junit:4
65 - dev-java/ant-junit:0
66 - )"
67 -BDEPEND="app-arch/unzip"
68 -
69 -S=${WORKDIR}
70 -
71 -RESTRICT="test"
72 -
73 -JAVA_ANT_REWRITE_CLASSPATH="yes"
74 -JAVA_ANT_CLASSPATH_TAGS+=" java"
75 -
76 -EANT_BUILD_TARGET="developer-build"
77 -EANT_TEST_EXTRA_ARGS="-Dpython.home=dist"
78 -
79 -# jdbc-informix and jdbc-oracle-bin (requires registration) aren't exposed.
80 -# Uncomment and add to CDEPEND if you want either of them
81 -#EANT_GENTOO_CLASSPATH+=",jdbc-informix" EANT_EXTRA_ARGS+=" -Dinformix.present"
82 -#EANT_GENTOO_CLASSPATH+=",jdbc-oracle-bin" EANT_EXTRA_ARGS+=" -Doracle.present"
83 -
84 -PATCHES=(
85 - "${FILESDIR}"/${PN}-2.5.2-distutils_scripts_location.patch
86 - "${FILESDIR}"/${PN}-2.5.2-respect_PYTHONPATH.patch
87 - "${FILESDIR}"/${PN}-2.7_beta1-ant.patch
88 - "${FILESDIR}"/${PN}-2.7_beta1-dont-always-recompile-classes.patch
89 - "${FILESDIR}"/${PN}-2.7_beta2-maxrepeat-import.patch
90 - "${FILESDIR}"/${PN}-2.7.0-build.xml.patch
91 - "${FILESDIR}"/CVE-2016-4000.patch
92 -)
93 -
94 -src_prepare() {
95 - default
96 -
97 - find \( -name '*.jar' -o -name '*.class' \
98 - -o -name '*.pyc' -o -name '*.exe' \) -delete
99 -
100 - # needed for launchertest
101 - chmod +x tests/shell/test-jython.sh || die
102 -
103 - # https://bugs.gentoo.org/show_bug.cgi?id=833785
104 - sed -e 's:\(CharMatcher.\)ASCII:\1ascii():' \
105 - -i src/org/python/core/Py{,BaseCode,Unicode}.java || die
106 -
107 - java-pkg-2_src_prepare
108 -}
109 -
110 -src_configure() {
111 - # apparently this can cause problems
112 - append-flags -fno-stack-protector
113 -
114 - EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --with-dependencies antlr-3,jnr-posix-3.0)"
115 - EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only ant-core)"
116 -}
117 -
118 -src_test() {
119 - java-pkg-2_src_test
120 -}
121 -
122 -src_install() {
123 - local instdir=/usr/share/${PN}-${SLOT}
124 -
125 - java-pkg_newjar dist/${PN}-dev.jar
126 -
127 - java-pkg_register-optional-dependency jdbc-mysql
128 - java-pkg_register-optional-dependency jdbc-postgresql
129 -
130 - insinto ${instdir}
131 - doins -r dist/{Lib,registry}
132 -
133 - dodoc ACKNOWLEDGMENTS NEWS README.txt
134 -
135 - use doc && java-pkg_dohtml -r dist/Doc/javadoc
136 - use source && java-pkg_dosrc src/*
137 - use examples && java-pkg_doexamples Demo/*
138 -
139 - local java_args=(
140 - -Dpython.home="${EPREFIX}"/usr/share/${PN}-${SLOT}
141 - -Dpython.executable="${EPREFIX}"/usr/bin/jython${SLOT}
142 - -Dpython.cachedir="\${HOME}/.jythoncachedir"
143 - )
144 -
145 - java-pkg_dolauncher jython${SLOT} \
146 - --main org.python.util.jython \
147 - --java_args "${java_args[*]}"
148 -
149 - # we need a wrapper to help python_optimize
150 - cat <<-EOF > "${T}"/jython
151 - exec java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \
152 - -Dpython.home="${ED}${instdir}" \
153 - -Dpython.cachedir="${T}/.jythoncachedir" \
154 - -Duser.home="${T}" \
155 - org.python.util.jython "\${@}"
156 - EOF
157 - chmod +x "${T}"/jython || die
158 -
159 - local -x PYTHON="${T}"/jython
160 - # we can't get the path from the interpreter since it does some
161 - # magic that fails on non-installed copy...
162 - _python_export jython${SLOT} EPYTHON
163 -
164 - # compile tests (everything else is compiled already)
165 - # we're keeping it quiet since jython reports errors verbosely
166 - # and some of the tests are supposed to trigger compile errors
167 - python_optimize "${ED}${instdir}"/Lib/test &>/dev/null
168 -
169 - # for python-exec
170 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
171 - python_moduleinto "/usr/share/jython-${SLOT}/Lib/site-packages"
172 - python_domodule epython.py
173 -
174 - # some of the class files end up with newer timestamps than the files they
175 - # were generated from, make sure this doesn't happen
176 - find "${ED}${instdir}"/Lib/ -name '*.class' | xargs touch
177 -}