Date: Wednesday, September 29, 2010 @ 18:45:04
  Author: bisson
Revision: 92449

fix for FS#20991 (staging)

Added:
  fontforge/trunk/python27-compat.patch
Modified:
  fontforge/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |   11 ++++++++---
 python27-compat.patch |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2010-09-29 22:43:57 UTC (rev 92448)
+++ PKGBUILD    2010-09-29 22:45:04 UTC (rev 92449)
@@ -5,21 +5,26 @@
 
 pkgname=fontforge
 pkgver=20100501
-pkgrel=3
+pkgrel=4
 pkgdesc='An outline and bitmap font editor'
 arch=('i686' 'x86_64')
 url='http://fontforge.sourceforge.net'
 license=('BSD')
-depends=('libxkbui' 'libxi' 'libxml2' 'pango' 'giflib' 'libtiff' 'python')
+depends=('libxkbui' 'libxi' 'libxml2' 'pango' 'giflib' 'libtiff' 'python2')
 options=('!libtool')
 
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}_full-${pkgver}.tar.bz2";
+        'python27-compat.patch'
        'spline-fix.patch')
 sha1sums=('483425116c6af6ad90e37f9ada0c28e34f251ec3'
+          '83c7a09a59c71d93f5276411e8c18ae3bec557f4'
           '05d7603aa8873c1f417d69e95d647116b51061b6')
 
 build() {
        cd "${srcdir}/${pkgname}-${pkgver}"
 
+       # Patch for python 2.7 compatibility (fontforge-devel ML)
+       patch -p1 < ../python27-compat.patch
+
        # Fixes regression affecting lilypond, see FS#20991 (from SVN)
        patch -p1 < ../spline-fix.patch
 
@@ -30,7 +35,7 @@
                --enable-double \
                --enable-devicetables \
                --with-regular-link \
-               --with-python=python \
+               --with-python=python2 \
                --enable-pyextension
        make
 }

Added: python27-compat.patch
===================================================================
--- python27-compat.patch                               (rev 0)
+++ python27-compat.patch       2010-09-29 22:45:04 UTC (rev 92449)
@@ -0,0 +1,33 @@
+diff -ur fontforge-20100501/fontforge/ffpython.h 
fontforge-20100501.new/fontforge/ffpython.h
+--- fontforge-20100501/fontforge/ffpython.h    2010-04-05 22:10:26.000000000 
+0200
++++ fontforge-20100501.new/fontforge/ffpython.h        2010-08-31 
18:18:07.915888604 +0200
+@@ -43,7 +43,7 @@
+ 
+ #define STRING_CHECK   PyBytes_Check
+ #define STRING_TO_PY   PyBytes_FromString
+-#define DECODE_UTF8(s, size, errors) PyBytes_Decode(s, size, "UTF-8", errors)
++#define DECODE_UTF8(s, size, errors) PyString_Decode(s, size, "UTF-8", errors)
+ #define PYBYTES_UTF8(str)            PyString_AsEncodedObject(str, "UTF-8", 
NULL)
+ #define STRING_FROM_FORMAT           PyBytes_FromFormat
+ 
+diff -ur fontforge-20100501/Makefile.dynamic.in 
fontforge-20100501.new/Makefile.dynamic.in
+--- fontforge-20100501/Makefile.dynamic.in     2008-11-14 06:31:07.000000000 
+0100
++++ fontforge-20100501.new/Makefile.dynamic.in 2010-08-31 18:10:00.824156613 
+0200
+@@ -130,7 +130,7 @@
+       sh -c "if test -d fontforge/FontForge.app >/dev/null ; then rm -rf 
/Applications/FontForge.app ; mv fontforge/FontForge.app /Applications ; ln -s 
/usr/local/bin/fontforge /Applications/FontForge.app/Contents/MacOS/FontForge ; 
fi"
+       sh < systemspecific
+ #we don't always create a setup.py
+-      -(cd pyhook ; if test -r setup.py ; then python setup.py install 
--prefix=$(prefix) --root=$(DESTDIR); for dir in * ; do if test -d $$dir -a 
"$$dir" != "CVS" ; then  rm -rf $$dir ; fi; done ; fi )
++      -(cd pyhook ; if test -r setup.py ; then python2 setup.py install 
--prefix=$(prefix) --root=$(DESTDIR); for dir in * ; do if test -d $$dir -a 
"$$dir" != "CVS" ; then  rm -rf $$dir ; fi; done ; fi )
+ 
+ install_py: $(DESTDIR)$(sharedir) all install_libs install_incs install_po 
install_prog install_pycontrib
+ # You may need to be root to do the install
+@@ -138,7 +138,7 @@
+       sh -c "if test -d $(srcdir)/htdocs >/dev/null ; then $(MAKE) 
install_docs ; for dir in * ; do if test -d $$dir ; then  rm -rf $$dir ; fi; 
done ; fi"
+       sh -c "if test -d fontforge/FontForge.app >/dev/null ; then rm -rf 
/Applications/FontForge.app ; mv fontforge/FontForge.app /Applications ; ln -s 
/usr/local/bin/fontforge /Applications/FontForge.app/Contents/MacOS/FontForge ; 
fi"
+       sh < systemspecific
+-      -(cd pyhook ; python setup.py bdist --formats=gztar ; cp 
dist/fontforge-*.tar.gz $(DESTDIR)/tmp; for dir in * ; do if test -d $$dir -a 
"$$dir" != "CVS" ; then  rm -rf $$dir ; fi; done )
++      -(cd pyhook ; python2 setup.py bdist --formats=gztar ; cp 
dist/fontforge-*.tar.gz $(DESTDIR)/tmp; for dir in * ; do if test -d $$dir -a 
"$$dir" != "CVS" ; then  rm -rf $$dir ; fi; done )
+ 
+ install_gtk: fontforgegtk
+       (cd gtkui ; $(MAKE) install )

Reply via email to