pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

zbar: Import zbar-0.23nb4 as wip/zbar (from graphics/zbar)



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Sun Jun 14 12:25:56 2020 +0200
Changeset:	05515ab116a13ee6bb932d383322aeb5d3c82869

Modified Files:
	Makefile
Added Files:
	zbar/DESCR
	zbar/Makefile
	zbar/PLIST
	zbar/buildlink3.mk
	zbar/distinfo
	zbar/options.mk
	zbar/patches/patch-configure
	zbar/patches/patch-gtk_Makefile.in
	zbar/patches/patch-test_test__examples.sh.in

Log Message:
zbar: Import zbar-0.23nb4 as wip/zbar (from graphics/zbar)

ZBar is an open source software suite for reading bar codes from various
sources, such as video streams, image files and raw intensity sensors. It
supports many popular symbologies (types of bar codes) including
EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR
Code.

The flexible, layered implementation facilitates bar code scanning and
decoding for any application: use it stand-alone with the included GUI and
command line programs, easily integrate a bar code scanning widget into
your Qt, GTK+ or PyGTK GUI application, leverage one of the script or
programming interfaces (Python, Perl, C++) ...all the way down to a
streamlined C library suitable for embedded use.

This is intended to be used to update graphics/zbar to 0.23.1.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=05515ab116a13ee6bb932d383322aeb5d3c82869

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                     |   1 +
 zbar/DESCR                                   |  12 +++
 zbar/Makefile                                |  32 ++++++
 zbar/PLIST                                   |  22 +++++
 zbar/buildlink3.mk                           |  25 +++++
 zbar/distinfo                                |   9 ++
 zbar/options.mk                              |  37 +++++++
 zbar/patches/patch-configure                 | 139 +++++++++++++++++++++++++++
 zbar/patches/patch-gtk_Makefile.in           |  17 ++++
 zbar/patches/patch-test_test__examples.sh.in |  72 ++++++++++++++
 10 files changed, 366 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 7a81440983..82adab8935 100644
--- a/Makefile
+++ b/Makefile
@@ -5083,6 +5083,7 @@ SUBDIR+=	ypbind-mt
 SUBDIR+=	ypserv
 SUBDIR+=	zapping
 SUBDIR+=	zbackup
+SUBDIR+=	zbar
 SUBDIR+=	zdbsp
 SUBDIR+=	zenity
 SUBDIR+=	zero-epwing-git
diff --git a/zbar/DESCR b/zbar/DESCR
new file mode 100644
index 0000000000..75d22efb80
--- /dev/null
+++ b/zbar/DESCR
@@ -0,0 +1,12 @@
+ZBar is an open source software suite for reading bar codes from various
+sources, such as video streams, image files and raw intensity sensors. It
+supports many popular symbologies (types of bar codes) including
+EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR
+Code.
+
+The flexible, layered implementation facilitates bar code scanning and
+decoding for any application: use it stand-alone with the included GUI and
+command line programs, easily integrate a bar code scanning widget into
+your Qt, GTK+ or PyGTK GUI application, leverage one of the script or
+programming interfaces (Python, Perl, C++) ...all the way down to a
+streamlined C library suitable for embedded use.
diff --git a/zbar/Makefile b/zbar/Makefile
new file mode 100644
index 0000000000..6ffc6f9d1e
--- /dev/null
+++ b/zbar/Makefile
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.7 2020/06/02 08:24:08 adam Exp $
+
+DISTNAME=	zbar-0.23
+PKGREVISION=	4
+CATEGORIES=	graphics
+MASTER_SITES=	https://linuxtv.org/downloads/zbar/
+EXTRACT_SUFX=	.tar.bz2
+
+MAINTAINER=	leot%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/mchehab/zbar
+COMMENT=	Bar code reader
+LICENSE=	gnu-lgpl-v2.1
+
+GNU_CONFIGURE=	yes
+USE_LIBTOOL=	yes
+USE_TOOLS+=	pkg-config
+
+CONFIGURE_ARGS+=	--with-jpeg
+CONFIGURE_ARGS+=	--disable-video
+CONFIGURE_ARGS+=	--without-gtk
+CONFIGURE_ARGS+=	--without-python
+CONFIGURE_ARGS+=	--without-java
+CONFIGURE_ARGS+=	--without-qt
+
+PKGCONFIG_OVERRIDE+=	zbar-gtk.pc.in
+PKGCONFIG_OVERRIDE+=	zbar-qt.pc.in
+PKGCONFIG_OVERRIDE+=	zbar.pc.in
+
+.include "options.mk"
+
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/zbar/PLIST b/zbar/PLIST
new file mode 100644
index 0000000000..6f35c35231
--- /dev/null
+++ b/zbar/PLIST
@@ -0,0 +1,22 @@
+@comment $NetBSD: PLIST,v 1.1 2019/12/04 11:17:32 leot Exp $
+${PLIST.imagemagick}bin/zbarimg
+include/zbar.h
+include/zbar/Decoder.h
+include/zbar/Exception.h
+include/zbar/Image.h
+include/zbar/ImageScanner.h
+include/zbar/Processor.h
+include/zbar/Scanner.h
+include/zbar/Symbol.h
+include/zbar/Video.h
+include/zbar/Window.h
+lib/libzbar.la
+lib/pkgconfig/zbar.pc
+${PLIST.imagemagick}man/man1/zbarimg.1
+share/doc/zbar/COPYING
+share/doc/zbar/HACKING.md
+share/doc/zbar/INSTALL.md
+share/doc/zbar/LICENSE.md
+share/doc/zbar/NEWS.md
+share/doc/zbar/README.md
+share/doc/zbar/TODO.md
diff --git a/zbar/buildlink3.mk b/zbar/buildlink3.mk
new file mode 100644
index 0000000000..2e5db6f915
--- /dev/null
+++ b/zbar/buildlink3.mk
@@ -0,0 +1,25 @@
+# $NetBSD: buildlink3.mk,v 1.1 2019/12/04 11:17:32 leot Exp $
+
+BUILDLINK_TREE+=	zbar
+
+.if !defined(ZBAR_BUILDLINK3_MK)
+ZBAR_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.zbar+=	zbar>=0.23
+BUILDLINK_PKGSRCDIR.zbar?=	../../graphics/zbar
+
+pkgbase:=	zbar
+.include "../../mk/pkg-build-options.mk"
+
+.if !empty(PKG_BUILD_OPTIONS.zbar:Mx11)
+.include "../../x11/libICE/buildlink3.mk"
+.include "../../x11/libSM/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libXv/buildlink3.mk"
+.endif
+
+.include "../../mk/jpeg.buildlink3.mk"
+
+.endif # ZBAR_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-zbar
diff --git a/zbar/distinfo b/zbar/distinfo
new file mode 100644
index 0000000000..fc5a846e5f
--- /dev/null
+++ b/zbar/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.2 2020/03/26 21:51:11 joerg Exp $
+
+SHA1 (zbar-0.23.tar.bz2) = 11a1d3f1aa8ef905fe16d88347a191909705d7ab
+RMD160 (zbar-0.23.tar.bz2) = 59ecd5c78fa91f6951a129377b4fa477307676bb
+SHA512 (zbar-0.23.tar.bz2) = 7eef2ee99760edd693ecc12a36e04b71a156b93b4c1977ca4f6da103a955284cf640b55adb185477e1d4cc65345bb01608ed9528f6518abb514ccbc58e5d350b
+Size (zbar-0.23.tar.bz2) = 1168183 bytes
+SHA1 (patch-configure) = 7cbc332aae614096b4dcc76af0dd831284639fcc
+SHA1 (patch-gtk_Makefile.in) = bf32ac312d0d00ed7ac152ddd849dae0fc681e74
+SHA1 (patch-test_test__examples.sh.in) = d8a91cf9f8d619723825d6b50c26e781b5411a43
diff --git a/zbar/options.mk b/zbar/options.mk
new file mode 100644
index 0000000000..2e3adaf7d5
--- /dev/null
+++ b/zbar/options.mk
@@ -0,0 +1,37 @@
+# $NetBSD: options.mk,v 1.1 2019/12/06 08:03:00 leot Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.zbar
+PKG_SUPPORTED_OPTIONS=	imagemagick x11
+PKG_SUGGESTED_OPTIONS=	imagemagick x11
+
+.include "../../mk/bsd.options.mk"
+
+#
+# ImageMagick support
+#
+PLIST_VARS+=	imagemagick
+.if !empty(PKG_OPTIONS:Mimagemagick)
+PLIST.imagemagick=	yes
+CONFIGURE_ARGS+=	--with-imagemagick
+.  include "../../graphics/ImageMagick/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--without-imagemagick
+.endif
+
+#
+# X11 support
+#
+.if !empty(PKG_OPTIONS:Mx11)
+CONFIGURE_ARGS+=	--with-x
+CONFIGURE_ARGS+=	--with-xshm
+CONFIGURE_ARGS+=	--with-xv
+.  include "../../x11/libX11/buildlink3.mk"
+.  include "../../x11/libXext/buildlink3.mk"
+.  include "../../x11/libXv/buildlink3.mk"
+.  include "../../x11/libICE/buildlink3.mk"
+.  include "../../x11/libSM/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--with-x=no
+CONFIGURE_ARGS+=	--without-xshm
+CONFIGURE_ARGS+=	--without-xv
+.endif
diff --git a/zbar/patches/patch-configure b/zbar/patches/patch-configure
new file mode 100644
index 0000000000..3b8e8a5880
--- /dev/null
+++ b/zbar/patches/patch-configure
@@ -0,0 +1,139 @@
+$NetBSD: patch-configure,v 1.1 2019/12/04 11:17:32 leot Exp $
+
+- Avoid unportable `==' test(1) operator
+- Avoid `${parameter/pattern/string}' bash-ism
+- Only honor `--with-python' configure argument and completely ignore
+  possible PYTHON environment variable that could be passed via
+  CONFIGURE_ENV by pkgsrc
+
+`==' unportable test(1) operator commited upstream as
+f326730fff1cb3ea7c98d30f67fc94481468d468.
+
+--- configure.orig	2019-05-23 21:12:06.000000000 +0000
++++ configure
+@@ -21590,7 +21590,7 @@ fi
+ 
+ 
+ 
+-if test "x$with_gtk" == "xgtk3" || test "x$with_gtk" == "xauto"; then :
++if test "x$with_gtk" = "xgtk3" || test "x$with_gtk" = "xauto"; then :
+ 
+ pkg_failed=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK3" >&5
+@@ -21693,7 +21693,7 @@ fi
+ 
+ fi
+ 
+-if test "x$with_gtk" == "xgtk2" || test "x$with_gtk" == "xauto"; then :
++if test "x$with_gtk" = "xgtk2" || test "x$with_gtk" = "xauto"; then :
+ 
+ pkg_failed=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2" >&5
+@@ -21844,8 +21844,9 @@ fi
+ 
+ 
+ 
++if false; then
+ if test -z "$PYTHON"; then :
+-  if test "x$with_python" == "xauto"; then :
++  if test "x$with_python" = "xauto"; then :
+   for ac_prog in python3 python2 python
+ do
+   # Extract the first word of "$ac_prog", so it can be a program name with args.
+@@ -21893,7 +21894,7 @@ done
+ test -n "$PYTHON" || PYTHON=":"
+ 
+ else
+-  if test "x$with_python" == "xpython3"; then :
++  if test "x$with_python" = "xpython3"; then :
+   for ac_prog in python3 python
+ do
+   # Extract the first word of "$ac_prog", so it can be a program name with args.
+@@ -21941,7 +21942,7 @@ done
+ test -n "$PYTHON" || PYTHON=":"
+ 
+ else
+-  if test "x$with_python" == "xpython2"; then :
++  if test "x$with_python" = "xpython2"; then :
+   for ac_prog in python2 python
+ do
+   # Extract the first word of "$ac_prog", so it can be a program name with args.
+@@ -22000,6 +22001,7 @@ else
+   with_python="auto"
+ 
+ fi
++fi
+ 
+ if test "x$with_python" != "xno"; then :
+ 
+@@ -22450,7 +22452,7 @@ fi
+ 
+ 
+ 
+-if test "x$with_gir" == "xyes" && test "x$with_gtk" != "xno"; then :
++if test "x$with_gir" = "xyes" && test "x$with_gtk" != "xno"; then :
+ 
+ 
+ 
+@@ -23002,7 +23004,7 @@ else
+ fi
+ 
+ 
+-JAVAC=${JAVAC/ecj/ecj -1.5}
++JAVAC=`echo "$JAVAC" | sed -e 's/ecj/ecj -1.5/'`
+ 
+ # Javah was obsoleted on Java 8 and removed on Java 11. So, we need to
+ # look strictly at the $JAVA_HOME in order to avoid mixing different versions
+@@ -23110,7 +23112,7 @@ fi
+ done
+ test -n "$JAR" || JAR=":"
+ 
+-if test "x$JAR" == "x:"; then :
++if test "x$JAR" = "x:"; then :
+   have_java="no"
+ fi
+ 
+@@ -23163,7 +23165,7 @@ test -n "$JAVA" || JAVA="/bin/false"
+ 
+ 
+ 
+-if test "x$CLASSPATH" == "x"; then :
++if test "x$CLASSPATH" = "x"; then :
+   CLASSPATH="."
+ fi
+ 
+@@ -26981,7 +26985,7 @@ echo "GTK                    --with-gtk=
+ echo "GObject introspection  --with-gir=$with_gir"
+ echo "Qt                     --with-qt=$with_qt            Qt${QT_VERSION}"
+ echo "Java                   --with-java=$with_java"
+-if test "x$win32" == "xno"; then :
++if test "x$win32" = "xno"; then :
+   echo "Dbus                   --with-dbus=$with_dbus"
+ fi
+ if test "x$have_GM" = "xyes"; then :
+@@ -27012,7 +27016,7 @@ fi
+ if test "x$have_GM" = "xyes"; then :
+   echo "        => ImageMagick is preferred, as GraphicsMagick doesn't support https"
+ fi
+-if test "x$with_gtk" == "xno"; then :
++if test "x$with_gtk" = "xno"; then :
+   echo "        => GTK support will *NOT* be built"
+ fi
+ if test "x$with_pygtk2" != "xyes" && test "xPYTHON_VERSION_MAJOR" = "x2"; then :
+@@ -27021,7 +27025,7 @@ fi
+ if test "x$with_qt" != "xyes"; then :
+   echo "        => the Qt widget will *NOT* be built"
+ fi
+-if test "x$with_qt" == "xyes" && test "x$enable_static_qt" == "xyes" ; then :
++if test "x$with_qt" = "xyes" && test "x$enable_static_qt" = "xyes" ; then :
+   echo "        => Building a static Qt library"
+ fi
+ if test "x$with_java" != "xyes"; then :
+@@ -27033,6 +27037,6 @@ fi
+ #echo "NPAPI Plugin     --with-npapi=$with_npapi"
+ #AS_IF([test "x$with_mozilla" != "xyes"],
+ #  [echo "       => the Mozilla/Firefox/OpenOffice plugin will *NOT* be built"])
+-if test "x$enable_pdf417" == "xyes"; then :
++if test "x$enable_pdf417" = "xyes"; then :
+   echo "        => the pdf417 code support is incomplete!"
+ fi
diff --git a/zbar/patches/patch-gtk_Makefile.in b/zbar/patches/patch-gtk_Makefile.in
new file mode 100644
index 0000000000..68c8209ae1
--- /dev/null
+++ b/zbar/patches/patch-gtk_Makefile.in
@@ -0,0 +1,17 @@
+$NetBSD: patch-gtk_Makefile.in,v 1.1 2019/12/04 11:17:32 leot Exp $
+
+Avoid gmake-isms.
+
+XXX: Probably that's wrong and needs to be discussed with upstream!
+
+--- gtk/Makefile.in.orig	2019-05-23 21:12:07.000000000 +0000
++++ gtk/Makefile.in
+@@ -887,7 +887,7 @@ uninstall-am: uninstall-dist_girDATA uni
+ 
+ # GObject Introspection
+ 
+-include $(INTROSPECTION_MAKEFILE)
++include $(INTROSPECTION_MAKEFILE) # am--include-marker
+ 
+ # This may generate some warnings, but it is needed for "make dist"
+ ZBar-1.0.gir: $(lib_LTLIBRARIES)
diff --git a/zbar/patches/patch-test_test__examples.sh.in b/zbar/patches/patch-test_test__examples.sh.in
new file mode 100644
index 0000000000..129fc2ced2
--- /dev/null
+++ b/zbar/patches/patch-test_test__examples.sh.in
@@ -0,0 +1,72 @@
+$NetBSD: patch-test_test__examples.sh.in,v 1.1 2020/03/26 21:51:11 joerg Exp $
+
+--- test/test_examples.sh.in.orig	2020-03-26 11:48:50.144837043 +0000
++++ test/test_examples.sh.in
+@@ -31,28 +31,28 @@ test()
+ 	fi
+ }
+ 
+-if [ "@ENABLE_CODE128@" == "1" ]; then
++if [ "@ENABLE_CODE128@" = "1" ]; then
+ 	test code-128.png
+ fi
+ 
+-if [ "@ENABLE_CODE93@" == "1" ]; then
++if [ "@ENABLE_CODE93@" = "1" ]; then
+         test code-93.png
+ fi
+ 
+-if [ "@ENABLE_CODE39@" == "1" ]; then
++if [ "@ENABLE_CODE39@" = "1" ]; then
+         test code-39.png
+ fi
+ 
+-if [ "@ENABLE_CODABAR@" == "1" ]; then
++if [ "@ENABLE_CODABAR@" = "1" ]; then
+         test codabar.png
+ fi
+ 
+-if [ "@ENABLE_DATABAR@" == "1" ]; then
++if [ "@ENABLE_DATABAR@" = "1" ]; then
+         test databar.png
+         test databar-exp.png
+ fi
+ 
+-if [ "@ENABLE_EAN@" == "1" ]; then
++if [ "@ENABLE_EAN@" = "1" ]; then
+         test -Sean2.enable ean-2.png
+         test -Sean5.enable ean-5.png
+         test ean-8.png
+@@ -62,27 +62,27 @@ if [ "@ENABLE_EAN@" == "1" ]; then
+         test -Supca.enable code-upc-a.png
+ fi
+ 
+-if [ "@ENABLE_I25@" == "1" ]; then
++if [ "@ENABLE_I25@" = "1" ]; then
+         test i2-5.png
+ fi
+ 
+-if [ "@ENABLE_QRCODE@" == "1" ]; then
++if [ "@ENABLE_QRCODE@" = "1" ]; then
+         test qr-code.png
+         test -Stest-inverted qr-code-inverted.png
+ fi
+ 
+-if [ "@ENABLE_SQCODE@" == "1" ]; then
++if [ "@ENABLE_SQCODE@" = "1" ]; then
+         test sqcode1-generated.png
+         test sqcode1-scanned.png
+ fi
+ 
+ # The pdf417 code is incomplete: it doesn't output any results
+ #
+-#if [ "@ENABLE_PDF417@" == "1" ]; then
++#if [ "@ENABLE_PDF417@" = "1" ]; then
+ #        test code-pdf417.png
+ #fi
+ 
+-if [ "$ERR" == "" ]; then
++if [ "$ERR" = "" ]; then
+ 	echo "zbarimg PASSED."
+ else
+ 	exit 1


Home | Main Index | Thread Index | Old Index