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