summaryrefslogtreecommitdiff
path: root/app-text/trang
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/trang')
-rw-r--r--app-text/trang/Manifest6
-rw-r--r--app-text/trang/files/test.xml87
-rw-r--r--app-text/trang/metadata.xml12
-rw-r--r--app-text/trang/trang-20151127.ebuild79
4 files changed, 184 insertions, 0 deletions
diff --git a/app-text/trang/Manifest b/app-text/trang/Manifest
new file mode 100644
index 000000000000..06a2c15cb4bd
--- /dev/null
+++ b/app-text/trang/Manifest
@@ -0,0 +1,6 @@
+AUX test.xml 3053 SHA256 641b0ba68e3a4ce7d02de1d0cdcb7e918f35dd2e88157eb665a4d79238eef999 SHA512 11b4faef6fce89d72e8cdcc25cc1dc6c89ea7bc44252e0521a9a5ff47f686e78c46eac6b606e47f51b0bdb8175e583d5c1c56bdcb8bea105c70a63b65f20ea67 WHIRLPOOL d4de2ae72050b6b4de1b8b23e82e3cc6b65c8229c6b2743bcd0621ed04af1cfa932d12b67496b42f39ca8e24e5301bdff487913da682cb2db6f6d73a16d39520
+DIST trang-20151127.tar.gz 13746141 SHA256 86c810a42d974665d12db5213943cd72fcb6912d80b5a2853e083bc454ca6b75 SHA512 f5c6973791e8caa8dcce6bbf92cbd58491f55edd7819523947ad718ea3973eb81afc6b21d4e830949c2f183b485915dab98dbb5b90e01324677cfa41f5746e26 WHIRLPOOL c11781da0cf8d5deada8c59dcfbc13dffd78e045c97b4b27768d8772563b989e9c6434fa4be13ea3c53574ad59baf0eb3a150bc3d77edc7336315f6961fb0b6c
+EBUILD trang-20151127.ebuild 2070 SHA256 a92005e4882b762ad2c35630bbbc7eb3876ad856d5e4b61799196a0c832409ec SHA512 b0d9aa8adb56abbe566ccf37e6e2764127d2e752df1b02670175a653187add219a74433bdb6cad7a691a14effc59c25d7d18c08f0721c4f20fa34b4778dfb9a4 WHIRLPOOL 68f973a18a7a357e79a3a4499ef639c1c60aec70c2716b9a866d78e89c1fc7e48237b3469a7249018147a1a4fbf883aa22ead7b8c45149326c2b35b1024f5c54
+MISC ChangeLog 3784 SHA256 cadb3b50a93c838609fd9c02755a7cc2d3d46511f62cb4bf3941d87a25199ca9 SHA512 15b5feb0240df7d65beb8c8ddfda9df13f29bb731e8b49b823d0c4343adae92614ba408818ca9ac5224be9707cd736d821c7c40bd0a3204f58e526cc2f69918a WHIRLPOOL 450fef18b024afa1b55879da22fe67a6d1ecdbb788df6ef9334ecc649da9414032833ee6d2a7ca38dde7ea38321015825db10b205ed71040721ce9363048f5e0
+MISC ChangeLog-2015 4140 SHA256 84894f10313eaeb0441357d7d78a6fa696b9ba564ef2a1351de1af2b56b99dd5 SHA512 7957afbc189bda741304aeb0875cb8fdcea741f584f6e048e5dd00a6941c5c9d4cc343ffe300a958dd80b62066af0665b18f13f6c14ad9f99a02075864e44bd0 WHIRLPOOL 95985909cb3b0faa7f844f492661ab0b20de6a5de47d7a44288d6bd2a550dc4b80aebf4441e54535e83c79465db44f3b2424a29fdb6b03589d57f2bfc1a5d4a2
+MISC metadata.xml 374 SHA256 f6b2522c08b0cfb233ccac7e4e1f5ee864ea382f941fdb9b3d4e9d2389f51b76 SHA512 884f58def744deb8a44d8d60a178d7409bb67afcb3b88c224608ecf902a00602e6aeb0da8683fd6edc20d07bf739492196067c4b2821a129255e510b6991bc90 WHIRLPOOL 528a919d03035a5e5b7d6f5c238fff93e9424c5ed5821d47dc9e35ba594ec42566fc0819fb9c33947937fb4479ea4b045c8249a59c93662fec8970a75696febf
diff --git a/app-text/trang/files/test.xml b/app-text/trang/files/test.xml
new file mode 100644
index 000000000000..747972587821
--- /dev/null
+++ b/app-text/trang/files/test.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2001-2004 Bart Massey, Jamey Sharp, and Josh Triplett.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the names of the authors or their
+institutions shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from the authors.
+-->
+<xcb header="dpms" extension-xname="DPMS" extension-name="DPMS"
+ major-version="0" minor-version="0">
+ <request name="GetVersion" opcode="0">
+ <field type="CARD16" name="client_major_version" />
+ <field type="CARD16" name="client_minor_version" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="server_major_version" />
+ <field type="CARD16" name="server_minor_version" />
+ </reply>
+ </request>
+
+ <request name="Capable" opcode="1">
+ <reply>
+ <pad bytes="1" />
+ <field type="BOOL" name="capable" />
+ <pad bytes="23" />
+ </reply>
+ </request>
+
+ <request name="GetTimeouts" opcode="2">
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="standby_timeout" />
+ <field type="CARD16" name="suspend_timeout" />
+ <field type="CARD16" name="off_timeout" />
+ <pad bytes="18" />
+ </reply>
+ </request>
+
+ <request name="SetTimeouts" opcode="3">
+ <field type="CARD16" name="standby_timeout" />
+ <field type="CARD16" name="suspend_timeout" />
+ <field type="CARD16" name="off_timeout" />
+ </request>
+
+ <request name="Enable" opcode="4" />
+
+ <request name="Disable" opcode="5" />
+
+ <enum name="DPMSMode">
+ <item name="On" />
+ <item name="Standby" />
+ <item name="Suspend" />
+ <item name="Off" />
+ </enum>
+
+ <request name="ForceLevel" opcode="6">
+ <field type="CARD16" name="power_level" enum="DPMSMode" />
+ </request>
+
+ <request name="Info" opcode="7">
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="power_level" enum="DPMSMode" />
+ <field type="BOOL" name="state" />
+ <pad bytes="21" />
+ </reply>
+ </request>
+</xcb> \ No newline at end of file
diff --git a/app-text/trang/metadata.xml b/app-text/trang/metadata.xml
new file mode 100644
index 000000000000..04751195a354
--- /dev/null
+++ b/app-text/trang/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <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-20151127.ebuild b/app-text/trang/trang-20151127.ebuild
new file mode 100644
index 000000000000..fa287c480746
--- /dev/null
+++ b/app-text/trang/trang-20151127.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+}