summaryrefslogtreecommitdiff
path: root/app-text/trang
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
commitfcc5224904648a8e6eb528d7603154160a20022f (patch)
tree3bfce096b38a9cea8eed13fc70c1526c456e9abd /app-text/trang
parent2fd57282f0262ca084e05b0f2c63fbada395d02b (diff)
gentoo resync : 02.02.2022
Diffstat (limited to 'app-text/trang')
-rw-r--r--app-text/trang/Manifest4
-rw-r--r--app-text/trang/files/trang-20181222-build-fixes.patch31
-rw-r--r--app-text/trang/files/trang-20181222-unicode-data-path.patch15
-rw-r--r--app-text/trang/trang-20181222.ebuild85
4 files changed, 135 insertions, 0 deletions
diff --git a/app-text/trang/Manifest b/app-text/trang/Manifest
index ff834d0c2452..cb9af82ff3d4 100644
--- a/app-text/trang/Manifest
+++ b/app-text/trang/Manifest
@@ -1,4 +1,8 @@
AUX test.xml 3053 BLAKE2B f9837b05c4ac00fa63ce75f04318f3378c2cc0c99680c21520d7d75a74e0e9ad00a9fcdf4857655ac32a3eea935208dc86e51d2bbef3e2349cd78d65ed74ac30 SHA512 11b4faef6fce89d72e8cdcc25cc1dc6c89ea7bc44252e0521a9a5ff47f686e78c46eac6b606e47f51b0bdb8175e583d5c1c56bdcb8bea105c70a63b65f20ea67
+AUX trang-20181222-build-fixes.patch 968 BLAKE2B 5f84f3388133b126c711024750f85aff03cd76027ebd526e3eec4b4a605c4e3515662e2d2b1abcf3df08e88176a248442478d1350946e3b3150e00ab928a85db SHA512 ac8bf8e5f8f71f9271a9adba732112b39c379946298b859ab7504e4f861274670666f4a2e0337712a607049f34dbc206962fe2ff8883b8a8a7c5e09037f67062
+AUX trang-20181222-unicode-data-path.patch 627 BLAKE2B 78ed1c0ad5cf4327311ba9a65113bbc38554444625fa1da1ac90586e7cc4b87722458b483219c9c6a1132ffff3076a8d4dec120de772b4191ebf7db8cdc33224 SHA512 51909cfdac55204197478e7484794cd6d4a0892baa94d0a98e46bf1e227b7e21ac544451ff1fe9c4a4fb67fe3dc2b557d98471abc5ba130a92da973aebe41495
DIST trang-20151127.tar.gz 13746141 BLAKE2B 8895fefa8be62a524a2bfb603a64bcf641f13cd500dbe51b9efdaed7d5147dd6478963d356aec81c5c5b6af12a59edcb908d203b6b8edaf093fe29f76db80b7c SHA512 f5c6973791e8caa8dcce6bbf92cbd58491f55edd7819523947ad718ea3973eb81afc6b21d4e830949c2f183b485915dab98dbb5b90e01324677cfa41f5746e26
+DIST trang-20181222.tar.gz 14847113 BLAKE2B 335722853b2d373fd9a6e9d4478b8248ca49d0559d5a8f60566f5550e60d5a004f26338897617acc617f84d1d55546afb9c51da64b7634514fa2ec508fa7a47a SHA512 fa412a5beeff07a620c4aa5723cf5b73bdb6b1cda561e3bf7764a609110f538da5313bcc79aca4d7742f71b3b071d3537681845d17ece46bc871c0964f4e251d
EBUILD trang-20151127.ebuild 2070 BLAKE2B 6302b85f0047cb8fae003b7bccbdcf2bde3f24d4395fe8b3023bf425bf9cda31d4b3ef9bb42c73db51e4e14858ce907bb13a9d2744f8e3e1ec4db6ef1810f23a SHA512 45ef3c04539287046ba9792f018f838079e9d40b8c46771702c0f6ab3c952bd3072e5e071f8205bf747610e1a4ee059fe847081d2ea256865893a6dc3bcf3fb4
+EBUILD trang-20181222.ebuild 2224 BLAKE2B a5bbe67ccbd909bbb01f48dff6b61f641fd8b8cfc2afff743a16d3a0d525d5a75dd7910076ffd4980be4f1defb6c14ef875b49fc55c76fcedfc3427ad872cc3c SHA512 ce5232eb5bf83c5e029b0866f4ed97d62c8df6b619fb11a474c19d2c297e37e5ba6246e539b065763be2a88f7059770355a31191ed5d03f6f28f0457231421c3
MISC metadata.xml 375 BLAKE2B 0c05bab3ec0ef8605c8422510fea174514ce9fee8e642a2172c6e1eff07ad7cd0f10bacf1478477cf3a94abfca23a48ad2a18d5ed8133c4165694f1bbe930045 SHA512 fdd72c06fc6e618e789ef0bf85e6f4bb566f4bc36032d8d428ea8596d610dc3d0b435b03de0e157ce5cf3402edf4832e9c45c3b4d69401846f004ab69377a00b
diff --git a/app-text/trang/files/trang-20181222-build-fixes.patch b/app-text/trang/files/trang-20181222-build-fixes.patch
new file mode 100644
index 000000000000..ef7118c650a1
--- /dev/null
+++ b/app-text/trang/files/trang-20181222-build-fixes.patch
@@ -0,0 +1,31 @@
+https://sources.debian.org/patches/jing-trang/20181222+dfsg2-6/javacc.dir/
+
+Description: update local Java path
+--- a/build.xml
++++ b/build.xml
+@@ -1,6 +1,6 @@
+ <project name="jing-trang" default="jar">
+
+-<property name="lib.dir" value="lib"/>
++<property name="lib.dir" value="/usr/share/java"/>
+ <property name="build.dir" value="${basedir}/build"/>
+ <property name="doc.dir" value="${basedir}/doc"/>
+
+--- a/build.xsl
++++ b/build.xsl
+@@ -23,15 +23,6 @@
+ <target name="dummy"/>
+ <target name="init">
+ <mkdir dir="{$build}"/>
+- <exec executable="git">
+- <arg value="submodule"/>
+- <arg value="update"/>
+- <arg value="--init"/>
+- <arg value="--recursive"/>
+- </exec>
+- <copy todir="{$doc}">
+- <fileset dir="relaxng.org/jclark" includes="**"/>
+- </copy>
+ </target>
+ <xsl:for-each select="modules/module">
+ <xsl:apply-templates select="document(concat('mod/', .,'/mod.xml'), .)/module">
diff --git a/app-text/trang/files/trang-20181222-unicode-data-path.patch b/app-text/trang/files/trang-20181222-unicode-data-path.patch
new file mode 100644
index 000000000000..e1aaf5452f47
--- /dev/null
+++ b/app-text/trang/files/trang-20181222-unicode-data-path.patch
@@ -0,0 +1,15 @@
+Adapted from Debian.
+https://sources.debian.org/patches/jing-trang/20181222+dfsg2-6/unicode.patch/
+
+Description: update unicode path
+--- a/mod/regex/mod.xml
++++ b/mod/regex/mod.xml
+@@ -46,7 +46,7 @@
+ failonerror="yes">
+ <arg value="com.thaiopensource.datatype.xsd.regex.java.Categories"/>
+ <arg value="${build.dir}/mod/regex/gensrc/main"/>
+- <arg value="${lib.dir}/UnicodeData-3.1.0.txt"/>
++ <arg value="@GENTOO_PORTAGE_EPREFIX@/usr/share/unicode-data/UnicodeData.txt"/>
+ <classpath>
+ <pathelement location="${build.dir}/mod/regex-gen/classes/main"/>
+ <pathelement location="${build.dir}/mod/util/classes/main"/>
diff --git a/app-text/trang/trang-20181222.ebuild b/app-text/trang/trang-20181222.ebuild
new file mode 100644
index 000000000000..3ca0be320143
--- /dev/null
+++ b/app-text/trang/trang-20181222.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit java-pkg-2 java-ant-2 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"
+
+COMMON_DEP="
+ dev-java/xerces:2
+ dev-java/xml-commons-resolver:0"
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${COMMON_DEP}"
+DEPEND="
+ >=virtual/jdk-1.8:*
+ dev-java/javacc:0
+ dev-java/saxon:6.5
+ dev-java/testng:0
+ ${COMMON_DEP}"
+BDEPEND="app-i18n/unicode-data"
+
+EANT_ANT_TASKS="testng"
+EANT_GENTOO_CLASSPATH="xerces-2,xml-commons-resolver"
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+JAVA_PKG_BSFIX_NAME="build.xsl"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-20181222-build-fixes.patch
+ "${FILESDIR}"/${PN}-20181222-unicode-data-path.patch
+)
+
+src_prepare() {
+ default
+
+ eprefixify mod/regex/mod.xml
+
+ java-pkg_clean
+ echo "<version>${PV}</version>" > version.xml || die
+}
+
+src_configure() {
+ java-ant-2_src_configure
+
+ # Because this crazy package uses XSLT, we need to escape this.
+ sed -i 's:\${gentoo\.classpath}:${{gentoo.classpath}}:g' build.xsl || die
+
+ EANT_EXTRA_ARGS="-Djavacc.dir=${EPREFIX}/usr/share/javacc/lib"
+ export LOCALCLASSPATH=$(java-pkg_getjars --build-only --with-dependencies saxon-6.5)
+}
+
+src_compile() {
+ EANT_BUILD_TARGET="modbuild trang-doc" java-pkg-2_src_compile
+ EANT_BUILD_TARGET="mod.trang.jar" EANT_BUILD_XML="modbuild.xml" java-pkg-2_src_compile
+}
+
+src_test() {
+ java -jar build/${PN}.jar "${FILESDIR}/test.xml" test/test.xsd || die
+ java -jar build/${PN}.jar "${FILESDIR}/test.xml" test/test.dtd || die
+ java -jar build/${PN}.jar test/test.dtd test/test.dtd.xsd || die
+
+ md5sum -c <<EOF || die "Failed to verify md5sum"
+4bcb454ade46c0188f809d2e8ce15315 ${FILESDIR}/test.xml
+d096c1fb462902e10a3440a604a21664 test/test.xsd
+3fb46bdb16dc75a2a1e36e421b13e51d test/test.dtd
+fce355ca962cb063d7baa5d7fd571bcf test/test.dtd.xsd
+EOF
+}
+
+src_install() {
+ java-pkg_dojar build/${PN}.jar
+ java-pkg_dolauncher ${PN} \
+ --main com.thaiopensource.relaxng.translate.Driver
+
+ docinto html
+ dodoc build/*.html
+}