summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2002-05-17 12:39:49 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2002-05-17 12:39:49 +0000
commita66792d6dbb635bb3822b570f726573129cbf39a (patch)
treeb7d6e00849f3d46ef7d6175fe07da6353287ca25 /graphics
parentUpdate to 6.2.3. Belatedly, I confirmed that 6.2.2 supports (diff)
Use <bsd.lib.mk>
Submitted by: ru
Notes
Notes: svn path=/head/; revision=59335
Diffstat (limited to 'graphics')
-rw-r--r--graphics/png/Makefile9
-rw-r--r--graphics/png/files/makefile.freebsd47
-rw-r--r--graphics/png/files/patch-aa37
3 files changed, 55 insertions, 38 deletions
diff --git a/graphics/png/Makefile b/graphics/png/Makefile
index fc5a7ef252c2..775906fb01d8 100644
--- a/graphics/png/Makefile
+++ b/graphics/png/Makefile
@@ -7,7 +7,7 @@
PORTNAME= png
PORTVERSION= 1.2.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= http://www.libpng.org/pub/png/src/ \
ftp://swrinde.nde.swri.edu/pub/png/src/ \
@@ -29,6 +29,7 @@ PLIST_SUB= SHLIB_VER="${SHLIB_VER}"
MAN3= libpng.3 libpngpf.3
MAN5= png.5
+MANCOMPRESSED= maybe
.include <bsd.port.pre.mk>
@@ -36,4 +37,10 @@ post-extract:
# Please don't delete the following line - this link used by ghostscript* ports
@${LN} -sf ${WRKSRC} ${WRKDIR}/libpng
+post-patch:
+ ${CP} ${FILESDIR}/makefile.freebsd ${WRKSRC}/scripts/
+
+pre-install:
+ @[ -d ${PREFIX}/include/libpng ] || ${MKDIR} ${PREFIX}/include/libpng
+
.include <bsd.port.post.mk>
diff --git a/graphics/png/files/makefile.freebsd b/graphics/png/files/makefile.freebsd
new file mode 100644
index 000000000000..4ce6a2170b2c
--- /dev/null
+++ b/graphics/png/files/makefile.freebsd
@@ -0,0 +1,47 @@
+# makefile for libpng under FreeBSD
+# Copyright (C) 2002 Glenn Randers-Pehrson and Andrey A. Chernov
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+# For conditions of distribution and use, see copyright notice in png.h
+
+PREFIX?= /usr/local
+SHLIB_VER?= 5
+
+LIB= png
+SHLIB_MAJOR= ${SHLIB_VER}
+SHLIB_MINOR= 0
+NOPROFILE= YES
+NOOBJ= YES
+
+# where make install puts libpng.a and png.h
+DESTDIR= ${PREFIX}
+LIBDIR= /lib
+INCS= png.h pngconf.h
+INCSDIR= /include/libpng
+INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk
+MAN= libpng.3 libpngpf.3 png.5
+MANDIR= /man/man
+SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
+ libpng/pngconf.h ${INCSDIR}/../pngconf.h
+
+CFLAGS+= -I. -DPNG_USE_PNGGCCRD
+.if (${ARCH} != "i386")
+CFLAGS+= -DPNG_NO_ASSEMBLER_CODE
+.endif
+
+SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
+ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
+ pngwtran.c pngmem.c pngerror.c pngpread.c pnggccrd.c
+
+pngtest: pngtest.o libpng.a
+ ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm
+
+CLEANFILES= pngtest pngtest.o pngout.png
+
+test: pngtest
+ ./pngtest
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+.include <bsd.lib.mk>
diff --git a/graphics/png/files/patch-aa b/graphics/png/files/patch-aa
deleted file mode 100644
index 77f9e454ca43..000000000000
--- a/graphics/png/files/patch-aa
+++ /dev/null
@@ -1,37 +0,0 @@
---- scripts/makefile.freebsd.orig Mon Apr 15 18:11:36 2002
-+++ scripts/makefile.freebsd Sun Apr 21 20:03:05 2002
-@@ -3,11 +3,13 @@
- # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
- # For conditions of distribution and use, see copyright notice in png.h
-
-+.include <bsd.own.mk>
-+
- # where make install puts libpng.a and png.h
--prefix=/usr/local
-+prefix=${PREFIX}
-
--PNGMAJ= 5
--.if (${OBJFORMAT} == "elf")
-+PNGMAJ= $(SHLIB_VER)
-+.if (${PORTOBJFORMAT} == "elf")
- PNGVER= $(PNGMAJ)
- .else
- PNGMIN= 0
-@@ -15,7 +17,7 @@
- .endif
-
- CFLAGS+= -I. -DPNG_USE_PNGGCCRD
--.if (${MACHINE_ARCH} != "i386")
-+.if (${ARCH} != "i386")
- CFLAGS+= -DPNG_NO_ASSEMBLER_CODE
- .endif
- LDFLAGS+=-L. -lpng -lz -lm -static
-@@ -36,7 +38,7 @@
- $(RANLIB) $@
-
- libpng.so.${PNGVER}: $(OBJS:S/o$/so/g)
--.if (${OBJFORMAT} == "elf")
-+.if (${PORTOBJFORMAT} == "elf")
- ${CC} -shared -Wl,-x,-soname,$@ -o $@ $(OBJS:S/o$/so/g) -lz -lm
- .else
- ${CC} -shared -Wl,-x -o $@ $(OBJS:S/o$/so/g) -lz -lm