summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Mayo <aklhfex@gmail.com>2024-09-23 19:21:22 +0100
committerFlorian Schmaus <flow@gentoo.org>2024-09-24 10:46:29 +0200
commitabb9e5fda4b715993ea696d3eebcddce2b0e7620 (patch)
tree09f20aedf96e966641954d47b1557878eded0cf5 /media-gfx
parentmedia-gfx/gscan2pdf: drop 2.13.2 (diff)
downloadgentoo-abb9e5fda4b715993ea696d3eebcddce2b0e7620.tar.gz
gentoo-abb9e5fda4b715993ea696d3eebcddce2b0e7620.tar.bz2
gentoo-abb9e5fda4b715993ea696d3eebcddce2b0e7620.zip
media-gfx/gscan2pdf: add 2.13.4
Signed-off-by: Chris Mayo <aklhfex@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/38728 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/gscan2pdf/Manifest1
-rw-r--r--media-gfx/gscan2pdf/files/gscan2pdf-2.13.4-t3722.patch11
-rw-r--r--media-gfx/gscan2pdf/gscan2pdf-2.13.4.ebuild115
3 files changed, 127 insertions, 0 deletions
diff --git a/media-gfx/gscan2pdf/Manifest b/media-gfx/gscan2pdf/Manifest
index 3a187086144f..ae4560f95a86 100644
--- a/media-gfx/gscan2pdf/Manifest
+++ b/media-gfx/gscan2pdf/Manifest
@@ -1 +1,2 @@
DIST gscan2pdf-2.13.2.tar.xz 507244 BLAKE2B 66ac15ddcf74ed2b04f231e24a663afa7494bd5df04ecb190b68b9822382e01953d97949174f3d6280fabc9d0a2ea1cc270c0aa333cf9992cfa2f58f645df156 SHA512 882b707b11df26310136ed72428eab6ec8e2c6cf34686675eee3b14181622f85d21be0e05cab411961f2a2441ad948e7b56c7fe24eecb558eae7a7ac6b4db9d1
+DIST gscan2pdf-2.13.4.tar.xz 510300 BLAKE2B 1a6721df5bc037abeed877a55ba5e4e1d3a6c559786a79f1196842819fa48ecf06715e29a7662db9a19e40b22d62fc69c5786213ae46b456e3252920dc2549af SHA512 19bd71b08c3be0a239e4018a50e1327b74b07cc64b03546e573ccbcbf89f3de3443ca9735740b070162c6c9f0adc7655fc81319fc082bd15a47f5e90baee6537
diff --git a/media-gfx/gscan2pdf/files/gscan2pdf-2.13.4-t3722.patch b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.4-t3722.patch
new file mode 100644
index 000000000000..715dbdedf213
--- /dev/null
+++ b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.4-t3722.patch
@@ -0,0 +1,11 @@
+--- a/t/3722_user_defined.t
++++ b/t/3722_user_defined.t
+@@ -38,7 +38,7 @@ $slist->import_files(
+ },
+ error_callback => sub {
+ my ( $uuid, $process, $msg ) = @_;
+- is( $msg, 'error',
++ is( substr($msg, 0, 5), 'error',
+ 'user_defined caught error injected in queue' );
+ },
+ );
diff --git a/media-gfx/gscan2pdf/gscan2pdf-2.13.4.ebuild b/media-gfx/gscan2pdf/gscan2pdf-2.13.4.ebuild
new file mode 100644
index 000000000000..70b55f49a590
--- /dev/null
+++ b/media-gfx/gscan2pdf/gscan2pdf-2.13.4.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_TEST="do"
+
+inherit optfeature perl-module virtualx xdg-utils
+
+DESCRIPTION="Scan documents, perform OCR, produce PDFs and DjVus"
+HOMEPAGE="http://gscan2pdf.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-perl/Config-General
+ dev-perl/Data-UUID
+ dev-perl/Date-Calc
+ dev-perl/Filesys-Df
+ dev-perl/glib-perl
+ dev-perl/GooCanvas2
+ dev-perl/Gtk3
+ >=dev-perl/Gtk3-ImageView-10.0.0
+ dev-perl/Gtk3-SimpleList
+ dev-perl/HTML-Parser
+ dev-perl/Image-Sane
+ dev-perl/List-MoreUtils
+ dev-perl/Locale-Codes
+ dev-perl/Locale-gettext
+ dev-perl/Log-Log4perl
+ >=dev-perl/PDF-Builder-3.23.0
+ dev-perl/Proc-ProcessTable
+ dev-perl/Readonly
+ dev-perl/Set-IntSpan
+ dev-perl/Try-Tiny
+ virtual/perl-Archive-Tar
+ virtual/perl-Carp
+ virtual/perl-Data-Dumper
+ virtual/perl-File-Temp
+ virtual/perl-Getopt-Long
+ virtual/perl-threads
+ virtual/perl-threads-shared
+ media-gfx/imagemagick[png,tiff,perl]
+ media-gfx/sane-backends
+ >=media-libs/tiff-4.7.0"
+
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ dev-perl/IPC-System-Simple
+ dev-perl/Sub-Override
+ media-libs/fontconfig
+
+ app-text/djvu[jpeg,tiff]
+ app-text/poppler[utils]
+ app-text/tesseract[-opencl(-),png,tiff]
+ app-text/unpaper
+ media-gfx/imagemagick[djvu,jpeg,png,tiff,perl,postscript,truetype]
+ media-gfx/sane-backends[sane_backends_test]
+ media-gfx/sane-frontends
+ )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.13.2-t1161.patch"
+ "${FILESDIR}/${PN}-2.13.4-t3722.patch"
+)
+
+PERL_RM_FILES=( t/{90_MANIFEST,91_critic,99_pod,169_import_scan}.t )
+
+mydoc="History"
+
+src_test() {
+ einfo "Using:"
+ einfo " $(best_version app-text/djvu)"
+ einfo " $(best_version app-text/poppler)"
+ einfo " $(best_version app-text/tesseract)"
+ einfo " $(best_version dev-perl/Gtk3-ImageView)"
+ einfo " $(best_version dev-perl/Image-Sane)"
+ einfo " $(best_version dev-perl/PDF-Builder)"
+ einfo " $(best_version media-gfx/imagemagick)"
+ einfo " $(best_version media-gfx/sane-backends)"
+ einfo " $(best_version media-libs/tiff)"
+
+ local confdir="${HOME}/.config/ImageMagick"
+ mkdir -p "${confdir}" || die
+ cat > "${confdir}/policy.xml" <<-EOT || die
+ <policymap>
+ <policy domain="coder" rights="read|write" pattern="PDF" />
+ <policy domain="coder" rights="read" pattern="PS" />
+ </policymap>
+ EOT
+ NO_AT_BRIDGE=1 virtx perl-module_src_test
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+
+ optfeature "DjVu file support" "app-text/djvu[tiff] media-gfx/imagemagick[djvu]"
+ optfeature "encrypting PDFs" app-text/pdftk
+ optfeature "creating PostScript files from PDFs" app-text/poppler[utils]
+ optfeature "adding to an existing PDF" app-text/poppler[utils]
+ optfeature "Optical Character Recognition" app-text/tesseract[tiff]
+ optfeature "scan post-processing" app-text/unpaper
+ optfeature "automatic document feeder support" media-gfx/sane-frontends
+ optfeature "sending PDFs as email attachments" x11-misc/xdg-utils
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}