summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-text/trang/Manifest1
-rw-r--r--app-text/trang/metadata.xml1
-rw-r--r--app-text/trang/trang-20091111-r1.ebuild61
-rw-r--r--app-text/trang/trang-20151127.ebuild80
4 files changed, 82 insertions, 61 deletions
diff --git a/app-text/trang/Manifest b/app-text/trang/Manifest
index 010b2099dfb..283515d83de 100644
--- a/app-text/trang/Manifest
+++ b/app-text/trang/Manifest
@@ -1 +1,2 @@
DIST trang-20091111.zip 1079534 SHA256 d8a3f034f9918ebe5b265aafeadbee6729ddda5732cfc368e2c30b3b8c0ca598 SHA512 c19bf98613097d377ecce347dcab31b458b16d77c320b5d2a6106ff7b06b3aa3c7b87b4c78376b3d4f89be24ecb11fad622aadc0ba9d8d6be716486d7a1ebd7b WHIRLPOOL 6ed18632dfdb7c9661fcb6e1b3a02130ac877fdda3c4cc7779ec61510a7e67e68ab7315ab6f3e5cb8ed2a83447873579791c568f7706eaab29f5e2258fa5bc3b
+DIST trang-20151127.tar.gz 13746141 SHA256 86c810a42d974665d12db5213943cd72fcb6912d80b5a2853e083bc454ca6b75 SHA512 f5c6973791e8caa8dcce6bbf92cbd58491f55edd7819523947ad718ea3973eb81afc6b21d4e830949c2f183b485915dab98dbb5b90e01324677cfa41f5746e26 WHIRLPOOL c11781da0cf8d5deada8c59dcfbc13dffd78e045c97b4b27768d8772563b989e9c6434fa4be13ea3c53574ad59baf0eb3a150bc3d77edc7336315f6961fb0b6c
diff --git a/app-text/trang/metadata.xml b/app-text/trang/metadata.xml
index 4c52b3e0f77..04751195a35 100644
--- a/app-text/trang/metadata.xml
+++ b/app-text/trang/metadata.xml
@@ -6,6 +6,7 @@
<name>Java</name>
</maintainer>
<upstream>
+ <remote-id type="github">relaxng/jing-trang</remote-id>
<remote-id type="google-code">jing-trang</remote-id>
</upstream>
</pkgmetadata>
diff --git a/app-text/trang/trang-20091111-r1.ebuild b/app-text/trang/trang-20091111-r1.ebuild
deleted file mode 100644
index 30542e0d6ce..00000000000
--- a/app-text/trang/trang-20091111-r1.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-JAVA_PKG_IUSE="doc source"
-
-inherit java-pkg-2 java-ant-2
-
-DESCRIPTION="Multi-format schema converter based on RELAX NG"
-HOMEPAGE="http://thaiopensource.com/relaxng/trang.html"
-SRC_URI="https://jing-trang.googlecode.com/files/${P}.zip"
-LICENSE="BSD"
-
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-COMMON_DEP="
- dev-java/xerces:2
- dev-java/xml-commons-resolver:0"
-
-RDEPEND="
- >=virtual/jre-1.6
- ${COMMON_DEP}"
-
-DEPEND="
- app-arch/unzip
- >=virtual/jdk-1.6
- ${COMMON_DEP}"
-
-java_prepare() {
- # need resource files in jar archive so can't remove, see build.xml
- # rm -v *.jar || die "Failed to remove jar archives"
- cp "${FILESDIR}/build.xml" "${S}/build.xml" || die
-}
-
-EANT_GENTOO_CLASSPATH="xerces-2,xml-commons-resolver"
-
-src_test() {
- java -jar "dist/${PN}.jar" "${FILESDIR}/test.xml" "test/test.xsd"
- java -jar "dist/${PN}.jar" "${FILESDIR}/test.xml" "test/test.dtd"
- java -jar "dist/${PN}.jar" "test/test.dtd" "test/test.dtd.xsd"
-
- md5sum -c <<MD5SUMS_END || die "Failed to verify md5sum"
-4bcb454ade46c0188f809d2e8ce15315 "${FILESDIR}"/test.xml
-d096c1fb462902e10a3440a604a21664 test/test.xsd
-3fb46bdb16dc75a2a1e36e421b13e51d test/test.dtd
-fce355ca962cb063d7baa5d7fd571bcf test/test.dtd.xsd
-MD5SUMS_END
-}
-
-src_install() {
- java-pkg_dojar "dist/${PN}.jar"
- java-pkg_dolauncher trang \
- --main com.thaiopensource.relaxng.translate.Driver
- dohtml *.html || die
-
- use doc && java-pkg_dojavadoc javadoc
- use source && java-pkg_dosrc src/{org,com}
-}
diff --git a/app-text/trang/trang-20151127.ebuild b/app-text/trang/trang-20151127.ebuild
new file mode 100644
index 00000000000..40174cd70de
--- /dev/null
+++ b/app-text/trang/trang-20151127.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+COMMIT="1e74846999bbd14ce5248acbd2be9f1e624a9846"
+
+inherit java-pkg-2 java-ant-2
+
+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/${COMMIT}.tar.gz -> ${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+COMMON_DEP="
+ dev-java/xerces:2
+ dev-java/xml-commons-resolver:0"
+
+RDEPEND="
+ >=virtual/jre-1.7
+ ${COMMON_DEP}"
+
+DEPEND="
+ >=virtual/jdk-1.7
+ dev-java/javacc:0
+ dev-java/saxon:6.5
+ dev-java/testng:0
+ ${COMMON_DEP}"
+
+S="${WORKDIR}/jing-${PN}-${COMMIT}"
+
+EANT_ANT_TASKS="testng"
+EANT_GENTOO_CLASSPATH="xerces-2,xml-commons-resolver"
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+JAVA_PKG_BSFIX_NAME="build.xsl"
+
+java_prepare() {
+ 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=${EROOT}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_install() {
+ java-pkg_dojar build/${PN}.jar
+ java-pkg_dolauncher ${PN} \
+ --main com.thaiopensource.relaxng.translate.Driver
+
+ docinto html
+ dodoc build/*.html
+}
+
+src_test() {
+ java -jar build/${PN}.jar "${FILESDIR}/test.xml" test/test.xsd
+ java -jar build/${PN}.jar "${FILESDIR}/test.xml" test/test.dtd
+ java -jar build/${PN}.jar test/test.dtd test/test.dtd.xsd
+
+ 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
+}