summaryrefslogtreecommitdiff
path: root/dev-java/fop
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/fop
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-java/fop')
-rw-r--r--dev-java/fop/Manifest4
-rw-r--r--dev-java/fop/files/headless-launcher.bash1
-rw-r--r--dev-java/fop/fop-2.0-r3.ebuild129
-rw-r--r--dev-java/fop/metadata.xml8
4 files changed, 142 insertions, 0 deletions
diff --git a/dev-java/fop/Manifest b/dev-java/fop/Manifest
new file mode 100644
index 000000000000..9356ec9e0115
--- /dev/null
+++ b/dev-java/fop/Manifest
@@ -0,0 +1,4 @@
+AUX headless-launcher.bash 67 BLAKE2B 29ea0750d057e9a914ce26a14f1d6d1c4d49967aa553d6f55b115df0ebf1b77d693e01a7a06dbe92de4a589ff5847b176ccb820c23acde06b336e302a763d089 SHA512 d3a6635105ea62a62f1ff690a457bfbdebe3d15f8fd220f5508a4ec20b8a5c46e66bf9189562661d5053c6ac31a6998d1f4a117e0ac6087b336a0475635d7d3a
+DIST fop-2.0-src.zip 26381859 BLAKE2B 8500de6a23e93c14fdb4f27c59bafba27a64e6aaffb7a761f16de5bd523e2fdb83593ab53a66de79bf7b7d6c2b887ab97a34accb18be416b26448753babe2395 SHA512 428793303fcf143cffaecadc22cfdb8a065bad0108cceebcabc479d92dbe9834b4f81fd27f3e0314546d848e1960b2fe1a9d443999d8f336f7e87fce771beb7a
+EBUILD fop-2.0-r3.ebuild 3071 BLAKE2B 0eac2ff75d934a9e8fde6c4e93fdfbe83dd73107418b94f829e7d6d8aadb3979f82c042d66fb678105d6a58c020e241684ead0858ac790ea2d0b6ad869ae081d SHA512 2c8379748ea5a75274037011089863951d3fbe23d95ac37d22c784f5432774d3f7addb877f21aeafeb73cce21e0a0b5720a82761033c0a69230ba7faf1046e98
+MISC metadata.xml 242 BLAKE2B 6bf5b48906c64a18d9f27e7ecec168ed039f8d390792d62aedb8c86627a13ff09d583a736982057d245fe5db27c4016257125d69792d6bbe424e7d2a35067675 SHA512 50f4d6219b995b723d6ebbb4f2a18adbf558a685f862aea00f072254dcc0fe6c1388e4aeaf21fb3ce0fb840a2ef4851807536d037c9682b21cb1986198715a4f
diff --git a/dev-java/fop/files/headless-launcher.bash b/dev-java/fop/files/headless-launcher.bash
new file mode 100644
index 000000000000..a01c56f5e6ef
--- /dev/null
+++ b/dev-java/fop/files/headless-launcher.bash
@@ -0,0 +1 @@
+[[ "${!#}" = "-awt" ]] || gjl_java_args="-Djava.awt.headless=true"
diff --git a/dev-java/fop/fop-2.0-r3.ebuild b/dev-java/fop/fop-2.0-r3.ebuild
new file mode 100644
index 000000000000..308735bc50b0
--- /dev/null
+++ b/dev-java/fop/fop-2.0-r3.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# TODO: if 'doc' use flag is used then should build also extra docs ('docs' ant target), currently it cannot
+# be built as it needs forrest which we do not have
+# TODO: package and use optional dependency jeuclid
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc examples source test"
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="Formatting Objects Processor is a print formatter driven by XSL"
+HOMEPAGE="https://xmlgraphics.apache.org/fop/"
+SRC_URI="mirror://apache/xmlgraphics/${PN}/source/${P}-src.zip"
+
+KEYWORDS="amd64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+LICENSE="Apache-2.0"
+SLOT="0"
+
+# Tests are broken even in 2.0
+RESTRICT="test"
+
+CDEPEND="
+ dev-java/batik:1.9
+ dev-java/ant-core:0
+ dev-java/fontbox:1.7
+ dev-java/commons-io:1
+ dev-java/commons-logging:0
+ java-virtuals/servlet-api:3.0
+ dev-java/avalon-framework:4.2
+ dev-java/xmlgraphics-commons:2
+ dev-java/xml-commons-external:1.3
+ dev-java/qdox:1.12"
+
+RDEPEND=">=virtual/jre-1.6
+ ${CDEPEND}"
+
+DEPEND=">=virtual/jdk-1.6
+ app-arch/unzip
+ ${CDEPEND}"
+
+# test? (
+# dev-java/ant-junit:0
+# dev-java/junit:4
+# dev-java/xmlunit:1
+# dev-java/mockito:0
+# )"
+
+JAVA_ANT_ENCODING="ISO-8859-1"
+JAVA_ANT_REWRITE_CLASSPATH="true"
+
+EANT_GENTOO_CLASSPATH="
+ ant-core
+ batik-1.9
+ fontbox-1.7
+ commons-io-1
+ commons-logging
+ servlet-api-3.0
+ avalon-framework-4.2
+ xmlgraphics-commons-2
+ xml-commons-external-1.3
+"
+
+TARGETS=(
+ resourcegen
+ jar-hyphenation
+ jar-sandbox
+ jar-main
+)
+
+java_prepare() {
+ find "${S}"/lib -type f | xargs rm -v
+}
+
+src_compile() {
+ # https://bugs.gentoo.org/show_bug.cgi?id=554386
+ # http://wiki.apache.org/xmlgraphics-fop/HowTo/BuildFOPAlternatively
+ java-pkg_jar-from --into lib qdox-1.12 qdox.jar
+ java-pkg_jar-from --into lib xmlgraphics-commons-2 xmlgraphics-commons.jar
+ java-pkg_jar-from --into lib commons-logging commons-logging.jar
+ java-pkg_jar-from --into lib commons-io-1 commons-io.jar
+ java-pkg_jar-from --into lib fontbox-1.7 fontbox.jar
+ java-pkg_jar-from --into lib xml-commons-external-1.3 xml-apis-ext.jar
+ java-pkg_jar-from --into lib xml-commons-external-1.3 xml-apis.jar
+ java-pkg_jar-from --into lib avalon-framework-4.2 avalon-framework.jar
+ java-pkg_jar-from --virtual --into lib servlet-api-3.0 servlet-api.jar
+
+ for target in ${TARGETS[@]}; do
+ EANT_BUILD_TARGET="${target}" \
+ java-pkg-2_src_compile
+ done
+
+ if use doc; then
+ sed -i -e 's/failonerror=\"true\"/failonerror=\"false\"/;' ./build.xml
+ EANT_BUILD_TARGET="javadocs" \
+ java-pkg-2_src_compile
+ fi
+}
+
+src_install() {
+ java-pkg_dojar \
+ build/${PN}.jar \
+ build/${PN}-sandbox.jar \
+ build/${PN}-hyph.jar
+
+ java-pkg_dolauncher \
+ ${PN} --main org.apache.fop.cli.Main \
+ -pre "${FILESDIR}/headless-launcher.bash"
+
+ dodoc NOTICE README
+
+ if use doc; then
+ java-pkg_dojavadoc \
+ build/javadocs
+ fi
+
+ if use examples; then
+ java-pkg_doexamples \
+ examples/* conf
+ fi
+
+ if use source; then
+ java-pkg_dosrc \
+ src/java/org \
+ src/sandbox/org
+ fi
+}
diff --git a/dev-java/fop/metadata.xml b/dev-java/fop/metadata.xml
new file mode 100644
index 000000000000..37998bf40746
--- /dev/null
+++ b/dev-java/fop/metadata.xml
@@ -0,0 +1,8 @@
+<?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>
+</pkgmetadata>