From 0a3feeaba4dbc58966dccdbbfcd7fb14deef0831 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 16 Jun 2024 00:09:44 +0100 Subject: gentoo auto-resync : 16:06:2024 - 00:09:44 --- app-text/trang/Manifest | 2 +- app-text/trang/trang-20220510-r1.ebuild | 117 ++++++++++++++++++++++++++++++++ app-text/trang/trang-20220510.ebuild | 115 ------------------------------- 3 files changed, 118 insertions(+), 116 deletions(-) create mode 100644 app-text/trang/trang-20220510-r1.ebuild delete mode 100644 app-text/trang/trang-20220510.ebuild (limited to 'app-text/trang') diff --git a/app-text/trang/Manifest b/app-text/trang/Manifest index 01da655ab81a..0853192c22a5 100644 --- a/app-text/trang/Manifest +++ b/app-text/trang/Manifest @@ -5,5 +5,5 @@ AUX trang-20220510-CompactSyntaxTokenManager.patch 5081 BLAKE2B 81533757c5c0088d DIST trang-20181222.tar.gz 14847113 BLAKE2B 335722853b2d373fd9a6e9d4478b8248ca49d0559d5a8f60566f5550e60d5a004f26338897617acc617f84d1d55546afb9c51da64b7634514fa2ec508fa7a47a SHA512 fa412a5beeff07a620c4aa5723cf5b73bdb6b1cda561e3bf7764a609110f538da5313bcc79aca4d7742f71b3b071d3537681845d17ece46bc871c0964f4e251d DIST trang-20220510.tar.gz 14317698 BLAKE2B b7337e9555094989955e33f711db9981521c31a3708dd6a862f36cecae0496d8c86fdf09b2d60b8646d8e35e214f57ba7bcd49773fe002eef26ed6b81b4101c1 SHA512 51c44817b396ec45bb82987e0aee8e8d2e5f3f6a1e2f967bae717a31b1bd49c5fc7015466104b19ac62de6ee0270c018dcf19b467763ad1aaa92800bd4edd7a0 EBUILD trang-20181222.ebuild 2222 BLAKE2B beab45edaad346bdf72e21de7e9b14b8a4e6ac792cbea7d01579709443078be1b8231bdf9c47759b5253e32cc2ae3442370280411fe2994488db08e8a377ed11 SHA512 76e9d9de00d100cde4e6641772fe1ab6a591646907752ad4e015b369108799cdcb453910e387c8a3fa35ac64b5e7189e31b0296dc8d5668c11a31ca5b76c271b -EBUILD trang-20220510.ebuild 3888 BLAKE2B 7e0cfcee6b49bb8b20e8ba6c7ace218064011c413d1127ea7e84690f0fd0ebd1249ef6a26ec5b80d1727bd973932df7a434bb81b08b07136cb68fefb4bd9c732 SHA512 73253d3c9fc6f5de837ead6a39abc5e18572bb100cb08154f63e72d8beff93be341909d44cebf9887f265819830b043169c8957e8fd25e7330dd32315edfff14 +EBUILD trang-20220510-r1.ebuild 3928 BLAKE2B 90d142d78f66e77a5e04febe4a480156191d6e34f1088f3dc9ba676b3e13a4579c0109735cbfe9d9ac065e8af0c61ea533bce7506cc0a6cedc7e54726350f1d8 SHA512 a8f1c76631fa5b635e98464464c8c2717a519cbd5ecec902f2204cd9e9490d2b3207bbe6e59a63a36cbcad4872e6b3ea071026d67f26d7a44bafb1304c4c3b33 MISC metadata.xml 320 BLAKE2B dbc3c73e63a4eba52a905b023fd13c905a367c50b84f2114f1bee024f6e7787dfb02627aa30c83e17ffd90d763f9a977ad912a4429fe63a957120b7fd63ff34b SHA512 cd56de97d8e9b4439babc24fe21cc1b25f367598de0c4fc819ed24b17bfab70167495b00a065662f79b4315008fb65823dff6e6605d8939f697332f2a01eec36 diff --git a/app-text/trang/trang-20220510-r1.ebuild b/app-text/trang/trang-20220510-r1.ebuild new file mode 100644 index 000000000000..a75b2c67d591 --- /dev/null +++ b/app-text/trang/trang-20220510-r1.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc test" +JAVA_TESTING_FRAMEWORKS="testng" + +inherit java-pkg-2 java-pkg-simple prefix + +DESCRIPTION="Multi-format schema converter based on RELAX NG" +HOMEPAGE="http://thaiopensource.com/relaxng/trang.html" +SRC_URI="https://github.com/relaxng/jing-trang/archive/V${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/jing-${P}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +BDEPEND=" + app-i18n/unicode-data + dev-java/saxon:9 +" +CP_DEPEND=" + dev-java/xerces:2 + dev-java/xml-commons-resolver:0 +" +RDEPEND="${CP_DEPEND} + >=virtual/jre-1.8:*" +JAVACC_SLOT="7.0.13" + +#934306 restrict to >=virtual/jdk-11:* +DEPEND="${CP_DEPEND} + dev-java/javacc:${JAVACC_SLOT} + dev-java/testng:0 + >=virtual/jdk-11:*" + +JAVA_TEST_RESOURCE_DIRS="src/test" +JAVA_TEST_SRC_DIR="src/test" + +src_prepare() { + java-pkg-2_src_prepare + java-pkg_clean + + eprefixify mod/regex/mod.xml # Do we still need this? + + # separating some sources which are needed only for compilation + mkdir helper || die + cp -r mod/{catalog,datatype,jaxp,pattern,resolver,rng-parse}/src helper || die + + # most of the mods are not needed for the final trang.jar + rm -r mod/{dtdinst,nvdl,picl,rng-jarv,rng-validate,schematron,validate,xerces} || die + rm -r mod/{jaxp,pattern,rng-jaxp} || die + + # move all remainig stuff to "src/main" resp. "src/test" + mkdir -p resources src meta/META-INF/services || die + mv {mod/,}regex-gen || die # but not this one which is needed in two JAVA_SRC_DIRs + cp -r mod/*/src/{main,test} src || die + + # populate META-INF/services + echo com.thaiopensource.datatype.xsd.DatatypeLibraryFactoryImpl \ + > meta/META-INF/services/org.relaxng.datatype.DatatypeLibraryFactory || die + echo com.thaiopensource.datatype.xsd.regex.xerces2.RegexEngineImpl \ + > meta/META-INF/services/com.thaiopensource.datatype.xsd.regex.RegexEngine || die + + echo "version=${PV}" \ + > src/main/com/thaiopensource/relaxng/translate/resources/Version.properties || die + + # java-pkg-simple expects resources in JAVA_RESOURCE_DIRS + find src -type f ! -name '*.java' ! -name 'CompactSyntax.jj' ! -name 'package.html' \ + | xargs cp --parent -t resources || die + + # code generation according to mod/rng-parse/mod.xml + local OUT_DIR="gensrc/main/com/thaiopensource/relaxng/parse/compact" + mkdir -p "${OUT_DIR}" + "javacc-${JAVACC_SLOT}" -GRAMMAR_ENCODING=UTF-8 \ + -JDK_VERSION=1.8 \ + -OUTPUT_DIRECTORY="${OUT_DIR}" \ + helper/src/main/com/thaiopensource/relaxng/parse/compact/CompactSyntax.jj \ + || die "Code generation with java.jj failed" + rm "${OUT_DIR}/JavaCharStream.java" || die + + # mod/rng-parse/mod.xml lines 16-17 - 's/java.io.IOException/EOFException/' + eapply "${FILESDIR}/trang-20220510-CompactSyntaxTokenManager.patch" || die +} + +src_compile() { + einfo "Compiling some classes needed for code generation" + ejavac -d util \ + $(find regex-gen/src/main mod/util/src/main -name "*.java") || die + + einfo "Code generation" + "$(java-config -J)" -cp "util" \ + com.thaiopensource.datatype.xsd.regex.java.gen.NamingExceptionsGen \ + "com.thaiopensource.datatype.xsd.regex.java.NamingExceptions" \ + "src/main" || die + + "$(java-config -J)" -cp "util" \ + com.thaiopensource.datatype.xsd.regex.java.gen.CategoriesGen \ + "com.thaiopensource.datatype.xsd.regex.java.Categories" \ + "src/main" \ + "/usr/share/unicode-data/UnicodeData.txt" || die + + einfo "Compiling classes which are not needed for the final trang.jar" + ejavac -d helper \ + -cp "util:$(java-pkg_getjars --build-only xml-commons-resolver)" \ + $(find gensrc/main helper/src/main -name "*.java") || die + + einfo "Compiling trang.jar" + JAVA_CLASSPATH_EXTRA="testng" + JAVA_GENTOO_CLASSPATH_EXTRA="util:helper" + JAVA_JAR_FILENAME="trang.jar" + JAVA_MAIN_CLASS="com.thaiopensource.relaxng.translate.Driver" + JAVA_RESOURCE_DIRS=( meta resources/src/main ) + JAVA_SRC_DIR=( {gen,}src/main ) + java-pkg-simple_src_compile +} diff --git a/app-text/trang/trang-20220510.ebuild b/app-text/trang/trang-20220510.ebuild deleted file mode 100644 index 9b9eb123a90c..000000000000 --- a/app-text/trang/trang-20220510.ebuild +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -JAVA_PKG_IUSE="doc test" -JAVA_TESTING_FRAMEWORKS="testng" - -inherit java-pkg-2 java-pkg-simple prefix - -DESCRIPTION="Multi-format schema converter based on RELAX NG" -HOMEPAGE="http://thaiopensource.com/relaxng/trang.html" -SRC_URI="https://github.com/relaxng/jing-trang/archive/V${PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/jing-${P}" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -BDEPEND=" - app-i18n/unicode-data - dev-java/saxon:9 -" -CP_DEPEND=" - dev-java/xerces:2 - dev-java/xml-commons-resolver:0 -" -RDEPEND="${CP_DEPEND} - >=virtual/jre-1.8:*" -JAVACC_SLOT="7.0.13" -DEPEND="${CP_DEPEND} - dev-java/javacc:${JAVACC_SLOT} - dev-java/testng:0 - >=virtual/jdk-1.8:*" - -JAVA_TEST_RESOURCE_DIRS="src/test" -JAVA_TEST_SRC_DIR="src/test" - -src_prepare() { - java-pkg-2_src_prepare - java-pkg_clean - - eprefixify mod/regex/mod.xml # Do we still need this? - - # separating some sources which are needed only for compilation - mkdir helper || die - cp -r mod/{catalog,datatype,jaxp,pattern,resolver,rng-parse}/src helper || die - - # most of the mods are not needed for the final trang.jar - rm -r mod/{dtdinst,nvdl,picl,rng-jarv,rng-validate,schematron,validate,xerces} || die - rm -r mod/{jaxp,pattern,rng-jaxp} || die - - # move all remainig stuff to "src/main" resp. "src/test" - mkdir -p resources src meta/META-INF/services || die - mv {mod/,}regex-gen || die # but not this one which is needed in two JAVA_SRC_DIRs - cp -r mod/*/src/{main,test} src || die - - # populate META-INF/services - echo com.thaiopensource.datatype.xsd.DatatypeLibraryFactoryImpl \ - > meta/META-INF/services/org.relaxng.datatype.DatatypeLibraryFactory || die - echo com.thaiopensource.datatype.xsd.regex.xerces2.RegexEngineImpl \ - > meta/META-INF/services/com.thaiopensource.datatype.xsd.regex.RegexEngine || die - - echo "version=${PV}" \ - > src/main/com/thaiopensource/relaxng/translate/resources/Version.properties || die - - # java-pkg-simple expects resources in JAVA_RESOURCE_DIRS - find src -type f ! -name '*.java' ! -name 'CompactSyntax.jj' ! -name 'package.html' \ - | xargs cp --parent -t resources || die - - # code generation according to mod/rng-parse/mod.xml - local OUT_DIR="gensrc/main/com/thaiopensource/relaxng/parse/compact" - mkdir -p "${OUT_DIR}" - "javacc-${JAVACC_SLOT}" -GRAMMAR_ENCODING=UTF-8 \ - -JDK_VERSION=1.8 \ - -OUTPUT_DIRECTORY="${OUT_DIR}" \ - helper/src/main/com/thaiopensource/relaxng/parse/compact/CompactSyntax.jj \ - || die "Code generation with java.jj failed" - rm "${OUT_DIR}/JavaCharStream.java" || die - - # mod/rng-parse/mod.xml lines 16-17 - 's/java.io.IOException/EOFException/' - eapply "${FILESDIR}/trang-20220510-CompactSyntaxTokenManager.patch" || die -} - -src_compile() { - einfo "Compiling some classes needed for code generation" - ejavac -d util \ - $(find regex-gen/src/main mod/util/src/main -name "*.java") || die - - einfo "Code generation" - "$(java-config -J)" -cp "util" \ - com.thaiopensource.datatype.xsd.regex.java.gen.NamingExceptionsGen \ - "com.thaiopensource.datatype.xsd.regex.java.NamingExceptions" \ - "src/main" || die - - "$(java-config -J)" -cp "util" \ - com.thaiopensource.datatype.xsd.regex.java.gen.CategoriesGen \ - "com.thaiopensource.datatype.xsd.regex.java.Categories" \ - "src/main" \ - "/usr/share/unicode-data/UnicodeData.txt" || die - - einfo "Compiling classes which are not needed for the final trang.jar" - ejavac -d helper \ - -cp "util:$(java-pkg_getjars --build-only xml-commons-resolver)" \ - $(find gensrc/main helper/src/main -name "*.java") || die - - einfo "Compiling trang.jar" - JAVA_CLASSPATH_EXTRA="testng" - JAVA_GENTOO_CLASSPATH_EXTRA="util:helper" - JAVA_JAR_FILENAME="trang.jar" - JAVA_MAIN_CLASS="com.thaiopensource.relaxng.translate.Driver" - JAVA_RESOURCE_DIRS=( meta resources/src/main ) - JAVA_SRC_DIR=( {gen,}src/main ) - java-pkg-simple_src_compile -} -- cgit v1.2.3