gd stable port information

Package: gd
Version: 1.8.4
Revision: 25
Distribution: 10.3, 10.4
Depends: %N-shlibs (= %v-%r), %N-bin
BuildDepends: libpng3, libjpeg (>= 6b-3), fink (>= 0.9.9), x11, x11-dev
Conflicts: gd2, gd209
Replaces: gd2, gd209
Source: http://www.boutell.com/gd/http/%n-%v.tar.gz
Source-MD5: 2aef76e79f206f9798233f025f5dd28d
Patch: %n.patch
SetCPPFLAGS: -fno-common
CompileScript: <<
make PREFIX=%p
cc -dynamiclib -o libgd.1.8.dylib -install_name %p/lib/libgd.1.dylib -compatibility_version 1.8 -current_version 1.8 -all_load libgd.a -L/usr/X11R6/lib -lfreetype -L%p/lib -lpng -lz -ljpeg
<<
InstallScript: <<
mkdir -p %i/bin
mkdir -p %i/include
mkdir -p %i/lib
make install PREFIX=%p DESTDIR=%d
ranlib %i/lib/libgd.a
cp libgd.1.8.dylib %i/lib
ln -s libgd.1.8.dylib %i/lib/libgd.1.dylib
ln -s libgd.1.dylib %i/lib/libgd.dylib
<<
DocFiles: readme.txt index.html
BuildDependsOnly: True
SplitOff: <<
Package: %N-shlibs
Depends: libpng3-shlibs, libjpeg-shlibs, x11-shlibs
Replaces: gd (<= 1.8.4-5)
Files: lib/libgd.1.8.dylib lib/libgd.1.dylib
Shlibs: %p/lib/libgd.1.dylib 1.8.0 %n (>= 1.8.4-11)
Description: Shared libraries for gd package
DocFiles: readme.txt index.html
<<
SplitOff2: <<
Package: %N-bin
Depends: %N-shlibs
Conflicts: gd2-bin
Replaces: gd (<= 1.8.4-5), gd2-bin
Files: bin
Description: Executables for gd package
DocFiles: readme.txt index.html
<<
Description: Graphics generation library
DescDetail: <<
The GD library is useful for creating graphics like hit counters on
the fly. This version supports the PNG, JPEG and WBMP formats and lets
you use TrueType fonts rendered via freetype2.
<<
DescPort: <<
One file includes malloc.h, disabled. The created library is static
but compiled with the -fno-common switch, so it can be linked into
shared libraries or modules later.
10.3: Modified info and patch to use X11's freetype2.
<<
DescPackaging: <<
This package is based on previous work by Chris Pepper, Jeremy Higgs
and Peter O'Gorman. Previously maintained by Christoph Pfisterer.
<<
License: OSI-Approved
Homepage: http://www.boutell.com/gd/
Maintainer: Dave Morrison

gd stable port .patch

diff -uNr gd-1.8.4/Makefile gd-1.8.4-new/Makefile
--- gd-1.8.4/Makefile Thu Feb 22 12:03:43 2001
+++ gd-1.8.4-new/Makefile Fri Apr 2 16:31:59 2004
@@ -1,9 +1,11 @@
#Depending on your system, you will need to modify this makefile.

+PREFIX=/usr/local
+
#If you do not have gcc, change the setting for COMPILER, but you must
#use an ANSI standard C compiler (NOT the old SunOS 4.1.3 cc
#compiler; get gcc if you are still using it).
-COMPILER=gcc
+COMPILER=cc

#If the ar command fails on your system, consult the ar manpage
#for your system.
@@ -12,7 +14,8 @@
#If you don't have FreeType, libjpeg and/or Xpm installed, including the
#header files, uncomment this (default). You really must install
#libpng and zlib to get anywhere if you wish to create PNG images.
-CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG
+CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG \
+ -DHAVE_LIBFREETYPE

#If you do have FreeType, libjpeg and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. See also LIBS below.
@@ -30,7 +33,7 @@
#Some systems are very picky about link order. They don't all agree
#on the right order, either.

-LIBS=-lgd -lpng -lz -lm
+LIBS=-lgd -lpng -ljpeg -lz -lfreetype

#If you do have FreeType, JPEG and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. Note that
@@ -45,7 +48,7 @@
#ensure that the version of gd you are installing is used, and not an
#older release in your directory tree somewhere.

-INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
+INCLUDEDIRS=-I. -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include/X11 -I/usr/X11R6/include -I$(PREFIX)/include

#Typical install locations for freetype, zlib, xpm and libpng libraries.
#If yours are somewhere else, other than a standard location
@@ -55,16 +58,16 @@
#on your system can't cause conflicts while building a new one.
#This line shouldn't hurt if you don't actually have some of the
#optional libraries and directories.
-LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
+LIBDIRS=-L. -L$(PREFIX)/lib -L/usr/X11R6/lib

#Location where libgd.a should be installed by "make install".
-INSTALL_LIB=/usr/local/lib
+INSTALL_LIB=$(DESTDIR)$(PREFIX)/lib

#Location where .h files should be installed by "make install".
-INSTALL_INCLUDE=/usr/local/include
+INSTALL_INCLUDE=$(DESTDIR)$(PREFIX)/include

#Location where useful non-test programs should be installed by "make install".
-INSTALL_BIN=/usr/local/bin
+INSTALL_BIN=$(DESTDIR)$(PREFIX)/bin

#
#
diff -uNr gd-1.8.4/gdcache.h gd-1.8.4-new/gdcache.h
--- gd-1.8.4/gdcache.h Tue Feb 6 14:44:02 2001
+++ gd-1.8.4-new/gdcache.h Fri Apr 2 16:31:48 2004
@@ -40,7 +40,9 @@
/* header */
/*********************************************************/

+#ifndef __APPLE__
#include
+#endif
#ifndef NULL
#define NULL (void *)0
#endif

gd _unstable_ port information

Package: gd
Version: 1.8.4
Revision: 25
Distribution: 10.3, 10.4
Depends: %N-shlibs (= %v-%r), %N-bin
BuildDepends: libpng3, libjpeg (>= 6b-3), fink (>= 0.9.9), x11, x11-dev
Conflicts: gd2, gd209
Replaces: gd2, gd209
Source: http://www.boutell.com/gd/http/%n-%v.tar.gz
Source-MD5: 2aef76e79f206f9798233f025f5dd28d
Patch: %n.patch
SetCPPFLAGS: -fno-common
CompileScript: <<
make PREFIX=%p
cc -dynamiclib -o libgd.1.8.dylib -install_name %p/lib/libgd.1.dylib -compatibility_version 1.8 -current_version 1.8 -all_load libgd.a -L/usr/X11R6/lib -lfreetype -L%p/lib -lpng -lz -ljpeg
<<
InstallScript: <<
mkdir -p %i/bin
mkdir -p %i/include
mkdir -p %i/lib
make install PREFIX=%p DESTDIR=%d
ranlib %i/lib/libgd.a
cp libgd.1.8.dylib %i/lib
ln -s libgd.1.8.dylib %i/lib/libgd.1.dylib
ln -s libgd.1.dylib %i/lib/libgd.dylib
<<
DocFiles: readme.txt index.html
BuildDependsOnly: True
SplitOff: <<
Package: %N-shlibs
Depends: libpng3-shlibs, libjpeg-shlibs, x11-shlibs
Replaces: gd (<= 1.8.4-5)
Files: lib/libgd.1.8.dylib lib/libgd.1.dylib
Shlibs: %p/lib/libgd.1.dylib 1.8.0 %n (>= 1.8.4-11)
Description: Shared libraries for gd package
DocFiles: readme.txt index.html
<<
SplitOff2: <<
Package: %N-bin
Depends: %N-shlibs
Conflicts: gd2-bin
Replaces: gd (<= 1.8.4-5), gd2-bin
Files: bin
Description: Executables for gd package
DocFiles: readme.txt index.html
<<
Description: Graphics generation library
DescDetail: <<
The GD library is useful for creating graphics like hit counters on
the fly. This version supports the PNG, JPEG and WBMP formats and lets
you use TrueType fonts rendered via freetype2.
<<
DescPort: <<
One file includes malloc.h, disabled. The created library is static
but compiled with the -fno-common switch, so it can be linked into
shared libraries or modules later.
10.3: Modified info and patch to use X11's freetype2.
<<
DescPackaging: <<
This package is based on previous work by Chris Pepper, Jeremy Higgs
and Peter O'Gorman. Previously maintained by Christoph Pfisterer.
<<
License: OSI-Approved
Homepage: http://www.boutell.com/gd/
Maintainer: Dave Morrison

gd _unstable_ port .patch

diff -uNr gd-1.8.4/Makefile gd-1.8.4-new/Makefile
--- gd-1.8.4/Makefile Thu Feb 22 12:03:43 2001
+++ gd-1.8.4-new/Makefile Fri Apr 2 16:31:59 2004
@@ -1,9 +1,11 @@
#Depending on your system, you will need to modify this makefile.

+PREFIX=/usr/local
+
#If you do not have gcc, change the setting for COMPILER, but you must
#use an ANSI standard C compiler (NOT the old SunOS 4.1.3 cc
#compiler; get gcc if you are still using it).
-COMPILER=gcc
+COMPILER=cc

#If the ar command fails on your system, consult the ar manpage
#for your system.
@@ -12,7 +14,8 @@
#If you don't have FreeType, libjpeg and/or Xpm installed, including the
#header files, uncomment this (default). You really must install
#libpng and zlib to get anywhere if you wish to create PNG images.
-CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG
+CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG \
+ -DHAVE_LIBFREETYPE

#If you do have FreeType, libjpeg and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. See also LIBS below.
@@ -30,7 +33,7 @@
#Some systems are very picky about link order. They don't all agree
#on the right order, either.

-LIBS=-lgd -lpng -lz -lm
+LIBS=-lgd -lpng -ljpeg -lz -lfreetype

#If you do have FreeType, JPEG and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. Note that
@@ -45,7 +48,7 @@
#ensure that the version of gd you are installing is used, and not an
#older release in your directory tree somewhere.

-INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
+INCLUDEDIRS=-I. -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include/X11 -I/usr/X11R6/include -I$(PREFIX)/include

#Typical install locations for freetype, zlib, xpm and libpng libraries.
#If yours are somewhere else, other than a standard location
@@ -55,16 +58,16 @@
#on your system can't cause conflicts while building a new one.
#This line shouldn't hurt if you don't actually have some of the
#optional libraries and directories.
-LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
+LIBDIRS=-L. -L$(PREFIX)/lib -L/usr/X11R6/lib

#Location where libgd.a should be installed by "make install".
-INSTALL_LIB=/usr/local/lib
+INSTALL_LIB=$(DESTDIR)$(PREFIX)/lib

#Location where .h files should be installed by "make install".
-INSTALL_INCLUDE=/usr/local/include
+INSTALL_INCLUDE=$(DESTDIR)$(PREFIX)/include

#Location where useful non-test programs should be installed by "make install".
-INSTALL_BIN=/usr/local/bin
+INSTALL_BIN=$(DESTDIR)$(PREFIX)/bin

#
#
diff -uNr gd-1.8.4/gdcache.h gd-1.8.4-new/gdcache.h
--- gd-1.8.4/gdcache.h Tue Feb 6 14:44:02 2001
+++ gd-1.8.4-new/gdcache.h Fri Apr 2 16:31:48 2004
@@ -40,7 +40,9 @@
/* header */
/*********************************************************/

+#ifndef __APPLE__
#include
+#endif
#ifndef NULL
#define NULL (void *)0
#endif