public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/fop/files/, dev-java/fop/
Date: Wed, 13 Jan 2016 20:58:39 +0000 (UTC)	[thread overview]
Message-ID: <1452718710.eb31649bd0c09b4b195f8fb1204bee517d87a703.chewi@gentoo> (raw)

commit:     eb31649bd0c09b4b195f8fb1204bee517d87a703
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 13 20:57:05 2016 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Jan 13 20:58:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb31649b

dev-java/fop: Set headless flag in launcher, except when -awt given

fop will die if the value of DISPLAY is invalid. This was breaking
other package builds for some users. A real display is needed when the
-awt option is given though so make this conditional. See bug #569808.

Package-Manager: portage-2.2.26

 dev-java/fop/files/headless-launcher.bash |   1 +
 dev-java/fop/fop-2.0-r2.ebuild            | 130 ++++++++++++++++++++++++++++++
 2 files changed, 131 insertions(+)

diff --git a/dev-java/fop/files/headless-launcher.bash b/dev-java/fop/files/headless-launcher.bash
new file mode 100644
index 0000000..a01c56f
--- /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-r2.ebuild b/dev-java/fop/fop-2.0-r2.ebuild
new file mode 100644
index 0000000..af0e1c7
--- /dev/null
+++ b/dev-java/fop/fop-2.0-r2.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# 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="http://xmlgraphics.apache.org/fop/"
+SRC_URI="mirror://apache/xmlgraphics/${PN}/source/${P}-src.zip"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+# Tests are broken even in 2.0
+RESTRICT="test"
+
+CDEPEND="dev-java/batik:1.8
+	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.8
+	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
+}


             reply	other threads:[~2016-01-13 20:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13 20:58 James Le Cuirot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-04-17 22:27 [gentoo-commits] repo/gentoo:master commit in: dev-java/fop/files/, dev-java/fop/ Florian Schmaus
2022-05-09 17:21 Arthur Zamarin
2023-09-20  7:30 Miroslav Šulc
2024-02-22 13:45 Miroslav Šulc
2024-10-30 11:32 Miroslav Šulc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452718710.eb31649bd0c09b4b195f8fb1204bee517d87a703.chewi@gentoo \
    --to=chewi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox