]> git.pld-linux.org Git - packages/dmtx-utils.git/commitdiff
- fix building with ImageMagick 7 auto/th/dmtx-utils-0.7.4-2
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 25 Dec 2016 16:57:16 +0000 (17:57 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 25 Dec 2016 16:57:16 +0000 (17:57 +0100)
- fix counfigure.ac regen
- rel 2

ac.patch [new file with mode: 0644]
dmtx-utils.spec
imagemagick7.patch [new file with mode: 0644]

diff --git a/ac.patch b/ac.patch
new file mode 100644 (file)
index 0000000..32caf9b
--- /dev/null
+++ b/ac.patch
@@ -0,0 +1,10 @@
+--- dmtx-utils-0.7.4/configure.ac~     2016-12-25 17:41:49.000000000 +0100
++++ dmtx-utils-0.7.4/configure.ac      2016-12-25 17:43:52.006935201 +0100
+@@ -20,7 +20,6 @@
+ AC_CHECK_HEADERS([sysexits.h])
+ AC_CHECK_HEADERS([getopt.h])
+-AC_CHECK_FUNC([getopt_long], [], [ AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) ])
+ AC_ARG_ENABLE(
+    [dmtxquery],
index 2199092cf16af2b1c93166b3a006e9ed97483098..94c2d19e0eb72a572e7b86ed020a5cf6a5344208 100644 (file)
@@ -1,12 +1,17 @@
 Summary:       Utilities for libdmtx
 Name:          dmtx-utils
 Version:       0.7.4
-Release:       1
+Release:       2
 License:       LGPL v2+
 Group:         Applications/System
 Source0:       http://downloads.sourceforge.net/libdmtx/%{name}-%{version}.tar.bz2
 # Source0-md5: b132ab9fb1d289869469b8bb4959a08a
+Patch0:                ac.patch
+Patch1:                imagemagick7.patch
 URL:           http://www.libdmtx.org/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
 BuildRequires: libdmtx-devel
 BuildRequires: pkgconfig
 BuildRequires: rpmbuild(macros) >= 1.219
@@ -18,8 +23,15 @@ This package contains utilities that use libdmtx.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure
 
 %{__make}
diff --git a/imagemagick7.patch b/imagemagick7.patch
new file mode 100644 (file)
index 0000000..3cf991c
--- /dev/null
@@ -0,0 +1,48 @@
+diff -ur dmtx-utils-0.7.4/configure.ac dmtx-utils-0.7.4-im7/configure.ac
+--- dmtx-utils-0.7.4/configure.ac      2016-12-25 17:54:31.633992016 +0100
++++ dmtx-utils-0.7.4-im7/configure.ac  2016-12-25 17:43:52.006935201 +0100
+@@ -59,7 +59,7 @@
+ fi
+ if test x$dmtxread = xyes -o x$dmtxwrite = xyes; then
+-   PKG_CHECK_MODULES(MAGICK, Wand >= 6.2.4, [], AC_MSG_ERROR([dmtxread/dmtxwrite requires Wand >= 6.2.4]))
++   PKG_CHECK_MODULES(MAGICK, MagickWand >= 6.2.4, [], AC_MSG_ERROR([dmtxread/dmtxwrite requires Wand >= 6.2.4]))
+    AC_SUBST(MAGICK_CFLAGS)
+    AC_SUBST(MAGICK_LIBS)
+ fi
+diff -ur dmtx-utils-0.7.4/dmtxread/dmtxread.c dmtx-utils-0.7.4-im7/dmtxread/dmtxread.c
+--- dmtx-utils-0.7.4/dmtxread/dmtxread.c       2011-06-03 07:13:10.000000000 +0200
++++ dmtx-utils-0.7.4-im7/dmtxread/dmtxread.c   2016-12-25 17:52:06.070673612 +0100
+@@ -114,7 +114,7 @@
+          }
+          /* Copy pixels to known format */
+-         success = MagickGetImagePixels(wand, 0, 0, width, height, "RGB", CharPixel, pxl);
++         success = MagickImportImagePixels(wand, 0, 0, width, height, "RGB", CharPixel, pxl);
+          if(success == MagickFalse || pxl == NULL) {
+             CleanupMagick(&wand, DmtxTrue);
+             FatalError(EX_OSERR, "malloc() error");
+diff -ur dmtx-utils-0.7.4/dmtxread/dmtxread.h dmtx-utils-0.7.4-im7/dmtxread/dmtxread.h
+--- dmtx-utils-0.7.4/dmtxread/dmtxread.h       2011-06-03 07:13:10.000000000 +0200
++++ dmtx-utils-0.7.4-im7/dmtxread/dmtxread.h   2016-12-25 17:53:16.762275566 +0100
+@@ -33,7 +33,7 @@
+ #include <math.h>
+ #include <stdarg.h>
+ #include <assert.h>
+-#include <wand/magick-wand.h>
++#include <MagickWand/MagickWand.h>
+ #include <dmtx.h>
+ #include "../common/dmtxutil.h"
+diff -ur dmtx-utils-0.7.4/dmtxwrite/dmtxwrite.h dmtx-utils-0.7.4-im7/dmtxwrite/dmtxwrite.h
+--- dmtx-utils-0.7.4/dmtxwrite/dmtxwrite.h     2011-06-03 07:13:10.000000000 +0200
++++ dmtx-utils-0.7.4-im7/dmtxwrite/dmtxwrite.h 2016-12-25 17:53:07.285393032 +0100
+@@ -34,7 +34,7 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <assert.h>
+-#include <wand/magick-wand.h>
++#include <MagickWand/MagickWand.h>
+ #include <dmtx.h>
+ #include "../common/dmtxutil.h"
This page took 0.345184 seconds and 4 git commands to generate.