diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2024-06-11 10:34:23 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2024-07-23 20:18:13 +0200 |
commit | bf13cec19b5b29704b91174e832d6f7b0acc94f6 (patch) | |
tree | 3203b0a13eb4e50263592e364f6f7bf47a649f4b /dev-java | |
parent | dev-java/javacc: slot 7.0.4 build without rewrite-xml, drop java-ant-2 (diff) | |
download | gentoo-bf13cec19b5b29704b91174e832d6f7b0acc94f6.tar.gz gentoo-bf13cec19b5b29704b91174e832d6f7b0acc94f6.tar.bz2 gentoo-bf13cec19b5b29704b91174e832d6f7b0acc94f6.zip |
dev-java/javacc: slot 7.0.13 build without rewrite-xml, drop java-ant-2
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/37685
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/javacc/files/javacc-7.0.13-javadoc.patch | 14 | ||||
-rw-r--r-- | dev-java/javacc/files/javacc-7.0.13-source8.patch | 100 | ||||
-rw-r--r-- | dev-java/javacc/javacc-7.0.13-r1.ebuild | 69 |
3 files changed, 183 insertions, 0 deletions
diff --git a/dev-java/javacc/files/javacc-7.0.13-javadoc.patch b/dev-java/javacc/files/javacc-7.0.13-javadoc.patch new file mode 100644 index 000000000000..2849ced4340f --- /dev/null +++ b/dev-java/javacc/files/javacc-7.0.13-javadoc.patch @@ -0,0 +1,14 @@ +diff --git a/build.xml b/build.xml +index bddc709..52f3626 100644 +--- a/build.xml ++++ b/build.xml +@@ -202,9 +202,6 @@ THE POSSIBILITY OF SUCH DAMAGE. + <fileset dir="${java-src}" /> + </javadoc> + +- <zip destfile="${install-name}-javadoc.jar" basedir="${target-folder}/javadoc"> +- </zip> +- + </target> + + diff --git a/dev-java/javacc/files/javacc-7.0.13-source8.patch b/dev-java/javacc/files/javacc-7.0.13-source8.patch new file mode 100644 index 000000000000..544da8197eca --- /dev/null +++ b/dev-java/javacc/files/javacc-7.0.13-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.7" 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.7" 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.7" 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.7" 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 fork="true" 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.7" 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 fork="true" 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.7" 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 fork="true" 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.7" 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 fork="true" 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.7" 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 fork="true" 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.7" 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.7" 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.13-r1.ebuild b/dev-java/javacc/javacc-7.0.13-r1.ebuild new file mode 100644 index 000000000000..83edc96db3e2 --- /dev/null +++ b/dev-java/javacc/javacc-7.0.13-r1.ebuild @@ -0,0 +1,69 @@ +# 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/${P}.tar.gz" +S="${WORKDIR}/${PN}-${P}" + +LICENSE="BSD-2" +SLOT="7.0.13" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + +BDEPEND=">=dev-java/ant-1.10.14:0[junit]" +DEPEND=">=virtual/jdk-1.8:*" +RDEPEND=">=virtual/jre-1.8:*" + +DOCS=( + README.md + docs/faq.md + docs/release-notes.md +) + +PATCHES=( + "${FILESDIR}/javacc-7.0.13-javadoc.patch" + "${FILESDIR}/javacc-7.0.13-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" + + use doc && java-pkg_dojavadoc target/javadoc + + 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 +} |