libzbar-py stable port information

Info2: <<
Package: libzbar-py%type_pkg[python]
Version: 0.10
Revision: 1
Source: mirror:sourceforge:zbar/zbar-%v.tar.bz2
Source-MD5: 0fd61eb590ac1bab62a77913c8b086a5
Type: python (2.6 2.7)

BuildDepends: <<
atk1 (>= 1.28.0-1),
cairo (>= 1.8.8-3),
expat1,
fink (>= 0.24.12-1),
fontconfig2-dev (>= 2.8.0-4),
freetype219 (>= 2.3.12-1),
glib2-dev (>= 2.22.0-1),
glitz,
gtk+2-dev (>= 2.18.0-1),
libzbar0 (>= %v-1),
libzbar0-gtk (>= %v-1),
libjpeg8,
pango1-xft2-ft219-dev (>= 1.24.5-4),
pixman (>= 0.18.0-1),
pkgconfig,
python%type_pkg[python],
pygtk2-gtk-py%type_pkg[python]-dev (>= 2.16.0-1),
pygobject2-py%type_pkg[python]-dev (>= 2.20.0-1),
x11-dev,
xft2-dev,
xmlto
<<
Depends: <<
atk1-shlibs (>= 1.28.0-1),
cairo-shlibs (>= 1.8.8-3),
fontconfig2-shlibs (>= 2.8.0-4),
freetype219-shlibs (>= 2.3.12-1),
glib2-shlibs (>= 2.22.0-1),
gtk+2-shlibs (>= 2.18.0-1),
libzbar0-shlibs (>= %v-1),
libzbar0-gtk-shlibs (>= %v-1),
libjpeg8-shlibs,
pango1-xft2-ft219-shlibs (>= 1.24.5-4),
python%type_pkg[python],
pygtk2-gtk-py%type_pkg[python] (>= 2.16.0-1),
pygobject2-py%type_pkg[python] (>= 2.20.0-1)
<<

PatchFile: %{ni}.patch
PatchFile-MD5: 9cb52dd3f1cedc5ba072795cbea6bf45
PatchScript: <<
%{default_script}

mkdir -p _include/zbar
ln -s ../include/config.h _include

perl -pi -e 's,zbar/libzbar.la,,g' Makefile.in
perl -pi -e 's,zbar.pc,,g' Makefile.in
perl -pi -e 's,gtk/libzbargtk.la,,g' Makefile.in
perl -pi -e 's,zbar-gtk.pc,,g' Makefile.in
<<
ConfigureParams: --enable-dependency-tracking --disable-video --without-imagemagick --without-npapi --with-gtk --with-python --without-qt
CompileScript: <<
#!/bin/sh -ex
# special stuff for gtk
export PKG_CONFIG_PATH="%p/lib/glib-2.0/pkgconfig-strict:%p/lib/fontconfig2/lib/pkgconfig:$PKG_CONFIG_PATH"

# gather flags for installed zebra & zebra-gtk
ZBAR_CFLAGS=`%p/bin/pkg-config --cflags zbar-gtk`
ZBAR_LIBS=`%p/bin/pkg-config --libs zbar-gtk`
CPPFLAGS="$CPPFLAGS $ZBAR_CFLAGS"
LDFLAGS="$LDFLAGS $ZBAR_LIBS"

# special stuff for python
export PYTHON=%p/bin/python%type_raw[python]
export PYTHON_CONFIG=%p/bin/python%type_raw[python]-config

./configure %c
make
fink-package-precedence .
<<
InstallScript: <<
make install DESTDIR=%d include_HEADERS= zinclude_HEADERS=
rm -rf %i/share/doc/zbar
rm -rf %i/share/zbar
rmdir %i/bin %i/include/zbar %i/include %i/lib/pkgconfig
rm -rf %i/share/man
<<
DocFiles: COPYING ChangeLog HACKING NEWS README TODO

DescPackaging: <<
Hack makefiles and autoconf config.h locations to use
installed zebra instead of building locally.

Need to enable gtk in order to enable pygtk, but then hack to
use installed zebra-gtk instead of building locally.

Redo doc files manually so they go where we want and include
the files oriented towards users not installers.

This is just the python module; removing the should-be-empty
without -f makes sure we didn't accidentally build any
front-end programs or install any extraneous headers.
<<

Description: Python-gtk bindings for zebra barcode library
Homepage: http://zbar.sourceforge.net/
License: LGPL
Maintainer: Daniel Macks
<<

libzbar-py stable port .patch

diff -Nurd -x'*~' zbar-0.10.orig/Makefile.in zbar-0.10/Makefile.in
--- zbar-0.10.orig/Makefile.in 2009-10-23 14:17:25.000000000 -0400
+++ zbar-0.10/Makefile.in 2010-09-02 01:11:14.000000000 -0400
@@ -414,7 +414,7 @@
@HAVE_MAGICK_TRUE@zbarimg_zbarimg_DEPENDENCIES = \
@HAVE_MAGICK_TRUE@ $(am__DEPENDENCIES_1) zbar/libzbar.la \
@HAVE_MAGICK_TRUE@ $(am__append_32)
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/_include
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -656,7 +656,7 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CPPFLAGS = -I$(srcdir)/include
+AM_CPPFLAGS =
AM_CFLAGS = -Wall -Wno-parentheses
AM_CXXFLAGS = $(AM_CFLAGS)
ACLOCAL_AMFLAGS = -I config

libzbar-py _unstable_ port .patch