1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 inherit eutils perl-module virtualx xdg-utils
10 DESCRIPTION="Scan documents, perform OCR, produce PDFs and DjVus"
11 HOMEPAGE="http://gscan2pdf.sourceforge.net/"
12 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
16 KEYWORDS="~amd64 ~x86"
18 RESTRICT="!test? ( test )"
21 dev-perl/Config-General
28 dev-perl/Gtk3-SimpleList
31 dev-perl/List-MoreUtils
32 dev-perl/Locale-gettext
35 dev-perl/Proc-ProcessTable
39 virtual/perl-Archive-Tar
41 virtual/perl-Data-Dumper
42 virtual/perl-File-Temp
43 virtual/perl-Getopt-Long
45 virtual/perl-threads-shared
46 media-gfx/imagemagick[png,tiff,perl]
47 media-gfx/sane-backends
57 app-text/poppler[utils]
58 app-text/tesseract[-opencl,osd(+),tiff]
60 media-gfx/imagemagick[djvu,png,tiff,perl]
61 media-gfx/sane-backends[sane_backends_test]
62 media-gfx/sane-frontends
65 PERL_RM_FILES=( t/{90_MANIFEST,91_critic,99_pod}.t )
70 xdg_desktop_database_update
72 optfeature "DjVu file support" "app-text/djvu[tiff] media-gfx/imagemagick[djvu]"
73 optfeature "encrypting PDFs" app-text/pdftk
74 optfeature "creating PostScript files from PDFs" app-text/poppler[utils]
75 optfeature "adding to an existing PDF" app-text/poppler[utils]
76 optfeature "Optical Character Recognition" app-text/tesseract[osd,tiff]
77 optfeature "scan post-processing" app-text/unpaper
78 optfeature "automatic document feeder support" media-gfx/sane-frontends
79 optfeature "sending PDFs as email attachments" x11-misc/xdg-utils
83 xdg_desktop_database_update
87 local confdir="${HOME}/.config/ImageMagick"
88 mkdir -p "${confdir}" || die
89 cat > "${confdir}/policy.xml" <<-EOT || die
91 <policy domain="coder" rights="read|write" pattern="PDF" />
92 <policy domain="coder" rights="read" pattern="PS" />
95 NO_AT_BRIDGE=1 virtx perl-module_src_test