diff options
author | Sam James <sam@gentoo.org> | 2022-01-29 01:55:55 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-01-29 03:56:06 +0000 |
commit | 55db7510378cf4cce746af22f057969256ecc512 (patch) | |
tree | 0fef21892d9eb53754833724cff7ec992d647c59 /app-text/trang | |
parent | dev-vcs/rcs: drop 5.9.3, 5.9.4 (diff) | |
download | gentoo-55db7510378cf4cce746af22f057969256ecc512.tar.gz gentoo-55db7510378cf4cce746af22f057969256ecc512.tar.bz2 gentoo-55db7510378cf4cce746af22f057969256ecc512.zip |
app-text/trang: add 20181222
Bug: https://bugs.gentoo.org/826398
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text/trang')
-rw-r--r-- | app-text/trang/Manifest | 1 | ||||
-rw-r--r-- | app-text/trang/files/trang-20181222-build-fixes.patch | 31 | ||||
-rw-r--r-- | app-text/trang/files/trang-20181222-unicode-data-path.patch | 15 | ||||
-rw-r--r-- | app-text/trang/trang-20181222.ebuild | 85 |
4 files changed, 132 insertions, 0 deletions
diff --git a/app-text/trang/Manifest b/app-text/trang/Manifest index c21c96fe2361..69f8050bc313 100644 --- a/app-text/trang/Manifest +++ b/app-text/trang/Manifest @@ -1 +1,2 @@ DIST trang-20151127.tar.gz 13746141 BLAKE2B 8895fefa8be62a524a2bfb603a64bcf641f13cd500dbe51b9efdaed7d5147dd6478963d356aec81c5c5b6af12a59edcb908d203b6b8edaf093fe29f76db80b7c SHA512 f5c6973791e8caa8dcce6bbf92cbd58491f55edd7819523947ad718ea3973eb81afc6b21d4e830949c2f183b485915dab98dbb5b90e01324677cfa41f5746e26 +DIST trang-20181222.tar.gz 14847113 BLAKE2B 335722853b2d373fd9a6e9d4478b8248ca49d0559d5a8f60566f5550e60d5a004f26338897617acc617f84d1d55546afb9c51da64b7634514fa2ec508fa7a47a SHA512 fa412a5beeff07a620c4aa5723cf5b73bdb6b1cda561e3bf7764a609110f538da5313bcc79aca4d7742f71b3b071d3537681845d17ece46bc871c0964f4e251d 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 +} |