Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] pdftk: update to 3.3.3.
Date: Mon, 13 Nov 2023 02:10:17 +0100	[thread overview]
Message-ID: <20231113011017.r7ceZnXPVAzKzc9sEbituGSmFklXZbeaoCE1aqyXErE@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47189@inbox.vuxu.org>

[-- 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
 }

  parent reply	other threads:[~2023-11-13  1:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13  0:30 [PR PATCH] " classabbyamp
2023-11-13  0:39 ` [PR PATCH] [Updated] " classabbyamp
2023-11-13  1:10 ` classabbyamp [this message]
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

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=20231113011017.r7ceZnXPVAzKzc9sEbituGSmFklXZbeaoCE1aqyXErE@z \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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;
as well as URLs for NNTP newsgroup(s).