From 19289510ff807fbb9be918d3a0ce3f206625f002 Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Tue, 16 Mar 2021 13:53:10 +0000 Subject: Adding metadata --- dev-java/javacup/javacup-0.11b_p20151001-r1.ebuild | 91 +++++++++++++++ dev-java/jflex/jflex-1.6.1-r1.ebuild | 123 +++++++++++++++++++++ .../xalan-serializer-2.7.2-r1.ebuild | 41 +++++++ 3 files changed, 255 insertions(+) create mode 100644 dev-java/javacup/javacup-0.11b_p20151001-r1.ebuild create mode 100644 dev-java/jflex/jflex-1.6.1-r1.ebuild create mode 100644 dev-java/xalan-serializer/xalan-serializer-2.7.2-r1.ebuild (limited to 'dev-java') diff --git a/dev-java/javacup/javacup-0.11b_p20151001-r1.ebuild b/dev-java/javacup/javacup-0.11b_p20151001-r1.ebuild new file mode 100644 index 000000000000..587cf479708e --- /dev/null +++ b/dev-java/javacup/javacup-0.11b_p20151001-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-ant-2 + +MY_PV=${PV/_beta/-} +MY_PV=${MY_PV/_p/-} +MY_PV=${MY_PV#0.} +MY_P=java-cup-${MY_PV%-*} + +DESCRIPTION="CUP Parser Generator for Java" +HOMEPAGE="http://www2.cs.tum.edu/projects/cup/" +SRC_URI="http://www2.cs.tum.edu/projects/cup/releases/java-cup-src-${MY_PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +DEPEND="dev-java/ant-core:0 + dev-java/jflex:0 + >=virtual/jdk-1.8:*" + +RDEPEND=">=virtual/jre-1.8:*" + +JAVA_ANT_REWRITE_CLASSPATH="yes" +JAVA_ANT_CLASSPATH_TAGS+=" taskdef" + +S="${WORKDIR}" + +src_prepare() { + default + # Bizarrely, you can't build from the tarball without this patch. + eapply "${FILESDIR}"/${PN}-0.11b_beta20150326-build-xml-svn.patch + + # The JFlex package name has changed to lower case. + sed -i "s/JFlex\./jflex./g" build.xml || die + + # Remove the bundled JFlex. + rm -v bin/JFlex.jar || die +} + +src_configure() { + EANT_GENTOO_CLASSPATH_EXTRA=$(java-pkg_getjars --build-only ant-core,jflex) + java-ant-2_src_configure +} + +src_compile() { + # Annoyingly javacup bundles an older version of itself that will + # break jflex if that has already been built against this newer + # version beforehand. Even more annoyingly, the binary download is + # built with Java 8, which isn't much use to us. We therefore use + # any installed javacup that is newer than the bundled version where + # possible. If this approach turns out to be unworkable then we may + # just have to use the bundled jflex for bootstrapping. + if has_version \>=${CATEGORY}/${PN}-0.11b:${SLOT}; then + # Use PORTAGE_QUIET to suppress a QA warning that is spurious + # thanks to has_version above. This is Portage-specific but + # showing the warning elsewhere isn't the end of the world. + einfo "Bootstrapping with installed javacup ..." + EANT_GENTOO_CLASSPATH_EXTRA+=":$(PORTAGE_QUIET=1 java-pkg_getjars --build-only javacup)" eant + else + einfo "Bootstrapping with bundled javacup ..." + EANT_GENTOO_CLASSPATH_EXTRA+=":${S}/bin/${MY_P:0:-1}.jar" eant + fi + + # Clean everything except the new jar. + rm -rv java/ classes/ || die + + einfo "Recompiling with newly built javacup ..." + EANT_GENTOO_CLASSPATH_EXTRA+=":${S}/dist/${MY_P}.jar" eant + + use doc && ejavadoc -sourcepath src/ -d javadoc java_cup +} + +src_install() { + java-pkg_newjar dist/${MY_P}.jar + java-pkg_newjar dist/${MY_P}-runtime.jar ${PN}-runtime.jar + java-pkg_dolauncher ${PN} --jar ${PN}.jar + java-pkg_register-ant-task + + dodoc changelog.txt + docinto html + dodoc manual.html + + use source && java-pkg_dosrc java/* + use doc && java-pkg_dojavadoc javadoc +} diff --git a/dev-java/jflex/jflex-1.6.1-r1.ebuild b/dev-java/jflex/jflex-1.6.1-r1.ebuild new file mode 100644 index 000000000000..0306f5b66439 --- /dev/null +++ b/dev-java/jflex/jflex-1.6.1-r1.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="JFlex is a lexical analyzer generator for Java" +HOMEPAGE="https://www.jflex.de/" +SRC_URI="https://${PN}.de/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~ppc-macos ~x64-macos" +IUSE="examples test vim-syntax" +RESTRICT="!test? ( test )" + +CDEPEND="dev-java/ant-core:0" + +RDEPEND=">=virtual/jre-1.8:* + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + ${CDEPEND}" + +DEPEND="dev-java/javacup:0 + >=virtual/jdk-1.8:* + test? ( dev-java/junit:4 ) + ${CDEPEND}" + +PDEPEND="dev-java/javacup:0" + +S="${WORKDIR}/${P}" +JAVA_SRC_DIR="src/main/java" + +src_prepare() { + # See below for details. + eapply_user "${FILESDIR}/icedtea-arm.patch" + + # We need the bundled jflex.jar. + rm -rv ${JAVA_SRC_DIR}/java_cup examples/pom.xml || die + + # Remove the bundled java-cup.jar if unneeded. + if has_version ${PDEPEND}; then + rm -v lib/java-cup-*.jar || die + fi +} + +src_configure() { + # javacup is a cyclic dependency. Use the package if we have it, + # otherwise use the bundled version and install the package later. + if has_version ${PDEPEND}; then + # Use PORTAGE_QUIET to suppress a QA warning that is spurious + # thanks to has_version above. This is Portage-specific but + # showing the warning elsewhere isn't the end of the world. + JAVACUP=$(PORTAGE_QUIET=1 java-pkg_getjar --build-only javacup javacup.jar) + else + JAVACUP=$(echo lib/java-cup-*.jar) + fi + + JAVA_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --build-only ant-core):${JAVACUP}" +} + +jflex_compile() { + java "${@}" jflex.Main -d ${JAVA_SRC_DIR}/${PN} --skel src/main/${PN}/skeleton.nested src/main/${PN}/LexScan.flex || die + java-pkg-simple_src_compile + java-pkg_addres ${PN}.jar src/main/resources +} + +src_compile() { + java -jar "${JAVACUP}" -destdir ${JAVA_SRC_DIR}/${PN} -package ${PN} -parser LexParse -interface src/main/cup/LexParse.cup || die + + # The IcedTea ARM HotSpot port (as of 2.6.1) hangs when running + # jflex. We have patched jflex to fix it but we have to run the + # bundled version first. -Xint works around the problem. See + # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2678. + use arm && local JFLEX_ARGS="-Xint" + + # First compile (without doc/source) using the bundled jflex. + JAVA_PKG_IUSE= jflex_compile -cp "lib/${P}.jar:${JAVACUP}" ${JFLEX_ARGS} + + # Then recompile using the fresh jflex. + jflex_compile -cp "${PN}.jar:${JAVACUP}" +} + +src_install() { + java-pkg-simple_src_install + java-pkg_dolauncher ${PN} --main ${PN}.Main + + java-pkg_register-dependency javacup javacup-runtime.jar + java-pkg_register-ant-task + + use examples && java-pkg_doexamples examples + dodoc {changelog,README}.md + + if use doc; then + dodoc doc/*.pdf + docinto html + dodoc doc/*.{css,html,png} doc/COPYRIGHT + fi + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/syntax + doins lib/${PN}.vim + fi +} + +src_test() { + if use arm && java-pkg_current-vm-matches oracle-jdk-bin-1.8; then + # This results in a StackOverflowError as of 1.8.0.65 but works + # fine on icedtea:7. Don't know about icedtea:8 yet. + rm -v src/test/java/jflex/EmitterTest.java || die + fi + + local CP="src/test/java:${PN}.jar:${JAVA_GENTOO_CLASSPATH_EXTRA}:$(java-pkg_getjars junit-4)" + + local TESTS=$(find src/test/java -name "*Test*.java" -printf "%P\n") + TESTS="${TESTS//.java}" + TESTS="${TESTS//\//.}" + + ejavac -classpath "${CP}" $(find src/test/java -name "*.java") + ejunit4 -classpath "${CP}" ${TESTS} +} diff --git a/dev-java/xalan-serializer/xalan-serializer-2.7.2-r1.ebuild b/dev-java/xalan-serializer/xalan-serializer-2.7.2-r1.ebuild new file mode 100644 index 000000000000..1f6ae506e46a --- /dev/null +++ b/dev-java/xalan-serializer/xalan-serializer-2.7.2-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-pkg-simple + +MY_PV="$(ver_rs 1- '_')" +MY_P="xalan-j_${MY_PV}" + +DESCRIPTION="DOM Level 3 serializer from Apache Xalan, shared by Xalan and Xerces" +HOMEPAGE="https://xalan.apache.org/" +SRC_URI="mirror://apache/xalan/xalan-j/source/${MY_P}-src.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND=">=virtual/jre-1.8:*" +DEPEND=">=virtual/jdk-1.8:*" + +JAVA_SRC_DIR="src" +JAVA_RESOURCE_DIRS="resources" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + # kill all non-serializer sources to ease javadocs and dosrc + find src/org/ -type f ! -path "src/org/apache/xml/serializer/*" -delete || die + + # remove bundled jars + find -name "*.jar" -delete || die + rm src/*.tar.gz || die + + # move resources elsewhere + mkdir -p resources/org/apache/xml/serializer || die + mv src/org/apache/xml/serializer/*.properties resources/org/apache/xml/serializer/ || die +} -- cgit v1.3.1