summaryrefslogtreecommitdiff
path: root/dev-java/xom
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-java/xom
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-java/xom')
-rw-r--r--dev-java/xom/Manifest6
-rw-r--r--dev-java/xom/files/xom-1.2.6.patch49
-rw-r--r--dev-java/xom/files/xom-strip-fallback-parser.patch18
-rw-r--r--dev-java/xom/metadata.xml12
-rw-r--r--dev-java/xom/xom-1.2.10.ebuild79
5 files changed, 164 insertions, 0 deletions
diff --git a/dev-java/xom/Manifest b/dev-java/xom/Manifest
new file mode 100644
index 000000000000..d73d586b6cee
--- /dev/null
+++ b/dev-java/xom/Manifest
@@ -0,0 +1,6 @@
+AUX xom-1.2.6.patch 2096 BLAKE2B 041c55199398e37fcb4a481d7deb1c8c3fb8d980fa6ebc207236cf1e85e91c7b28f2c5e551153ac52b17272b8f02324dce7ae2b9948f9c0880a900eed84d9f62 SHA512 7d864f9178a5fd846572a17eb345a74510e7a3880c203054d7156849c10c678421ed688965d821daafcff91888be9a485c5409937055a56139066aaa6d32aca0
+AUX xom-strip-fallback-parser.patch 690 BLAKE2B c8135a026905fc16560be949598a48e02000aa29b3d1ddc6b40bd16ceb7ae60983ce703715f01e550fa2b643bcb1febb032387ab5431367d9dbc54079ed5f551 SHA512 e61defbc5c8da65561709be6431b0b15069759ec94de2f1f356d518b8b9d90a7ab1ccfd6db6148a3dbcc999b19c9607cd7586ef4c30f70e627968e726e953830
+DIST jaxen-1.1.6-src.tar.gz 204211 BLAKE2B 02e3ca40f3d6a41d417ae7f40b70ca74b4dff0bb254d5d7a80aeb725595564805bda795ee9d1b1c92ec3b1d59aad3a9cb82d8f2bac5ef0e66a3feca04bb63345 SHA512 84a3beb521c8729d7ad9bcb76a252e12d624614277eee9d5e844f79fcdfc58f5f49eac902256b17c0af6563d4c255249d9124a47c3b02827189a7489f3172309
+DIST xom-1.2.10.tar.gz 11717279 BLAKE2B dd66d423563abd717c0a663db3300b5baccf549f9dd71e42cc86b9c222f60faed1fc8525dbab04c27f271a3f048dcc01fbcb20da6ec6efd093e192c7a4b90685 SHA512 edaa4abbb929f4eba1ee092be7a196ba1c7a359b233a38abbf100dc519a9a6ca2b9a4947497e412f96ceaf509bbd03c0ce25b17e401b6cd0a95fc355bbdc7680
+EBUILD xom-1.2.10.ebuild 2180 BLAKE2B 6d72a78523641f9bf871d64d846e7641719e31a344c63f532107b356a297c6f88d444026d237c8835a51fd48dd6ac129b201e42494ed88343a0e9c55ece7bdab SHA512 4acb2e5879b5eba4e358b39aa80980f62b663ab37bac936e91d8d338e56bd8d9364646ef845d684593550fe6c5d75d57d17274b5aaa87d84a9c0ada59dbce002
+MISC metadata.xml 407 BLAKE2B 2486554418b17502be636181d1dc619a50143016a72e05d5bef8a42c631b9f09913040bc868cefae0759075f26853c605e6a11179b20f3ca3081dd091536b56e SHA512 4ec08597d54cbea6121f240565ff7b7ee614c370357b551bebd18d31749c1863e30bc8b7935caa00051f9946cc927cd34c1bad02be07eca40c89d2c6e0e7b2f6
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..94ce28945741
--- /dev/null
+++ b/dev-java/xom/xom-1.2.10.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2018 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 ~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
+}