summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/zbar/Makefile7
-rw-r--r--graphics/zbar/files/patch-configure6
-rw-r--r--graphics/zbar/files/patch-zbarimg.c12
3 files changed, 23 insertions, 2 deletions
diff --git a/graphics/zbar/Makefile b/graphics/zbar/Makefile
index 743f0cf98935..f8774e982a7f 100644
--- a/graphics/zbar/Makefile
+++ b/graphics/zbar/Makefile
@@ -3,7 +3,7 @@
PORTNAME= zbar
PORTVERSION= 0.10
-PORTREVISION= 15
+PORTREVISION= 16
CATEGORIES= graphics
MASTER_SITES= SF
@@ -28,10 +28,13 @@ X11_USE= XORG=ice,sm,x11,xau,xcb,xdmcp,xext,xv
X11_CONFIGURE_ON= --with-x=yes
X11_CONFIGURE_OFF= --with-x=no --without-xshm --without-xv
-IMAGEMAGICK_LIB_DEPENDS= libMagick++-6.so:graphics/ImageMagick6
+IMAGEMAGICK_LIB_DEPENDS= libMagick++-7.so:graphics/ImageMagick7
IMAGEMAGICK_CONFIGURE_ON= --with-imagemagick=yes
IMAGEMAGICK_CONFIGURE_OFF= --with-imagemagick=no
+# To avoid patching configure even more:
+CONFIGURE_ENV+= ac_cv_header_wand_MagickWand_h=yes
+
V4L_BUILD_DEPENDS= v4l_compat>=1.0.20101027:multimedia/v4l_compat
V4L_CONFIGURE_ON= --enable-video=yes
V4L_CONFIGURE_OFF= --enable-video=no
diff --git a/graphics/zbar/files/patch-configure b/graphics/zbar/files/patch-configure
index 506e478abe9e..ea821508055f 100644
--- a/graphics/zbar/files/patch-configure
+++ b/graphics/zbar/files/patch-configure
@@ -8,3 +8,9 @@
LIBS="-ljpeg $LIBS"
else
+@@ -21736,4 +21737,5 @@
+ fi
+ MAGICK_VERSION=`$PKG_CONFIG MagickWand --modversion`
++ MAGICK_CFLAGS="$MAGICK_CFLAGS -DMAGICK_MAJOR=${MAGICK_VERSION%%.*}"
+ { $as_echo "$as_me:$LINENO: using ImageMagick version $MAGICK_VERSION" >&5
+ $as_echo "$as_me: using ImageMagick version $MAGICK_VERSION" >&6;}
diff --git a/graphics/zbar/files/patch-zbarimg.c b/graphics/zbar/files/patch-zbarimg.c
new file mode 100644
index 000000000000..0f69dda184b1
--- /dev/null
+++ b/graphics/zbar/files/patch-zbarimg.c
@@ -0,0 +1,12 @@
+--- zbarimg/zbarimg.c 2009-10-23 14:16:44.000000000 -0400
++++ zbarimg/zbarimg.c 2017-08-10 10:22:08.707599000 -0400
+@@ -39,5 +39,9 @@
+
+ #include <zbar.h>
++#if MAGICK_MAJOR < 7
+ #include <wand/MagickWand.h>
++#else
++#include <MagickWand/MagickWand.h>
++#endif
+
+ /* in 6.4.5.4 MagickGetImagePixels changed to MagickExportImagePixels.