summaryrefslogtreecommitdiff
path: root/media-gfx/gscan2pdf
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/gscan2pdf')
-rw-r--r--media-gfx/gscan2pdf/Manifest9
-rw-r--r--media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-min_max.patch20
-rw-r--r--media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-t1161.patch13
-rw-r--r--media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-t131.patch17
-rw-r--r--media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-tiff2ps.patch39
-rw-r--r--media-gfx/gscan2pdf/gscan2pdf-2.12.5.ebuild110
-rw-r--r--media-gfx/gscan2pdf/gscan2pdf-2.13.2-r1.ebuild (renamed from media-gfx/gscan2pdf/gscan2pdf-2.13.0.ebuild)11
7 files changed, 103 insertions, 116 deletions
diff --git a/media-gfx/gscan2pdf/Manifest b/media-gfx/gscan2pdf/Manifest
index ad12a03cc3b3..490c433f30b4 100644
--- a/media-gfx/gscan2pdf/Manifest
+++ b/media-gfx/gscan2pdf/Manifest
@@ -1,7 +1,8 @@
-DIST gscan2pdf-2.12.5.tar.xz 502636 BLAKE2B 5fb92a4e5dfdbd985119058ed86ca015a58e97fd73edae4d46279e482351f9b5514045a60bb67ca2bfb58fa1e4315bc03ca67a2f2e3ed0cd2c941d8ae755fdfa SHA512 eeeec0940ef4a40b8cb7e961758e9688c94d980842ab36c4e52384099d1e28773f2967a75eb7c024ab713b880c2538d8395021bfabd68cffa7b334fdd35d773b
-DIST gscan2pdf-2.13.0.tar.xz 503876 BLAKE2B 784b52d9e06fe8a112b2e4d6ce281c037f1e834154e0d19ee9112b4027e2075971d52114f7f6d197bee024aabd84a2263fa98ba08e4cade6129dd0a0a4d2a104 SHA512 81a72d2241cf32dfdf628ab991476e435812e9f04f54c8fe311d0c7ef5e77e6d38091523aa4bf610382d76e1e4f5049cd5ba96c68f6d796298f9e2a584ff0d5d
+AUX gscan2pdf-2.13.2-min_max.patch 919 BLAKE2B f74350243325ec05dc290afd45e45d5916d439932e47e54361457a31c8543c69def80b4c4c84058702bf39627237eb80ed8df1d5688e7cecd2d57091d34c9bd1 SHA512 71a38fc780136e80710ce8e025e5eea37174789fc104b20034c2a8b6f26974cb31798f70a62144b8d14d74ea75c126282fdc6d70468e4c07ffb610ce8931502f
+AUX gscan2pdf-2.13.2-t1161.patch 512 BLAKE2B b74f51a2cc70c19ef9b242b02540fff63098a783f9a0102622844a49fd5cf60c3701255af5317450c92bec3b3a7dc784fd9a5f37e136cd4db9f16de800323602 SHA512 cc8a8c65e9cf9b1425f69ae15687cdf0983fefd1415e30510e6f6bf0d4ffe71375839e2a4355c9d2f69b7b690d1a39d8520181dadbb055576cf2cde156b72c6e
+AUX gscan2pdf-2.13.2-t131.patch 473 BLAKE2B 23ec073509f9b252494e677a7f90f1eb41077a7e63641b1f6a6cb06d9a1329a3b5c96189c92a78b11b515c091b8df16173a40ced65d8f563e87b7d83410c31dd SHA512 ceffdfd0e478047d5da7044e160b8feadda9a0fa09ac99c609a118b84ac45ed10cd386f04c499c832566d8626e5abee4ce5d819a9e51733eb7dc822fa162f32d
+AUX gscan2pdf-2.13.2-tiff2ps.patch 1490 BLAKE2B c8b85f7a21e3e03cc1621d0f65af9f6ab03e89e72ef3839dc6f585cd8d0e6cc2d10c49ff119b671bc9f6fc99cf03c6a0117402acc38e624d46fd89cd02a75058 SHA512 b6357c1ea6d6dc958b7044be062bdb9445667da3d2ff9017bbdd3b041daafa89e742d8c1c9c919d3b8b5c4ab35840db1d24ec27a573a1e75b544c0dfce40bd9b
DIST gscan2pdf-2.13.2.tar.xz 507244 BLAKE2B 66ac15ddcf74ed2b04f231e24a663afa7494bd5df04ecb190b68b9822382e01953d97949174f3d6280fabc9d0a2ea1cc270c0aa333cf9992cfa2f58f645df156 SHA512 882b707b11df26310136ed72428eab6ec8e2c6cf34686675eee3b14181622f85d21be0e05cab411961f2a2441ad948e7b56c7fe24eecb558eae7a7ac6b4db9d1
-EBUILD gscan2pdf-2.12.5.ebuild 2995 BLAKE2B 96336de1a27929613f0734fd8013031cd8f6fd239f8c344d6f35fbc5385b1d280266d587e45714d4a5c740e2dc03df7ac28b07593f5b376729c041d4591cac92 SHA512 d5e143d4f92ff01ff47d8d8a7cb4d0147e11ec3dfaf3eb323638670faf5f105b5af222b312bf39f2984be36b51c4dbf809ad498c311ba2a0a1baa54f543cce3b
-EBUILD gscan2pdf-2.13.0.ebuild 3013 BLAKE2B 18f7a307ade095948cff2496a0ff23f6cb4ef4c80318b919cda9e7fa85760e09a9b642a57dcb7615acf3408c8285d873721465933d0e2bd1311728b4f98e2e84 SHA512 2786aa6f7d41f0376c0076d8a17dfd769b45418d039a60baca10f7c81c92b9fe79131a6b578a13886f1c88c2daf813c2cf8afdde3ff0b67adfa446e40176b675
+EBUILD gscan2pdf-2.13.2-r1.ebuild 3523 BLAKE2B ba43bb3251fc0c07cd5ad155ef130f9c7e3448de4259a433b79ea492e1a6417347f432ac92601b9d34e20a179182e1f888bbd6450527f11d9fc02c538fdcfebd SHA512 bd1b2b0475c7de1503329b7ab6230c750310eaf0f7358259ceda26de4134ead37de0e7bc0eaff6b7fdf4f05fa0528704a3c88abb29b735e770e5a7674f74d49b
EBUILD gscan2pdf-2.13.2.ebuild 3011 BLAKE2B 9ebdc39b750fdc00de20b4bc836482b27cca65185cb3b93b9811a423e5e6ff10319ebe5702135548bb521189ef735282eeeb96e76f712500dfa24d8355bd352b SHA512 46a2156c7342cd8a39b3039035f933a9d97c2c166eb495113740b2de803302b929851fbd3a0b551d4d2de17a42119a59adb2061bead7291b91cfe7b20cf593c0
MISC metadata.xml 470 BLAKE2B d9a9ad2f443b0bca02e6b8e91c96f22430543ee82fe8a1174739d4ad59225f73b975d31316fecd4dde6f26002ef6ba9fd39bf5d4adfd2bc82540d14e90d623a6 SHA512 ecd2fe9215c3a65760b8c101989772a73a7e9975dc38a1b11b0334cf6e1d001ccebfca1bc6d7631eb3b3e3e03d1736205563b0c836a2aea026fdfe552d72cbe0
diff --git a/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-min_max.patch b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-min_max.patch
new file mode 100644
index 000000000000..5724bc16a188
--- /dev/null
+++ b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-min_max.patch
@@ -0,0 +1,20 @@
+--- a/lib/Gscan2pdf/Dialog/Scan/Image_Sane.pm
++++ b/lib/Gscan2pdf/Dialog/Scan/Image_Sane.pm
+@@ -295,6 +295,17 @@ sub _initialise_options { ## no critic (ProhibitExcessComplexity)
+ if ( $opt->{constraint}{quant} ) {
+ $step = $opt->{constraint}{quant};
+ }
++ if ( $opt->{constraint}{min} > $opt->{constraint}{max} ) {
++ $logger->error(
++ sprintf __(
++"Ignoring scan option '%s', minimum range (%s) > maximum (%s)"
++ ),
++ $opt->{name},
++ $opt->{constraint}{min},
++ $opt->{constraint}{max}
++ );
++ next;
++ }
+ $widget =
+ Gtk3::SpinButton->new_with_range( $opt->{constraint}{min},
+ $opt->{constraint}{max}, $step );
diff --git a/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-t1161.patch b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-t1161.patch
new file mode 100644
index 000000000000..707d109cf148
--- /dev/null
+++ b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-t1161.patch
@@ -0,0 +1,13 @@
+diff --git a/t/1161_save_multipage_pdf_with_utf8.t b/t/1161_save_multipage_pdf_with_utf8.t
+index 23ed652e..6b9537a0 100644
+--- a/t/1161_save_multipage_pdf_with_utf8.t
++++ b/t/1161_save_multipage_pdf_with_utf8.t
+@@ -26,7 +26,7 @@ system(qw(convert rose: 1.pnm));
+ my $n = 3;
+
+ my %options;
+-$options{font} = capture('fc-list : file | grep ttf 2> /dev/null | head -n 1');
++$options{font} = capture('fc-list :lang=ru file | grep ttf 2> /dev/null | head -n 1');
+ chomp $options{font};
+ $options{font} =~ s/: $//;
+
diff --git a/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-t131.patch b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-t131.patch
new file mode 100644
index 000000000000..ecbf48b5f59a
--- /dev/null
+++ b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-t131.patch
@@ -0,0 +1,17 @@
+--- a/t/131_save_tiff.t
++++ b/t/131_save_tiff.t
+@@ -43,12 +43,12 @@ Gtk3->main;
+
+ like(
+ capture(qw(identify test.tif)),
+- qr/test.tif TIFF 70x46 70x46\+0\+0 8-bit sRGB [7|9][.\d]+K?B/,
++ qr/test.tif TIFF 70x46 70x46\+0\+0 8-bit sRGB/,
+ 'valid TIFF created'
+ );
+ like(
+ capture(qw(identify test2.png)),
+- qr/test2.png PNG 70x46 70x46\+0\+0 8-bit sRGB 7[.\d]+K?B.*/,
++ qr/test2.png PNG 70x46 70x46\+0\+0 8-bit sRGB/,
+ 'ran post-save hook'
+ );
+
diff --git a/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-tiff2ps.patch b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-tiff2ps.patch
new file mode 100644
index 000000000000..f5c96a196098
--- /dev/null
+++ b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-tiff2ps.patch
@@ -0,0 +1,39 @@
+--- a/lib/Gscan2pdf/Dialog/Save.pm
++++ b/lib/Gscan2pdf/Dialog/Save.pm
+@@ -570,10 +570,6 @@ sub add_image_type {
+ $label = Gtk3::Label->new( __('Postscript backend') );
+ $hboxps->pack_start( $label, FALSE, FALSE, 0 );
+ my @backends = (
+- [
+- 'libtiff', __('LibTIFF'),
+- __('Use LibTIFF (tiff2ps) to create Postscript files from TIFF.')
+- ],
+ [
+ 'pdf2ps',
+ __('Ghostscript'),
+--- a/lib/Gscan2pdf/Document.pm
++++ b/lib/Gscan2pdf/Document.pm
+@@ -4471,22 +4471,7 @@ sub _thread_save_tiff {
+ 'Save file', sprintf __('Error compressing image: %s'), $error );
+ return;
+ }
+- if ( defined $options{options}{ps} ) {
+- $self->{message} = __('Converting to PS');
+- @cmd = ( 'tiff2ps', '-3', $options{path}, '-O', $options{options}{ps} );
+- ( $status, undef, $error ) = exec_command( \@cmd, $options{pidfile} );
+- if ( $status or $error ) {
+- $logger->info($error);
+- _thread_throw_error( $self, $options{uuid}, $options{page}{uuid},
+- 'Save file',
+- sprintf __('Error converting TIFF to PS: %s'), $error );
+- return;
+- }
+- _post_save_hook( $options{options}{ps}, %{ $options{options} } );
+- }
+- else {
+- _post_save_hook( $options{path}, %{ $options{options} } );
+- }
++ _post_save_hook( $options{path}, %{ $options{options} } );
+
+ $self->{return}->enqueue(
+ {
diff --git a/media-gfx/gscan2pdf/gscan2pdf-2.12.5.ebuild b/media-gfx/gscan2pdf/gscan2pdf-2.12.5.ebuild
deleted file mode 100644
index a9f6ec537bcc..000000000000
--- a/media-gfx/gscan2pdf/gscan2pdf-2.12.5.ebuild
+++ /dev/null
@@ -1,110 +0,0 @@
-# Copyright 1999-2022 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="mirror://sourceforge/${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"
-
-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,osd(+),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
- )"
-
-PERL_RM_FILES=( t/{90_MANIFEST,91_critic,99_pod}.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
-}
diff --git a/media-gfx/gscan2pdf/gscan2pdf-2.13.0.ebuild b/media-gfx/gscan2pdf/gscan2pdf-2.13.2-r1.ebuild
index 4bfade7a935f..0ad4b4925aba 100644
--- a/media-gfx/gscan2pdf/gscan2pdf-2.13.0.ebuild
+++ b/media-gfx/gscan2pdf/gscan2pdf-2.13.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -65,7 +65,14 @@ BDEPEND="
media-gfx/sane-frontends
)"
-PERL_RM_FILES=( t/{90_MANIFEST,91_critic,99_pod,169_import_scan}.t )
+PATCHES=(
+ "${FILESDIR}/${P}-min_max.patch"
+ "${FILESDIR}/${P}-tiff2ps.patch"
+ "${FILESDIR}/${P}-t131.patch"
+ "${FILESDIR}/${P}-t1161.patch"
+)
+
+PERL_RM_FILES=( t/{90_MANIFEST,91_critic,99_pod,135_save_tiff_as_ps_with_space,169_import_scan,0601_Dialog_Scan,1171_prepend_pdf,1172_append_pdf,1173_prepend_pdf_with_space,1174_prepend_pdf_with_inverted_comma,1175_append_with_timestamp,1621_import_pdf,1622_import_multipage_PDF,1623_import_multipage_PDF2,1624_import_multipage_PDF3,1625_import_pdf_bw,1626_import_PDF_with_error,1627_import_encrypted_pdf,1628_import_pdf_metadata}.t )
mydoc="History"