diff options
-rw-r--r-- | graphics/png/Makefile | 4 | ||||
-rw-r--r-- | graphics/png/files/patch-aa | 38 | ||||
-rw-r--r-- | graphics/png/files/patch-ac | 21 | ||||
-rw-r--r-- | graphics/png/pkg-plist | 3 |
4 files changed, 61 insertions, 5 deletions
diff --git a/graphics/png/Makefile b/graphics/png/Makefile index df95f53ce2ad..fccaea4260aa 100644 --- a/graphics/png/Makefile +++ b/graphics/png/Makefile @@ -7,6 +7,7 @@ PORTNAME= png PORTVERSION= 1.2.8 +PORTREVISION= 1 CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= lib${PORTNAME} @@ -20,7 +21,8 @@ MAINTAINER= ache@FreeBSD.org COMMENT= Library for manipulating PNG images MAKEFILE= ${WRKSRC}/scripts/makefile.freebsd -ALL_TARGET= all test +ALL_TARGET= all libpng-config test +MAKE_FLAGS= ccopts="${CFLAGS}" ldopts="${LDFLAGS}" -f INSTALLS_SHLIB= yes SHLIB_VER= 5 diff --git a/graphics/png/files/patch-aa b/graphics/png/files/patch-aa index 5189c653c043..07184ac7ef82 100644 --- a/graphics/png/files/patch-aa +++ b/graphics/png/files/patch-aa @@ -1,11 +1,41 @@ --- scripts/makefile.freebsd.orig Sat May 18 18:46:45 2002 -+++ scripts/makefile.freebsd Wed Oct 20 23:06:52 2004 -@@ -25,7 +25,7 @@ ++++ scripts/makefile.freebsd Sun Jan 30 17:33:45 2005 +@@ -24,10 +24,11 @@ + LDADD+= -lm -lz DPADD+= ${LIBM} ${LIBZ} - CFLAGS+= -I. -DPNG_USE_PNGGCCRD +-CFLAGS+= -I. -DPNG_USE_PNGGCCRD -.if (${MACHINE_ARCH} != "i386") +-CFLAGS+= -DPNG_NO_ASSEMBLER_CODE ++cppflags=-DPNG_USE_PNGGCCRD +.if (${ARCH} != "i386") - CFLAGS+= -DPNG_NO_ASSEMBLER_CODE ++cppflags+=-DPNG_NO_ASSEMBLER_CODE .endif ++CFLAGS+=-I. ${cppflags} + SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ + pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ +@@ -44,5 +45,23 @@ + DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO + writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* ++ ++libpng-config: ++ ( cat scripts/libpng-config-head.in; \ ++ echo prefix=\"${PREFIX}\"; \ ++ echo libdir=\"${PREFIX}${LIBDIR}\"; \ ++ echo ccopts=\"${ccopts}\"; \ ++ echo cppflags=\"${cppflags}\"; \ ++ echo I_opts=\"-I${PREFIX}${INCSDIR}\"; \ ++ echo L_opts=\"-L${PREFIX}${LIBDIR}\"; \ ++ echo libs=\"-lpng -lz -lm\"; \ ++ echo ldopts=\"${ldopts}\"; \ ++ cat scripts/libpng-config-body.in ) > libpng-config ++ chmod +x libpng-config ++ ++beforeinstall: libpng-config ++ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ++ libpng-config ${PREFIX}/bin ++ ln -sf libpng-config ${PREFIX}/bin/libpng12-config + + .include <bsd.lib.mk> diff --git a/graphics/png/files/patch-ac b/graphics/png/files/patch-ac new file mode 100644 index 000000000000..be538a4031c1 --- /dev/null +++ b/graphics/png/files/patch-ac @@ -0,0 +1,21 @@ +--- scripts/libpng-config-body.in.orig Wed Sep 18 08:05:43 2002 ++++ scripts/libpng-config-body.in Sun Jan 30 17:31:12 2005 +@@ -77,12 +77,16 @@ + echo ${R_opts} + ;; + ++ --ldopts) ++ echo ${ldopts} ++ ;; ++ + --ldflags) +- echo ${ldflags} ${L_opts} ${R_opts} ${libs} ++ echo ${ldopts} ${L_opts} ${R_opts} ${libs} + ;; + + --static) +- R_opts="" ++ R_opts="-static" + ;; + + *) diff --git a/graphics/png/pkg-plist b/graphics/png/pkg-plist index 3f1f2d5cdb0b..57f6df1964b7 100644 --- a/graphics/png/pkg-plist +++ b/graphics/png/pkg-plist @@ -1,3 +1,6 @@ +@unexec rm -f %D/bin/libpng12-config +bin/libpng-config +@exec ln -sf %f %D/bin/libpng12-config include/libpng/png.h @exec ln -sf libpng/%f %D/include/%f @unexec rm -f %D/include/%f |