diff options
author | lioux <lioux@FreeBSD.org> | 2001-12-15 22:59:57 +0800 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2001-12-15 22:59:57 +0800 |
commit | d956b709060c760fb151d39a635babf2eb0b469f (patch) | |
tree | 2372e743179b23c8e16783eba751386be73ca248 /graphics/gd | |
parent | edcfbb3fc66e119fde994f9438324a77246f1a9d (diff) | |
download | freebsd-ports-gnome-d956b709060c760fb151d39a635babf2eb0b469f.tar.gz freebsd-ports-gnome-d956b709060c760fb151d39a635babf2eb0b469f.tar.zst freebsd-ports-gnome-d956b709060c760fb151d39a635babf2eb0b469f.zip |
- Respect CFLAGS properly
- Fix compilation error when both freetype and freetype2 are installed
- Fix Xpm support
- Use freetype-config to find both include and library path
- Port style changes in Makefile
- Generic fix for -current malloc.h issue
PR: 32854
Submitted by: KATO Tsuguru <tkato@prontomail.com>
Diffstat (limited to 'graphics/gd')
-rw-r--r-- | graphics/gd/Makefile | 39 | ||||
-rw-r--r-- | graphics/gd/files/patch-ac | 58 | ||||
-rw-r--r-- | graphics/gd/files/patch-malloc | 5 |
3 files changed, 56 insertions, 46 deletions
diff --git a/graphics/gd/Makefile b/graphics/gd/Makefile index b0d7e82fb62f..244fe8b1b428 100644 --- a/graphics/gd/Makefile +++ b/graphics/gd/Makefile @@ -7,7 +7,7 @@ PORTNAME= gd PORTVERSION= 1.8.4 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES+= graphics MASTER_SITES= http://www.boutell.com/gd/http/ \ ftp://ftp.boutell.com/pub/boutell/gd/ \ @@ -19,37 +19,42 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER?= ports@FreeBSD.org +BUILD_DEPENDS= freetype-config:${PORTSDIR}/print/freetype2 # XXX +LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ + png.5:${PORTSDIR}/graphics/png \ + freetype.7:${PORTSDIR}/print/freetype2 .if !exists(/usr/bin/bzip2) BUILD_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2 .endif -LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png \ - jpeg.9:${PORTSDIR}/graphics/jpeg \ - freetype:${PORTSDIR}/print/freetype2 -USE_FREETYPE2= yes +FREETYPE_CONFIG?= ${LOCALBASE}/bin/freetype-config + +MAKE_ENV= FREETYPE_CONFIG="${FREETYPE_CONFIG}" +INSTALLS_SHLIB= yes .if defined(WITH_X11) -USE_XLIB= yes USE_XPM= yes .endif -INSTALLS_SHLIB= yes - -DOCS= index.html +pre-everything:: +.if !defined(WITH_X11) + @${ECHO_MSG} + @${ECHO_MSG} "If you want to compile with Xpm support," + @${ECHO_MSG} "hst Ctrl-C right now and use \"make WITH_X11=yes\"" + @${ECHO_MSG} +.endif post-extract: - bzip2 -d < ${_DISTDIR}/gd_gif_in.c.bz2 > ${WRKSRC}/gd_gif_in.c + @bzip2 -dc ${DISTDIR}/${DIST_SUBDIR}/gd_gif_in.c.bz2 \ + > ${WRKSRC}/gd_gif_in.c -pre-everything: -.if !defined(WITH_X11) - @${ECHO_MSG} "If you want to compile in X support use " - @${ECHO_MSG} "'make -DWITH_X11' instead" -.endif +post-patch: + @${PERL} -pi -e 's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/gdcache.h post-install: .if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/,} ${DOCSDIR} + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/index.html ${DOCSDIR} .endif .include <bsd.port.mk> diff --git a/graphics/gd/files/patch-ac b/graphics/gd/files/patch-ac index 8ddd65b3acd2..5ca15b19a4e6 100644 --- a/graphics/gd/files/patch-ac +++ b/graphics/gd/files/patch-ac @@ -1,6 +1,6 @@ ---- Makefile.orig Thu Feb 22 09:03:43 2001 -+++ Makefile Sat Feb 24 16:25:23 2001 -@@ -3,11 +3,11 @@ +--- Makefile.orig Sat Dec 15 12:52:57 2001 ++++ Makefile Sat Dec 15 12:55:02 2001 +@@ -3,22 +3,30 @@ #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). @@ -14,58 +14,69 @@ #If you don't have FreeType, libjpeg and/or Xpm installed, including the #header files, uncomment this (default). You really must install -@@ -16,8 +16,14 @@ + #libpng and zlib to get anywhere if you wish to create PNG images. +-CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG ++CFLAGS+=-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. --#CFLAGS=-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG \ --# -DHAVE_LIBFREETYPE -DHAVE_LIBTTF -+CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE + #CFLAGS=-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG \ + # -DHAVE_LIBFREETYPE -DHAVE_LIBTTF + +.if defined(WITH_X11) -+CFLAGS+=-DHAVE_LIBXPM ++CFLAGS+=-DHAVE_XPM +.endif + +.if defined(JISX0208) +CFLAGS+=-DJISX0208 +.endif - ++ #To use the old FreeType 1.x library, add this additional #define #to the line above -@@ -30,13 +36,15 @@ + #-DHAVE_LIBTTF +@@ -30,7 +38,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 -lz -ljpeg -lfreetype -lm ++LIBS=-lgd -lpng -lz -ljpeg -lm `$(FREETYPE_CONFIG) --libs` #If you do have FreeType, JPEG and/or Xpm fully installed, uncomment a #variation of this and comment out the line above. Note that - #Xpm requires X11. See also CFLAGS above. +@@ -38,6 +46,10 @@ + + #LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lm -lttf --#LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lm -lttf +.if defined(WITH_X11) +LIBS+=-lXpm -lX11 +.endif - ++ #Note: for Freetype 1.x, use DHAVE_LIBTTF and -lttf instead. -@@ -45,7 +53,8 @@ + #Typical install locations for freetype, zlib, xpm, libjpeg and libpng header +@@ -45,7 +57,11 @@ #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${LOCALBASE}/include/freetype2 -I${LOCALBASE}/include -+INCLUDEDIRS+=-I${X11BASE}/include/X11 -I${X11BASE}/include/freetype2 -I${X11BASE}/include ++INCLUDEDIRS=-I. `$(FREETYPE_CONFIG) --cflags` -I${LOCALBASE}/include ++ ++.if defined(WITH_X11) ++INCLUDEDIRS+=-I${X11BASE}/include/X11 -I${X11BASE}/include ++.endif #Typical install locations for freetype, zlib, xpm and libpng libraries. #If yours are somewhere else, other than a standard location -@@ -55,16 +66,17 @@ +@@ -55,16 +71,20 @@ #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${LOCALBASE}/lib -Wl,--rpath,${LOCALBASE}/lib ++ ++.if defined(WITH_X11) +LIBDIRS+=-L${X11BASE}/lib -Wl,--rpath,${X11BASE}/lib ++.endif #Location where libgd.a should be installed by "make install". -INSTALL_LIB=/usr/local/lib @@ -81,14 +92,13 @@ # # -@@ -74,34 +88,44 @@ +@@ -74,34 +94,43 @@ VERSION=1.8.4 -CC=$(COMPILER) $(INCLUDEDIRS) -LINK=$(CC) $(LIBDIRS) $(LIBS) -+CC+=$(INCLUDEDIRS) -+#LINK=$(CC) $(LIBDIRS) $(LIBS) ++CFLAGS+=$(INCLUDEDIRS) PROGRAMS=$(BIN_PROGRAMS) $(TEST_PROGRAMS) @@ -97,6 +107,8 @@ -all: libgd.a $(PROGRAMS) +SOVER=2 ++ ++.SUFFIXES: .c .so .o -install: libgd.a $(BIN_PROGRAMS) - sh ./install-item 644 libgd.a $(INSTALL_LIB)/libgd.a @@ -116,8 +128,6 @@ - sh ./install-item 644 gdfontmb.h $(INSTALL_INCLUDE)/gdfontmb.h - sh ./install-item 644 gdfonts.h $(INSTALL_INCLUDE)/gdfonts.h - sh ./install-item 644 gdfontt.h $(INSTALL_INCLUDE)/gdfontt.h -+.SUFFIXES: .c .so .o -+ +.c.so: + $(CC) -fpic -DPIC $(CFLAGS) -o $@ -c $< + @@ -147,7 +157,7 @@ gddemo: gddemo.o libgd.a $(CC) gddemo.o -o gddemo $(LIBDIRS) $(LIBS) -@@ -138,18 +162,21 @@ +@@ -138,18 +167,21 @@ gdtestttf: gdtestttf.o libgd.a $(CC) --verbose gdtestttf.o -o gdtestttf $(LIBDIRS) $(LIBS) diff --git a/graphics/gd/files/patch-malloc b/graphics/gd/files/patch-malloc deleted file mode 100644 index fa33bbc023f2..000000000000 --- a/graphics/gd/files/patch-malloc +++ /dev/null @@ -1,5 +0,0 @@ ---- gdcache.h Tue Feb 6 14:44:02 2001 -+++ gdcache.h Fri Aug 24 08:10:41 2001 -@@ -43 +43 @@ --#include <malloc.h> -+#include <stdlib.h> |