Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] pdftk: update to 3.3.3.
@ 2023-11-13  0:30 classabbyamp
  2023-11-13  0:39 ` [PR PATCH] [Updated] " classabbyamp
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: classabbyamp @ 2023-11-13  0:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

There is a new pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages pdftk
https://github.com/void-linux/void-packages/pull/47189

pdftk: update to 3.3.3.
- New package: bc-java-1.76
- New package: java-commons-lang-3.13.0
- pdftk: update to 3.3.3.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

cc: @Hoshpak


A patch file from https://github.com/void-linux/void-packages/pull/47189.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pdftk-47189.patch --]
[-- Type: text/x-diff, Size: 6408 bytes --]

From 3155cbbb61342c6146f60ef5390925baf1fd3a8c Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:22 -0500
Subject: [PATCH 1/3] New package: bc-java-1.76

---
 srcpkgs/bc-java/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/bc-java/template

diff --git a/srcpkgs/bc-java/template b/srcpkgs/bc-java/template
new file mode 100644
index 0000000000000..4218848ee1e79
--- /dev/null
+++ b/srcpkgs/bc-java/template
@@ -0,0 +1,28 @@
+# Template file for 'bc-java'
+pkgname=bc-java
+version=1.76
+revision=1
+hostmakedepends="apache-ant openjdk17"
+depends="virtual?java-runtime"
+short_desc="Bouncy Castle Java cryptography APIs"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MIT"
+homepage="https://www.bouncycastle.org/java.html"
+distfiles="https://github.com/bcgit/bc-java/archive/refs/tags/r${version/./rv}.tar.gz"
+checksum=20524a31378291def8e2d7d387550f4f70f34590e431a425d29b64bd57159866
+
+do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	ant -f ant/jdk18+.xml clean build-provider build
+}
+
+do_check() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	ant -f ant/jdk18+.xml test
+}
+
+do_install() {
+	vinstall build/artifacts/jdk1.8/jars/bcprov-jdk18on-${version/./}.jar 644 /usr/lib/bc-java
+	ln -s bcprov-jdk18on-${version/./}.jar "${DESTDIR}"/usr/lib/bc-java/bcprov.jar
+	vlicense LICENSE.html
+}

From 609126f920a644f24e37bf6af04d3d0625bac63e Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:29 -0500
Subject: [PATCH 2/3] New package: java-commons-lang-3.13.0

---
 srcpkgs/java-commons-lang/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/java-commons-lang/template

diff --git a/srcpkgs/java-commons-lang/template b/srcpkgs/java-commons-lang/template
new file mode 100644
index 0000000000000..648c5ab191012
--- /dev/null
+++ b/srcpkgs/java-commons-lang/template
@@ -0,0 +1,28 @@
+# Template file for 'java-commons-lang'
+pkgname=java-commons-lang
+version=3.13.0
+revision=1
+hostmakedepends="apache-maven openjdk17"
+depends="virtual?java-runtime"
+short_desc="Helper utilities for the java.lang API"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="Apache-2.0"
+homepage="https://commons.apache.org/proper/commons-lang/"
+distfiles="https://archive.apache.org/dist/commons/lang/source/commons-lang3-${version}-src.tar.gz"
+checksum=49bb80cd6d76270412bc77c48702a05845594e9a72d49243094b79bef1fd3b33
+
+do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	mvn -am -Dmaven.javadoc.skip=true -Dmaven.test.skip=true clean package
+}
+
+do_check() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	mvn test
+}
+
+do_install() {
+	vinstall target/commons-lang3-"${version}".jar 644 /usr/lib/java-commons-lang
+	ln -s "commons-lang3-$version.jar" "${DESTDIR}"/usr/lib/java-commons-lang/commons-lang.jar
+
+}

From cceff44fc13c0c555e2194ff5893829690bc4e94 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:36 -0500
Subject: [PATCH 3/3] pdftk: update to 3.3.3.

switch to java port, which seems to be the accepted continuation for
other distros

fixes #47176
---
 srcpkgs/pdftk/files/Makefile | 19 ------------------
 srcpkgs/pdftk/files/pdftk    |  4 ++++
 srcpkgs/pdftk/template       | 37 ++++++++++++++++++------------------
 3 files changed, 22 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/pdftk/files/Makefile
 create mode 100644 srcpkgs/pdftk/files/pdftk

diff --git a/srcpkgs/pdftk/files/Makefile b/srcpkgs/pdftk/files/Makefile
deleted file mode 100644
index 126a0653b7324..0000000000000
--- a/srcpkgs/pdftk/files/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Based on 'Makefile.Debian', part of pdftk
-# Copyright (c) 2004-2012 Sid Steward
-
-export CXX= @CXX@
-export GCJ= gcj-6
-export GCJH= gcjh-6
-export GJAR= gjar-6
-export LIBGCJ= /usr/share/java/libgcj.jar
-export AR= @AR@
-export RM= rm
-export ARFLAGS= rs
-export RMFLAGS= -vf
-export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers
-export CXXFLAGS= @CXXFLAGS@
-export GCJFLAGS= -Wno-all -fsource=1.3 -O2 -fPIC -L/usr/lib
-export GCJHFLAGS= -force
-export LDLIBS= @LDFLAGS@ -lgcj
-
-include Makefile.Base
diff --git a/srcpkgs/pdftk/files/pdftk b/srcpkgs/pdftk/files/pdftk
new file mode 100644
index 0000000000000..2b1959430c5df
--- /dev/null
+++ b/srcpkgs/pdftk/files/pdftk
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+"$JAVA_HOME"/bin/java -cp "/usr/lib/bc-java/bc-java.jar:/usr/lib/java-commons-lang/commons-lang.jar:/usr/lib/pdftk/pdftk.jar" \
+	com.gitlab.pdftk_java.pdftk "$@"
diff --git a/srcpkgs/pdftk/template b/srcpkgs/pdftk/template
index 56af9ba6965f5..571f27d5f81ad 100644
--- a/srcpkgs/pdftk/template
+++ b/srcpkgs/pdftk/template
@@ -1,30 +1,29 @@
 # Template file for 'pdftk'
 pkgname=pdftk
-version=2.02
-revision=4
-build_wrksrc=${pkgname}
-hostmakedepends="unzip gcc6-gcj gcc6"
-makedepends="libgcj-devel"
+version=3.3.3
+revision=1
+hostmakedepends="gradle"
+makedepends="openjdk17"
+depends="virtual?java-runtime bc-java java-commons-lang"
 short_desc="Command-line tool for working with PDFs"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
 license="GPL-2.0-or-later"
-homepage="https://www.pdflabs.com/tools/pdftk-server/"
-distfiles="http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/${pkgname}-${version}-src.zip"
-checksum=118f6a25fd3acaafb58824dce6f97cdc07e56050e666b90e4c4ef426ea37b8c1
-nocross=yes
+homepage="https://gitlab.com/pdftk-java/pdftk"
+distfiles="https://gitlab.com/pdftk-java/pdftk/-/archive/v${version}/pdftk-v${version}.tar.gz"
+checksum=9c947de54658539e3a136e39f9c38ece1cf2893d143abb7f5bf3a2e3e005b286
 
 do_build() {
-	_cxxflags="${CXXFLAGS//-fstack-clash-protection}"
-	_cxxflags="${_cxxflags//-ffile-prefix-map=\/builddir\/${pkgname}-${version}\/${build_wrksrc}=.}"
-	sed -e "s;@CXX@;g++-6;" \
-		-e "s;@AR@;$AR;" \
-		-e "s;@CXXFLAGS@;${_cxxflags};" \
-		-e "s;@LDFLAGS@;$LDFLAGS;" \
-		${FILESDIR}/Makefile > Makefile
-	make ${makejobs} || make ${makjobs}
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	gradle --no-daemon build
+}
+
+do_check() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	gradle --no-daemon test
 }
 
 do_install() {
-	vbin pdftk
-	vman ../pdftk.1
+	vinstall build/libs/pdftk.jar 644 /usr/lib/pdftk
+	vman pdftk.1
+	vbin "${FILESDIR}"/pdftk
 }

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] pdftk: update to 3.3.3.
  2023-11-13  0:30 [PR PATCH] pdftk: update to 3.3.3 classabbyamp
@ 2023-11-13  0:39 ` classabbyamp
  2023-11-13  1:10 ` classabbyamp
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2023-11-13  0:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages pdftk
https://github.com/void-linux/void-packages/pull/47189

pdftk: update to 3.3.3.
- New package: bc-java-1.76
- New package: java-commons-lang-3.13.0
- pdftk: update to 3.3.3.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

cc: @Hoshpak


A patch file from https://github.com/void-linux/void-packages/pull/47189.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pdftk-47189.patch --]
[-- Type: text/x-diff, Size: 6394 bytes --]

From 3155cbbb61342c6146f60ef5390925baf1fd3a8c Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:22 -0500
Subject: [PATCH 1/3] New package: bc-java-1.76

---
 srcpkgs/bc-java/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/bc-java/template

diff --git a/srcpkgs/bc-java/template b/srcpkgs/bc-java/template
new file mode 100644
index 0000000000000..4218848ee1e79
--- /dev/null
+++ b/srcpkgs/bc-java/template
@@ -0,0 +1,28 @@
+# Template file for 'bc-java'
+pkgname=bc-java
+version=1.76
+revision=1
+hostmakedepends="apache-ant openjdk17"
+depends="virtual?java-runtime"
+short_desc="Bouncy Castle Java cryptography APIs"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MIT"
+homepage="https://www.bouncycastle.org/java.html"
+distfiles="https://github.com/bcgit/bc-java/archive/refs/tags/r${version/./rv}.tar.gz"
+checksum=20524a31378291def8e2d7d387550f4f70f34590e431a425d29b64bd57159866
+
+do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	ant -f ant/jdk18+.xml clean build-provider build
+}
+
+do_check() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	ant -f ant/jdk18+.xml test
+}
+
+do_install() {
+	vinstall build/artifacts/jdk1.8/jars/bcprov-jdk18on-${version/./}.jar 644 /usr/lib/bc-java
+	ln -s bcprov-jdk18on-${version/./}.jar "${DESTDIR}"/usr/lib/bc-java/bcprov.jar
+	vlicense LICENSE.html
+}

From 609126f920a644f24e37bf6af04d3d0625bac63e Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:29 -0500
Subject: [PATCH 2/3] New package: java-commons-lang-3.13.0

---
 srcpkgs/java-commons-lang/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/java-commons-lang/template

diff --git a/srcpkgs/java-commons-lang/template b/srcpkgs/java-commons-lang/template
new file mode 100644
index 0000000000000..648c5ab191012
--- /dev/null
+++ b/srcpkgs/java-commons-lang/template
@@ -0,0 +1,28 @@
+# Template file for 'java-commons-lang'
+pkgname=java-commons-lang
+version=3.13.0
+revision=1
+hostmakedepends="apache-maven openjdk17"
+depends="virtual?java-runtime"
+short_desc="Helper utilities for the java.lang API"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="Apache-2.0"
+homepage="https://commons.apache.org/proper/commons-lang/"
+distfiles="https://archive.apache.org/dist/commons/lang/source/commons-lang3-${version}-src.tar.gz"
+checksum=49bb80cd6d76270412bc77c48702a05845594e9a72d49243094b79bef1fd3b33
+
+do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	mvn -am -Dmaven.javadoc.skip=true -Dmaven.test.skip=true clean package
+}
+
+do_check() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	mvn test
+}
+
+do_install() {
+	vinstall target/commons-lang3-"${version}".jar 644 /usr/lib/java-commons-lang
+	ln -s "commons-lang3-$version.jar" "${DESTDIR}"/usr/lib/java-commons-lang/commons-lang.jar
+
+}

From 3df8ea44d0d6e8312bbac8e7b451f4cd6da18f1d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:36 -0500
Subject: [PATCH 3/3] pdftk: update to 3.3.3.

switch to java port, which seems to be the accepted continuation for
other distros

fixes #47176
---
 srcpkgs/pdftk/files/Makefile | 19 -------------------
 srcpkgs/pdftk/files/pdftk    |  4 ++++
 srcpkgs/pdftk/template       | 36 +++++++++++++++++-------------------
 3 files changed, 21 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/pdftk/files/Makefile
 create mode 100644 srcpkgs/pdftk/files/pdftk

diff --git a/srcpkgs/pdftk/files/Makefile b/srcpkgs/pdftk/files/Makefile
deleted file mode 100644
index 126a0653b7324..0000000000000
--- a/srcpkgs/pdftk/files/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Based on 'Makefile.Debian', part of pdftk
-# Copyright (c) 2004-2012 Sid Steward
-
-export CXX= @CXX@
-export GCJ= gcj-6
-export GCJH= gcjh-6
-export GJAR= gjar-6
-export LIBGCJ= /usr/share/java/libgcj.jar
-export AR= @AR@
-export RM= rm
-export ARFLAGS= rs
-export RMFLAGS= -vf
-export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers
-export CXXFLAGS= @CXXFLAGS@
-export GCJFLAGS= -Wno-all -fsource=1.3 -O2 -fPIC -L/usr/lib
-export GCJHFLAGS= -force
-export LDLIBS= @LDFLAGS@ -lgcj
-
-include Makefile.Base
diff --git a/srcpkgs/pdftk/files/pdftk b/srcpkgs/pdftk/files/pdftk
new file mode 100644
index 0000000000000..2b1959430c5df
--- /dev/null
+++ b/srcpkgs/pdftk/files/pdftk
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+"$JAVA_HOME"/bin/java -cp "/usr/lib/bc-java/bc-java.jar:/usr/lib/java-commons-lang/commons-lang.jar:/usr/lib/pdftk/pdftk.jar" \
+	com.gitlab.pdftk_java.pdftk "$@"
diff --git a/srcpkgs/pdftk/template b/srcpkgs/pdftk/template
index 56af9ba6965f5..32c1db3d9568e 100644
--- a/srcpkgs/pdftk/template
+++ b/srcpkgs/pdftk/template
@@ -1,30 +1,28 @@
 # Template file for 'pdftk'
 pkgname=pdftk
-version=2.02
-revision=4
-build_wrksrc=${pkgname}
-hostmakedepends="unzip gcc6-gcj gcc6"
-makedepends="libgcj-devel"
+version=3.3.3
+revision=1
+hostmakedepends="gradle openjdk17"
+depends="virtual?java-runtime bc-java java-commons-lang"
 short_desc="Command-line tool for working with PDFs"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
 license="GPL-2.0-or-later"
-homepage="https://www.pdflabs.com/tools/pdftk-server/"
-distfiles="http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/${pkgname}-${version}-src.zip"
-checksum=118f6a25fd3acaafb58824dce6f97cdc07e56050e666b90e4c4ef426ea37b8c1
-nocross=yes
+homepage="https://gitlab.com/pdftk-java/pdftk"
+distfiles="https://gitlab.com/pdftk-java/pdftk/-/archive/v${version}/pdftk-v${version}.tar.gz"
+checksum=9c947de54658539e3a136e39f9c38ece1cf2893d143abb7f5bf3a2e3e005b286
 
 do_build() {
-	_cxxflags="${CXXFLAGS//-fstack-clash-protection}"
-	_cxxflags="${_cxxflags//-ffile-prefix-map=\/builddir\/${pkgname}-${version}\/${build_wrksrc}=.}"
-	sed -e "s;@CXX@;g++-6;" \
-		-e "s;@AR@;$AR;" \
-		-e "s;@CXXFLAGS@;${_cxxflags};" \
-		-e "s;@LDFLAGS@;$LDFLAGS;" \
-		${FILESDIR}/Makefile > Makefile
-	make ${makejobs} || make ${makjobs}
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	gradle --no-daemon build
+}
+
+do_check() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	gradle --no-daemon test
 }
 
 do_install() {
-	vbin pdftk
-	vman ../pdftk.1
+	vinstall build/libs/pdftk.jar 644 /usr/lib/pdftk
+	vman pdftk.1
+	vbin "${FILESDIR}"/pdftk
 }

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] pdftk: update to 3.3.3.
  2023-11-13  0:30 [PR PATCH] pdftk: update to 3.3.3 classabbyamp
  2023-11-13  0:39 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-11-13  1:10 ` classabbyamp
  2023-11-13  1:19 ` classabbyamp
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2023-11-13  1:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages pdftk
https://github.com/void-linux/void-packages/pull/47189

pdftk: update to 3.3.3.
- New package: bc-java-1.76
- New package: java-commons-lang-3.13.0
- pdftk: update to 3.3.3.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

cc: @Hoshpak


A patch file from https://github.com/void-linux/void-packages/pull/47189.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pdftk-47189.patch --]
[-- Type: text/x-diff, Size: 6299 bytes --]

From b885afcee850cac1f0233bd599bfa638ecc5ebf4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:22 -0500
Subject: [PATCH 1/3] New package: bc-java-1.76

---
 srcpkgs/bc-java/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/bc-java/template

diff --git a/srcpkgs/bc-java/template b/srcpkgs/bc-java/template
new file mode 100644
index 0000000000000..907ba9d747e69
--- /dev/null
+++ b/srcpkgs/bc-java/template
@@ -0,0 +1,23 @@
+# Template file for 'bc-java'
+pkgname=bc-java
+version=1.76
+revision=1
+hostmakedepends="apache-ant openjdk17"
+depends="virtual?java-runtime"
+short_desc="Bouncy Castle Java cryptography APIs"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MIT"
+homepage="https://www.bouncycastle.org/java.html"
+distfiles="https://github.com/bcgit/bc-java/archive/refs/tags/r${version/./rv}.tar.gz"
+checksum=20524a31378291def8e2d7d387550f4f70f34590e431a425d29b64bd57159866
+
+do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	ant -f ant/jdk18+.xml clean build-provider build
+}
+
+do_install() {
+	vinstall build/artifacts/jdk1.8/jars/bcprov-jdk18on-${version/./}.jar 644 /usr/lib/bc-java
+	ln -s bcprov-jdk18on-${version/./}.jar "${DESTDIR}"/usr/lib/bc-java/bcprov.jar
+	vlicense LICENSE.html
+}

From 03607f569c76daa2213f8e8265a672604ef65938 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:29 -0500
Subject: [PATCH 2/3] New package: java-commons-lang-3.13.0

---
 srcpkgs/java-commons-lang/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/java-commons-lang/template

diff --git a/srcpkgs/java-commons-lang/template b/srcpkgs/java-commons-lang/template
new file mode 100644
index 0000000000000..648c5ab191012
--- /dev/null
+++ b/srcpkgs/java-commons-lang/template
@@ -0,0 +1,28 @@
+# Template file for 'java-commons-lang'
+pkgname=java-commons-lang
+version=3.13.0
+revision=1
+hostmakedepends="apache-maven openjdk17"
+depends="virtual?java-runtime"
+short_desc="Helper utilities for the java.lang API"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="Apache-2.0"
+homepage="https://commons.apache.org/proper/commons-lang/"
+distfiles="https://archive.apache.org/dist/commons/lang/source/commons-lang3-${version}-src.tar.gz"
+checksum=49bb80cd6d76270412bc77c48702a05845594e9a72d49243094b79bef1fd3b33
+
+do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	mvn -am -Dmaven.javadoc.skip=true -Dmaven.test.skip=true clean package
+}
+
+do_check() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	mvn test
+}
+
+do_install() {
+	vinstall target/commons-lang3-"${version}".jar 644 /usr/lib/java-commons-lang
+	ln -s "commons-lang3-$version.jar" "${DESTDIR}"/usr/lib/java-commons-lang/commons-lang.jar
+
+}

From d104610a02fa27a510d40eb444875186617918e0 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:36 -0500
Subject: [PATCH 3/3] pdftk: update to 3.3.3.

switch to java port, which seems to be the accepted continuation for
other distros

fixes #47176
---
 srcpkgs/pdftk/files/Makefile | 19 -------------------
 srcpkgs/pdftk/files/pdftk    |  4 ++++
 srcpkgs/pdftk/template       | 36 +++++++++++++++++-------------------
 3 files changed, 21 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/pdftk/files/Makefile
 create mode 100644 srcpkgs/pdftk/files/pdftk

diff --git a/srcpkgs/pdftk/files/Makefile b/srcpkgs/pdftk/files/Makefile
deleted file mode 100644
index 126a0653b7324..0000000000000
--- a/srcpkgs/pdftk/files/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Based on 'Makefile.Debian', part of pdftk
-# Copyright (c) 2004-2012 Sid Steward
-
-export CXX= @CXX@
-export GCJ= gcj-6
-export GCJH= gcjh-6
-export GJAR= gjar-6
-export LIBGCJ= /usr/share/java/libgcj.jar
-export AR= @AR@
-export RM= rm
-export ARFLAGS= rs
-export RMFLAGS= -vf
-export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers
-export CXXFLAGS= @CXXFLAGS@
-export GCJFLAGS= -Wno-all -fsource=1.3 -O2 -fPIC -L/usr/lib
-export GCJHFLAGS= -force
-export LDLIBS= @LDFLAGS@ -lgcj
-
-include Makefile.Base
diff --git a/srcpkgs/pdftk/files/pdftk b/srcpkgs/pdftk/files/pdftk
new file mode 100644
index 0000000000000..2b1959430c5df
--- /dev/null
+++ b/srcpkgs/pdftk/files/pdftk
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+"$JAVA_HOME"/bin/java -cp "/usr/lib/bc-java/bc-java.jar:/usr/lib/java-commons-lang/commons-lang.jar:/usr/lib/pdftk/pdftk.jar" \
+	com.gitlab.pdftk_java.pdftk "$@"
diff --git a/srcpkgs/pdftk/template b/srcpkgs/pdftk/template
index 56af9ba6965f5..32c1db3d9568e 100644
--- a/srcpkgs/pdftk/template
+++ b/srcpkgs/pdftk/template
@@ -1,30 +1,28 @@
 # Template file for 'pdftk'
 pkgname=pdftk
-version=2.02
-revision=4
-build_wrksrc=${pkgname}
-hostmakedepends="unzip gcc6-gcj gcc6"
-makedepends="libgcj-devel"
+version=3.3.3
+revision=1
+hostmakedepends="gradle openjdk17"
+depends="virtual?java-runtime bc-java java-commons-lang"
 short_desc="Command-line tool for working with PDFs"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
 license="GPL-2.0-or-later"
-homepage="https://www.pdflabs.com/tools/pdftk-server/"
-distfiles="http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/${pkgname}-${version}-src.zip"
-checksum=118f6a25fd3acaafb58824dce6f97cdc07e56050e666b90e4c4ef426ea37b8c1
-nocross=yes
+homepage="https://gitlab.com/pdftk-java/pdftk"
+distfiles="https://gitlab.com/pdftk-java/pdftk/-/archive/v${version}/pdftk-v${version}.tar.gz"
+checksum=9c947de54658539e3a136e39f9c38ece1cf2893d143abb7f5bf3a2e3e005b286
 
 do_build() {
-	_cxxflags="${CXXFLAGS//-fstack-clash-protection}"
-	_cxxflags="${_cxxflags//-ffile-prefix-map=\/builddir\/${pkgname}-${version}\/${build_wrksrc}=.}"
-	sed -e "s;@CXX@;g++-6;" \
-		-e "s;@AR@;$AR;" \
-		-e "s;@CXXFLAGS@;${_cxxflags};" \
-		-e "s;@LDFLAGS@;$LDFLAGS;" \
-		${FILESDIR}/Makefile > Makefile
-	make ${makejobs} || make ${makjobs}
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	gradle --no-daemon build
+}
+
+do_check() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	gradle --no-daemon test
 }
 
 do_install() {
-	vbin pdftk
-	vman ../pdftk.1
+	vinstall build/libs/pdftk.jar 644 /usr/lib/pdftk
+	vman pdftk.1
+	vbin "${FILESDIR}"/pdftk
 }

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] pdftk: update to 3.3.3.
  2023-11-13  0:30 [PR PATCH] pdftk: update to 3.3.3 classabbyamp
  2023-11-13  0:39 ` [PR PATCH] [Updated] " classabbyamp
  2023-11-13  1:10 ` classabbyamp
@ 2023-11-13  1:19 ` classabbyamp
  2023-11-15 17:06 ` Hoshpak
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2023-11-13  1:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages pdftk
https://github.com/void-linux/void-packages/pull/47189

pdftk: update to 3.3.3.
- New package: bc-java-1.76
- New package: java-commons-lang-3.13.0
- pdftk: update to 3.3.3.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

cc: @Hoshpak


A patch file from https://github.com/void-linux/void-packages/pull/47189.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pdftk-47189.patch --]
[-- Type: text/x-diff, Size: 6222 bytes --]

From b885afcee850cac1f0233bd599bfa638ecc5ebf4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:22 -0500
Subject: [PATCH 1/3] New package: bc-java-1.76

---
 srcpkgs/bc-java/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/bc-java/template

diff --git a/srcpkgs/bc-java/template b/srcpkgs/bc-java/template
new file mode 100644
index 0000000000000..907ba9d747e69
--- /dev/null
+++ b/srcpkgs/bc-java/template
@@ -0,0 +1,23 @@
+# Template file for 'bc-java'
+pkgname=bc-java
+version=1.76
+revision=1
+hostmakedepends="apache-ant openjdk17"
+depends="virtual?java-runtime"
+short_desc="Bouncy Castle Java cryptography APIs"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MIT"
+homepage="https://www.bouncycastle.org/java.html"
+distfiles="https://github.com/bcgit/bc-java/archive/refs/tags/r${version/./rv}.tar.gz"
+checksum=20524a31378291def8e2d7d387550f4f70f34590e431a425d29b64bd57159866
+
+do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	ant -f ant/jdk18+.xml clean build-provider build
+}
+
+do_install() {
+	vinstall build/artifacts/jdk1.8/jars/bcprov-jdk18on-${version/./}.jar 644 /usr/lib/bc-java
+	ln -s bcprov-jdk18on-${version/./}.jar "${DESTDIR}"/usr/lib/bc-java/bcprov.jar
+	vlicense LICENSE.html
+}

From dd80e30ae7b455128e6932b32530963eaf976dab Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:29 -0500
Subject: [PATCH 2/3] New package: java-commons-lang-3.13.0

---
 srcpkgs/java-commons-lang/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/java-commons-lang/template

diff --git a/srcpkgs/java-commons-lang/template b/srcpkgs/java-commons-lang/template
new file mode 100644
index 0000000000000..48e7a3b6e35c4
--- /dev/null
+++ b/srcpkgs/java-commons-lang/template
@@ -0,0 +1,23 @@
+# Template file for 'java-commons-lang'
+pkgname=java-commons-lang
+version=3.13.0
+revision=1
+hostmakedepends="apache-maven openjdk17"
+depends="virtual?java-runtime"
+short_desc="Helper utilities for the java.lang API"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="Apache-2.0"
+homepage="https://commons.apache.org/proper/commons-lang/"
+distfiles="https://archive.apache.org/dist/commons/lang/source/commons-lang3-${version}-src.tar.gz"
+checksum=49bb80cd6d76270412bc77c48702a05845594e9a72d49243094b79bef1fd3b33
+
+do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	mvn -am -Dmaven.javadoc.skip=true -Dmaven.test.skip=true clean package
+}
+
+do_install() {
+	vinstall target/commons-lang3-"${version}".jar 644 /usr/lib/java-commons-lang
+	ln -s "commons-lang3-$version.jar" "${DESTDIR}"/usr/lib/java-commons-lang/commons-lang.jar
+
+}

From cf7b62667cdd14dfbf47db4a0a60674cdb641711 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 12 Nov 2023 19:27:36 -0500
Subject: [PATCH 3/3] pdftk: update to 3.3.3.

switch to java port, which seems to be the accepted continuation for
other distros

fixes #47176
---
 srcpkgs/pdftk/files/Makefile | 19 -------------------
 srcpkgs/pdftk/files/pdftk    |  4 ++++
 srcpkgs/pdftk/template       | 36 +++++++++++++++++-------------------
 3 files changed, 21 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/pdftk/files/Makefile
 create mode 100644 srcpkgs/pdftk/files/pdftk

diff --git a/srcpkgs/pdftk/files/Makefile b/srcpkgs/pdftk/files/Makefile
deleted file mode 100644
index 126a0653b7324..0000000000000
--- a/srcpkgs/pdftk/files/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Based on 'Makefile.Debian', part of pdftk
-# Copyright (c) 2004-2012 Sid Steward
-
-export CXX= @CXX@
-export GCJ= gcj-6
-export GCJH= gcjh-6
-export GJAR= gjar-6
-export LIBGCJ= /usr/share/java/libgcj.jar
-export AR= @AR@
-export RM= rm
-export ARFLAGS= rs
-export RMFLAGS= -vf
-export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers
-export CXXFLAGS= @CXXFLAGS@
-export GCJFLAGS= -Wno-all -fsource=1.3 -O2 -fPIC -L/usr/lib
-export GCJHFLAGS= -force
-export LDLIBS= @LDFLAGS@ -lgcj
-
-include Makefile.Base
diff --git a/srcpkgs/pdftk/files/pdftk b/srcpkgs/pdftk/files/pdftk
new file mode 100644
index 0000000000000..2b1959430c5df
--- /dev/null
+++ b/srcpkgs/pdftk/files/pdftk
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+"$JAVA_HOME"/bin/java -cp "/usr/lib/bc-java/bc-java.jar:/usr/lib/java-commons-lang/commons-lang.jar:/usr/lib/pdftk/pdftk.jar" \
+	com.gitlab.pdftk_java.pdftk "$@"
diff --git a/srcpkgs/pdftk/template b/srcpkgs/pdftk/template
index 56af9ba6965f5..32c1db3d9568e 100644
--- a/srcpkgs/pdftk/template
+++ b/srcpkgs/pdftk/template
@@ -1,30 +1,28 @@
 # Template file for 'pdftk'
 pkgname=pdftk
-version=2.02
-revision=4
-build_wrksrc=${pkgname}
-hostmakedepends="unzip gcc6-gcj gcc6"
-makedepends="libgcj-devel"
+version=3.3.3
+revision=1
+hostmakedepends="gradle openjdk17"
+depends="virtual?java-runtime bc-java java-commons-lang"
 short_desc="Command-line tool for working with PDFs"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
 license="GPL-2.0-or-later"
-homepage="https://www.pdflabs.com/tools/pdftk-server/"
-distfiles="http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/${pkgname}-${version}-src.zip"
-checksum=118f6a25fd3acaafb58824dce6f97cdc07e56050e666b90e4c4ef426ea37b8c1
-nocross=yes
+homepage="https://gitlab.com/pdftk-java/pdftk"
+distfiles="https://gitlab.com/pdftk-java/pdftk/-/archive/v${version}/pdftk-v${version}.tar.gz"
+checksum=9c947de54658539e3a136e39f9c38ece1cf2893d143abb7f5bf3a2e3e005b286
 
 do_build() {
-	_cxxflags="${CXXFLAGS//-fstack-clash-protection}"
-	_cxxflags="${_cxxflags//-ffile-prefix-map=\/builddir\/${pkgname}-${version}\/${build_wrksrc}=.}"
-	sed -e "s;@CXX@;g++-6;" \
-		-e "s;@AR@;$AR;" \
-		-e "s;@CXXFLAGS@;${_cxxflags};" \
-		-e "s;@LDFLAGS@;$LDFLAGS;" \
-		${FILESDIR}/Makefile > Makefile
-	make ${makejobs} || make ${makjobs}
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	gradle --no-daemon build
+}
+
+do_check() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	gradle --no-daemon test
 }
 
 do_install() {
-	vbin pdftk
-	vman ../pdftk.1
+	vinstall build/libs/pdftk.jar 644 /usr/lib/pdftk
+	vman pdftk.1
+	vbin "${FILESDIR}"/pdftk
 }

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: pdftk: update to 3.3.3.
  2023-11-13  0:30 [PR PATCH] pdftk: update to 3.3.3 classabbyamp
                   ` (2 preceding siblings ...)
  2023-11-13  1:19 ` classabbyamp
@ 2023-11-15 17:06 ` Hoshpak
  2023-11-15 17:25 ` classabbyamp
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Hoshpak @ 2023-11-15 17:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

New comment by Hoshpak on void-packages repository

https://github.com/void-linux/void-packages/pull/47189#issuecomment-1812927017

Comment:
I don't think that just replacing the content of the package is the right approach to this since it appears to me that they are two different pieces of software from different authors (although with virtually the same functionality). Imho it would be better to just remove the pdftk package and offer a new one under a different name (pdftk-java seems to be a common choice) Regarding the whole PR I don't like the idea of adding new packages that are orphaned from day one. If no one's going to maintain them, they shouldn't be added in the first place. In any case, please don't put me in the maintainer field. I have no interest to maintain any Java based packages.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: pdftk: update to 3.3.3.
  2023-11-13  0:30 [PR PATCH] pdftk: update to 3.3.3 classabbyamp
                   ` (3 preceding siblings ...)
  2023-11-15 17:06 ` Hoshpak
@ 2023-11-15 17:25 ` classabbyamp
  2023-11-15 17:26 ` classabbyamp
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2023-11-15 17:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/47189#issuecomment-1812958051

Comment:
> I don't think that just replacing the content of the package is the right approach to this since it appears to me that they are two different pieces of software from different authors (although with virtually the same functionality). Imho it would be better to just remove the pdftk package and offer a new one under a different name (pdftk-java seems to be a common choice

If `pdftk` is removed and replaced by `pdftk-java`, isn't that basically the same thing as just replacing the package contents, in effect? (difference being `pdftk` becoming a transitional dummy package, I guess)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: pdftk: update to 3.3.3.
  2023-11-13  0:30 [PR PATCH] pdftk: update to 3.3.3 classabbyamp
                   ` (4 preceding siblings ...)
  2023-11-15 17:25 ` classabbyamp
@ 2023-11-15 17:26 ` classabbyamp
  2023-11-15 17:36 ` [PR PATCH] [Updated] " classabbyamp
  2023-11-15 19:11 ` [PR PATCH] [Merged]: pdftk: replace with pdftk-java classabbyamp
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2023-11-15 17:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/47189#issuecomment-1812960072

Comment:
> If no one's going to maintain them, they shouldn't be added in the first place. In any case, please don't put me in the maintainer field. I have no interest to maintain any Java based packages.

I'll adopt all of them if you're not interested in maintaining anything java

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] pdftk: update to 3.3.3.
  2023-11-13  0:30 [PR PATCH] pdftk: update to 3.3.3 classabbyamp
                   ` (5 preceding siblings ...)
  2023-11-15 17:26 ` classabbyamp
@ 2023-11-15 17:36 ` classabbyamp
  2023-11-15 19:11 ` [PR PATCH] [Merged]: pdftk: replace with pdftk-java classabbyamp
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2023-11-15 17:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages pdftk
https://github.com/void-linux/void-packages/pull/47189

pdftk: update to 3.3.3.
- New package: bc-java-1.76
- New package: java-commons-lang-3.13.0
- pdftk: update to 3.3.3.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

cc: @Hoshpak


A patch file from https://github.com/void-linux/void-packages/pull/47189.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pdftk-47189.patch --]
[-- Type: text/x-diff, Size: 8152 bytes --]

From 8d5a38666f9c441fbf6a231a05723e8c1acdf161 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 15 Nov 2023 12:28:14 -0500
Subject: [PATCH 1/4] New package: bc-java-1.76

---
 srcpkgs/bc-java/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/bc-java/template

diff --git a/srcpkgs/bc-java/template b/srcpkgs/bc-java/template
new file mode 100644
index 0000000000000..edd1b9c4398c6
--- /dev/null
+++ b/srcpkgs/bc-java/template
@@ -0,0 +1,23 @@
+# Template file for 'bc-java'
+pkgname=bc-java
+version=1.76
+revision=1
+hostmakedepends="apache-ant openjdk17"
+depends="virtual?java-runtime"
+short_desc="Bouncy Castle Java cryptography APIs"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="MIT"
+homepage="https://www.bouncycastle.org/java.html"
+distfiles="https://github.com/bcgit/bc-java/archive/refs/tags/r${version/./rv}.tar.gz"
+checksum=20524a31378291def8e2d7d387550f4f70f34590e431a425d29b64bd57159866
+
+do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	ant -f ant/jdk18+.xml clean build-provider build
+}
+
+do_install() {
+	vinstall build/artifacts/jdk1.8/jars/bcprov-jdk18on-${version/./}.jar 644 /usr/lib/bc-java
+	ln -s bcprov-jdk18on-${version/./}.jar "${DESTDIR}"/usr/lib/bc-java/bcprov.jar
+	vlicense LICENSE.html
+}

From 64c521da779964f40b5246a4860fb7f4415c26c7 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 15 Nov 2023 12:28:31 -0500
Subject: [PATCH 2/4] New package: java-commons-lang-3.13.0

---
 srcpkgs/java-commons-lang/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/java-commons-lang/template

diff --git a/srcpkgs/java-commons-lang/template b/srcpkgs/java-commons-lang/template
new file mode 100644
index 0000000000000..ea01b5e0239c3
--- /dev/null
+++ b/srcpkgs/java-commons-lang/template
@@ -0,0 +1,23 @@
+# Template file for 'java-commons-lang'
+pkgname=java-commons-lang
+version=3.13.0
+revision=1
+hostmakedepends="apache-maven openjdk17"
+depends="virtual?java-runtime"
+short_desc="Helper utilities for the java.lang API"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="Apache-2.0"
+homepage="https://commons.apache.org/proper/commons-lang/"
+distfiles="https://archive.apache.org/dist/commons/lang/source/commons-lang3-${version}-src.tar.gz"
+checksum=49bb80cd6d76270412bc77c48702a05845594e9a72d49243094b79bef1fd3b33
+
+do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	mvn -am -Dmaven.javadoc.skip=true -Dmaven.test.skip=true clean package
+}
+
+do_install() {
+	vinstall target/commons-lang3-"${version}".jar 644 /usr/lib/java-commons-lang
+	ln -s "commons-lang3-$version.jar" "${DESTDIR}"/usr/lib/java-commons-lang/commons-lang.jar
+
+}

From ddca528e83e0169be0e29ccb3d1a7264116aa7f5 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 15 Nov 2023 12:31:02 -0500
Subject: [PATCH 3/4] New package: pdftk-java-3.3.3

port of pdftk to java
---
 srcpkgs/pdftk-java/files/pdftk |  4 ++++
 srcpkgs/pdftk-java/template    | 28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)
 create mode 100644 srcpkgs/pdftk-java/files/pdftk
 create mode 100644 srcpkgs/pdftk-java/template

diff --git a/srcpkgs/pdftk-java/files/pdftk b/srcpkgs/pdftk-java/files/pdftk
new file mode 100644
index 0000000000000..2b1959430c5df
--- /dev/null
+++ b/srcpkgs/pdftk-java/files/pdftk
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+"$JAVA_HOME"/bin/java -cp "/usr/lib/bc-java/bc-java.jar:/usr/lib/java-commons-lang/commons-lang.jar:/usr/lib/pdftk/pdftk.jar" \
+	com.gitlab.pdftk_java.pdftk "$@"
diff --git a/srcpkgs/pdftk-java/template b/srcpkgs/pdftk-java/template
new file mode 100644
index 0000000000000..44b2a3a5e8d59
--- /dev/null
+++ b/srcpkgs/pdftk-java/template
@@ -0,0 +1,28 @@
+# Template file for 'pdftk-java'
+pkgname=pdftk-java
+version=3.3.3
+revision=1
+hostmakedepends="gradle openjdk17"
+depends="virtual?java-runtime bc-java java-commons-lang"
+short_desc="Command-line tool for working with PDFs"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="GPL-2.0-or-later"
+homepage="https://gitlab.com/pdftk-java/pdftk"
+distfiles="https://gitlab.com/pdftk-java/pdftk/-/archive/v${version}/pdftk-v${version}.tar.gz"
+checksum=9c947de54658539e3a136e39f9c38ece1cf2893d143abb7f5bf3a2e3e005b286
+
+do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	gradle --no-daemon build
+}
+
+do_check() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk17
+	gradle --no-daemon test
+}
+
+do_install() {
+	vinstall build/libs/pdftk.jar 644 /usr/lib/pdftk
+	vman pdftk.1
+	vbin "${FILESDIR}"/pdftk
+}

From 60ff1503f0af5343589285e7549fe70d6488d721 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 15 Nov 2023 12:33:52 -0500
Subject: [PATCH 4/4] pdftk: remove and replace with pdftk-java

- requires gcc6 libraries, which are now in /bootstrap
- replaced by pdftk-java:

> This is a port of pdftk into Java.
> The current goals are to keep functionality as compatible with the
> original as it is reasonable, to fix any issues present in the
> original (correctness takes precedence over compatibility, see the
> differences), and to clean up the code. New functionality may be added,
> but it is not a priority.

fixes #47176
---
 srcpkgs/pdftk                |  1 +
 srcpkgs/pdftk-java/template  |  6 ++++++
 srcpkgs/pdftk/files/Makefile | 19 -------------------
 srcpkgs/pdftk/template       | 30 ------------------------------
 4 files changed, 7 insertions(+), 49 deletions(-)
 create mode 120000 srcpkgs/pdftk
 delete mode 100644 srcpkgs/pdftk/files/Makefile
 delete mode 100644 srcpkgs/pdftk/template

diff --git a/srcpkgs/pdftk b/srcpkgs/pdftk
new file mode 120000
index 0000000000000..3a3e0e2c17f0f
--- /dev/null
+++ b/srcpkgs/pdftk
@@ -0,0 +1 @@
+pdftk-java
\ No newline at end of file
diff --git a/srcpkgs/pdftk-java/template b/srcpkgs/pdftk-java/template
index 44b2a3a5e8d59..f04b33e2d160b 100644
--- a/srcpkgs/pdftk-java/template
+++ b/srcpkgs/pdftk-java/template
@@ -26,3 +26,9 @@ do_install() {
 	vman pdftk.1
 	vbin "${FILESDIR}"/pdftk
 }
+
+pdftk_package() {
+	build_style=meta
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" (transitional dummy package)"
+}
diff --git a/srcpkgs/pdftk/files/Makefile b/srcpkgs/pdftk/files/Makefile
deleted file mode 100644
index 126a0653b7324..0000000000000
--- a/srcpkgs/pdftk/files/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Based on 'Makefile.Debian', part of pdftk
-# Copyright (c) 2004-2012 Sid Steward
-
-export CXX= @CXX@
-export GCJ= gcj-6
-export GCJH= gcjh-6
-export GJAR= gjar-6
-export LIBGCJ= /usr/share/java/libgcj.jar
-export AR= @AR@
-export RM= rm
-export ARFLAGS= rs
-export RMFLAGS= -vf
-export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers
-export CXXFLAGS= @CXXFLAGS@
-export GCJFLAGS= -Wno-all -fsource=1.3 -O2 -fPIC -L/usr/lib
-export GCJHFLAGS= -force
-export LDLIBS= @LDFLAGS@ -lgcj
-
-include Makefile.Base
diff --git a/srcpkgs/pdftk/template b/srcpkgs/pdftk/template
deleted file mode 100644
index 56af9ba6965f5..0000000000000
--- a/srcpkgs/pdftk/template
+++ /dev/null
@@ -1,30 +0,0 @@
-# Template file for 'pdftk'
-pkgname=pdftk
-version=2.02
-revision=4
-build_wrksrc=${pkgname}
-hostmakedepends="unzip gcc6-gcj gcc6"
-makedepends="libgcj-devel"
-short_desc="Command-line tool for working with PDFs"
-maintainer="Helmut Pozimski <helmut@pozimski.eu>"
-license="GPL-2.0-or-later"
-homepage="https://www.pdflabs.com/tools/pdftk-server/"
-distfiles="http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/${pkgname}-${version}-src.zip"
-checksum=118f6a25fd3acaafb58824dce6f97cdc07e56050e666b90e4c4ef426ea37b8c1
-nocross=yes
-
-do_build() {
-	_cxxflags="${CXXFLAGS//-fstack-clash-protection}"
-	_cxxflags="${_cxxflags//-ffile-prefix-map=\/builddir\/${pkgname}-${version}\/${build_wrksrc}=.}"
-	sed -e "s;@CXX@;g++-6;" \
-		-e "s;@AR@;$AR;" \
-		-e "s;@CXXFLAGS@;${_cxxflags};" \
-		-e "s;@LDFLAGS@;$LDFLAGS;" \
-		${FILESDIR}/Makefile > Makefile
-	make ${makejobs} || make ${makjobs}
-}
-
-do_install() {
-	vbin pdftk
-	vman ../pdftk.1
-}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Merged]: pdftk: replace with pdftk-java
  2023-11-13  0:30 [PR PATCH] pdftk: update to 3.3.3 classabbyamp
                   ` (6 preceding siblings ...)
  2023-11-15 17:36 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-11-15 19:11 ` classabbyamp
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2023-11-15 19:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

There's a merged pull request on the void-packages repository

pdftk: replace with pdftk-java
https://github.com/void-linux/void-packages/pull/47189

Description:

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

cc: @Hoshpak


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-11-15 19:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-13  0:30 [PR PATCH] pdftk: update to 3.3.3 classabbyamp
2023-11-13  0:39 ` [PR PATCH] [Updated] " classabbyamp
2023-11-13  1:10 ` classabbyamp
2023-11-13  1:19 ` classabbyamp
2023-11-15 17:06 ` Hoshpak
2023-11-15 17:25 ` classabbyamp
2023-11-15 17:26 ` classabbyamp
2023-11-15 17:36 ` [PR PATCH] [Updated] " classabbyamp
2023-11-15 19:11 ` [PR PATCH] [Merged]: pdftk: replace with pdftk-java classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).