summaryrefslogtreecommitdiff
path: root/app-text
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-01-08 06:41:21 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-01-08 06:41:21 +0000
commit9991465b0b90d77b2a8a2ae833b6ecd99e6b5101 (patch)
tree28adc48ed9c9af3eec4c870d7a7efc8da5e0d8f1 /app-text
parentd69399c7befdd98cda62d6a1788ae2aa7f104c5e (diff)
gentoo auto-resync : 08:01:2025 - 06:41:21
Diffstat (limited to 'app-text')
-rw-r--r--app-text/Manifest.gzbin50267 -> 50272 bytes
-rw-r--r--app-text/trang/Manifest2
-rw-r--r--app-text/trang/trang-20241231.ebuild124
3 files changed, 126 insertions, 0 deletions
diff --git a/app-text/Manifest.gz b/app-text/Manifest.gz
index 733e498b326b..2db9dd908d46 100644
--- a/app-text/Manifest.gz
+++ b/app-text/Manifest.gz
Binary files differ
diff --git a/app-text/trang/Manifest b/app-text/trang/Manifest
index e6b1827b4d05..3786284c300d 100644
--- a/app-text/trang/Manifest
+++ b/app-text/trang/Manifest
@@ -1,4 +1,6 @@
AUX trang-20220510-CompactSyntaxTokenManager.patch 5081 BLAKE2B 81533757c5c0088dc79554f2a11ca4a501a30c023693ed36a1547c442518424097d90ba1de6a130a1c1851af2dca194ea7a1804d04ad8fbc7c3c33ca48bace90 SHA512 74dc0bee59e5b2307c6d05029ffa1f0379359fd99017788f7f1aa328059a0296d0b365d8d79b30a206f0f6f4d21f283b4547a084f485c48975b4307a2a8369ec
DIST trang-20220510.tar.gz 14317698 BLAKE2B b7337e9555094989955e33f711db9981521c31a3708dd6a862f36cecae0496d8c86fdf09b2d60b8646d8e35e214f57ba7bcd49773fe002eef26ed6b81b4101c1 SHA512 51c44817b396ec45bb82987e0aee8e8d2e5f3f6a1e2f967bae717a31b1bd49c5fc7015466104b19ac62de6ee0270c018dcf19b467763ad1aaa92800bd4edd7a0
+DIST trang-20241231.tar.gz 14317272 BLAKE2B 420bd2148f90bbda03d91c0e748fb785e89286e5b9b565cc31e81306e5c832a6b683b51bd132b7f16e7cbce798eaf1b13d23a4b035ef77a1b13bb25366866523 SHA512 6e0d9c69b5fe663b2e014e0a30b6d92018a349b982698631f346a1fe7657e8a8c5b785df1c1188f4caf61acfccbaf9fc2f6478f2dfb425ef6ef510a865bdaaa3
EBUILD trang-20220510-r1.ebuild 3922 BLAKE2B b8b849ac1854a82777176607984b441a789f88cffe6b3d116944d9c25a387dd31412d46acb11a7dd437031966b427e1d5ad865b402ab348054885bd455fd63c2 SHA512 15cde3966f4f37e328b717eb183553603a0df6e6febd0b643ed049beb9ccb8f35168869550ae2fca9084bcaecec2c94ab79949928a1f5ce92edfedde7e5c182f
+EBUILD trang-20241231.ebuild 3972 BLAKE2B 01f5178aa4cfc0d2ccccb8a633fa523cfc35f74548be963ff175e760d3ca85b2846591d068c961130e0c87b47af73d6b2ed9d2f568a25711f528da0aca20f30b SHA512 3c379b94c1e3dafefaf0445d88ebffbae807751dd39da9734b1232c206dd67e94b79b9ba0160a480d52fde51895020e44217a382259ea4fb19baddc8241ce398
MISC metadata.xml 320 BLAKE2B dbc3c73e63a4eba52a905b023fd13c905a367c50b84f2114f1bee024f6e7787dfb02627aa30c83e17ffd90d763f9a977ad912a4429fe63a957120b7fd63ff34b SHA512 cd56de97d8e9b4439babc24fe21cc1b25f367598de0c4fc819ed24b17bfab70167495b00a065662f79b4315008fb65823dff6e6605d8939f697332f2a01eec36
diff --git a/app-text/trang/trang-20241231.ebuild b/app-text/trang/trang-20241231.ebuild
new file mode 100644
index 000000000000..343ab8e4a119
--- /dev/null
+++ b/app-text/trang/trang-20241231.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2025 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"
+
+BDEPEND="
+ app-i18n/unicode-data
+ dev-java/saxon:9
+"
+
+CP_DEPEND="
+ dev-java/xerces:2
+ dev-java/xml-commons-resolver:0
+"
+
+JAVACC_SLOT="7.0.13"
+
+DEPEND="
+ ${CP_DEPEND}
+ dev-java/javacc:${JAVACC_SLOT}
+ dev-java/testng:0
+ >=virtual/jdk-1.8:*
+"
+
+RDEPEND="
+ ${CP_DEPEND}
+ >=virtual/jre-1.8:*
+"
+
+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_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?
+
+ # javac of old openjdk:8 does not create its output directory, see bug #934306
+ # separating some sources which are needed only for compilation
+ mkdir helper util || 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-pkg-simple_src_compile
+}