summaryrefslogtreecommitdiff
path: root/dev-java/batik
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
committerV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
commit752d6256e5204b958b0ef7905675a940b5e9172f (patch)
tree330d16e6362a49cbed8875a777fe641a43376cd3 /dev-java/batik
parent0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff)
gentoo resync : 12.05.2022
Diffstat (limited to 'dev-java/batik')
-rw-r--r--dev-java/batik/Manifest6
-rw-r--r--dev-java/batik/batik-1.14-r1.ebuild178
-rw-r--r--dev-java/batik/batik-1.14.ebuild2
-rw-r--r--dev-java/batik/batik-1.9.ebuild109
-rw-r--r--dev-java/batik/files/batik-1.9-ImportInfo.patch10
5 files changed, 181 insertions, 124 deletions
diff --git a/dev-java/batik/Manifest b/dev-java/batik/Manifest
index 244492fabbfb..9cb153a3263a 100644
--- a/dev-java/batik/Manifest
+++ b/dev-java/batik/Manifest
@@ -1,8 +1,6 @@
AUX batik-1.14-modules 461 BLAKE2B a22123561682c3990ad289ca888453b876bb1a4de03b435445758386297cb8e1058db777d4c79941a407c4b95ad8623a6450dc8ba0acf71f66b25a666ab7695c SHA512 19ec52318a76f16122e0740bb8f744e6b669537ad75f44931c1cf64c407a1d11b6eba4ea4b0e0e37ec5402e9ff99b76e8ae0e5b65f529f6ad56e30625cb7b77e
-AUX batik-1.9-ImportInfo.patch 439 BLAKE2B 2d1c13f8ffa944c9f303932818b4df5b2c9c10f2903b67500971413e9e3460340b4c6d9bb3e84875ce06845f6646d0ce566a295a5982e88209bf692266dabbb8 SHA512 ff390670537fd631dbd0041a4496e0a33daa1bbd9390867285d2a817ee7794d19c0d634dbfcf4a1e777db072a0f1b6bc2b68e475bbe590bce825aa7b7d76f643
AUX batik-squiggle.desktop 177 BLAKE2B 7f4fbc31f31f6ddbdb7802ad4ea6b87c21b39b83cec2caf5f8b68634693b05c66e3f7da6d2cf69f5da6defa2d44fa4c5a0eba4af13308b8f18fb666be86b1d40 SHA512 7e7be90a0a779752cf04bbb1e702f5f3ca773129f7dfebcc3352e55f81cad2d65f6067e07c075f730b7f11235529804856fc226703b5e213216bc110dd978d8e
DIST batik-src-1.14.tar.gz 17647867 BLAKE2B 9385e77e739ece921012310a53953a6e258a5d748987e85dd20783ca248ae55619db6472b7590a45fe40a1b51c693478a37a7dbe1a958b42392c525e5f228815 SHA512 689c52f58f8f0456c89bd18745d2d92e7590b9054bea71b96be87d44977057d583e78504cbf14afc3e0c585d2383dac3009c7c421de868c847db045e921da8fb
-DIST batik-src-1.9.tar.gz 16748072 BLAKE2B 4e23c0de3d56ba130c5bc9ef80a01549e8c11ab4db3b1ac5dae8525cf0a3a8b7f4df3161c12f1f0df9c74229aaf2034fb6c9c2f91b7fc7407a0af580d144e606 SHA512 96a5c16bd3d61ea33ed5013fd0b00f1724470d9b667f0f84ef4a29dcaaa19b1cc8ffcc92dc49767f4e29d77a47f99df5afca479336ac5619778b51a6fb6cd952
-EBUILD batik-1.14.ebuild 5258 BLAKE2B 7646b84b78affb3b789e026a9f71a6689b5835b368faf9acfad705b1c7314ba6870f4b7fadf7583a82ae697dc86f50cb9687cc8ac034f56920f152ae52bd53a7 SHA512 004bc8c5ff37a085951c258a43cfdd66da68c0e58890328bc349776e3db4306c6d33676af641c77679396dd301ad0402e5cfe9292d7e407aa9f589b5da25957e
-EBUILD batik-1.9.ebuild 2594 BLAKE2B a7aa8ebb48b3819cc4fb088cabc6dc858dd5c3f20b2779c910e8f631d2be3920c133ae38caf4048991f1d6a1108a2b16a14a3f8e3d6cdfcea1256bebfcdb1724 SHA512 bf2eee253a058dfe08714e3a533e37a034af1477534a00b425105d9d2330798c37ea9ed3a00dc79f56a7558effa5a44473c74260d0fd2fffe9b621679a120e46
+EBUILD batik-1.14-r1.ebuild 5215 BLAKE2B ef6d32420076d58c4973cd981fa71d448868dd8facb7b0213adb439f44886ae0e95a32a01ed533dce70940fab561ceecff9099e1530b1bdc978f2ef15e2bebab SHA512 5458ace08f1f2c2165607507c7684238769a4c0ecf9c3a52a8ca5abbbe5f8632512146efd32b7be83eb171d99dc8db8e98a75cca74b145d7e09852fff2710a1f
+EBUILD batik-1.14.ebuild 5255 BLAKE2B 941c89a89636efafbcc3607a1d5103d458f3acba4ae1806b7a4df24b3e5b53e081a5a5d8e5deb7fc3ce845be7723cc751ad2733a50e9e6680579eb5db4deb7ce SHA512 c8da33549a8cb656214403dc1b30914cd82f325daccb518f5b024c5036e12e28de8ec2b70fc61cec259a0ae85ea9894f30539bce1639369f68cdca6d4f279ad1
MISC metadata.xml 610 BLAKE2B c589c175b595deb71eae6b8fccd46f4d6b82331f636cff28b6074300b6495efb780d157bb1b5b1359070cca7405138fcff719d72f1038023357fc7ab05c52b87 SHA512 73a6bb61c87645d1600ab90ca954599208c8599e967f6e999d973fa80e9693435db8a75ace95c8881486c8e2929d5a201a51e821e5f58763c273b21b5a32c229
diff --git a/dev-java/batik/batik-1.14-r1.ebuild b/dev-java/batik/batik-1.14-r1.ebuild
new file mode 100644
index 000000000000..97c0d8183481
--- /dev/null
+++ b/dev-java/batik/batik-1.14-r1.ebuild
@@ -0,0 +1,178 @@
+# 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/batik-1.14.ebuild b/dev-java/batik/batik-1.14.ebuild
index fa844886caec..74222ffb9dd1 100644
--- a/dev-java/batik/batik-1.14.ebuild
+++ b/dev-java/batik/batik-1.14.ebuild
@@ -18,7 +18,7 @@ SRC_URI="mirror://apache/xmlgraphics/batik/source/batik-src-${PV}.tar.gz"
LICENSE="Apache-2.0"
SLOT="1.14"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+KEYWORDS="amd64 ~arm64 ppc64 x86"
CP_DEPEND="
dev-java/jacl:0
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;
-