ports/152708: New port: graphics/zbar barcode reader

Oliver Heesakkers dev2 at heesakkers.info
Tue Nov 30 16:30:13 UTC 2010


>Number:         152708
>Category:       ports
>Synopsis:       New port: graphics/zbar barcode reader
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 30 16:30:12 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Heesakkers
>Release:        
>Organization:
>Environment:
>Description:
I want to introduce the zbar barcode reader to the ports. When build with the ImageMagick-option this port produces the zbarimg cli-program which reads a file and outputs the message encoded in the contained (QR) barcode.

When Merkaartor 0.17 is released I want to update that port to optionally use this port to enable the use of "walking papers" in Merkaartor.
>How-To-Repeat:

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	zbar
#	zbar/pkg-descr
#	zbar/Makefile
#	zbar/distinfo
#	zbar/pkg-plist
#
echo c - zbar
mkdir -p zbar > /dev/null 2>&1
echo x - zbar/pkg-descr
sed 's/^X//' >zbar/pkg-descr << '645a387965207c05ce119ee40e58a7db'
XZBar is an open source software suite for reading bar codes from various
Xsources, such as video streams, image files and raw intensity sensors. It
Xsupports many popular symbologies (types of bar codes) including EAN-13/UPC-A,
XUPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code.
X
XThe flexible, layered implementation facilitates bar code scanning and decoding
Xfor any application: use it stand-alone with the included GUI and command line
Xprograms, easily integrate a bar code scanning widget into your Qt, GTK+ or
XPyGTK GUI application, leverage one of the script or programming interfaces
X(Python, Perl, C++) ...all the way down to a streamlined C library suitable for
Xembedded use.
X
XZBar is licensed under the GNU LGPL 2.1 to enable development of both open
Xsource and commercial projects.
645a387965207c05ce119ee40e58a7db
echo x - zbar/Makefile
sed 's/^X//' >zbar/Makefile << '85fb7abe4d733649c455ce30e8cf783e'
X# New ports collection makefile for: zbar
X# Date created:                      12 november 2010
X# Whom:                              Oliver Heesakkers
X#
X# $FreeBSD$
X#
X
XPORTNAME=		zbar
XPORTVERSION=		0.10
XCATEGORIES=		graphics
XMASTER_SITES=		SF
X
XMAINTAINER=		dev2 at heesakkers.info
XCOMMENT=		ZBar barcode reader
X
XLICENSE=		LGPL21
X
XGNU_CONFIGURE=		yes
XUSE_GMAKE=		yes
XUSE_LDCONFIG=		yes
X
XOPTIONS=		X11         "Build with X support" on \
X			IMAGEMAGICK "ImageMagick graphics support" on \
X			V4L         "Build zbarcam video scanner" off \
X			PYTHON      "Build PyGTK widget" off \
X			GTK2        "Build GTK+2 widget" off \
X			QT4         "Build Qt4 widget" off
X
X.include <bsd.port.options.mk>
X
X.if exists(${LOCALBASE}/lib/libjpeg.so)
XCONFIGURE_ARGS+=	--with-jpeg=yes
X.else
XCONFIGURE_ARGS+=	--with-jpeg=no
X.endif
X
X.if defined(WITH_X11)
XUSE_XORG=		xext xv
XCONFIGURE_ARGS+=	--with-x=yes
X.else
XCONFIGURE_ARGS+=	--with-x=no --without-xshm --without-xv
X.endif
X
X.if defined(WITH_IMAGEMAGICK)
XLIB_DEPENDS+=		Magick++.4:${PORTSDIR}/graphics/ImageMagick
XCONFIGURE_ARGS+=	--with-imagemagick=yes
XPLIST_SUB+=		IMAGEMAGICK=""
XMAN1=			zbarimg.1
X.else
XCONFIGURE_ARGS+=	--with-imagemagick=no
XPLIST_SUB+=		IMAGEMAGICK="@comment "
X.endif
X
X.if defined(WITH_V4L)
XBUILD_DEPENDS+=		v4l_compat>=1.0.20101027:${PORTSDIR}/multimedia/v4l_compat
XCONFIGURE_ARGS+=	--enable-video=yes
XPLIST_SUB+=		V4L=""
XMAN1+=			zbarcam.1
X.else
XCONFIGURE_ARGS+=	--enable-video=no
XPLIST_SUB+=		V4L="@comment "
X.endif
X
X.if defined(WITH_PYTHON)
XUSE_PYTHON=		any
XCONFIGURE_ARGS+=	--with-python=yes
XPLIST_SUB+=		PYTHON=""
X.else
XCONFIGURE_ARGS+=	--with-python=no
XPLIST_SUB+=		PYTHON="@comment "
X.endif
X
X.if defined(WITH_GTK2)
XUSE_GNOME=		gtk20
XCONFIGURE_ARGS+=	--with-gtk=yes
XPLIST_SUB+=		GTK2=""
X.else
XCONFIGURE_ARGS+=	--with-gtk=no
XPLIST_SUB+=		GTK2="@comment "
X.endif
X
X.if defined(WITH_QT4)
XUSE_QT_VER=		4
XQT_COMPONENTS=		gui
XCONFIGURE_ARGS+=	--with-qt=yes
XPLIST_SUB+=		QT4=""
X.else
XCONFIGURE_ARGS+=	--with-qt=no
XPLIST_SUB+=		QT4="@comment "
X.endif
X
X.if defined(NOPORTDOCS)
XPLIST_SUB+=		PORTDOCS="@comment "
X.endif
X
XCONFIGURE_ENV=		LDFLAGS="-L${LOCALBASE}/lib"
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' ${WRKSRC}/configure
X
Xpre-build:
X	@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|{PREFIX}/libdata/pkgconfig|' ${WRKSRC}/Makefile
X
Xpost-install:
X.if defined(NOPORTDOCS)
X	${RM} ${DOCSDIR}/*
X	${RMDIR} ${DOCSDIR}
X.endif
X
X.include <bsd.port.mk>
85fb7abe4d733649c455ce30e8cf783e
echo x - zbar/distinfo
sed 's/^X//' >zbar/distinfo << '8d4ff4529d14eabd6de4904c16a498c0'
XSHA256 (zbar-0.10.tar.gz) = 575fa82de699faa7bda2d2ebbe3e1af0a4152ec4d3ad72c0ab6712d7cc9b5dd2
XSIZE (zbar-0.10.tar.gz) = 714457
8d4ff4529d14eabd6de4904c16a498c0
echo x - zbar/pkg-plist
sed 's/^X//' >zbar/pkg-plist << '9308bcaf0b4e42853974a9627c0b3d5e'
X%%V4L%%bin/zbarcam
X%%IMAGEMAGICK%%bin/zbarimg
Xinclude/zbar.h
Xinclude/zbar/Decoder.h
Xinclude/zbar/Exception.h
Xinclude/zbar/Image.h
Xinclude/zbar/ImageScanner.h
Xinclude/zbar/Processor.h
X%%QT4%%include/zbar/QZBar.h
X%%QT4%%include/zbar/QZBarImage.h
Xinclude/zbar/Scanner.h
Xinclude/zbar/Symbol.h
Xinclude/zbar/Video.h
Xinclude/zbar/Window.h
X%%GTK2%%include/zbar/zbargtk.h
Xlib/libzbar.a
Xlib/libzbar.la
Xlib/libzbar.so
Xlib/libzbar.so.2
X%%GTK2%%lib/libzbargtk.a
X%%GTK2%%lib/libzbargtk.la
X%%GTK2%%lib/libzbargtk.so
X%%GTK2%%lib/libzbargtk.so.0
X%%QT4%%lib/libzbarqt.a
X%%QT4%%lib/libzbarqt.la
X%%QT4%%lib/libzbarqt.so
X%%QT4%%lib/libzbarqt.so.0
X%%GTK2%%libdata/pkgconfig/zbar-gtk.pc
X%%QT4%%libdata/pkgconfig/zbar-qt.pc
Xlibdata/pkgconfig/zbar.pc
X%%PYTHON%%%%PYTHON_SITELIBDIR%%/zbar.la
X%%PYTHON%%%%PYTHON_SITELIBDIR%%/zbar.so
X%%PYTHON%%%%GTK2%%%%PYTHON_SITELIBDIR%%/zbarpygtk.la
X%%PYTHON%%%%GTK2%%%%PYTHON_SITELIBDIR%%/zbarpygtk.so
X%%PORTDOCS%%%%DOCSDIR%%/COPYING
X%%PORTDOCS%%%%DOCSDIR%%/HACKING
X%%PORTDOCS%%%%DOCSDIR%%/INSTALL
X%%PORTDOCS%%%%DOCSDIR%%/LICENSE
X%%PORTDOCS%%%%DOCSDIR%%/NEWS
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%%%DOCSDIR%%/TODO
X at dirrmtry share/zbar
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X at dirrmtry lib/python2.6/site-packages
X at dirrmtry lib/python2.6
X at dirrmtry lib/pkgconfig
X at dirrm include/zbar
9308bcaf0b4e42853974a9627c0b3d5e
exit


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list