summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/zbar/DESCR12
-rw-r--r--graphics/zbar/Makefile31
-rw-r--r--graphics/zbar/PLIST22
-rw-r--r--graphics/zbar/buildlink3.mk25
-rw-r--r--graphics/zbar/distinfo8
-rw-r--r--graphics/zbar/patches/patch-configure139
-rw-r--r--graphics/zbar/patches/patch-gtk_Makefile.in17
7 files changed, 254 insertions, 0 deletions
diff --git a/graphics/zbar/DESCR b/graphics/zbar/DESCR
new file mode 100644
index 00000000000..75d22efb805
--- /dev/null
+++ b/graphics/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/graphics/zbar/Makefile b/graphics/zbar/Makefile
new file mode 100644
index 00000000000..cff7d0af630
--- /dev/null
+++ b/graphics/zbar/Makefile
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile,v 1.1 2019/12/04 11:17:32 leot Exp $
+
+DISTNAME= zbar-0.23
+CATEGORIES= graphics
+MASTER_SITES= https://linuxtv.org/downloads/zbar/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= leot@NetBSD.org
+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/graphics/zbar/PLIST b/graphics/zbar/PLIST
new file mode 100644
index 00000000000..6f35c35231a
--- /dev/null
+++ b/graphics/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/graphics/zbar/buildlink3.mk b/graphics/zbar/buildlink3.mk
new file mode 100644
index 00000000000..2e5db6f9152
--- /dev/null
+++ b/graphics/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/graphics/zbar/distinfo b/graphics/zbar/distinfo
new file mode 100644
index 00000000000..8f7f701f4a3
--- /dev/null
+++ b/graphics/zbar/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2019/12/04 11:17:32 leot 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
diff --git a/graphics/zbar/patches/patch-configure b/graphics/zbar/patches/patch-configure
new file mode 100644
index 00000000000..3b8e8a5880d
--- /dev/null
+++ b/graphics/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/graphics/zbar/patches/patch-gtk_Makefile.in b/graphics/zbar/patches/patch-gtk_Makefile.in
new file mode 100644
index 00000000000..68c8209ae14
--- /dev/null
+++ b/graphics/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)