diff options
Diffstat (limited to 'dev-java/saxon')
-rw-r--r-- | dev-java/saxon/Manifest | 12 | ||||
-rw-r--r-- | dev-java/saxon/files/9.2-build.xml | 72 | ||||
-rw-r--r-- | dev-java/saxon/files/9.2-edition.properties | 2 | ||||
-rw-r--r-- | dev-java/saxon/files/build-6.5.5.xml | 69 | ||||
-rw-r--r-- | dev-java/saxon/files/build-8.4b.xml | 123 | ||||
-rw-r--r-- | dev-java/saxon/metadata.xml | 11 | ||||
-rw-r--r-- | dev-java/saxon/saxon-6.5.5-r2.ebuild | 48 | ||||
-rw-r--r-- | dev-java/saxon/saxon-9.2.0.6-r1.ebuild | 97 | ||||
-rw-r--r-- | dev-java/saxon/saxon-9.2.0.6.ebuild | 97 |
9 files changed, 531 insertions, 0 deletions
diff --git a/dev-java/saxon/Manifest b/dev-java/saxon/Manifest new file mode 100644 index 000000000000..2b05df40ebbb --- /dev/null +++ b/dev-java/saxon/Manifest @@ -0,0 +1,12 @@ +AUX 9.2-build.xml 2061 SHA256 b319aec150c2ce260518e41eec4e8b164f0f49793f86a00f96b962cfe9fc60d2 SHA512 9e7c02427041df22a7a5eddc6d9e709635493d079efaba66a9da6320af961d933176105028f8a96fef8f84599724829d582ff64d061d70364f048ed39308e67c WHIRLPOOL cc45db5c1ec871599ddd33dd6a818665cb512052497f09863f202d68153ea3cb5f0a0e7aa0a40edd01369b4502af151e7ccad291c8b3bfef3f9edfa94e7b254d +AUX 9.2-edition.properties 74 SHA256 b520d14d6e7f6180efac9b992b598653a025a077e919bdbedc35c4165b78af3c SHA512 2c95fc288bb35f68819edc95e8ce30f921b17196123ee7ce0c9908d210e8758c51204bc7dd222d6b7e4803dceb331bcd83120622fa2bcb6587d150a0f479ca02 WHIRLPOOL 5bb0b03a6fcdaa9e8590d0a6b474bfec6be272ab9faaae39f4164b6e8a0bafa918c09b2f1b7b8942c2351e6037de03e93512dbf934ab87185bc2060ea0ede0f4 +AUX build-6.5.5.xml 2087 SHA256 2037c4ac4840dbafedd3a7321840c2f2691784cb26241b1daa76332325b98279 SHA512 581a6fbd4af73849caa2a288efe9680f01163b56d8ab3c2f8739afcf07b72ba616ee9ea5456a1f7739ecfb38f4ae4d76f57fa3f99ce022551984568f36a6531b WHIRLPOOL fb9d0c77fdc89082376e43bbdbf45d7c4a6e06f52520ecb1e7a5814bbd72c43a74cd7c4678e435d3497781ce34cb4d0055df98d6b1d97a5a3b7383bc0a3ab1b3 +AUX build-8.4b.xml 4213 SHA256 8539556510bd074cb18780c7790b26ebc2a7780b24a11662fee4b8ee34f8e787 SHA512 7eb3c3136debefae6a66abfc0a199db403e72b397c5a7b0f0b2c30f6f697ffb828dbf7d9f3ac1c08d1965aa70c556eea10de0cb2adaada1ee46648e8f0075912 WHIRLPOOL 28524badce8398782a7444b8d9d56357cc74c5799d0098a246935a89b3b0e537e2f8993760c13de74b97a92eb5190d3104e2d6a236446e96e9be662b2a62b760 +DIST saxon6-5-5.zip 3346162 SHA256 a76806dda554edc844601d0ec0fb3d2a10a2f397eabf3569dfb44b628363afc4 SHA512 2d76ab6da8fc8ca8502139f6b620d4c9e94732a520083480e3936f6bd0a9f069252a7a05df53dab49aabec505764b2ec4ca1b36022bb56df568883a0491f495a WHIRLPOOL 11bd5242e2c82ac7467561946a0b3b35e53af48962906739136ce97561ca38fd950011a1f4a65cd597d2279af244c7b474707017108296c8deaee8fcecde7652 +DIST saxonhe9-2-0-6source.zip 2942625 SHA256 4f15659cf8bb537b4b20f63cf060bf56f39453ab520fa912b2e9fe87e90a972e SHA512 6c59c0cbed905cf561387acb54bb31f0a251432deb0edf498ec4f4d9955bbcc12d1765ace594090d3ccb0416e3e72349466e430bb4f799b51fd12ce8fc5a144e WHIRLPOOL ca1b5b8f2f70eb72259b8128606830adebc6f6eed8c5c6ff9f222a672556ff8f73219960758480366004b656100e017bfdebad7f4dc60afc9cb3ab6793fa9364 +EBUILD saxon-6.5.5-r2.ebuild 867 SHA256 91384306d4f19114f49563462c0626ba0a11ee8c95728e42bf818f52845f524a SHA512 a8a6978c47998380b6c7ec09f7102584007aedd829cd95d0ff629d2df9062c5eb46ceecff88b2bb0fa575907810fb21fa14dc1253ff0da3f9962687935f53df1 WHIRLPOOL 0d3a059d67d730933dfe6d1dfb057d400dbed0bf7274cee0e63e9c568a5ead04502e6084aa4d7ba7da79d32bbb67986d9ae14d808917d3e516b13653628a1b86 +EBUILD saxon-9.2.0.6-r1.ebuild 2197 SHA256 8f50f9023431c08dbb881c94ba54d3758cc18ebe34e704d91c3f2961479ce674 SHA512 b2ec3ef58bc895f3aa42eaaa23d033e3f5186cbaf1078d931160071bdcb4fc2bbab3edcde16ece9fc341b108060d76bf96082e961ff4d9ea95c8ee7863208b9d WHIRLPOOL 8f8ed395c87d8be73cea8049aaf2f257ebd2db2427229d44b5caca6776844ccf886be463cdcbcadcc558e75453e50925f079c43fa0a9077d38252dbc09ef4783 +EBUILD saxon-9.2.0.6.ebuild 2201 SHA256 2c63897465ce56d5030a7c9f01bd968cedb19e102dcf372fc1659ee3c8ca1131 SHA512 ff42010f65d63fbdb5e584cc409dd455e956376835eb3336731781b2a39b31080d7c24d852b0b9d9c95743b3dfae067dcfe936420475884deb464922ce66b2c4 WHIRLPOOL e59d77793ca070e02eba1dabaea54b2c2c584f8bed83ca043c80dd049106030f2941bd5ce2aad061b45effa5dc899c80e9c9411b9afa38406a37eb74e7fdea74 +MISC ChangeLog 3500 SHA256 bdc83bc159daf99e431754c8b5f2e89fdac4a55d84261c312b000999046af4f1 SHA512 18475062f7cb6344431e2ba01266117477868862b3e1d68c2b5e31a4cc4e75689b3b99f644ea931b40b78c6e634d204b6f1b880f5b36aa991e94ada2e056039b WHIRLPOOL 117efb6530659608ebe1b4da1789a17005aada8639508fdd7ed80a28824f846655b24ca2042c7c091bd35f18a2936f85198bf47c52f1197c35e7d987f7f2edf6 +MISC ChangeLog-2015 5242 SHA256 f9ac6dd3a71814066208c1b697d08ef60f4ac7551b0870aec6392891536de928 SHA512 9b3435b7ff0f307a99ce6e733b88a4d0e39c2e079095b46230c43d26035de5f5c92cd87f14fd9542cb45463c05c3677f0ce1260fe2fe2bd86ad036deeeeeb2bb WHIRLPOOL 2008087b5de32bc7d7ba40f0d345d4cbd9267d1ee5e13a8a1342818a2c002be2a8e6f7536f0426cbc2e46bb8698d228693368c664c60cf56b559089b7b0aeb68 +MISC metadata.xml 311 SHA256 114b0d85d54aa436bbc74a30494f4e41199e89f6edf127df09a9d20383678888 SHA512 2fc12b71b9e977a095610f8f784f19252d44e31442cc5d5ce513f601a2394f4bf491fc9065de88bbf45afe7b8f1ca33ea907e31aa26875f48846856f1bf51126 WHIRLPOOL 2c5c113db14567a1a835a993d09b7b41e682c67bb3758e63965a861f23c2ddcc6bc6d2057096433e8f8d62b121274f531b182cf98ac6e1b4eea608d8e90275c2 diff --git a/dev-java/saxon/files/9.2-build.xml b/dev-java/saxon/files/9.2-build.xml new file mode 100644 index 000000000000..3bd9a64d4fe5 --- /dev/null +++ b/dev-java/saxon/files/9.2-build.xml @@ -0,0 +1,72 @@ +<!-- simple generic build file --> + +<project name="saxon" default="all" basedir="."> + + <!-- Properties --> + + <property name="name" value="saxon"/> + <property name="src" value="src"/> + <property name="build" value="build"/> + <property name="build.classes" value="${build}/classes"/> + <property name="build.doc" value="${build}/api"/> + <property name="build.lib" value="${build}/lib"/> + <property name="j2se.javadoc" value="http://java.sun.com/javase/@JDK@/docs/api"/> + <property name="jdom.javadoc" value="/usr/share/jdom-@JDOM@/api"/> + + <!-- Targets --> + + <!-- Prepare build directories --> + <target name="prepare"> + <mkdir dir="${src}"/> + <mkdir dir="${build}"/> + <mkdir dir="${build.classes}"/> + <mkdir dir="${build.lib}"/> + <mkdir dir="${build.doc}"/> + <copy todir="${src}"> + <fileset dir="." includes="com/**,org/**,net/**"/> + </copy> + </target> + + <!-- Kill all the created directories --> + <target name="clean"> + <delete dir="${build}"/> + <delete dir="${src}"/> + </target> + + <!-- Build classes --> + <target name="classes" depends="prepare"> + <javac srcdir="${src}" destdir="${build.classes}" encoding="ISO-8859-1"/> + </target> + + <!-- Build jar archives --> + + <target name="jar" depends="classes"> + <jar jarfile="${build.lib}/${name}.jar" + basedir="${build.classes}"> + <manifest> + <attribute name="Main-Class" value="net.sf.saxon.Transform"/> + </manifest> + </jar> + </target> + + <!-- Build the full JavaDocs --> + <target name="javadoc" depends="prepare"> + <javadoc sourcepath="${src}" + destdir="${build.doc}" + doctitle="${name} JavaDoc" + windowtitle="${name} JavaDoc" + package="true" + author="true" + version="true" + packagenames="net.sf.saxon.*,org.w3c.xsl.*" + encoding="ISO-8859-1" + > + <link href="${j2se.javadoc}"/> + <link href="${jdom.javadoc}"/> + </javadoc> + </target> + + <!-- Build everything --> + <target name="all" depends="jar,javadoc"/> + +</project> diff --git a/dev-java/saxon/files/9.2-edition.properties b/dev-java/saxon/files/9.2-edition.properties new file mode 100644 index 000000000000..bb5acee0b19c --- /dev/null +++ b/dev-java/saxon/files/9.2-edition.properties @@ -0,0 +1,2 @@ +config=net.sf.saxon.Configuration +platform=net.sf.saxon.java.JavaPlatform diff --git a/dev-java/saxon/files/build-6.5.5.xml b/dev-java/saxon/files/build-6.5.5.xml new file mode 100644 index 000000000000..bb866d07642a --- /dev/null +++ b/dev-java/saxon/files/build-6.5.5.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--- + @author: Saleem Abdulrasool <compnerd@gentoo.org> + @date: 5/9/2005 + @revision: 1.0_alpha + + @notes: Call using the following: ant -f build.xml -Dproject.name=${project name} -Dpackage.name=${package name} +--> + +<project name="Gentoo_Builder" default="jar" basedir="."> + <property name="src" value="src"/> + <property name="build" value="build"/> + <property name="dist" value="dist"/> + + <property name="project.name" value="saxon6.5"/> + <property name="pkg" value="${package.name}"/> + <property name="all.jar" value="${project.name}.jar"/> + + <!-- Override any defined properties --> + <property file="build.properties"/> + <path id="lib.classpath"> + <fileset dir="lib"> + <include name="**/*.jar"/> + </fileset> + </path> + + + <target name="init"> + <tstamp/> + <mkdir dir="${build}"/> + <mkdir dir="${dist}"/> + <mkdir dir="${dist}/doc"/> + </target> + + <target name="compile" depends="init"> + <javac srcdir="${src}" destdir="${build}" classpath="${classpath}" classpathref="lib.classpath"/> + </target> + + <target name="manifest" depends="init"> + <move file="${src}/META-INF" tofile="${build}/META-INF"/> + <manifest file="${build}/META-INF/MANIFEST.MF" mode="update"> + <attribute name="Built-By" value="Gentoo Portage"/> + </manifest> + </target> + + <target name="jar-saxon6.5" depends="compile,manifest"> + <jar jarfile="${dist}/${all.jar}" manifest="${build}/META-INF/MANIFEST.MF"> + <fileset dir="${build}"> + <include name="com/**"/> + <include name="javax/**"/> + <include name="org/**"/> + <include name="META-INF/services/javax.xml.transform.TransformerFactory"/> + </fileset> + </jar> + </target> + + <target name="jar" depends="jar-saxon6.5"/> + + <target name="javadoc" depends="compile"> + <javadoc destdir="${dist}/doc/api" classpathref="lib.classpath"> + <fileset dir="${src}"/> + </javadoc> + </target> + + <target name="clean"> + <delete dir="${build}"/> + <delete dir="${dist}"/> + </target> +</project> diff --git a/dev-java/saxon/files/build-8.4b.xml b/dev-java/saxon/files/build-8.4b.xml new file mode 100644 index 000000000000..a3b6ebafbec7 --- /dev/null +++ b/dev-java/saxon/files/build-8.4b.xml @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--- + @author: Saleem Abdulrasool <compnerd@gentoo.org> + @date: 5/9/2005 + @revision: 1.0_alpha + + @notes: Call using the following: ant -f build.xml -Dproject.name=${project name} -Dpackage.name=${package name} +--> + +<project name="Gentoo_Builder" default="jar" basedir="."> + <property name="src" value="src"/> + <property name="build" value="build"/> + <property name="dist" value="dist"/> + + <property name="project.name" value="saxon8"/> + <property name="pkg" value="${package.name}"/> + <property name="all.jar" value="${project.name}.jar"/> + <property name="dom.jar" value="${project.name}-dom.jar"/> + <property name="jdom.jar" value="${project.name}-jdom.jar"/> + <property name="sql.jar" value="${project.name}-sql.jar"/> + <property name="xom.jar" value="${project.name}-xom.jar"/> + <property name="xpath.jar" value="${project.name}-xpath.jar"/> + + <!-- Override any defined properties --> + <property file="build.properties"/> + <path id="lib.classpath"> + <fileset dir="lib"> + <include name="**/*.jar"/> + </fileset> + </path> + + + <target name="init"> + <tstamp/> + <mkdir dir="${build}"/> + <mkdir dir="${build}/META-INF/services"/> + <mkdir dir="${dist}"/> + <mkdir dir="${dist}/doc"/> + </target> + + <target name="compile" depends="init"> + <javac srcdir="${src}" destdir="${build}" classpath="${classpath}" classpathref="lib.classpath"/> + </target> + + <target name="manifest" depends="init"> + <manifest file="${build}/META-INF/MANIFEST.MF" mode="update"> + <attribute name="Built-By" value="Gentoo Portage"/> + </manifest> + <echo file="${build}/META-INF/services/javax.xml.xpath.XPathFactory" message="net.sf.saxon.xpath.XPathFactory"/> + <echo file="${build}/META-INF/services/javax.xml.transform.TransformerFactory" message="net.sf.saxon.transform.TransformerFactoryImpl"/> + </target> + + <target name="jar-saxon8" depends="compile,manifest"> + <jar jarfile="${dist}/${all.jar}" manifest="${build}/META-INF/MANIFEST.MF"> + <fileset dir="${build}"> + <include name="net/sf/saxon/**"/> + <include name="META-INF/services/javax.xml.transform.TransformFactory"/> + <exclude name="**/dom/**"/> + <exclude name="**/jdom/**"/> + <exclude name="**/sql/**"/> + <exclude name="**/xom/**"/> + <exclude name="**/xpath/**"/> + </fileset> + <manifest> + <attribute name="Main-Class" value="net.sf.saxon.Transform" /> + </manifest> + </jar> + </target> + + <target name="jar-saxon8-dom" depends="compile,manifest"> + <jar jarfile="${dist}/${dom.jar}" manifest="${build}/META-INF/MANIFEST.MF"> + <fileset dir="${build}"> + <include name="net/sf/saxon/dom/**"/> + </fileset> + </jar> + </target> + + <target name="jar-saxon8-jdom" depends="compile,manifest"> + <jar jarfile="${dist}/${jdom.jar}" manifest="${build}/META-INF/MANIFEST.MF"> + <fileset dir="${build}"> + <include name="net/sf/saxon/jdom/**"/> + </fileset> + </jar> + </target> + + <target name="jar-saxon8-sql" depends="compile,manifest"> + <jar jarfile="${dist}/${sql.jar}" manifest="${build}/META-INF/MANIFEST.MF"> + <fileset dir="${build}"> + <include name="net/sf/saxon/jdom/**"/> + </fileset> + </jar> + </target> + + <target name="jar-saxon8-xom" depends="compile,manifest"> + <jar jarfile="${dist}/${xom.jar}" manifest="${build}/META-INF/MANIFEST.MF"> + <fileset dir="${build}"> + <include name="net/sf/saxon/xom/**"/> + </fileset> + </jar> + </target> + + <target name="jar-saxon8-xpath" depends="compile,manifest"> + <jar jarfile="${dist}/${xpath.jar}" manifest="${build}/META-INF/MANIFEST.MF"> + <fileset dir="${build}"> + <include name="net/sf/saxon/xpath/**"/> + <include name="META-INF/services/javax.xml.xpath.XPathFactory"/> + </fileset> + </jar> + </target> + + <target name="jar" depends="jar-saxon8,jar-saxon8-dom,jar-saxon8-jdom,jar-saxon8-sql,jar-saxon8-xom,jar-saxon8-xpath"/> + + <target name="javadoc" depends="compile"> + <javadoc destdir="${dist}/doc/api" classpathref="lib.classpath"> + <fileset dir="${src}"/> + </javadoc> + </target> + + <target name="clean"> + <delete dir="${build}"/> + <delete dir="${dist}"/> + </target> +</project> diff --git a/dev-java/saxon/metadata.xml b/dev-java/saxon/metadata.xml new file mode 100644 index 000000000000..d11a296ea609 --- /dev/null +++ b/dev-java/saxon/metadata.xml @@ -0,0 +1,11 @@ +<?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="sourceforge">saxon</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-java/saxon/saxon-6.5.5-r2.ebuild b/dev-java/saxon/saxon-6.5.5-r2.ebuild new file mode 100644 index 000000000000..6ea74c425702 --- /dev/null +++ b/dev-java/saxon/saxon-6.5.5-r2.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc examples source" + +inherit java-pkg-2 java-pkg-simple versionator + +MY_P="${PN}$(replace_all_version_separators -)" + +DESCRIPTION="Set of tools for processing XML documents" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip" +HOMEPAGE="http://saxon.sourceforge.net/" + +LICENSE="MPL-1.1" +SLOT="6.5" +KEYWORDS="amd64 x86" + +CDEPEND="dev-java/jdom:0" + +RDEPEND=" + ${CDEPEND} + >=virtual/jre-1.6" + +DEPEND=" + ${CDEPEND} + >=virtual/jdk-1.6" + +JAVA_GENTOO_CLASSPATH="jdom" +JAVA_ENCODING="ISO-8859-1" +JAVA_SRC_DIR="src" + +src_unpack() { + unpack ${A} + unzip -qq source.zip -d src || die "failed to unpack" +} + +src_prepare() { + default + java-pkg_clean +} + +src_install() { + default + java-pkg-simple_src_install + use examples && java-pkg_doexamples samples +} diff --git a/dev-java/saxon/saxon-9.2.0.6-r1.ebuild b/dev-java/saxon/saxon-9.2.0.6-r1.ebuild new file mode 100644 index 000000000000..149209c055b8 --- /dev/null +++ b/dev-java/saxon/saxon-9.2.0.6-r1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="3" + +JAVA_PKG_IUSE="doc source" + +inherit versionator java-pkg-2 java-ant-2 + +MY_PV="$(replace_all_version_separators -)" + +DESCRIPTION="A XSLT and XQuery Processor" +HOMEPAGE="http://saxon.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${PN}he${MY_PV}source.zip" + +LICENSE="MPL-1.0" +SLOT="9" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~x86-fbsd" + +IUSE="" + +# virtual/jdk slot for external javadoc +JDK_VER="6" +# dev-java/jdom slot for external javadoc +JDOM_VER="0" +# dev-java/dom4j slot +DOM4J_VER="1" + +CDEPEND="dev-java/ant-core + dev-java/dom4j:${DOM4J_VER} + dev-java/jdom:${JDOM_VER} + dev-java/xom" +RDEPEND=">=virtual/jre-1.${JDK_VER} + ${CDEPEND}" +DEPEND=">=virtual/jdk-1.${JDK_VER} + app-arch/unzip + ${CDEPEND}" + +S="${WORKDIR}" + +# prepare eclass variables +JAVA_ANT_REWRITE_CLASSPATH="yes" +JAVA_ANT_CLASSPATH_TAGS="javac javadoc" + +src_unpack() { + unpack ${A} + + ### fedora-inspired remove + + # deadNET + rm -rv net/sf/saxon/dotnet + + # Depends on XQJ (javax.xml.xquery) + rm -rv net/sf/saxon/xqj + + # This requires a EE edition feature (com.saxonica.xsltextn) + rm -v net/sf/saxon/option/sql/SQLElementFactory.java +} + +java_prepare() { + # <major>.<minor> version + local version="$(get_version_component_range 1-2)" + + # generate build.xml with external javadoc links + sed -e "s:@JDK@:${JDK_VER}:" \ + -e "s:@JDOM@:${JDOM_VER}:" \ + < "${FILESDIR}/${version}-build.xml" \ + > "${S}/build.xml" \ + || die "build.xml generation failed!" + + # prepare creates the dir for properties + eant prepare + + # properties + cp -v \ + "${FILESDIR}/${version}-edition.properties" \ + "${S}/build/classes/edition.properties" +} + +src_compile() { + local gcp="$(java-pkg_getjars dom4j-${DOM4J_VER},jdom,xom)" + gcp="${gcp}:$(java-pkg_getjars --build-only ant-core)" + eant -Dgentoo.classpath="${gcp}" jar $(use_doc) +} + +src_install() { + java-pkg_dojar build/lib/${PN}.jar + + java-pkg_dolauncher ${PN}${SLOT}-transform --main net.sf.saxon.Transform + java-pkg_dolauncher ${PN}${SLOT}-query --main net.sf.saxon.Query + + java-pkg_register-ant-task + + use doc && java-pkg_dojavadoc build/api + + use source && java-pkg_dosrc src +} diff --git a/dev-java/saxon/saxon-9.2.0.6.ebuild b/dev-java/saxon/saxon-9.2.0.6.ebuild new file mode 100644 index 000000000000..715fbbf14830 --- /dev/null +++ b/dev-java/saxon/saxon-9.2.0.6.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="3" + +JAVA_PKG_IUSE="doc source" + +inherit versionator java-pkg-2 java-ant-2 + +MY_PV="$(replace_all_version_separators -)" + +DESCRIPTION="A XSLT and XQuery Processor" +HOMEPAGE="http://saxon.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${PN}he${MY_PV}source.zip" + +LICENSE="MPL-1.0" +SLOT="9" +KEYWORDS="amd64 ~arm ppc64 x86 ~x86-fbsd" + +IUSE="" + +# virtual/jdk slot for external javadoc +JDK_VER="6" +# dev-java/jdom slot for external javadoc +JDOM_VER="1.0" +# dev-java/dom4j slot +DOM4J_VER="1" + +CDEPEND="dev-java/ant-core + dev-java/dom4j:${DOM4J_VER} + dev-java/jdom:${JDOM_VER} + dev-java/xom" +RDEPEND=">=virtual/jre-1.${JDK_VER} + ${CDEPEND}" +DEPEND=">=virtual/jdk-1.${JDK_VER} + app-arch/unzip + ${CDEPEND}" + +S="${WORKDIR}" + +# prepare eclass variables +JAVA_ANT_REWRITE_CLASSPATH="yes" +JAVA_ANT_CLASSPATH_TAGS="javac javadoc" + +src_unpack() { + unpack ${A} + + ### fedora-inspired remove + + # deadNET + rm -rv net/sf/saxon/dotnet + + # Depends on XQJ (javax.xml.xquery) + rm -rv net/sf/saxon/xqj + + # This requires a EE edition feature (com.saxonica.xsltextn) + rm -v net/sf/saxon/option/sql/SQLElementFactory.java +} + +java_prepare() { + # <major>.<minor> version + local version="$(get_version_component_range 1-2)" + + # generate build.xml with external javadoc links + sed -e "s:@JDK@:${JDK_VER}:" \ + -e "s:@JDOM@:${JDOM_VER}:" \ + < "${FILESDIR}/${version}-build.xml" \ + > "${S}/build.xml" \ + || die "build.xml generation failed!" + + # prepare creates the dir for properties + eant prepare + + # properties + cp -v \ + "${FILESDIR}/${version}-edition.properties" \ + "${S}/build/classes/edition.properties" +} + +src_compile() { + local gcp="$(java-pkg_getjars dom4j-${DOM4J_VER},jdom-${JDOM_VER},xom)" + gcp="${gcp}:$(java-pkg_getjars --build-only ant-core)" + eant -Dgentoo.classpath="${gcp}" jar $(use_doc) +} + +src_install() { + java-pkg_dojar build/lib/${PN}.jar + + java-pkg_dolauncher ${PN}${SLOT}-transform --main net.sf.saxon.Transform + java-pkg_dolauncher ${PN}${SLOT}-query --main net.sf.saxon.Query + + java-pkg_register-ant-task + + use doc && java-pkg_dojavadoc build/api + + use source && java-pkg_dosrc src +} |