the Fink project is an effort to port
popular Unix programs to Mac OS X
Info2: <<
Package: fontforge
Version: 20110222
Revision: 1
Type: python 2.7
License: BSD
Description: Outline font editor
DescDetail: <<
An outline font editor that lets you create your own postscript,
truetype, opentype, cid-keyed, multi-master, cff, svg, bitmap (bdf)
and woff fonts, or edit existing ones. Also lets you convert one format
to another. FontForge has support for many Macintosh font formats.
This program was formerly called PfaEdit.
<<
DescUsage: <<
Will use autotrace or potrace to trace bitmaps if available.
<<
DescPort: <<
Makefile ignores CPPFLAGS and LDFLAGS so we use CFLAGS instead.
Had to remove setting of DYLD_LIBRARY_PATH in start.c.
Caused ImageIO problems. Yuck.
Enabled python scripting. Uses fink's python%type_pkg[python].
Patched Makefile.in's to remove useless -I and reorder flags.
Reenabled building shared libs; put them into %p/lib/%n.
Now installs a .app wrapper bundle at %p/Applications/FontForge.app
Install desktop and mime files for KDE and Gnome.
<<
Homepage: http://fontforge.sourceforge.net/
Maintainer: Daniel Johnson
Source: mirror:sourceforge:%n/%n_full-%v.tar.bz2
Source-MD5: 5be4dda345b5d73a27cc399df96e463a
SourceDirectory: %n-%v
Source2: mirror:sourceforge:%n/%n_htdocs-20110221.tar.bz2
Source2-MD5: 7fd1870acebb7637f0b1e723a6455558
Source2ExtractDir: %n-%v/htdocs
Source3: http://fontforge.sourceforge.net/cidmaps.tgz
Source3-MD5: 063691163e592515b31514515bb3ce8c
Source3Rename: cidmaps-20081215.tgz
Source3ExtractDir: %n-%v/cidmap
Depends: <<
cairo-shlibs (>= 1.8.8-5),
desktop-file-utils,
expat1-shlibs,
fontconfig2-shlibs (>= 2.8.0-4),
freetype219-shlibs (>= 2.3.12-1),
giflib-shlibs,
glib2-shlibs (>= 2.22.4-2),
glitz-shlibs,
libgettext8-shlibs,
libiconv,
libjpeg8-shlibs,
libpng14-shlibs,
libspiro0-shlibs,
libtiff-shlibs,
libuninameslist1-shlibs,
libxml2-shlibs,
pango1-xft2-ft219-shlibs (>= 1.24.5-7),
pixman-shlibs (>= 0.16.6-1),
python%type_pkg[python],
shared-mime-info,
x11,
xft2-shlibs (>= 2.1.14-3)
<<
BuildDepends: <<
cairo (>= 1.8.8-5),
expat1,
fink (>= 0.28.0),
fink-package-precedence,
fontconfig2-dev (>= 2.8.0-4),
freetype219 (>= 2.3.12-1),
gettext-tools,
giflib,
glib2-dev (>= 2.22.4-2),
glitz,
libgettext8-dev,
libiconv-dev,
libjpeg8,
libpng14,
libspiro0,
libtiff,
libuninameslist1,
libxml2,
pango1-xft2-ft219-dev (>= 1.24.5-7),
pkgconfig (>= 0.23-1),
pixman (>= 0.16.6-1),
x11-dev,
xft2-dev (>= 2.1.14-3)
<<
Recommends: autotrace-bin | potrace
Conflicts: pfaedit
Replaces: pfaedit
DocFiles: AUTHORS INSTALL LICENSE README-Mac.html README-Unix.html VERSION
PatchFile: %n.patch
PatchFile-MD5: 7cca6066c0e8dd486f818eac324ed614
PatchScript: <<
%{default_script}
#Use fink's python to build the python extension.
perl -pi -e 's,python setup.py,%p/bin/python%type_raw[python] setup.py,g' Makefile.dynamic.in
#Make extension look for private libs in %p/lib/%n
perl -pi -e 's,/lib/,/lib/%n/,g' pyhook/loadfontforge.h
#Fix path to fontforge.png in fontforge.desktop
perl -pi -e 's,fontforge.png,%p/share/fontforge/fontforge.png,' Packaging/fontforge.desktop
#/usr/include/libxml2 -- Do Not Want.
perl -pi -e 's|/usr/include/libxml2|%p/include/libxml2|g' configure
# I hate it when configure tries to be clever.
perl -pi -e 's|/usr/local ||' configure
perl -pi -e 's|/sw|%p|' configure
<<
UseMaxBuildJobs: true
NoSetCPPFLAGS: True
NoSetLDFLAGS: True
SetCFLAGS: -Os -I%p/include/libxml2 -I%p/lib/fontconfig2/include -I%p/lib/xft2/include -I%p/include -I%p/include/cairo
SetCPPFLAGS: -I%p/lib/fontconfig2/include -MD
SetLIBRARY_PATH: %p/lib/fontconfig2/lib:%p/lib:/usr/X11R6/lib
SetLDFLAGS: -L%p/lib/fontconfig2/lib -L%p/lib/xft2/lib -L%p/lib/python%type_raw[python]/config -L%p/lib -L/usr/X11R6/lib
ConfigureParams: <<
--mandir='${prefix}/share/man'\
--libdir='${prefix}/lib/%n'\
--with-x\
--with-regular-link\
--with-python=%p/bin/python%type_raw[python]\
--with-python-lib=-lpython%type_raw[python]\
--enable-shared=yes\
--enable-static=no\
--enable-libff\
--enable-pyextension\
--enable-type3\
--enable-double\
--enable-pasteafter\
--enable-tilepath\
--without-freetype-src
<<
CompileScript: <<
#!/bin/bash -ev
export CPATH="%p/include"
export F77=no
# This bit enables stripping unused libs on 10.5 and later.
let version=`uname -r | cut -f 1 -d .`
if [ $version -ge 9 ]; then
export LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
fi
./configure %c
make X_LIBS=""
fink-package-precedence --depfile-ext='\.d' .
<<
InstallScript: <<
make install DESTDIR=%d
/bin/rm -rf %i/include
/bin/ln -s %p/bin/fontforge fontforge/FontForge.app/Contents/MacOS/FontForge
/bin/mkdir -p %i/share/applications
/bin/mkdir -p %i/share/fontforge
/bin/mkdir -p %i/share/mime/packages
/bin/cp Packaging/fontforge.desktop %i/share/applications
/bin/cp Packaging/fontforge.png %i/share/fontforge
/bin/cp Packaging/fontforge.xml %i/share/mime/packages
<<
PostInstScript: <<
. %p/bin/init.sh
[ -x %p/bin/update-mime-database ] && update-mime-database %p/share/mime > /dev/null 2>&1 || :
[ -x %p/bin/update-desktop-database ] && update-desktop-database -q %p/share/applications || :
<<
PostRmScript: <<
. %p/bin/init.sh
[ -x %p/bin/update-mime-database ] && update-mime-database %p/share/mime > /dev/null 2>&1 || :
[ -x %p/bin/update-desktop-database ] && update-desktop-database -q %p/share/applications || :
<<
AppBundles: fontforge/FontForge.app
Shlibs: <<
!%p/lib/%n/libfontforge.1.dylib
!%p/lib/%n/libgdraw.4.dylib
!%p/lib/%n/libgunicode.3.dylib
!%p/lib/%n/libgutils.1.dylib
!%p/lib/%n/libgioftp.1.dylib
<<
<<
diff -ru fontforge-20110222.orig/Makefile.dynamic.in fontforge-20110222/Makefile.dynamic.in
--- fontforge-20110222.orig/Makefile.dynamic.in 2011-02-14 22:37:39.000000000 -0500
+++ fontforge-20110222/Makefile.dynamic.in 2011-03-27 09:49:27.000000000 -0400
@@ -127,8 +127,8 @@
# You may need to be root to do the install
#explicit use of sh to make sure we don't invoke csh with different "if" syntax
sh -c "if test -d $(srcdir)/htdocs >/dev/null ; then $(MAKE) install_docs ; 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
+# 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 )
diff -ru fontforge-20110222.orig/Unicode/Makefile.dynamic.in fontforge-20110222/Unicode/Makefile.dynamic.in
--- fontforge-20110222.orig/Unicode/Makefile.dynamic.in 2011-02-14 22:37:39.000000000 -0500
+++ fontforge-20110222/Unicode/Makefile.dynamic.in 2011-03-27 09:49:27.000000000 -0400
@@ -18,8 +18,8 @@
cjk.lo memory.lo ucharmap.lo unialt.lo ustring.lo utype.lo \
usprintf.lo gwwiconv.lo
-Incs = -I$(top_srcdir)/inc -I../inc -I/usr/pkg/include -I/usr/pkg/include/giflib
-CFLAGS = @CFLAGS@ @CPPFLAGS@ $(Incs) @WFLAGS@ @DEFS@
+Incs = -I$(top_srcdir)/inc -I../inc
+CFLAGS = $(Incs) @CFLAGS@ @CPPFLAGS@ @WFLAGS@ @DEFS@
../libgunicode.la: $(libgunicode_OBJECTS)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) -no-undefined @LDFLAGS@ -o ../libgunicode.la $(libgunicode_OBJECTS) \
diff -ru fontforge-20110222.orig/configure fontforge-20110222/configure
--- fontforge-20110222.orig/configure 2011-03-27 09:53:07.000000000 -0400
+++ fontforge-20110222/configure 2011-03-27 09:57:33.000000000 -0400
@@ -4633,7 +4633,7 @@
oldCPPFLAGS="$CPPFLAGS"
gww_extraincludes=""
oldLDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS -L/usr/local/lib"
+#LDFLAGS="$LDFLAGS -L/usr/local/lib"
case "$host" in
*-apple-darwin*)
@@ -20475,88 +20475,6 @@
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_create_read_struct in -lpng16" >&5
-$as_echo_n "checking for png_create_read_struct in -lpng16... " >&6; }
-if test "${ac_cv_lib_png16_png_create_read_struct+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng16 -lz -lm $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_create_read_struct ();
-int
-main ()
-{
-return png_create_read_struct ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png16_png_create_read_struct=yes
-else
- ac_cv_lib_png16_png_create_read_struct=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png16_png_create_read_struct" >&5
-$as_echo "$ac_cv_lib_png16_png_create_read_struct" >&6; }
-if test "x$ac_cv_lib_png16_png_create_read_struct" = x""yes; then :
- $as_echo "#define _LIBPNG16 1" >>confdefs.h
-
-else
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_create_read_struct in -lpng15" >&5
-$as_echo_n "checking for png_create_read_struct in -lpng15... " >&6; }
-if test "${ac_cv_lib_png15_png_create_read_struct+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng15 -lz -lm $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_create_read_struct ();
-int
-main ()
-{
-return png_create_read_struct ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png15_png_create_read_struct=yes
-else
- ac_cv_lib_png15_png_create_read_struct=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png15_png_create_read_struct" >&5
-$as_echo "$ac_cv_lib_png15_png_create_read_struct" >&6; }
-if test "x$ac_cv_lib_png15_png_create_read_struct" = x""yes; then :
- $as_echo "#define _LIBPNG15 1" >>confdefs.h
-
-else
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_create_read_struct in -lpng14" >&5
$as_echo_n "checking for png_create_read_struct in -lpng14... " >&6; }
if test "${ac_cv_lib_png14_png_create_read_struct+set}" = set; then :
@@ -20686,10 +20604,6 @@
fi
-fi
-
-fi
-
ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
if test "x$ac_cv_header_png_h" = x""yes; then :
:
diff -ru fontforge-20110222.orig/fontforge/Makefile.dynamic.in fontforge-20110222/fontforge/Makefile.dynamic.in
--- fontforge-20110222.orig/fontforge/Makefile.dynamic.in 2011-02-14 22:37:39.000000000 -0500
+++ fontforge-20110222/fontforge/Makefile.dynamic.in 2011-03-27 09:49:27.000000000 -0400
@@ -68,12 +68,12 @@
#I used to include -L/usr/lib explicitly after static_libs. Not sure why. Should be implied & breaks 64bit compiles
LDFLAGS = $(X_LIBS) @LDFLAGS@
-LIBS = -rpath $(libdir) @LINK_WITH_GDRAW@ ../libgutils.la \
- ../libgunicode.la \
- $(X_PRE_LIBS) $(X_11LIB) $(X_EXTRA_LIBS) @LIBS@ $(STATIC_LIBS) -lm
-LIBLIBS = -rpath $(libdir) ../libgutils.la ../libgunicode.la \
- @LIBS@ $(STATIC_LIBS) -lm
-DLIBS = -rpath $(libdir) ../libfontforge.la ../libgutils.la ../libgunicode.la @LIBS@ $(STATIC_LIBS) -lm
+LIBS = -rpath $(libdir) $(STATIC_LIBS) @LINK_WITH_GDRAW@ ../libgunicode.la \
+ ../libgutils.la \
+ $(X_PRE_LIBS) $(X_11LIB) $(X_EXTRA_LIBS) @LIBS@ -lm
+LIBLIBS = -rpath $(libdir) $(STATIC_LIBS) ../libgunicode.la ../libgutils.la \
+ @LIBS@ -lm
+DLIBS = -rpath $(libdir) $(STATIC_LIBS) ../libgunicode.la ../libgutils.la ../libfontforge.la @LIBS@ -lm
all: @FINAL_TARGET@ @MACAPP@ sfddiff fontimage fontlint
Only in fontforge-20110222/fontforge: Makefile.dynamic.in.orig
diff -ru fontforge-20110222.orig/fontforge/start.c fontforge-20110222/fontforge/start.c
--- fontforge-20110222.orig/fontforge/start.c 2011-02-14 22:37:40.000000000 -0500
+++ fontforge-20110222/fontforge/start.c 2011-03-27 09:49:27.000000000 -0400
@@ -125,7 +125,6 @@
/* install image libs. For some reason fink installs in a place */
/* the dynamic loader doesn't find */
/* (And fink's attempts to set the PATH variables generally don't work */
- setenv("DYLD_LIBRARY_PATH","/sw/lib",0);
#endif
}
diff -ru fontforge-20110222.orig/gdraw/Makefile.dynamic.in fontforge-20110222/gdraw/Makefile.dynamic.in
--- fontforge-20110222.orig/gdraw/Makefile.dynamic.in 2011-02-14 22:37:40.000000000 -0500
+++ fontforge-20110222/gdraw/Makefile.dynamic.in 2011-03-27 09:49:27.000000000 -0400
@@ -34,12 +34,12 @@
gtextfield.lo gtextinfo.lo gwidgets.lo gxdraw.lo gxcdraw.lo \
ghvbox.lo gmatrixedit.lo gdrawable.lo gspacer.lo xkeysyms_unicode.lo
-Incs = -I$(top_srcdir)/inc -I../inc -I/usr/pkg/include -I/usr/pkg/include/giflib
-CFLAGS = @CFLAGS@ @CPPFLAGS@ $(Incs) @WFLAGS@ $(X_CFLAGS) -DNOTHREADS @DEFS@ -DLIBDIR='"$(libdir)"'
+Incs = -I$(top_srcdir)/inc -I../inc
+CFLAGS = $(Incs) @CFLAGS@ @CPPFLAGS@ @WFLAGS@ $(X_CFLAGS) -DNOTHREADS @DEFS@ -DLIBDIR='"$(libdir)"'
../libgdraw.la: $(libgdraw_OBJECTS)
$(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) -o ../libgdraw.la $(libgdraw_OBJECTS) \
- ../libgutils.la ../libgunicode.la $(X_LIBS) @LDFLAGS@ @LIBS@ \
+ ../libgunicode.la ../libgutils.la $(X_LIBS) @LDFLAGS@ @LIBS@ \
$(STATIC_LIBS) $(X_PRE_LIBS) $(X_11LIB) $(X_EXTRA_LIBS) \
-rpath $(libdir) -version-info $(GD_VERSION):$(GD_REVISION):$(GD_AGE)
diff -ru fontforge-20110222.orig/gutils/Makefile.dynamic.in fontforge-20110222/gutils/Makefile.dynamic.in
--- fontforge-20110222.orig/gutils/Makefile.dynamic.in 2011-02-14 22:37:40.000000000 -0500
+++ fontforge-20110222/gutils/Makefile.dynamic.in 2011-03-27 09:49:27.000000000 -0400
@@ -30,21 +30,19 @@
gio.lo giofile.lo giohosts.lo giomime.lo giothread.lo giotrans.lo
libgioftp_OBJECTS = gioftp.lo
-Incs = -I$(top_srcdir)/inc -I../inc -I/usr/pkg/include -I/usr/pkg/include/giflib
-CFLAGS = @CFLAGS@ @CPPFLAGS@ $(Incs) @WFLAGS@ $(X_CFLAGS) -DNOTHREADS @DEFS@ -DLIBDIR='"$(libdir)"'
+Incs = -I$(top_srcdir)/inc -I../inc
+CFLAGS = $(Incs) @CFLAGS@ @CPPFLAGS@ @WFLAGS@ $(X_CFLAGS) -DNOTHREADS @DEFS@ -DLIBDIR='"$(libdir)"'
both: ../libgutils.la ../libgioftp.la
../libgutils.la: $(libgutils_OBJECTS)
- $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) @LDFLAGS@ -o ../libgutils.la $(libgutils_OBJECTS) \
+ $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) $(STATIC_LIBS) @LDFLAGS@ -o ../libgutils.la $(libgutils_OBJECTS) \
../libgunicode.la @LIBS@ \
- $(STATIC_LIBS) \
-rpath $(libdir) -version-info $(GU_VERSION):$(GU_REVISION):$(GU_AGE)
../libgioftp.la: $(libgioftp_OBJECTS)
- $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) @LDFLAGS@ -o ../libgioftp.la $(libgioftp_OBJECTS) \
+ $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) $(STATIC_LIBS) @LDFLAGS@ -o ../libgioftp.la $(libgioftp_OBJECTS) \
../libgunicode.la @LIBS@ \
- $(STATIC_LIBS) \
-rpath $(libdir) -version-info $(GFTP_VERSION):$(GFTP_REVISION):$(GFTP_AGE)
%.lo: %.c