add zbar library (#2527)
* add zbar library * update pkgrel, fix maintainer field and can have two sets of compiled binaries
This commit is contained in:
44
mingw-w64-zbar/PKGBUILD
Normal file
44
mingw-w64-zbar/PKGBUILD
Normal file
@@ -0,0 +1,44 @@
|
||||
# Maintainer: David SEGUELA <david.seguela@delair-tech.com>
|
||||
|
||||
_realname=zbar
|
||||
pkgbase="mingw-w64-${_realname}"
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=0.10
|
||||
pkgrel=1
|
||||
pkgdesc="Application and library for reading bar codes from various sources"
|
||||
arch=('any')
|
||||
url="http://zbar.sourceforge.net/"
|
||||
license=('LGPL')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-imagemagick")
|
||||
source=("http://downloads.sourceforge.net/project/${_realname}/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.bz2"
|
||||
"windowsandimagemagick.patch")
|
||||
md5sums=('0fd61eb590ac1bab62a77913c8b086a5'
|
||||
'291225949d396ecf828bab78e4773dc3')
|
||||
options=('strip' 'staticlibs')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -p1 -i ../windowsandimagemagick.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
|
||||
[[ -d ${srcdir}/build-${CARCH} ]] && rm -rf ${srcdir}/build-${CARCH}
|
||||
cp -rf ${srcdir}/${_realname}-${pkgver} ${srcdir}/build-${CARCH}
|
||||
cd ${srcdir}/build-${CARCH}
|
||||
./configure --prefix=${MINGW_PREFIX} \
|
||||
--build=${MINGW_CHOST} \
|
||||
--host=${MINGW_CHOST} \
|
||||
--target=${MINGW_CHOST} \
|
||||
--without-qt \
|
||||
--without-gtk \
|
||||
--without-python \
|
||||
--disable-video
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${srcdir}/"build-"${CARCH}/
|
||||
make install DESTDIR="${pkgdir}"
|
||||
}
|
||||
183
mingw-w64-zbar/windowsandimagemagick.patch
Normal file
183
mingw-w64-zbar/windowsandimagemagick.patch
Normal file
@@ -0,0 +1,183 @@
|
||||
From 2720bba09c35fee63c811152132a1582687a93f9 Mon Sep 17 00:00:00 2001
|
||||
From: "david.seguela" <david.seguela@delair-tech.com>
|
||||
Date: Wed, 24 May 2017 17:26:08 +0200
|
||||
Subject: [PATCH] windows compatibility and image magick
|
||||
|
||||
---
|
||||
configure | 56 ++++++++++++++++++++++++++--------------------------
|
||||
configure.ac | 4 ++--
|
||||
zbar/processor/win.c | 4 ++--
|
||||
zbarimg/zbarimg.c | 2 +-
|
||||
4 files changed, 33 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 44788a6..bc17e63 100644
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -21741,8 +21741,8 @@ $as_echo "$as_me: using ImageMagick version $MAGICK_VERSION" >&6;}
|
||||
CPPFLAGS_save="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $MAGICK_CFLAGS"
|
||||
if test "${ac_cv_header_wand_MagickWand_h+set}" = set; then
|
||||
- { $as_echo "$as_me:$LINENO: checking for wand/MagickWand.h" >&5
|
||||
-$as_echo_n "checking for wand/MagickWand.h... " >&6; }
|
||||
+ { $as_echo "$as_me:$LINENO: checking for MagickWand/MagickWand.h" >&5
|
||||
+$as_echo_n "checking for MagickWand/MagickWand.h... " >&6; }
|
||||
if test "${ac_cv_header_wand_MagickWand_h+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
fi
|
||||
@@ -21750,8 +21750,8 @@ fi
|
||||
$as_echo "$ac_cv_header_wand_MagickWand_h" >&6; }
|
||||
else
|
||||
# Is the header compilable?
|
||||
-{ $as_echo "$as_me:$LINENO: checking wand/MagickWand.h usability" >&5
|
||||
-$as_echo_n "checking wand/MagickWand.h usability... " >&6; }
|
||||
+{ $as_echo "$as_me:$LINENO: checking MagickWand/MagickWand.h usability" >&5
|
||||
+$as_echo_n "checking MagickWand/MagickWand.h usability... " >&6; }
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
@@ -21759,7 +21759,7 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
-#include <wand/MagickWand.h>
|
||||
+#include <MagickWand/MagickWand.h>
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (ac_try="$ac_compile"
|
||||
@@ -21792,15 +21792,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
$as_echo "$ac_header_compiler" >&6; }
|
||||
|
||||
# Is the header present?
|
||||
-{ $as_echo "$as_me:$LINENO: checking wand/MagickWand.h presence" >&5
|
||||
-$as_echo_n "checking wand/MagickWand.h presence... " >&6; }
|
||||
+{ $as_echo "$as_me:$LINENO: checking MagickWand/MagickWand.h presence" >&5
|
||||
+$as_echo_n "checking MagickWand/MagickWand.h presence... " >&6; }
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
-#include <wand/MagickWand.h>
|
||||
+#include <MagickWand/MagickWand.h>
|
||||
_ACEOF
|
||||
if { (ac_try="$ac_cpp conftest.$ac_ext"
|
||||
case "(($ac_try" in
|
||||
@@ -21834,25 +21834,25 @@ $as_echo "$ac_header_preproc" >&6; }
|
||||
# So? What about this header?
|
||||
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
||||
yes:no: )
|
||||
- { $as_echo "$as_me:$LINENO: WARNING: wand/MagickWand.h: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
-$as_echo "$as_me: WARNING: wand/MagickWand.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
- { $as_echo "$as_me:$LINENO: WARNING: wand/MagickWand.h: proceeding with the compiler's result" >&5
|
||||
-$as_echo "$as_me: WARNING: wand/MagickWand.h: proceeding with the compiler's result" >&2;}
|
||||
+ { $as_echo "$as_me:$LINENO: WARNING: MagickWand/MagickWand.h: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
+$as_echo "$as_me: WARNING: MagickWand/MagickWand.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
+ { $as_echo "$as_me:$LINENO: WARNING: MagickWand/MagickWand.h: proceeding with the compiler's result" >&5
|
||||
+$as_echo "$as_me: WARNING: MagickWand/MagickWand.h: proceeding with the compiler's result" >&2;}
|
||||
ac_header_preproc=yes
|
||||
;;
|
||||
no:yes:* )
|
||||
- { $as_echo "$as_me:$LINENO: WARNING: wand/MagickWand.h: present but cannot be compiled" >&5
|
||||
-$as_echo "$as_me: WARNING: wand/MagickWand.h: present but cannot be compiled" >&2;}
|
||||
- { $as_echo "$as_me:$LINENO: WARNING: wand/MagickWand.h: check for missing prerequisite headers?" >&5
|
||||
-$as_echo "$as_me: WARNING: wand/MagickWand.h: check for missing prerequisite headers?" >&2;}
|
||||
- { $as_echo "$as_me:$LINENO: WARNING: wand/MagickWand.h: see the Autoconf documentation" >&5
|
||||
-$as_echo "$as_me: WARNING: wand/MagickWand.h: see the Autoconf documentation" >&2;}
|
||||
- { $as_echo "$as_me:$LINENO: WARNING: wand/MagickWand.h: section \"Present But Cannot Be Compiled\"" >&5
|
||||
-$as_echo "$as_me: WARNING: wand/MagickWand.h: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
- { $as_echo "$as_me:$LINENO: WARNING: wand/MagickWand.h: proceeding with the preprocessor's result" >&5
|
||||
-$as_echo "$as_me: WARNING: wand/MagickWand.h: proceeding with the preprocessor's result" >&2;}
|
||||
- { $as_echo "$as_me:$LINENO: WARNING: wand/MagickWand.h: in the future, the compiler will take precedence" >&5
|
||||
-$as_echo "$as_me: WARNING: wand/MagickWand.h: in the future, the compiler will take precedence" >&2;}
|
||||
+ { $as_echo "$as_me:$LINENO: WARNING: MagickWand/MagickWand.h: present but cannot be compiled" >&5
|
||||
+$as_echo "$as_me: WARNING: MagickWand/MagickWand.h: present but cannot be compiled" >&2;}
|
||||
+ { $as_echo "$as_me:$LINENO: WARNING: MagickWand/MagickWand.h: check for missing prerequisite headers?" >&5
|
||||
+$as_echo "$as_me: WARNING: MagickWand/MagickWand.h: check for missing prerequisite headers?" >&2;}
|
||||
+ { $as_echo "$as_me:$LINENO: WARNING: MagickWand/MagickWand.h: see the Autoconf documentation" >&5
|
||||
+$as_echo "$as_me: WARNING: MagickWand/MagickWand.h: see the Autoconf documentation" >&2;}
|
||||
+ { $as_echo "$as_me:$LINENO: WARNING: MagickWand/MagickWand.h: section \"Present But Cannot Be Compiled\"" >&5
|
||||
+$as_echo "$as_me: WARNING: MagickWand/MagickWand.h: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
+ { $as_echo "$as_me:$LINENO: WARNING: MagickWand/MagickWand.h: proceeding with the preprocessor's result" >&5
|
||||
+$as_echo "$as_me: WARNING: MagickWand/MagickWand.h: proceeding with the preprocessor's result" >&2;}
|
||||
+ { $as_echo "$as_me:$LINENO: WARNING: MagickWand/MagickWand.h: in the future, the compiler will take precedence" >&5
|
||||
+$as_echo "$as_me: WARNING: MagickWand/MagickWand.h: in the future, the compiler will take precedence" >&2;}
|
||||
( cat <<\_ASBOX
|
||||
## ------------------------------------------- ##
|
||||
## Report this to spadix@users.sourceforge.net ##
|
||||
@@ -21861,8 +21861,8 @@ _ASBOX
|
||||
) | sed "s/^/$as_me: WARNING: /" >&2
|
||||
;;
|
||||
esac
|
||||
-{ $as_echo "$as_me:$LINENO: checking for wand/MagickWand.h" >&5
|
||||
-$as_echo_n "checking for wand/MagickWand.h... " >&6; }
|
||||
+{ $as_echo "$as_me:$LINENO: checking for MagickWand/MagickWand.h" >&5
|
||||
+$as_echo_n "checking for MagickWand/MagickWand.h... " >&6; }
|
||||
if test "${ac_cv_header_wand_MagickWand_h+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
@@ -21877,11 +21877,11 @@ if test "x$ac_cv_header_wand_MagickWand_h" = x""yes; then
|
||||
else
|
||||
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
-{ { $as_echo "$as_me:$LINENO: error: ImageMagick package found but wand/MagickWand.h not installed?!
|
||||
+{ { $as_echo "$as_me:$LINENO: error: ImageMagick package found but MagickWand/MagickWand.h not installed?!
|
||||
this is a problem with your ImageMagick install,
|
||||
please resolve the inconsistency and try again...
|
||||
See \`config.log' for more details." >&5
|
||||
-$as_echo "$as_me: error: ImageMagick package found but wand/MagickWand.h not installed?!
|
||||
+$as_echo "$as_me: error: ImageMagick package found but MagickWand/MagickWand.h not installed?!
|
||||
this is a problem with your ImageMagick install,
|
||||
please resolve the inconsistency and try again...
|
||||
See \`config.log' for more details." >&2;}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 56d3dd0..dd76332 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -285,8 +285,8 @@ $saved_error
|
||||
dnl double check ImageMagick install (bug #2582232)
|
||||
CPPFLAGS_save="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $MAGICK_CFLAGS"
|
||||
- AC_CHECK_HEADER([wand/MagickWand.h], [],
|
||||
- [AC_MSG_FAILURE([ImageMagick package found but wand/MagickWand.h not installed?!
|
||||
+ AC_CHECK_HEADER([MagickWand/MagickWand.h], [],
|
||||
+ [AC_MSG_FAILURE([ImageMagick package found but MagickWand/MagickWand.h not installed?!
|
||||
this is a problem with your ImageMagick install,
|
||||
please resolve the inconsistency and try again...])])
|
||||
CPPFLAGS="$CPPFLAGS_save"])
|
||||
diff --git a/zbar/processor/win.c b/zbar/processor/win.c
|
||||
index 46844d3..5b5d021 100644
|
||||
--- a/zbar/processor/win.c
|
||||
+++ b/zbar/processor/win.c
|
||||
@@ -117,12 +117,12 @@ static LRESULT CALLBACK win_handle_event (HWND hwnd,
|
||||
LPARAM lparam)
|
||||
{
|
||||
zbar_processor_t *proc =
|
||||
- (zbar_processor_t*)GetWindowLongPtr(hwnd, GWL_USERDATA);
|
||||
+ (zbar_processor_t*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||
/* initialized during window creation */
|
||||
if(message == WM_NCCREATE) {
|
||||
proc = ((LPCREATESTRUCT)lparam)->lpCreateParams;
|
||||
assert(proc);
|
||||
- SetWindowLongPtr(hwnd, GWL_USERDATA, (LONG_PTR)proc);
|
||||
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)proc);
|
||||
proc->display = hwnd;
|
||||
|
||||
zbar_window_attach(proc->window, proc->display, proc->xwin);
|
||||
diff --git a/zbarimg/zbarimg.c b/zbarimg/zbarimg.c
|
||||
index 5d2db34..a6bc2d1 100644
|
||||
--- a/zbarimg/zbarimg.c
|
||||
+++ b/zbarimg/zbarimg.c
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include <zbar.h>
|
||||
-#include <wand/MagickWand.h>
|
||||
+#include <MagickWand/MagickWand.h>
|
||||
|
||||
/* in 6.4.5.4 MagickGetImagePixels changed to MagickExportImagePixels.
|
||||
* (still not sure this check is quite right...
|
||||
--
|
||||
2.12.1
|
||||
|
||||
Reference in New Issue
Block a user