summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2024-06-10 16:35:04 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2024-07-23 20:18:13 +0200
commit192e24ec75e39c4ca17efabea7588665d084bcce (patch)
tree7da37385dc264baedf8923e5f1213508d70d01a9 /dev-java
parentwww-servers/tomcat: drop 9.0.90-r1, 10.1.25-r1 (diff)
downloadgentoo-192e24ec75e39c4ca17efabea7588665d084bcce.tar.gz
gentoo-192e24ec75e39c4ca17efabea7588665d084bcce.tar.bz2
gentoo-192e24ec75e39c4ca17efabea7588665d084bcce.zip
dev-java/javacc: slot 0 build without rewrite-xml, drop java-ant-2
Bug: https://bugs.gentoo.org/936530 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/javacc/files/javacc-4.1-javadoc.patch16
-rw-r--r--dev-java/javacc/files/javacc-4.1-source8.patch134
-rw-r--r--dev-java/javacc/javacc-4.1-r1.ebuild72
3 files changed, 222 insertions, 0 deletions
diff --git a/dev-java/javacc/files/javacc-4.1-javadoc.patch b/dev-java/javacc/files/javacc-4.1-javadoc.patch
new file mode 100644
index 000000000000..134aaa35abc9
--- /dev/null
+++ b/dev-java/javacc/files/javacc-4.1-javadoc.patch
@@ -0,0 +1,16 @@
+--- a/build.xml
++++ b/build.xml
+@@ -150,5 +150,13 @@
+ <arg line="${version}" />
+ </exec>
+ </target>
++ <target name="javadoc" depends="compile">
++ <javadoc destdir="doc/api" source="8">
++ <packageset dir="src"/>
++ <classpath>
++ <pathelement path="lib/junit3.8.1/junit.jar" />
++ </classpath>
++ </javadoc>
++ </target>
+
+ </project>
diff --git a/dev-java/javacc/files/javacc-4.1-source8.patch b/dev-java/javacc/files/javacc-4.1-source8.patch
new file mode 100644
index 000000000000..6dfc3e47382d
--- /dev/null
+++ b/dev-java/javacc/files/javacc-4.1-source8.patch
@@ -0,0 +1,134 @@
+--- a/build.xml
++++ b/build.xml
+@@ -112,6 +112,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
+ <junit printsummary="yes" haltonfailure="yes">
+ <classpath>
+ <pathelement path="classes" />
++ <pathelement path="lib/junit3.8.1/junit.jar" />
+ </classpath>
+ <batchtest fork="no" todir=".">
+ <fileset dir="classes">
+--- a/src/org/javacc/jjdoc/build.xml
++++ b/src/org/javacc/jjdoc/build.xml
+@@ -46,7 +46,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
+ <javac srcdir="${javacc.root}/src"
+ destdir="${javacc.root}/classes"
+ debug="${build.compiler.debug}"
+- source="1.4"
++ source="8"
++ target="8"
+ classpath="${javacc.root}/classes">
+ </javac>
+ </target>
+--- a/src/org/javacc/jjtree/build.xml
++++ b/src/org/javacc/jjtree/build.xml
+@@ -54,7 +54,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
+ <javac srcdir="${javacc.root}/src"
+ destdir="${javacc.root}/classes"
+ debug="${build.compiler.debug}"
+- source="1.4"
++ source="8"
++ target="8"
+ classpath="${javacc.root}/classes">
+ </javac>
+ </target>
+--- a/src/org/javacc/parser/build.xml
++++ b/src/org/javacc/parser/build.xml
+@@ -52,7 +52,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
+ <javac srcdir="${javacc.root}/src"
+ destdir="${javacc.root}/classes"
+ debug="${build.compiler.debug}"
+- source="1.4"
++ source="8"
++ target="8"
+ classpath="${javacc.root}/classes:${junit.jar}">
+ </javac>
+ </target>
+--- a/test/imports/build.xml
++++ b/test/imports/build.xml
+@@ -41,7 +41,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
+
+ <javac srcdir="out-dir"
+ destdir="out-dir"
+- source="1.4"
++ source="8"
++ target="8"
+ debug="true"
+ classpath="../../bin/lib/javacc.jar">
+ </javac>
+--- a/test/javaFiles/build.xml
++++ b/test/javaFiles/build.xml
+@@ -52,7 +52,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
+
+ <javac srcdir="out-dir"
+ destdir="out-dir/static"
+- source="1.4"
++ source="8"
++ target="8"
+ debug="true"
+ classpath="../../bin/lib/javacc.jar">
+ </javac>
+@@ -74,7 +75,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
+
+ <javac srcdir="out-dir"
+ destdir="out-dir/non-static"
+- source="1.4"
++ source="8"
++ target="8"
+ debug="true"
+ classpath="../../bin/lib/javacc.jar">
+ </javac>
+@@ -99,7 +101,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
+
+ <javac srcdir="out-dir"
+ destdir="out-dir/non-static"
+- source="1.4"
++ source="8"
++ target="8"
+ debug="true"
+ classpath="../../bin/lib/javacc.jar">
+ </javac>
+@@ -126,7 +129,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
+
+ <javac srcdir="out-dir"
+ destdir="out-dir/non-static"
+- source="1.4"
++ source="8"
++ target="8"
+ debug="true"
+ classpath="../../bin/lib/javacc.jar">
+ </javac>
+@@ -152,7 +156,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
+
+ <javac srcdir="out-dir"
+ destdir="out-dir/non-static"
+- source="1.4"
++ source="8"
++ target="8"
+ debug="true"
+ classpath="../../bin/lib/javacc.jar">
+ </javac>
+--- a/test/javacodeLA/build.xml
++++ b/test/javacodeLA/build.xml
+@@ -40,7 +40,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
+
+ <javac srcdir="out-dir"
+ destdir="out-dir"
+- source="1.4"
++ source="8"
++ target="8"
+ debug="true"
+ classpath="../../bin/lib/javacc.jar">
+ </javac>
+--- a/test/lom/build.xml
++++ b/test/lom/build.xml
+@@ -40,7 +40,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
+
+ <javac srcdir="out-dir"
+ destdir="out-dir"
+- source="1.4"
++ source="8"
++ target="8"
+ debug="true"
+ classpath="../../bin/lib/javacc.jar">
+ </javac>
diff --git a/dev-java/javacc/javacc-4.1-r1.ebuild b/dev-java/javacc/javacc-4.1-r1.ebuild
new file mode 100644
index 000000000000..2e24904099d6
--- /dev/null
+++ b/dev-java/javacc/javacc-4.1-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc examples source test"
+MAVEN_ID="net.java.dev.javacc:javacc:${PV}"
+
+inherit java-pkg-2
+
+DESCRIPTION="Java Compiler Compiler - The Java Parser Generator"
+HOMEPAGE="https://javacc.github.io/javacc/"
+SRC_URI="https://github.com/javacc/javacc/archive/release_${PV//./}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/javacc-release_${PV//./}"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+BDEPEND=">=dev-java/ant-1.10.14:0"
+
+DEPEND="
+ dev-java/junit:0
+ >=virtual/jdk-1.8:*
+ test? ( >=dev-java/ant-1.10.14:0[junit] )
+"
+RDEPEND=">=virtual/jre-1.8:*"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.1-javadoc.patch"
+ "${FILESDIR}/javacc-4.1-source8.patch"
+)
+
+src_prepare() {
+ default #780585
+ java-pkg-2_src_prepare
+ java-pkg_clean ! -path "./bootstrap/*"
+ java-pkg_jar-from --into lib/junit3.8.1 junit
+}
+
+src_compile() {
+ eant
+ use doc && eant javadoc
+}
+
+src_test() {
+ eant test
+}
+
+src_install() {
+ java-pkg_dojar bin/lib/"${PN}".jar
+
+ if use doc; then
+ java-pkg_dohtml -r www/*
+ java-pkg_dojavadoc doc/api
+ fi
+
+ use examples && java-pkg_doexamples examples
+ use source && java-pkg_dosrc src/*
+
+ echo "JAVACC_HOME=${EPREFIX}/usr/share/javacc/" > "${T}"/22javacc-${SLOT} || die
+ doenvd "${T}"/22javacc-${SLOT}
+
+ echo "export VERSION=${PV}" > "${T}"/pre || die
+
+ local launcher
+ for launcher in javacc jjdoc jjtree; do
+ java-pkg_dolauncher ${launcher} -pre "${T}"/pre --main ${launcher}
+ done
+
+ einstalldocs
+}