* [gentoo-commits] repo/gentoo:master commit in: dev-java/batik/, dev-java/batik/files/
@ 2022-03-29 8:26 Florian Schmaus
0 siblings, 0 replies; 3+ messages in thread
From: Florian Schmaus @ 2022-03-29 8:26 UTC (permalink / raw
To: gentoo-commits
commit: f05681e1984f759b0e7235b9ea373b9d27a8cff4
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Tue Mar 22 17:08:01 2022 +0000
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Mar 29 08:26:53 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f05681e1
dev-java/batik: Bump to 1.14
Closes: https://bugs.gentoo.org/710208
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/24382
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
dev-java/batik/Manifest | 1 +
dev-java/batik/batik-1.14.ebuild | 191 ++++++++++++++++++++++++++++
dev-java/batik/files/batik-1.14-modules | 33 +++++
dev-java/batik/files/batik-squiggle.desktop | 9 ++
dev-java/batik/metadata.xml | 4 +
5 files changed, 238 insertions(+)
diff --git a/dev-java/batik/Manifest b/dev-java/batik/Manifest
index d7732ad2c392..33f7b1515575 100644
--- a/dev-java/batik/Manifest
+++ b/dev-java/batik/Manifest
@@ -1 +1,2 @@
+DIST batik-src-1.14.tar.gz 17647867 BLAKE2B 9385e77e739ece921012310a53953a6e258a5d748987e85dd20783ca248ae55619db6472b7590a45fe40a1b51c693478a37a7dbe1a958b42392c525e5f228815 SHA512 689c52f58f8f0456c89bd18745d2d92e7590b9054bea71b96be87d44977057d583e78504cbf14afc3e0c585d2383dac3009c7c421de868c847db045e921da8fb
DIST batik-src-1.9.tar.gz 16748072 BLAKE2B 4e23c0de3d56ba130c5bc9ef80a01549e8c11ab4db3b1ac5dae8525cf0a3a8b7f4df3161c12f1f0df9c74229aaf2034fb6c9c2f91b7fc7407a0af580d144e606 SHA512 96a5c16bd3d61ea33ed5013fd0b00f1724470d9b667f0f84ef4a29dcaaa19b1cc8ffcc92dc49767f4e29d77a47f99df5afca479336ac5619778b51a6fb6cd952
diff --git a/dev-java/batik/batik-1.14.ebuild b/dev-java/batik/batik-1.14.ebuild
new file mode 100644
index 000000000000..f4be7b642036
--- /dev/null
+++ b/dev-java/batik/batik-1.14.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Skeleton command:
+# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri mirror://apache/xmlgraphics/batik/source/batik-src-1.14.tar.gz --slot 1.14 --keywords "~amd64 ~ppc64 ~x86" --ebuild batik-1.14.ebuild
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.apache.xmlgraphics:batik:1.14"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit desktop java-pkg-2 java-pkg-simple xdg-utils
+
+DESCRIPTION="XML Graphics Batik"
+HOMEPAGE="https://xmlgraphics.apache.org/batik/"
+SRC_URI="mirror://apache/xmlgraphics/batik/source/batik-src-${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="1.14"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+
+CP_DEPEND="
+ dev-java/jacl:0
+ dev-java/jython:2.7
+ dev-java/rhino:1.6
+ dev-java/xalan:0
+ dev-java/xml-commons-external:1.3
+ dev-java/xmlgraphics-commons:2
+"
+
+DEPEND="${CP_DEPEND}
+ >=virtual/jdk-1.8:*"
+
+RDEPEND="${CP_DEPEND}
+ >=virtual/jre-1.8:*"
+
+DOCS=( {CHANGES,NOTICE,README} )
+
+S="${WORKDIR}/batik-${PV}"
+
+src_prepare() {
+ default
+ java-pkg_clean
+}
+
+src_compile() {
+
+ # We loop over the modules list and compile the jar files.
+ while read module ; do \
+
+ echo "compiling $module"
+
+ JAVA_SRC_DIR=""
+ JAVA_RESOURCE_DIRS=""
+ JAVA_JAR_FILENAME="$module.jar"
+ JAVA_MAIN_CLASS=""
+
+ # Not all of the modules have resources.
+ if [[ -d $module/src/main/resources ]]; then \
+ JAVA_RESOURCE_DIRS="$module/src/main/resources"
+ fi
+
+ # Don't let sed die on modules without MainClass.
+ JAVA_MAIN_CLASS=$( sed -n 's:.*<mainClass>\(.*\)</mainClass>:\1:p' $module/pom.xml )
+
+ # Some modules don't have source code.
+ if [[ -d $module/src/main/java/org ]]; then \
+ JAVA_SRC_DIR="$module/src/main/java"
+ java-pkg-simple_src_compile
+ else
+ # This case applies to batik-rasterizer.
+ if [[ -d $module/src/main/resources/org ]]; then \
+ jar -cfe $module.jar "${JAVA_MAIN_CLASS}" -C "$module/src/main/resources" . || die
+ # Else for batik-rasterizer-ext, batik-squiggle and batik-squiggle-ext
+ else
+ jar -cfe $module.jar "${JAVA_MAIN_CLASS}" -C . README || die
+ zip -d $module.jar "README"
+ fi
+ fi
+
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":$module.jar"
+
+ rm -fr target || die
+
+ # Modules batik-rasterizer-ext and batik-squiggle-ext, upstream puts their jar files in the extensions
+ # directory, see batik-extension/src/main/resources/org/apache/batik/extensions/README.txt
+ # We keep them in the mudules list for later but omit them by 'grep -v'.
+ # The same for batik-test-old which depends on fop-transcoder-allinone which itself depends on batik.
+ # batik-1.14-modules is the "Reactor Build Order" extracted from the output of "mvn dependency:tree".
+ done < <(grep -v '\(batik-rasterizer-ext\|batik-squiggle-ext\|batik-test-old\)' "${FILESDIR}"/batik-1.14-modules)
+
+ if use doc; then
+
+ JAVA_SRC_DIR=""
+ JAVA_JAR_FILENAME="ignoreme.jar"
+
+ while read module ; do \
+
+ # Some modules don't have source code
+ if [[ -d $module/src/main/java/org ]]; then \
+ JAVA_SRC_DIR+=( "$module/src/main/java" )
+ fi
+
+ done < "${FILESDIR}"/batik-1.14-modules
+
+ java-pkg-simple_src_compile
+ fi
+}
+
+src_test() {
+
+ JAVA_TEST_GENTOO_CLASSPATH="junit-4"
+
+ while read module ; do \
+
+ echo "testing $module"
+
+ JAVA_TEST_SRC_DIR=""
+ JAVA_TEST_RESOURCE_DIRS=""
+ JAVA_TEST_RUN_ONLY=""
+
+ if [[ -d $module/src/test/resources ]]; then \
+ JAVA_TEST_RESOURCE_DIRS="$module/src/test/resources"
+ fi
+
+ # https://github.com/apache/xmlgraphics-batik/blob/refs/tags/batik-1_14/batik-util/pom.xml#L74-L75
+ if [[ $module == batik-util ]]; then \
+ JAVA_TEST_RUN_ONLY="org.apache.batik.util.Base64TestCases"
+ fi
+
+ if [[ -d $module/src/test/java/org ]]; then \
+ JAVA_TEST_SRC_DIR="$module/src/test/java"
+ java-pkg-simple_src_test
+ fi
+
+ done < <(grep -v '\(batik-rasterizer-ext\|batik-squiggle-ext\|batik-test-old\)' "${FILESDIR}"/batik-1.14-modules)
+}
+
+src_install() {
+ einstalldocs
+ domenu "${FILESDIR}"/batik-squiggle.desktop
+ doicon batik-svgbrowser/src/main/resources/org/apache/batik/apps/svgbrowser/resources/init.svg
+
+ while read module ; do \
+
+ JAVA_MAIN_CLASS=$( sed -n 's:.*<mainClass>\(.*\)</mainClass>:\1:p' $module/pom.xml )
+
+ java-pkg_dojar $module.jar
+
+ # Add a launcher if the module has a MainClass.
+ if [[ -n "${JAVA_MAIN_CLASS}" ]]; then \
+ java-pkg_dolauncher "$module-${SLOT}" --main "${JAVA_MAIN_CLASS}"
+ fi
+
+ # Some modules don't have source code
+ if [[ -d $module/src/main/java/org ]]; then \
+
+ if use source; then
+ java-pkg_dosrc "$module/src/main/java/*"
+ fi
+
+ fi
+
+ done < <(grep -v '\(batik-rasterizer-ext\|batik-squiggle-ext\|batik-test-old\)' "${FILESDIR}"/batik-1.14-modules)
+
+ local java_policy_file="${JAVA_PKG_SHAREPATH}/etc/${PN}.policy"
+ insinto "$(dirname "${java_policy_file}")"
+ newins - "$(basename "${java_policy_file}")" <<- _EOF_
+ grant codeBase "file:${EPREFIX}${JAVA_PKG_JARDEST}/-" {
+ permission java.security.AllPermission;
+ };
+ _EOF_
+ java-pkg_register-environment-variable \
+ gjl_java_args \
+ "-Djava.security.policy=file:${EPREFIX}${java_policy_file}"
+
+ if use doc; then
+ java-pkg_dojavadoc target/api
+ fi
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+}
diff --git a/dev-java/batik/files/batik-1.14-modules b/dev-java/batik/files/batik-1.14-modules
new file mode 100644
index 000000000000..d9c964870901
--- /dev/null
+++ b/dev-java/batik/files/batik-1.14-modules
@@ -0,0 +1,33 @@
+batik-constants
+batik-i18n
+batik-test
+batik-util
+batik-awt-util
+batik-css
+batik-ext
+batik-xml
+batik-dom
+batik-parser
+batik-svg-dom
+batik-anim
+batik-gvt
+batik-script
+batik-bridge
+batik-svggen
+batik-transcoder
+batik-codec
+batik-extension
+batik-gui-util
+batik-svgrasterizer
+batik-rasterizer-ext
+batik-rasterizer
+batik-slideshow
+batik-swing
+batik-svgbrowser
+batik-squiggle-ext
+batik-squiggle
+batik-svgpp
+batik-ttf2svg
+batik-test-swing
+batik-test-svg
+batik-test-old
diff --git a/dev-java/batik/files/batik-squiggle.desktop b/dev-java/batik/files/batik-squiggle.desktop
new file mode 100644
index 000000000000..95bb990177c7
--- /dev/null
+++ b/dev-java/batik/files/batik-squiggle.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Squiggle
+Comment=SVG browser
+Exec=batik-squiggle-1.14
+Icon=init
+Terminal=false
+Type=Application
+Categories=Graphics;VectorGraphics;
+MimeType=image/svg+xml;
diff --git a/dev-java/batik/metadata.xml b/dev-java/batik/metadata.xml
index 2841917ad49d..a9b2477896cb 100644
--- a/dev-java/batik/metadata.xml
+++ b/dev-java/batik/metadata.xml
@@ -5,6 +5,10 @@
<email>java@gentoo.org</email>
<name>Java</name>
</maintainer>
+<upstream>
+ <bugs-to>https://issues.apache.org/jira/projects/BATIK/issues/</bugs-to>
+ <remote-id type="github">apache/xmlgraphics-batik</remote-id>
+</upstream>
<longdescription>
Java toolkit for applications or applets that want to use
images in the Scalable Vector Graphics (SVG) format for various
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-java/batik/, dev-java/batik/files/
@ 2022-05-09 17:21 Arthur Zamarin
0 siblings, 0 replies; 3+ messages in thread
From: Arthur Zamarin @ 2022-05-09 17:21 UTC (permalink / raw
To: gentoo-commits
commit: 5776e4441e70b5695f57230978afd1fc9a6115b9
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Thu May 5 16:25:30 2022 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon May 9 17:21:20 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5776e444
dev-java/batik: drop 1.9
Closes: https://bugs.gentoo.org/831112
Closes: https://bugs.gentoo.org/833406
Closes: https://bugs.gentoo.org/831105
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
dev-java/batik/Manifest | 1 -
dev-java/batik/batik-1.9.ebuild | 109 ------------------------
dev-java/batik/files/batik-1.9-ImportInfo.patch | 10 ---
3 files changed, 120 deletions(-)
diff --git a/dev-java/batik/Manifest b/dev-java/batik/Manifest
index 33f7b1515575..4ac30465bd11 100644
--- a/dev-java/batik/Manifest
+++ b/dev-java/batik/Manifest
@@ -1,2 +1 @@
DIST batik-src-1.14.tar.gz 17647867 BLAKE2B 9385e77e739ece921012310a53953a6e258a5d748987e85dd20783ca248ae55619db6472b7590a45fe40a1b51c693478a37a7dbe1a958b42392c525e5f228815 SHA512 689c52f58f8f0456c89bd18745d2d92e7590b9054bea71b96be87d44977057d583e78504cbf14afc3e0c585d2383dac3009c7c421de868c847db045e921da8fb
-DIST batik-src-1.9.tar.gz 16748072 BLAKE2B 4e23c0de3d56ba130c5bc9ef80a01549e8c11ab4db3b1ac5dae8525cf0a3a8b7f4df3161c12f1f0df9c74229aaf2034fb6c9c2f91b7fc7407a0af580d144e606 SHA512 96a5c16bd3d61ea33ed5013fd0b00f1724470d9b667f0f84ef4a29dcaaa19b1cc8ffcc92dc49767f4e29d77a47f99df5afca479336ac5619778b51a6fb6cd952
diff --git a/dev-java/batik/batik-1.9.ebuild b/dev-java/batik/batik-1.9.ebuild
deleted file mode 100644
index 2e905bf8073d..000000000000
--- a/dev-java/batik/batik-1.9.ebuild
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-JAVA_PKG_IUSE="doc"
-
-inherit java-pkg-2 java-ant-2 epatch
-
-DESCRIPTION="Java based SVG toolkit"
-HOMEPAGE="https://xmlgraphics.apache.org/batik/"
-SRC_URI="http://apache.mirrors.ovh.net/ftp.apache.org/dist/xmlgraphics/${PN}/source/${PN}-src-${PV}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="1.9"
-KEYWORDS="amd64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-IUSE="doc python tcl"
-
-CDEPEND="
- tcl? ( dev-java/jacl:0 )
- python? ( dev-java/jython:2.7 )
- dev-java/xalan:0
- dev-java/rhino:1.6
- dev-java/ant-core:0
- dev-java/xmlgraphics-commons:2
- dev-java/xml-commons-external:1.3"
-
-DEPEND="
- ${CDEPEND}
- >=virtual/jdk-1.6"
-
-RDEPEND="
- ${CDEPEND}
- >=virtual/jre-1.6"
-
-JAVA_ANT_REWRITE_CLASSPATH="true"
-
-EANT_GENTOO_CLASSPATH="
- xml-commons-external-1.3
- xmlgraphics-commons-2
- rhino-1.6
- xalan"
-
-src_prepare() {
- default
-
- # See bug 318323.
- local file
- for file in build.xml contrib/rasterizertask/build.xml; do
- java-ant_xml-rewrite -f ${file} -c -e javadoc -a failonerror -v no -a maxmemory -v 512m
- done
-
- # See bug 628812.
- use tcl && epatch "${FILESDIR}/${P}-ImportInfo.patch"
-
- cd lib || die
- rm -v *.jar build/*.jar || die
- use python && java-pkg_jar-from jython-2.7
- use tcl && java-pkg_jar-from jacl
-}
-
-src_compile() {
- # Fails to build on amd64 without this
- export ANT_OPTS="-Xmx256m"
- use amd64 && export ANT_OPTS="-Xmx1g"
-
- eant jars all-jar $(use_doc)
- cd contrib/rasterizertask || die
- eant -Dgentoo.classpath="$(java-pkg_getjar ant-core ant.jar):../../classes" jar $(use_doc)
-}
-
-src_install() {
- batik_unversion_jars() {
- local jar
- for jar in batik-*.jar; do
- newj="${jar%-*}.jar"
- java-pkg_newjar ${jar} ${newj}
- done
- }
-
- # First unversion jars in ${P}/lib
- cd "${S}/${P}/lib" || die
- batik_unversion_jars
-
- # Then, only those in ${P}
- cd "${S}/${P}" || die
- batik_unversion_jars
-
- # Proceed with documentation installation
- cd "${S}" || die
- dodoc README CHANGES
- use doc && java-pkg_dojavadoc "${P}/docs/javadoc"
-
- # See bug #116976.
- java-pkg_dolauncher "batik-${SLOT}" \
- --pwd "${EPREFIX}/usr/share/${PN}-${SLOT}/" \
- --main org.apache.batik.apps.svgbrowser.Main
-
- # To find these lsjar batik-${SLOT} | grep Main.class
- local launcher
- for launcher in ttf2svg slideshow svgpp rasterizer; do
- java-pkg_dolauncher batik-${launcher}-${SLOT} \
- --main org.apache.batik.apps.${launcher}.Main
- done
-
- # Install and register the ant task.
- java-pkg_dojar contrib/rasterizertask/build/lib/RasterizerTask.jar
- java-pkg_register-ant-task
-}
diff --git a/dev-java/batik/files/batik-1.9-ImportInfo.patch b/dev-java/batik/files/batik-1.9-ImportInfo.patch
deleted file mode 100644
index 103b99e1b967..000000000000
--- a/dev-java/batik/files/batik-1.9-ImportInfo.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/batik-script/src/main/java/org/apache/batik/script/jacl/JaclInterpreterFactory.java 2017-10-28 17:24:11.401276868 +0000
-+++ b/batik-script/src/main/java/org/apache/batik/script/jacl/JaclInterpreterFactory.java 2017-10-28 17:27:13.314255999 +0000
-@@ -20,6 +20,7 @@
-
- import java.net.URL;
-
-+import org.apache.batik.script.ImportInfo;
- import org.apache.batik.script.Interpreter;
- import org.apache.batik.script.InterpreterFactory;
-
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-java/batik/, dev-java/batik/files/
@ 2023-04-05 10:56 Miroslav Šulc
0 siblings, 0 replies; 3+ messages in thread
From: Miroslav Šulc @ 2023-04-05 10:56 UTC (permalink / raw
To: gentoo-commits
commit: f137d0226cf2c7568a4f382add4c533de20c2688
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Tue Apr 4 20:43:05 2023 +0000
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Wed Apr 5 10:56:07 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f137d022
dev-java/batik: drop 1.14-r1
Closes: https://bugs.gentoo.org/903687
Closes: https://bugs.gentoo.org/903600
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/30480
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
dev-java/batik/Manifest | 1 -
dev-java/batik/batik-1.14-r1.ebuild | 178 --------------------------------
dev-java/batik/files/batik-1.14-modules | 33 ------
3 files changed, 212 deletions(-)
diff --git a/dev-java/batik/Manifest b/dev-java/batik/Manifest
index aebefb3e43af..6392b059f106 100644
--- a/dev-java/batik/Manifest
+++ b/dev-java/batik/Manifest
@@ -1,3 +1,2 @@
-DIST batik-src-1.14.tar.gz 17647867 BLAKE2B 9385e77e739ece921012310a53953a6e258a5d748987e85dd20783ca248ae55619db6472b7590a45fe40a1b51c693478a37a7dbe1a958b42392c525e5f228815 SHA512 689c52f58f8f0456c89bd18745d2d92e7590b9054bea71b96be87d44977057d583e78504cbf14afc3e0c585d2383dac3009c7c421de868c847db045e921da8fb
DIST batik-src-1.16.tar.gz 13495722 BLAKE2B 041442b5485588a23b6e335cc46630b3c73fb8a36157e8bc77baa7b399bf7986549039f27e89727ebc98b8492095b957c8c6deb12b232a39784844e4c5edf6ab SHA512 024ab7a204d00b6c855e26c62a326dfcde5fb486a7635890c6fcb37d421c7195ae04b3d292daabc0fcb6564f55bfa93d6fef15cf4c2dad77e569ca17d1eeb250
DIST batik-src-1.16.tar.gz.asc 833 BLAKE2B fdcfb26b9cc0d4fb0c37ce42d65628629ab0c27257ebe07715d5b2786500515125a240957c9ba76333aa54320905273031354cf09ee29e3a79fc7529640ebf03 SHA512 7fc3450d2b4d19e03528707fc20d6e18af926938ad24ad7460cc1c423c6c40507059fff2e2921d82fc582a4b486a75141fb407d450b043e2cc5007e0c2d486ea
diff --git a/dev-java/batik/batik-1.14-r1.ebuild b/dev-java/batik/batik-1.14-r1.ebuild
deleted file mode 100644
index 1a978d257f26..000000000000
--- a/dev-java/batik/batik-1.14-r1.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Skeleton command:
-# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri mirror://apache/xmlgraphics/batik/source/batik-src-1.14.tar.gz --slot 1.14 --keywords "~amd64 ~ppc64 ~x86" --ebuild batik-1.14.ebuild
-
-EAPI=8
-
-JAVA_PKG_IUSE="doc source test"
-MAVEN_ID="org.apache.xmlgraphics:batik:1.14"
-JAVA_TESTING_FRAMEWORKS="junit-4"
-
-inherit desktop java-pkg-2 java-pkg-simple xdg-utils
-
-DESCRIPTION="XML Graphics Batik"
-HOMEPAGE="https://xmlgraphics.apache.org/batik/"
-SRC_URI="mirror://apache/xmlgraphics/batik/source/batik-src-${PV}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="1.14"
-KEYWORDS="amd64 ~arm64 ppc64 x86"
-
-CP_DEPEND="
- dev-java/jacl:0
- dev-java/jython:2.7
- dev-java/rhino:1.6
- dev-java/xalan:0
- dev-java/xml-commons-external:1.4
- dev-java/xmlgraphics-commons:2
-"
-
-DEPEND="${CP_DEPEND}
- >=virtual/jdk-1.8:*"
-
-RDEPEND="${CP_DEPEND}
- >=virtual/jre-1.8:*"
-
-DOCS=( CHANGES NOTICE README )
-
-S="${WORKDIR}/batik-${PV}"
-
-src_prepare() {
- default
- java-pkg_clean
-}
-
-src_compile() {
- # We loop over the modules list and compile the jar files.
- while read module; do
- einfo "Compiling $module"
-
- JAVA_SRC_DIR=""
- JAVA_RESOURCE_DIRS=""
- JAVA_JAR_FILENAME="$module.jar"
- JAVA_MAIN_CLASS=""
-
- # Not all of the modules have resources.
- if [[ -d $module/src/main/resources ]]; then
- JAVA_RESOURCE_DIRS="$module/src/main/resources"
- fi
-
- # Don't let sed die on modules without MainClass.
- JAVA_MAIN_CLASS=$( sed -n 's:.*<mainClass>\(.*\)</mainClass>:\1:p' $module/pom.xml )
-
- # Some modules don't have source code.
- if [[ -d $module/src/main/java/org ]]; then
- JAVA_SRC_DIR="$module/src/main/java"
- java-pkg-simple_src_compile
- else
- # This case applies to batik-rasterizer.
- if [[ -d $module/src/main/resources/org ]]; then
- jar -cfe $module.jar "${JAVA_MAIN_CLASS}" -C "$module/src/main/resources" . || die
- # Else for batik-rasterizer-ext, batik-squiggle and batik-squiggle-ext
- else
- jar -cfe $module.jar "${JAVA_MAIN_CLASS}" -C . README || die
- zip -d $module.jar "README"
- fi
- fi
-
- JAVA_GENTOO_CLASSPATH_EXTRA+=":$module.jar"
-
- rm -fr target || die
- # Modules batik-rasterizer-ext and batik-squiggle-ext, upstream puts their jar files in the extensions
- # directory, see batik-extension/src/main/resources/org/apache/batik/extensions/README.txt
- # We keep them in the mudules list for later but omit them by 'grep -v'.
- # The same for batik-test-old which depends on fop-transcoder-allinone which itself depends on batik.
- # batik-1.14-modules is the "Reactor Build Order" extracted from the output of "mvn dependency:tree".
- done < <(grep -v '\(batik-rasterizer-ext\|batik-squiggle-ext\|batik-test-old\)' "${FILESDIR}"/batik-1.14-modules)
-
- if use doc; then
- JAVA_SRC_DIR=""
- JAVA_JAR_FILENAME="ignoreme.jar"
-
- while read module; do
- # Some modules don't have source code
- if [[ -d $module/src/main/java/org ]]; then
- JAVA_SRC_DIR+=( "$module/src/main/java" )
- fi
- done < "${FILESDIR}"/batik-1.14-modules
-
- java-pkg-simple_src_compile
- fi
-}
-
-src_test() {
- JAVA_TEST_GENTOO_CLASSPATH="junit-4"
-
- while read module; do
- einfo "Testing $module"
-
- JAVA_TEST_SRC_DIR=""
- JAVA_TEST_RESOURCE_DIRS=""
- JAVA_TEST_RUN_ONLY=""
-
- if [[ -d $module/src/test/resources ]]; then
- JAVA_TEST_RESOURCE_DIRS="$module/src/test/resources"
- fi
-
- # https://github.com/apache/xmlgraphics-batik/blob/refs/tags/batik-1_14/batik-util/pom.xml#L74-L75
- if [[ $module == batik-util ]]; then
- JAVA_TEST_RUN_ONLY="org.apache.batik.util.Base64TestCases"
- fi
-
- if [[ -d $module/src/test/java/org ]]; then
- JAVA_TEST_SRC_DIR="$module/src/test/java"
- java-pkg-simple_src_test
- fi
- done < <(grep -v '\(batik-rasterizer-ext\|batik-squiggle-ext\|batik-test-old\)' "${FILESDIR}"/batik-1.14-modules)
-}
-
-src_install() {
- einstalldocs
- domenu "${FILESDIR}"/batik-squiggle.desktop
- doicon batik-svgbrowser/src/main/resources/org/apache/batik/apps/svgbrowser/resources/init.svg
-
- while read module; do
- JAVA_MAIN_CLASS=$( sed -n 's:.*<mainClass>\(.*\)</mainClass>:\1:p' $module/pom.xml )
-
- java-pkg_dojar $module.jar
-
- # Add a launcher if the module has a MainClass.
- if [[ -n "${JAVA_MAIN_CLASS}" ]]; then
- java-pkg_dolauncher "$module-${SLOT}" --main "${JAVA_MAIN_CLASS}"
- fi
-
- # Some modules don't have source code
- if [[ -d $module/src/main/java/org ]]; then
- if use source; then
- java-pkg_dosrc "$module/src/main/java/*"
- fi
- fi
- done < <(grep -v '\(batik-rasterizer-ext\|batik-squiggle-ext\|batik-test-old\)' "${FILESDIR}"/batik-1.14-modules)
-
- local java_policy_file="${JAVA_PKG_SHAREPATH}/etc/${PN}.policy"
- insinto "$(dirname "${java_policy_file}")"
- newins - "$(basename "${java_policy_file}")" <<- _EOF_
- grant codeBase "file:${EPREFIX}${JAVA_PKG_JARDEST}/-" {
- permission java.security.AllPermission;
- };
- _EOF_
- java-pkg_register-environment-variable \
- gjl_java_args \
- "-Djava.security.policy=file:${EPREFIX}${java_policy_file}"
-
- if use doc; then
- java-pkg_dojavadoc target/api
- fi
-}
-
-pkg_postinst() {
- xdg_desktop_database_update
- xdg_icon_cache_update
-}
-
-pkg_postrm() {
- xdg_desktop_database_update
- xdg_icon_cache_update
-}
diff --git a/dev-java/batik/files/batik-1.14-modules b/dev-java/batik/files/batik-1.14-modules
deleted file mode 100644
index d9c964870901..000000000000
--- a/dev-java/batik/files/batik-1.14-modules
+++ /dev/null
@@ -1,33 +0,0 @@
-batik-constants
-batik-i18n
-batik-test
-batik-util
-batik-awt-util
-batik-css
-batik-ext
-batik-xml
-batik-dom
-batik-parser
-batik-svg-dom
-batik-anim
-batik-gvt
-batik-script
-batik-bridge
-batik-svggen
-batik-transcoder
-batik-codec
-batik-extension
-batik-gui-util
-batik-svgrasterizer
-batik-rasterizer-ext
-batik-rasterizer
-batik-slideshow
-batik-swing
-batik-svgbrowser
-batik-squiggle-ext
-batik-squiggle
-batik-svgpp
-batik-ttf2svg
-batik-test-swing
-batik-test-svg
-batik-test-old
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-05 10:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-09 17:21 [gentoo-commits] repo/gentoo:master commit in: dev-java/batik/, dev-java/batik/files/ Arthur Zamarin
-- strict thread matches above, loose matches on Subject: below --
2023-04-05 10:56 Miroslav Šulc
2022-03-29 8:26 Florian Schmaus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox