summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-02-16 14:16:03 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2020-02-16 14:41:33 +0100
commit985c92af4730d864e86fa87746185b0246e9db93 (patch)
tree66218895a9fde51e143bbf2a6bd5a50c709fb252 /media-gfx
parentmedia-sound/lilypond: Sort variables, style, drop LANGS, USE guile2 (diff)
downloadgentoo-985c92af4730d864e86fa87746185b0246e9db93.tar.gz
gentoo-985c92af4730d864e86fa87746185b0246e9db93.tar.bz2
gentoo-985c92af4730d864e86fa87746185b0246e9db93.zip
media-gfx/iscan: Fix build with >=imagemagick-7
Non-maintainer commit. See also: https://github.com/utsushi/utsushi/issues/43 Closes: https://bugs.gentoo.org/704706 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/iscan/files/iscan-3.61.0-imagemagick-7.patch54
-rw-r--r--media-gfx/iscan/iscan-3.61.0.ebuild11
2 files changed, 59 insertions, 6 deletions
diff --git a/media-gfx/iscan/files/iscan-3.61.0-imagemagick-7.patch b/media-gfx/iscan/files/iscan-3.61.0-imagemagick-7.patch
new file mode 100644
index 000000000000..9d345a2b309c
--- /dev/null
+++ b/media-gfx/iscan/files/iscan-3.61.0-imagemagick-7.patch
@@ -0,0 +1,54 @@
+From 222aa3e123ee771d8997f6931997e3143186e0d6 Mon Sep 17 00:00:00 2001
+From: sirjaren <sirjaren@gmail.com>
+Date: Tue, 20 Feb 2018 13:35:46 -0600
+Subject: [PATCH] media-gfx/utsushi: ImageMagick deskew/crop support
+
+Fixes to allow utsushi to be built with --magick-pp. According to:
+ https://github.com/utsushi/utsushi/issues/43
+
+The API changes from ImageMagick 6 to 7 means build failures as there
+are old API's in use. It seems, that these API's are not actually used
+(as in GraphicsMagick doesn't use them), so it may be ok to disable the
+checks for them in 'doc-locate.cpp'.
+
+This is not yet confirmed, but allows building and using deskew in my
+own testing.
+---
+ .../files/utsushi-9999-magick-pp.patch | 33 ++++++++++
+ 4 files changed, 111 insertions(+), 8 deletions(-)
+ create mode 100644 media-gfx/utsushi/files/utsushi-9999-boost.patch
+ create mode 100644 media-gfx/utsushi/files/utsushi-9999-magick-pp.patch
+
+diff --git a/filters/doc-locate.cpp b/filters/doc-locate.cpp
+index 4b09b29..4508274 100644
+--- a/filters/doc-locate.cpp
++++ b/filters/doc-locate.cpp
+@@ -260,17 +260,17 @@ public:
+ clone.rotate (deskew_angle ());
+
+ Magick::Geometry rv = bbox (clone);
+- if (HAVE_IMAGE_MAGICK_PP)
+- {
+- if (clone.page ().xNegative ())
+- rv.xOff (rv.xOff () - clone.page ().xOff());
+- else
+- rv.xOff (rv.xOff () + clone.page ().xOff());
+- if (clone.page ().yNegative ())
+- rv.yOff (rv.yOff () - clone.page ().yOff());
+- else
+- rv.yOff (rv.yOff () + clone.page ().yOff());
+- }
++ /*if (HAVE_IMAGE_MAGICK_PP)
++ *{
++ * if (clone.page ().xNegative ())
++ * rv.xOff (rv.xOff () - clone.page ().xOff());
++ * else
++ * rv.xOff (rv.xOff () + clone.page ().xOff());
++ * if (clone.page ().yNegative ())
++ * rv.yOff (rv.yOff () - clone.page ().yOff());
++ * else
++ * rv.yOff (rv.yOff () + clone.page ().yOff());
++ }*/
+ return scale (rv);
+ }
+
diff --git a/media-gfx/iscan/iscan-3.61.0.ebuild b/media-gfx/iscan/iscan-3.61.0.ebuild
index 5ea99a53ae23..8d372ec8a73e 100644
--- a/media-gfx/iscan/iscan-3.61.0.ebuild
+++ b/media-gfx/iscan/iscan-3.61.0.ebuild
@@ -5,15 +5,11 @@ EAPI=7
DESCRIPTION="EPSON Image Scan v3 for Linux"
HOMEPAGE="http://support.epson.net/linux/en/imagescanv3.php"
-
SRC_URI="http://support.epson.net/linux/src/scanner/imagescanv3/common/imagescan_${PV}.orig.tar.gz"
LICENSE="GPL-3+"
-
SLOT="0"
-
IUSE="graphicsmagick gui imagemagick"
-
KEYWORDS="~amd64 ~x86"
DEPEND="
@@ -28,11 +24,14 @@ DEPEND="
graphicsmagick? ( media-gfx/graphicsmagick:= )
)
"
-RDEPEND=${DEPEND}
+RDEPEND="${DEPEND}"
S="${WORKDIR}/utsushi-0.$(ver_cut 2-3)"
-PATCHES=( "${FILESDIR}"/${PN}-3.61.0-ijg-libjpeg.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-ijg-libjpeg.patch
+ "${FILESDIR}"/${P}-imagemagick-7.patch
+)
src_configure() {
econf \