commit:     97b55e3205a7d0e71589bff351217fd2dd078a7f
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 20 09:18:40 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Jun 20 09:41:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97b55e32

dev-tex/pdfannotextractor: add 0.2

Major overhaul of the ebuild. We pull in pdfbox and fontbox as jars, as
the required version is no longer in ::gentoo.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 dev-tex/pdfannotextractor/Manifest                 |  3 +
 .../files/pdfannotextractor-0.2-javajars.patch     | 12 ++++
 .../pdfannotextractor/pdfannotextractor-0.2.ebuild | 74 ++++++++++++++++++++++
 3 files changed, 89 insertions(+)

diff --git a/dev-tex/pdfannotextractor/Manifest 
b/dev-tex/pdfannotextractor/Manifest
index d5ba583fcb9d..8c5e24772d37 100644
--- a/dev-tex/pdfannotextractor/Manifest
+++ b/dev-tex/pdfannotextractor/Manifest
@@ -1 +1,4 @@
+DIST fontbox-1.7.1.jar 188471 BLAKE2B 
88d2880e12bf99a2536b2ae21073e3f5eebeb8620e38158c971bcdd39da4f787fc9fca170183a2604ece8032cc3f3b379a763ebab472635b5b3feba1cad41855
 SHA512 
083d861ed254f92a66f9025ff63acd939ac93fc045d6c266b77b49ee8df483d8b93d8a75b25ec48bb9dc648cd6b49d8ef15858f1db1a2f367311331fc4a505a8
 DIST pdfannotextractor-0.1l.zip 48496 BLAKE2B 
f6c5be87c1b083f8a7b6e894e8ffd0f28b910c67661a9a773164c18ca27acafa22252a78e57d8c521abee2a57f3ce55f55067c7a7b54d51760ed0188571d64df
 SHA512 
043a12545889cbdf9309024bcb381a70eef6ac1c1a3214d678b606c97102dde6cfd473fbd8057f9ed7badebd0fc85db0ce0e05f361a71f8b8c3f71e523f8beba
+DIST pdfannotextractor-0.2.tar.gz 28922 BLAKE2B 
ca488a815762cdc9b3ee3dd240e21d105862a93e5d4cf0533a37ddf8e65ed1dea331dd5ddb4a4df33f757740bfa23ebb20a44ad69281c23d986cf596f9f4ea72
 SHA512 
8cbbc2cbfa71f9390955d9b9d563d6f936265d6f1216aa0d627fdb5867938cf6ca4e5a3dd80980376558ef1839cf38fd48697b26c743a3c4fca58d68b27632e5
+DIST pdfbox-1.8.17.jar 4099777 BLAKE2B 
05f777efd07f8189c6e0b2fd26d29b86e91e97c5a3351cf59e333d9a6c9b5512a856dacb469f643ebf6f607021217a63d214ad7632cf6d66a2e837d68d975b45
 SHA512 
44cd1f3d471d068b86e8bd06662365da34bb7d21e2a3080d9bc9bb0241661e61c2505294eeb40fc6983bdc2481ce09e60398b72a2a3d9b1ccaeec1536f428021

diff --git 
a/dev-tex/pdfannotextractor/files/pdfannotextractor-0.2-javajars.patch 
b/dev-tex/pdfannotextractor/files/pdfannotextractor-0.2-javajars.patch
new file mode 100644
index 000000000000..898b271a148e
--- /dev/null
+++ b/dev-tex/pdfannotextractor/files/pdfannotextractor-0.2-javajars.patch
@@ -0,0 +1,12 @@
+Index: work/scripts/pax/pdfannotextractor.pl
+===================================================================
+--- work.orig/scripts/pdfannotextractor.pl
++++ work/scripts/pdfannotextractor.pl
+@@ -84,6 +84,7 @@ my @jar_pdfbox = qw[
+     PDFBox-0.7.2.jar
+ ];
+ my @dir_jar = qw[
++    /usr/share/pdfannotextractor/lib
+     /usr/share/java
+     /usr/local/share/java
+ ];

diff --git a/dev-tex/pdfannotextractor/pdfannotextractor-0.2.ebuild 
b/dev-tex/pdfannotextractor/pdfannotextractor-0.2.ebuild
new file mode 100644
index 000000000000..db396a353ae8
--- /dev/null
+++ b/dev-tex/pdfannotextractor/pdfannotextractor-0.2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit latex-package java-pkg-2 java-ant-2
+
+MY_COMMIT_ID=718e18be0c8fd1dc5b7c974eb4fbe6d0774cd05e
+MY_PDFBOX_VER="1.8.17"
+MY_FONTBOX_VER="1.7.1"
+
+DESCRIPTION="Extract annotations from pdf files"
+HOMEPAGE="https://www.ctan.org/tex-archive/macros/latex/contrib/pax/";
+SRC_URI="
+       
https://github.com/bastien-roucaries/latex-pax/archive/${MY_COMMIT_ID}.tar.gz
+               -> ${P}.tar.gz
+       
https://downloads.apache.org/pdfbox/${MY_PDFBOX_VER}/pdfbox-${MY_PDFBOX_VER}.jar
+       
https://archive.apache.org/dist/pdfbox/${MY_FONTBOX_VER}/fontbox-${MY_FONTBOX_VER}.jar
+"
+
+S="${WORKDIR}/latex-pax-${MY_COMMIT_ID}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~x64-macos"
+
+CP_DEPEND="
+       dev-java/commons-logging:0
+"
+COMMON_DEPEND="virtual/latex-base"
+DEPEND="
+       ${COMMON_DEPEND}
+       >=virtual/jdk-11
+"
+BDEPEND="app-arch/unzip"
+RDEPEND="
+       ${CP_DEPEND}
+       ${COMMIN_DEPEND}
+       virtual/perl-Getopt-Long
+       dev-perl/File-Which
+       >=virtual/jre-11
+"
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_GENTOO_CLASSPATH="
+       commons-logging
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.2-javajars.patch
+)
+
+src_prepare() {
+       default
+       cp "${DISTDIR}"/pdfbox-${MY_PDFBOX_VER}.jar pdfbox.jar || die
+       cp "${DISTDIR}"/fontbox-${MY_FONTBOX_VER}.jar fontbox.jar || die
+}
+
+src_compile() {
+       cd source || die
+       EANT_GENTOO_CLASSPATH_EXTRA="${S}/pdfbox.jar:${S}/fontbox.jar" eant || 
die
+}
+
+src_install() {
+#      newbin scripts/pdfannotextractor.pl pdfannotextractor
+
+       java-pkg_dojar scripts/pax.jar pdfbox.jar fontbox.jar
+
+       java-pkg_dolauncher ${PN} --main pax.PDFAnnotExtractor
+
+       insinto ${TEXMF}
+       doins -r tex
+       dodoc README
+}

Reply via email to