libzebrabar-py stable port information

Info2: <<
Package: libzebrabar-py%type_pkg[python]
Version: 0.5
Revision: 2
Source: mirror:sourceforge:zbar/zebra-%v.tar.bz2
Source-MD5: 7e5cfba8d06fe46c4310efe67fb7a4a7
Type: python (2.6)

BuildDepends: <<
atk1 (>= 1.26.0-1),
cairo (>= 1.8-1),
expat1,
fink (>= 0.24.12-1),
fontconfig2-dev (>= 2.4.1-1),
freetype219 (>= 2.3.8-2),
glib2-dev (>= 2.20.0-1),
glitz,
libzebrabar3 (>= 0.5-4),
libzebrabar0-gtk (>= 0.5-1),
libgettext3-dev,
libiconv-dev,
libpng3,
pango1-xft2-ft219-dev (>= 1.24.0-1),
pixman (>= 0.16.0-1),
pkgconfig,
python%type_pkg[python],
pygtk2-gtk-py%type_pkg[python]-dev (>= 2.15.2-1),
pygobject2-py%type_pkg[python]-dev (>= 2.18.0-1),
x11-dev,
xft2-dev,
xmlto
<<
Depends: <<
atk1-shlibs (>= 1.26.0-1),
cairo-shlibs (>= 1.8-1),
expat1-shlibs,
fontconfig2-shlibs (>= 2.4.1-1),
freetype219-shlibs (>= 2.3.8-2),
glib2-shlibs (>= 2.14.0-1),
glitz-shlibs,
libzebrabar3-shlibs (>= 0.5-4),
libzebrabar0-gtk-shlibs (>= 0.5-1),
libgettext3-shlibs,
libiconv,
libpng3-shlibs,
pango1-xft2-ft219-shlibs (>= 1.24.0-1),
pixman-shlibs (>= 0.16.0-1),
python%type_pkg[python],
pygtk2-gtk-py%type_pkg[python] (>= 2.15.2-1),
pygobject2-py%type_pkg[python] (>= 2.18.0-1),
x11-shlibs
<<

PatchFile: %{ni}.patch
PatchFile-MD5: 426b5f36e77f320e1831800dad7bb278
PatchScript: <<
%{default_script}

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

perl -pi -e 's,zebra/libzebra.la,,g' Makefile.in
perl -pi -e 's,zebra.pc,,g' Makefile.in
perl -pi -e 's,gtk/libzebragtk.la,,g' Makefile.in
perl -pi -e 's,zebra-gtk.pc,,g' Makefile.in
<<
ConfigureParams: --disable-dependency-tracking --disable-video --without-imagemagick --without-npapi --with-gtk --with-python --without-qt --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
CompileScript: <<
#!/bin/sh -ex
# special stuff for gtk
export PKG_CONFIG_PATH="%p/lib/fontconfig2/lib/pkgconfig:%p/lib/pkgconfig:$PKG_CONFIG_PATH"

# gather flags for installed zebra & zebra-gtk
ZEBRA_CFLAGS=`%p/bin/pkg-config --cflags zebra-gtk`
ZEBRA_LIBS=`%p/bin/pkg-config --libs zebra-gtk`
CPPFLAGS="$CPPFLAGS $ZEBRA_CFLAGS"
LDFLAGS="$LDFLAGS $ZEBRA_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
<<
InstallScript: <<
make install DESTDIR=%d include_HEADERS= zinclude_HEADERS=
rm -rf %i/share/doc/zebra
rmdir %i/bin %i/include/zebra %i/include %i/lib/pkgconfig
rm -rf %i/share/man
<<
DocFiles: COPYING.LIB 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.

Claims to allow pthon>=2.3.5, but uses pythonX.X-config, which
is only available for python>=2.5. See:
http://sourceforge.net/tracker/index.php?func=detail&aid=2052663&group_id=189236&atid=928515
<<
DescPort: <<
zebrapygtkmodule and zebrapygtk can't both define
__PyGObject_API. See:
http://sourceforge.net/tracker/index.php?func=detail&aid=2052681&group_id=189236&atid=928515
<<

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

libzebrabar-py stable port .patch

diff -Nurd -x'*~' zebra-0.5.orig/Makefile.in zebra-0.5/Makefile.in
--- zebra-0.5.orig/Makefile.in 2008-07-24 20:11:36.000000000 -0400
+++ zebra-0.5/Makefile.in 2008-08-13 23:41:58.000000000 -0400
@@ -274,7 +274,7 @@
zebraimg_zebraimg_OBJECTS = $(am_zebraimg_zebraimg_OBJECTS)
@HAVE_MAGICK_TRUE@zebraimg_zebraimg_DEPENDENCIES = \
@HAVE_MAGICK_TRUE@ $(am__DEPENDENCIES_1) zebra/libzebra.la
-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) \
@@ -492,7 +492,7 @@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CPPFLAGS = -I$(srcdir)/include
+AM_CPPFLAGS =
AM_CFLAGS = -Wall
AM_CXXFLAGS = $(AM_CFLAGS)
ACLOCAL_AMFLAGS = -I config
diff -Nurd -x'*~' zebra-0.5.orig/configure zebra-0.5/configure
--- zebra-0.5.orig/configure 2008-07-24 20:11:34.000000000 -0400
+++ zebra-0.5/configure 2008-08-15 01:52:42.000000000 -0400
@@ -19093,7 +19093,7 @@
fi

if test "x$PYTHON_LIBS" = "x"; then
- PYTHON_LIBS=`$PYTHON_CONFIG --libs`
+ PYTHON_LIBS=`$PYTHON_CONFIG --ldflags`
fi


diff -Nurd -x'*~' zebra-0.5.orig/pygtk/zebrapygtkmodule.c zebra-0.5/pygtk/zebrapygtkmodule.c
--- zebra-0.5.orig/pygtk/zebrapygtkmodule.c 2008-07-24 20:10:12.000000000 -0400
+++ zebra-0.5/pygtk/zebrapygtkmodule.c 2008-08-15 02:01:12.000000000 -0400
@@ -21,6 +21,7 @@
* http://sourceforge.net/projects/zebra
*------------------------------------------------------------------------*/

+#define NO_IMPORT_PYGOBJECT
#include

void zebrapygtk_register_classes(PyObject*);

libzebrabar-py _unstable_ port .patch