diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2024-06-11 10:31:07 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2024-07-23 20:18:13 +0200 |
commit | 7ae73e5e1ee735153a8ccb043ead9b3ca2cc45e1 (patch) | |
tree | 2f476980d7a2d1d77f5cb3f5d1d02c56fbe35c55 | |
parent | dev-java/javacc: slot 0 build without rewrite-xml, drop java-ant-2 (diff) | |
download | gentoo-7ae73e5e1ee735153a8ccb043ead9b3ca2cc45e1.tar.gz gentoo-7ae73e5e1ee735153a8ccb043ead9b3ca2cc45e1.tar.bz2 gentoo-7ae73e5e1ee735153a8ccb043ead9b3ca2cc45e1.zip |
dev-java/javacc: slot 7.0.4 build without rewrite-xml, drop java-ant-2
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r-- | dev-java/javacc/files/javacc-7.0.4-javadoc.patch | 12 | ||||
-rw-r--r-- | dev-java/javacc/files/javacc-7.0.4-source8.patch | 100 | ||||
-rw-r--r-- | dev-java/javacc/javacc-7.0.4-r1.ebuild | 77 |
3 files changed, 189 insertions, 0 deletions
diff --git a/dev-java/javacc/files/javacc-7.0.4-javadoc.patch b/dev-java/javacc/files/javacc-7.0.4-javadoc.patch new file mode 100644 index 000000000000..57699b5249d5 --- /dev/null +++ b/dev-java/javacc/files/javacc-7.0.4-javadoc.patch @@ -0,0 +1,12 @@ +--- a/build.xml ++++ b/build.xml +@@ -201,9 +201,6 @@ THE POSSIBILITY OF SUCH DAMAGE. + <fileset dir="${generated-src}" /> + <fileset dir="${java-src}" /> + </javadoc> +- +- <zip destfile="${install-name}-javadoc.jar" basedir="${target-folder}/javadoc"> +- </zip> + </target> + + <target name="unittest" depends="jar" description="run JUnit unit test cases" unless="true"> diff --git a/dev-java/javacc/files/javacc-7.0.4-source8.patch b/dev-java/javacc/files/javacc-7.0.4-source8.patch new file mode 100644 index 000000000000..620b1c03f78b --- /dev/null +++ b/dev-java/javacc/files/javacc-7.0.4-source8.patch @@ -0,0 +1,100 @@ +--- a/test/exceptions/build.xml ++++ b/test/exceptions/build.xml +@@ -40,7 +40,7 @@ THE POSSIBILITY OF SUCH DAMAGE. + <arg line="Parser.jj" /> + </java> + +- <javac srcdir="out-dir" destdir="out-dir" source="1.5" debug="true" includeantruntime='false' ++ <javac srcdir="out-dir" destdir="out-dir" source="8" target="8" debug="true" includeantruntime='false' + classpath="../../target/javacc.jar"> + </javac> + +@@ -83,7 +83,7 @@ THE POSSIBILITY OF SUCH DAMAGE. + <arg line="Parser.jj" /> + </java> + +- <javac srcdir="out-dir" destdir="out-dir" source="1.5" includeantruntime='false' ++ <javac srcdir="out-dir" destdir="out-dir" source="8" target="8" includeantruntime='false' + debug="true" + classpath="../../target/javacc.jar"> + </javac> +--- a/test/imports/build.xml ++++ b/test/imports/build.xml +@@ -39,7 +39,7 @@ THE POSSIBILITY OF SUCH DAMAGE. + <arg line="Parser.jj" /> + </java> + +- <javac srcdir="out-dir" destdir="out-dir" source="1.5" debug="true" includeantruntime='false' ++ <javac srcdir="out-dir" destdir="out-dir" source="8" target="8" debug="true" includeantruntime='false' + classpath="../../target/javacc.jar"> + </javac> + +--- a/test/javaFiles/build.xml ++++ b/test/javaFiles/build.xml +@@ -50,7 +50,7 @@ THE POSSIBILITY OF SUCH DAMAGE. + </condition> + </fail> + +- <javac srcdir="out-dir" destdir="out-dir/static" source="1.5" debug="true" includeantruntime='false' ++ <javac srcdir="out-dir" destdir="out-dir/static" source="8" target="8" debug="true" includeantruntime='false' + classpath="../../target/javacc.jar"> + </javac> + <java classname="Parser" classpath="out-dir/static" inputstring="A" failonerror="true"> </java> +@@ -69,7 +69,7 @@ THE POSSIBILITY OF SUCH DAMAGE. + </condition> + </fail> + +- <javac srcdir="out-dir" destdir="out-dir/non-static" source="1.5" debug="true" includeantruntime='false' ++ <javac srcdir="out-dir" destdir="out-dir/non-static" source="8" target="8" debug="true" includeantruntime='false' + classpath="../../target/javacc.jar"> + </javac> + <java classname="Parser" classpath="out-dir/non-static" inputstring="A" failonerror="true"> </java> +@@ -91,7 +91,7 @@ THE POSSIBILITY OF SUCH DAMAGE. + </condition> + </fail> + +- <javac srcdir="out-dir" destdir="out-dir/non-static" source="1.5" debug="true" includeantruntime='false' ++ <javac srcdir="out-dir" destdir="out-dir/non-static" source="8" target="8" debug="true" includeantruntime='false' + classpath="../../target/javacc.jar"> + </javac> + <java classname="Parser" classpath="out-dir/non-static" inputstring="A" failonerror="true"> </java> +@@ -115,7 +115,7 @@ THE POSSIBILITY OF SUCH DAMAGE. + </fail> + + +- <javac srcdir="out-dir" destdir="out-dir/non-static" source="1.5" debug="true" includeantruntime='false' ++ <javac srcdir="out-dir" destdir="out-dir/non-static" source="8" target="8" debug="true" includeantruntime='false' + classpath="../../target/javacc.jar"> + </javac> + <java classname="Parser" classpath="out-dir/non-static" inputstring="A" failonerror="true"> </java> +@@ -138,7 +138,7 @@ THE POSSIBILITY OF SUCH DAMAGE. + </fail> + + +- <javac srcdir="out-dir" destdir="out-dir/non-static" source="1.5" debug="true" includeantruntime='false' ++ <javac srcdir="out-dir" destdir="out-dir/non-static" source="8" debug="true" includeantruntime='false' + classpath="../../target/javacc.jar"> + </javac> + <java classname="Parser" classpath="out-dir/non-static" inputstring="A" failonerror="true"> </java> +--- a/test/javacodeLA/build.xml ++++ b/test/javacodeLA/build.xml +@@ -38,7 +38,7 @@ THE POSSIBILITY OF SUCH DAMAGE. + <arg line="javacode.jj" /> + </java> + +- <javac srcdir="out-dir" destdir="out-dir" source="1.5" debug="true" includeantruntime='false' ++ <javac srcdir="out-dir" destdir="out-dir" source="8" target="8" debug="true" includeantruntime='false' + classpath="../../target/javacc.jar"> + </javac> + +--- a/test/lom/build.xml ++++ b/test/lom/build.xml +@@ -38,7 +38,7 @@ THE POSSIBILITY OF SUCH DAMAGE. + <arg line="Parser.jj" /> + </java> + +- <javac srcdir="out-dir" destdir="out-dir" source="1.5" debug="true" includeantruntime='false' ++ <javac srcdir="out-dir" destdir="out-dir" source="8" target="8" debug="true" includeantruntime='false' + classpath="../../target/javacc.jar"> + </javac> + diff --git a/dev-java/javacc/javacc-7.0.4-r1.ebuild b/dev-java/javacc/javacc-7.0.4-r1.ebuild new file mode 100644 index 000000000000..41b912eee734 --- /dev/null +++ b/dev-java/javacc/javacc-7.0.4-r1.ebuild @@ -0,0 +1,77 @@ +# 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/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="7.0.4" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +BDEPEND=">=dev-java/ant-1.10.14-r3:0" + +DEPEND=" + >=virtual/jdk-1.8:* + test? ( >=dev-java/ant-1.10.14:0[junit] )" + +RDEPEND=">=virtual/jre-1.8:*" + +DOCS=( + README + javacc-releases.notes + jjdoc-releases.notes + jjtree-releases.notes + release.notes +) + +PATCHES=( + "${FILESDIR}/javacc-7.0.4-javadoc.patch" + "${FILESDIR}/javacc-7.0.4-source8.patch" +) + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + java-pkg_clean ! -path "./bootstrap/*" +} + +src_compile() { + eant -Dant.build.javac.source="8" -Dant.build.javac.target="8" + use doc && eant javadoc -Dant.build.javac.source="8" -Dant.build.javac.target="8" +} + +src_test() { + eant test -Dant.build.javac.source="8" -Dant.build.javac.target="8" +} + +src_install() { + java-pkg_dojar "target/${PN}.jar" + + if use doc; then + java-pkg_dohtml -r www/* + java-pkg_dojavadoc target/javadoc + 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}-${SLOT} -pre "${T}"/pre --main ${launcher} + done + + einstalldocs +} |