From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001
From: V3n3RiX <venerix@redcorelinux.org>
Date: Mon, 9 Oct 2017 18:53:29 +0100
Subject: reinit the tree, so we can have metadata

---
 dev-java/xom/Manifest                              |  8 +++
 dev-java/xom/files/xom-1.2.6.patch                 | 49 ++++++++++++++
 dev-java/xom/files/xom-strip-fallback-parser.patch | 18 +++++
 dev-java/xom/metadata.xml                          | 12 ++++
 dev-java/xom/xom-1.2.10.ebuild                     | 79 ++++++++++++++++++++++
 5 files changed, 166 insertions(+)
 create mode 100644 dev-java/xom/Manifest
 create mode 100644 dev-java/xom/files/xom-1.2.6.patch
 create mode 100644 dev-java/xom/files/xom-strip-fallback-parser.patch
 create mode 100644 dev-java/xom/metadata.xml
 create mode 100644 dev-java/xom/xom-1.2.10.ebuild

(limited to 'dev-java/xom')

diff --git a/dev-java/xom/Manifest b/dev-java/xom/Manifest
new file mode 100644
index 000000000000..2ad52a46f342
--- /dev/null
+++ b/dev-java/xom/Manifest
@@ -0,0 +1,8 @@
+AUX xom-1.2.6.patch 2096 SHA256 d3fb76a36a60b4d364f82f0ea0b87e449379721b71056b91f134067b9c93ce03 SHA512 7d864f9178a5fd846572a17eb345a74510e7a3880c203054d7156849c10c678421ed688965d821daafcff91888be9a485c5409937055a56139066aaa6d32aca0 WHIRLPOOL 1e759bd820c3a520763682e4249b8a087801032727abe3bcf2dbea247b43444e3d5d6018c2b2abc2566f259ea122bfdd14ce42a9849ec2bed8139ca063deadeb
+AUX xom-strip-fallback-parser.patch 690 SHA256 152c505a672526452599e8fd825ef6b89e0eba8a967b64b112509c78e9496d13 SHA512 e61defbc5c8da65561709be6431b0b15069759ec94de2f1f356d518b8b9d90a7ab1ccfd6db6148a3dbcc999b19c9607cd7586ef4c30f70e627968e726e953830 WHIRLPOOL 6672a31c92b27c0a70b006dee6575a6f8ee471580f2bb9abef613ebd3018a1fd80bb6a69b5508fa66b0e5ec1aab0096b94e072948c39730324c15ee9edc38de5
+DIST jaxen-1.1.6-src.tar.gz 204211 SHA256 812754aaff83efbf0d822e0014ba668599f2b519ab46fd7d4e5078eb3cc3c887 SHA512 84a3beb521c8729d7ad9bcb76a252e12d624614277eee9d5e844f79fcdfc58f5f49eac902256b17c0af6563d4c255249d9124a47c3b02827189a7489f3172309 WHIRLPOOL d1ac6b7c8fb35d61accc12a97f9d92a29df909d6a29e4a5957bf695a63c73bc0e74362efd9aa31a3fdb7891cbd5411175106fe5815895327d3b1f854721361a0
+DIST xom-1.2.10.tar.gz 11717279 SHA256 d8d58d26cba76f6f9e1a65ab537f759f662d1f4441e9a94b6687e23fdb76f879 SHA512 edaa4abbb929f4eba1ee092be7a196ba1c7a359b233a38abbf100dc519a9a6ca2b9a4947497e412f96ceaf509bbd03c0ce25b17e401b6cd0a95fc355bbdc7680 WHIRLPOOL a7186e0a3c913c13d3b28d07f48bb31db929bf8e514ecb10ddac519e2ce3187c067d5aa928d3316d98f34e944571d1f95bec174fd461cded273ebb8937bc218b
+EBUILD xom-1.2.10.ebuild 2190 SHA256 0cccd9357dee499902fbf20083ae7b4398fae1c788ce16d788c2a45c61a14572 SHA512 8c3cfd3bb4f18867e9a84ee9ed77ce37a7f99e2477c8d98731fbc914caed8827791d3a42f47942c722b0b9041383286083b0e3502a7c52162fc6d67c8d60c98a WHIRLPOOL 5c979c603a0b8765c406deead97752c5a6dd29bedf5c9bad50893ae21ceeb62cd4120a6a2ab3e73bd62b73d9e1f570090ce0b7630db1e0738afe4cd677aefd39
+MISC ChangeLog 2616 SHA256 30fbeb7e1d9ee19537a23b899989c407deb0ec935f44bc1129a72f60633fb2d0 SHA512 b3197fa0a2992fe27096c968a004684fc4950a196b439364ffa97acdaab1f5c78c6407cd6cc96acc2098278a70500285a43ea8a5a2f7867b6d84f36fc6cbe7b9 WHIRLPOOL ccaad261290cd42a02796d591ab46f614db79cee6d4ea3bd526c5a0c99a36a0296b6d6fb5da09c4422054c61c68b65e360005f3d0cc835c632b92ca5dddfb18a
+MISC ChangeLog-2015 9611 SHA256 e80fa924285c6dcf589c648e89eef2140096609ac380b1ceb3d076e2fa565d24 SHA512 8217ed8678d072c367cd93226efef5036204fa0043f7deac03efdb28797787984b71fb4b504563f5e05a713f9064c63a2c6bbff331467658c85933139e5f0a2d WHIRLPOOL 0f80848675c41aeeb057a624a15381aa00f5268283f22a34560639993fdee63bd589e678f25dd749e46192d60339b9629fa32385450449a3ec161eda099fd951
+MISC metadata.xml 407 SHA256 e353e44bcb3e013faa7fda4a6803ea55dd2532826fe20f1174eb18a922db9ae5 SHA512 4ec08597d54cbea6121f240565ff7b7ee614c370357b551bebd18d31749c1863e30bc8b7935caa00051f9946cc927cd34c1bad02be07eca40c89d2c6e0e7b2f6 WHIRLPOOL e25e21ab589e6b5f85aa6e2f9337c033c16ce4fb6dca0aca36451a3a11aadcaa0d7c4377196b317d719973e92a37648bf40e892c0e8f1dfee1454e480bcaa6ac
diff --git a/dev-java/xom/files/xom-1.2.6.patch b/dev-java/xom/files/xom-1.2.6.patch
new file mode 100644
index 000000000000..3187e437306b
--- /dev/null
+++ b/dev-java/xom/files/xom-1.2.6.patch
@@ -0,0 +1,49 @@
+diff -Nur XOM/build.xml XOM_patched/build.xml
+--- XOM/build.xml	2010-06-21 06:03:14.000000000 +0300
++++ XOM_patched/build.xml	2011-03-13 07:05:01.000000000 +0200
+@@ -21,7 +21,6 @@
+ subject line. The XOM home page is http://www.xom.nu/
+ -->
+ <project name="XOM" default="help" basedir=".">
+-
+     <description>
+       Build XOM
+     </description>
+@@ -71,7 +70,7 @@
+     <property name="jaxen.dir"       value="${build.dir}/jaxen-classes"/>
+ 
+     <property name="xml-apis.jar"   value="${lib.dir}/xml-apis.jar"/>
+-    <property name="parser.jar"     value="${lib.dir}/dtd-xercesImpl.jar"/>
++    <property name="parser.jar"     value="${lib.dir}/xercesImpl.jar"/>
+     <property name="xslt.jar"       value="${lib.dir}/xalan.jar"/>
+     <property name="serializer.jar" value="${lib.dir}/serializer.jar"/>
+     <property name="tagsoup.jar"    value="${lib2.dir}/tagsoup-1.2.jar"/>
+@@ -226,7 +225,7 @@
+            encoding="UTF-8"
+     	   fork="true"
+            includeAntRuntime="false"
+-           excludes="nu/xom/pantry/* nu/xom/tools/* nu/xom/samples/*Servlet.java">
++excludes="nu/xom/pantry/* nu/xom/tools/* nu/xom/samples/">
+        <classpath refid="compile.class.path"/>
+     </javac>
+     <copy file="${build.src}/nu/xom/characters.dat" tofile="${build.dest}/nu/xom/characters.dat"/>
+@@ -323,7 +322,7 @@
+ 
+   <target name="jar" depends="compile" description="Create xom.jar">
+   	<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
+-  	        classpath="${lib.dir}/jarjar-1.0.jar"/>
++  	        classpath="${lib.dir}/jarjar.jar"/>
+     <jarjar jarfile="${build.dir}/${name}-${version}.jar"
+          basedir="${build.dest}"
+          index="no"
+@@ -862,8 +861,8 @@
+   </target>
+ 
+ 
+-  <target name="compile-jaxen" description="Compile Jaxen" depends="get-jaxen">
+-    <javac srcdir="${build.dir}/jaxen-${jaxenversion}/src/java/main"
++  <target name="compile-jaxen" description="Compile Jaxen">
++    <javac srcdir="lib/jaxen-${jaxenversion}/src/java/main"
+            destdir="${build.dir}/jaxen-classes"
+            debug="${debug}"
+            optimize="${optimize}"
diff --git a/dev-java/xom/files/xom-strip-fallback-parser.patch b/dev-java/xom/files/xom-strip-fallback-parser.patch
new file mode 100644
index 000000000000..49a324ef2dad
--- /dev/null
+++ b/dev-java/xom/files/xom-strip-fallback-parser.patch
@@ -0,0 +1,18 @@
+Author: Ralph Sennhauser <sera@gentoo.org>
+
+Don't build and install fallback parser relying on internel classes of
+SUNs/Oracles JVM >= 1.5. This allows building xom using ibm-jdk-bin. #399119
+
+--- /tmp/build.xml
++++ /tmp/build.xml
+@@ -235,10 +235,6 @@
+   	<echo file="${build.dest}/nu/xom/version.txt">${version}</echo>
+ 
+     <copy file="${build.src}/nu/xom/compositions.dat" tofile="${build.dest}/nu/xom/compositions.dat" />
+-
+-    <!-- This file requires Java 1.5 to generate so we compile it with a 
+-         different target and copy it over here. -->
+-    <copy file="classes15/nu/xom/JDK15XML1_0Parser.class" tofile="${build.dest}/nu/xom/JDK15XML1_0Parser.class"/>
+   </target>
+ 
+ 
diff --git a/dev-java/xom/metadata.xml b/dev-java/xom/metadata.xml
new file mode 100644
index 000000000000..6d01ad88c62b
--- /dev/null
+++ b/dev-java/xom/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>
+	<longdescription>
+		XOM is a new XML object model. It is a tree-based API for processing
+		XML with Java that strives for correctness and simplicity.
+	</longdescription>
+</pkgmetadata>
diff --git a/dev-java/xom/xom-1.2.10.ebuild b/dev-java/xom/xom-1.2.10.ebuild
new file mode 100644
index 000000000000..9c6d566bbd20
--- /dev/null
+++ b/dev-java/xom/xom-1.2.10.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc examples source"
+
+inherit java-pkg-2 java-ant-2
+
+JAXEN_V="1.1.6"
+JAXEN_P="jaxen-${JAXEN_V}"
+
+DESCRIPTION="A new XML object model"
+HOMEPAGE="http://cafeconleche.org/XOM/index.html"
+# Bundled jaxen as its moved under XOM's namespace
+SRC_URI="http://cafeconleche.org/XOM/${P}.tar.gz
+	http://dist.codehaus.org/jaxen/distributions/${JAXEN_P}-src.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+
+COMMON_DEPEND="dev-java/xerces:2
+		dev-java/xml-commons-external:1.3
+		examples? ( java-virtuals/servlet-api:2.4 )"
+
+RDEPEND=">=virtual/jre-1.4
+		${COMMON_DEPEND}"
+
+DEPEND=">=virtual/jdk-1.4
+		dev-java/jarjar:1
+		${COMMON_DEPEND}"
+
+S="${WORKDIR}/XOM"
+
+# Test require network access to pass.
+# They need a redirected http document on public web.
+RESTRICT="test"
+
+java_prepare() {
+	epatch "${FILESDIR}/${PN}-1.2.6.patch"
+	epatch "${FILESDIR}/${PN}-strip-fallback-parser.patch" #399119
+
+	# Delete test files as they aren't installed
+	rm -vr src/nu/xom/tests || die
+
+	# Delete bundled jars
+	rm -v *.jar lib/*.jar || die
+
+	# Delete bundled classes
+	find . -name "*.class" -delete -print || die
+
+	# Move bundled jaxen to where the build.xml expects it
+	mv "${WORKDIR}"/${JAXEN_P}/ lib/ || die
+
+	java-pkg_jar-from --into lib/ xml-commons-external-1.3
+	java-pkg_jar-from --into lib/ xerces-2
+	java-pkg_jar-from --build-only --into lib/ jarjar-1
+
+	# Tagsoup is only needed to run betterdoc but we use the pregenerated ones.
+}
+
+src_compile() {
+	local ant_flags="-Ddebug=off"
+	use examples && ant_flags="${ant_flags} -Dservlet.jar=$(java-pkg_getjar servlet-api-2.4 servlet-api.jar)"
+
+	ANT_TASKS="jarjar-1" eant jar ${ant_flags}\
+		$(use examples && echo samples)
+}
+
+src_install() {
+	java-pkg_newjar build/${P}.jar ${PN}.jar
+	use examples && java-pkg_dojar build/xom-samples.jar
+	dodoc Todo.txt
+
+	use doc && java-pkg_dojavadoc apidocs/
+	use source && java-pkg_dosrc src/*
+	use examples && java-pkg_doexamples --subdir nu/xom/samples src/nu/xom/samples
+}
-- 
cgit v1.2.3