summaryrefslogtreecommitdiff
path: root/graphics/gd1
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2000-11-12 02:40:52 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2000-11-12 02:40:52 +0000
commitf52f02f515ca67d4c2c485190e1cd7b23d01ab32 (patch)
treeb4b6077c1050a75325e42b341936d9bb25c478d5 /graphics/gd1
parentUpgrade to 0.80. (diff)
Compile with freetype default.
Approved by: billf
Notes
Notes: svn path=/head/; revision=35031
Diffstat (limited to 'graphics/gd1')
-rw-r--r--graphics/gd1/Makefile3
-rw-r--r--graphics/gd1/files/patch-ac66
2 files changed, 50 insertions, 19 deletions
diff --git a/graphics/gd1/Makefile b/graphics/gd1/Makefile
index 5ada5de05ba8..385ce5e7e52e 100644
--- a/graphics/gd1/Makefile
+++ b/graphics/gd1/Makefile
@@ -15,10 +15,11 @@ MAINTAINER= billf@FreeBSD.org
LIB_DEPENDS= png.4:${PORTSDIR}/graphics/png \
jpeg.9:${PORTSDIR}/graphics/jpeg
+
+USE_FREETYPE= yes
.if defined(WITH_X11)
USE_XLIB= yes
USE_XPM= yes
-USE_FREETYPE= yes
.endif
INSTALLS_SHLIB= yes
diff --git a/graphics/gd1/files/patch-ac b/graphics/gd1/files/patch-ac
index c54c2ab92621..015b7579d91b 100644
--- a/graphics/gd1/files/patch-ac
+++ b/graphics/gd1/files/patch-ac
@@ -1,16 +1,18 @@
---- Makefile.orig Thu May 18 13:39:18 2000
-+++ Makefile Sun May 21 00:55:38 2000
-@@ -5,3 +5,3 @@
+--- Makefile.orig Sun Jun 4 03:26:12 2000
++++ Makefile Thu Nov 9 14:53:41 2000
+@@ -3,18 +3,22 @@
+ #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}
-@@ -9,3 +9,3 @@
+ #If the ar command fails on your system, consult the ar manpage
#for your system.
-AR=ar
+#AR=ar
-@@ -13,6 +13,10 @@
+ #If you don't have FreeType, libjpeg and/or Xpm installed, including the
#header files, uncomment this (default).
-CFLAGS=-O
+#CFLAGS=-O
@@ -18,32 +20,47 @@
#variation of this and comment out the line above. See also LIBS below.
-#CFLAGS=-O -DHAVE_XPM -DHAVE_JPEG -DHAVE_LIBTTF
+.if defined(WITH_X11)
-+CFLAGS+=-DHAVE_XPM -DHAVE_JPEG -DHAVE_LIBTTF
++CFLAGS+=-DHAVE_XPM -DHAVE_JPEG
+.else
-+CFLAGS+=-DHAVE_JPEG
++CFLAGS+=-DHAVE_JPEG -DHAVE_LIBTTF
+.endif
-@@ -25,3 +29,3 @@
+ #If you don't have FreeType and/or Xpm fully installed, uncomment this
+ #(default).
+@@ -23,7 +27,7 @@
+ #Some systems are very picky about link order. They don't all agree
+ #on the right order, either.
-LIBS=-lm -lgd -lpng -lz
-+LIBS=-lm -lgd -lpng -lz -ljpeg
++LIBS=-lm -lgd -lpng -lz -ljpeg -lttf
-@@ -35,3 +39,5 @@
+ #If you do have FreeType, JPEG and/or Xpm fully installed, uncomment a
+ #variation of this and comment out the line above. Note that
+@@ -33,14 +37,19 @@
+ #Some systems are very picky about link order. They don't all agree
+ #on the right order, either.
-#LIBS=-lm -lgd -lpng -lz -ljpeg -lttf -lXpm -lX11
+.if defined(WITH_X11)
-+LIBS+= -lttf -lXpm -lX11
++LIBS+= -lXpm -lX11
+.endif
-@@ -42,3 +48,6 @@
+ #Typical install locations for freetype, zlib, xpm, libjpeg and libpng header files.
+ #If yours are somewhere else, change this.
+ #-I. is important to 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/local/include -I/usr/include/X11 -I/usr/X11R6/include/X11
-+INCLUDEDIRS=-I. -I${LOCALBASE}/include
++INCLUDEDIRS=-I. -I${LOCALBASE}/include -I${LOCALBASE}/include/freetype
+.if defined(WITH_X11)
-+INCLUDEDIRS+=-I${LOCALBASE}/include/freetype -I${X11BASE}/include/X11 -I${X11BASE}/include
++INCLUDEDIRS+=-I${X11BASE}/include/X11 -I${X11BASE}/include
+.endif
-@@ -50,12 +59,15 @@
+ #Typical install locations for freetype, zlib, xpm and libpng libraries.
+ #If yours are somewhere else, other than a standard location
+@@ -48,16 +57,19 @@
+ #-L. as this allows the gd library itself to be found.
+ #Put -L. first so that old versions of the gd library elsewhere
#on your system can't cause conflicts while building a new one.
-LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
+LIBDIRS=-L. -L$(LOCALBASE)/lib
@@ -63,7 +80,11 @@
-INSTALL_BIN=/usr/local/bin
+INSTALL_BIN=$(PREFIX)/bin
-@@ -67,6 +79,6 @@
+ #
+ #
+@@ -65,36 +77,43 @@
+ #
+ #
-VERSION=1.8.1
+VERSION=1.8.2
@@ -73,7 +94,10 @@
+CC+= $(INCLUDEDIRS)
+#LINK=$(CC) $(LIBDIRS) $(LIBS)
-@@ -77,22 +89,29 @@
+ PROGRAMS=$(BIN_PROGRAMS) $(TEST_PROGRAMS)
+
+ BIN_PROGRAMS=pngtogd pngtogd2 gdtopng gd2topng gd2copypal gdparttopng webpng
+ TEST_PROGRAMS=gdtest gddemo gd2time gdtestttf
-all: libgd.a $(PROGRAMS)
+.SUFFIXES: .c .so .o
@@ -121,7 +145,11 @@
+ $(INSTALL) -c -m 644 gdfonts.h $(INSTALL_INCLUDE)/gdfonts.h
+ $(INSTALL) -c -m 644 gdfontt.h $(INSTALL_INCLUDE)/gdfontt.h
-@@ -131,12 +150,15 @@
+ gddemo: gddemo.o libgd.a
+ $(CC) gddemo.o -o gddemo $(LIBDIRS) $(LIBS)
+@@ -129,16 +148,19 @@
+ gdtestttf: gdtestttf.o libgd.a
+ $(CC) gdtestttf.o -o gdtestttf $(LIBDIRS) $(LIBS)
-libgd.a: gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o gd_io_file.o gd_ss.o \
+OBJS= gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o gd_io_file.o gd_ss.o \
@@ -144,3 +172,5 @@
+ $(CC) -shared -Wl,-x -Wl,-assert -Wl,pure-text -Wl,-soname,$@ -o $@ $(OBJS:.o=.so) $(LIBDIRS) $(LIBS)
+ ln -sf libgd.so.1 libgd.so
+ clean:
+ rm -f *.o *.a ${PROGRAMS} test/gdtest.jpg test/gdtest.wbmp