Here's an update for graphics/png to 1.5.2. This only covers png itself, not any fallout in the tree.
* I've added the depend step, because I don't think we're otherwise guaranteed that pnglibconf.h is built first in a parallel build. * We can drop libpng-manual.txt, it's included as libpng.3. Attached as png.patch. Since maintaining our own Makefile and fighting upstream is annoying, I've also explored building png with the included autotools framework. A diff for a simpler port based on this is attached as png.ac.patch. The drawback is that it ends up installing everything as libpng15-foo and symlinking libpng-foo to it. I don't know if we want to go down that route. Comments, opinions? -- Christian "naddy" Weisgerber na...@mips.inka.de
Index: Makefile =================================================================== RCS file: /cvs/ports/graphics/png/Makefile,v retrieving revision 1.78 diff -u -p -r1.78 Makefile --- Makefile 1 Jul 2011 17:09:36 -0000 1.78 +++ Makefile 3 Jul 2011 17:41:09 -0000 @@ -2,11 +2,10 @@ COMMENT= library for manipulating PNG images -VERSION= 1.2.44 +VERSION= 1.5.2 DISTNAME= libpng-${VERSION} PKGNAME= png-${VERSION} -REVISION= 0 -SHARED_LIBS= png 10.0 +SHARED_LIBS= png 11.0 CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libpng/} @@ -22,6 +21,7 @@ SUBST_VARS= VERSION FAKE_FLAGS= PREFIX="${PREFIX}" +ALL_TARGET= depend all MAKE_ENV= CC="${CC}" MAKE_FILE= scripts/makefile.openbsd MAKE_FLAGS= SHLIB_MAJOR=${LIBpng_VERSION:R} \ Index: distinfo =================================================================== RCS file: /cvs/ports/graphics/png/distinfo,v retrieving revision 1.26 diff -u -p -r1.26 distinfo --- distinfo 27 Jun 2010 19:55:04 -0000 1.26 +++ distinfo 3 Jul 2011 17:41:09 -0000 @@ -1,5 +1,5 @@ -MD5 (libpng-1.2.44.tar.gz) = ibYvjaruqxNC4wfW0UEf8Q== -RMD160 (libpng-1.2.44.tar.gz) = ZFgC0qiz+SyrYQVgTisZjkgyVPQ= -SHA1 (libpng-1.2.44.tar.gz) = d2u45C2GvXGuWODZb4VHLB1jvus= -SHA256 (libpng-1.2.44.tar.gz) = bVvgKh2QQL9OggXgbJ+2oHDI/ACFnZ4XKcTED/EB9n0= -SIZE (libpng-1.2.44.tar.gz) = 829035 +MD5 (libpng-1.5.2.tar.gz) = MdRI65OhZGNZoj8bI0NKsw== +RMD160 (libpng-1.5.2.tar.gz) = 0Rh51Y1si7849KZuUp5qs01KHMw= +SHA1 (libpng-1.5.2.tar.gz) = ccMLmyMWmi2sWwp3lU2dkfjZRP4= +SHA256 (libpng-1.5.2.tar.gz) = HtKBgQNI27YdAkZcDf+FTBe4JvXF12zOMrwOatygIVY= +SIZE (libpng-1.5.2.tar.gz) = 964261 Index: patches/patch-libpng_3 =================================================================== RCS file: patches/patch-libpng_3 diff -N patches/patch-libpng_3 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libpng_3 3 Jul 2011 17:41:09 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- libpng.3.orig Sun Jul 3 08:20:25 2011 ++++ libpng.3 Sun Jul 3 08:20:40 2011 +@@ -1122,7 +1122,7 @@ rebuilt from scripts/pnglibconf.dfa using awk or it mu + + Hand editing is achieved by copying scripts/pnglibconf.h.prebuilt and changing + the lines defining the supported features, paying very close attention to the +-'option' information in scripts/pnglibconf.dfa that describes those features and ++\&'option' information in scripts/pnglibconf.dfa that describes those features and + their requirements. This is easy to get wrong. + + B. Configuration using DFA_XTRA Index: patches/patch-pngconf_h =================================================================== RCS file: patches/patch-pngconf_h diff -N patches/patch-pngconf_h --- patches/patch-pngconf_h 23 Aug 2009 14:44:18 -0000 1.8 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,15 +0,0 @@ -$OpenBSD: patch-pngconf_h,v 1.8 2009/08/23 14:44:18 naddy Exp $ ---- pngconf.h.orig Thu Aug 13 13:13:21 2009 -+++ pngconf.h Sun Aug 23 16:21:58 2009 -@@ -40,6 +40,11 @@ - #endif - #endif - -+/* libpng compile time options */ -+#ifndef PNG_NO_MMX_CODE -+# define PNG_NO_MMX_CODE -+#endif -+ - /* - * Added at libpng-1.2.8 - * Index: patches/patch-pngerror_c =================================================================== RCS file: /cvs/ports/graphics/png/patches/patch-pngerror_c,v retrieving revision 1.5 diff -u -p -r1.5 patch-pngerror_c --- patches/patch-pngerror_c 1 Jul 2011 17:09:36 -0000 1.5 +++ patches/patch-pngerror_c 3 Jul 2011 17:41:09 -0000 @@ -6,9 +6,9 @@ libpng "png_format_buffer()" Denial of S From upstream git: http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng/libpng;a=commitdiff;h=65e6d5a34f49acdb362a0625a706c6b914e670af ---- pngerror.c.orig Fri Jul 1 19:07:03 2011 -+++ pngerror.c Fri Jul 1 19:07:42 2011 -@@ -181,8 +181,13 @@ png_format_buffer(png_structp png_ptr, png_charp buffe +--- pngerror.c.orig Thu Mar 31 18:23:40 2011 ++++ pngerror.c Sun Jul 3 00:19:50 2011 +@@ -185,8 +185,13 @@ png_format_buffer(png_structp png_ptr, png_charp buffe { buffer[iout++] = ':'; buffer[iout++] = ' '; @@ -23,4 +23,4 @@ http://libpng.git.sourceforge.net/git/gi + buffer[iout] = '\0'; } } - + #endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */ Index: patches/patch-scripts_libpng_pc_in =================================================================== RCS file: /cvs/ports/graphics/png/patches/patch-scripts_libpng_pc_in,v retrieving revision 1.18 diff -u -p -r1.18 patch-scripts_libpng_pc_in --- patches/patch-scripts_libpng_pc_in 27 Jun 2010 19:55:04 -0000 1.18 +++ patches/patch-scripts_libpng_pc_in 3 Jul 2011 17:41:09 -0000 @@ -1,16 +1,16 @@ $OpenBSD: patch-scripts_libpng_pc_in,v 1.18 2010/06/27 19:55:04 kili Exp $ ---- scripts/libpng.pc.in.orig Sat Jun 26 02:31:16 2010 -+++ scripts/libpng.pc.in Sun Jun 27 08:23:08 2010 +--- scripts/libpng.pc.in.orig Sat Jul 2 23:30:05 2011 ++++ scripts/libpng.pc.in Sat Jul 2 23:30:23 2011 @@ -1,10 +1,10 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ --includedir=@includedir@/libpng12 +-includedir=@includedir@/libpng15 +includedir=@includedir@ Name: libpng Description: Loads and saves PNG files - Version: 1.2.44 --Libs: -L${libdir} -lpng12 + Version: 1.5.2 +-Libs: -L${libdir} -lpng15 +Libs: -L${libdir} -lpng -lz -lm Cflags: -I${includedir} Index: patches/patch-scripts_makefile_openbsd =================================================================== RCS file: /cvs/ports/graphics/png/patches/patch-scripts_makefile_openbsd,v retrieving revision 1.32 diff -u -p -r1.32 patch-scripts_makefile_openbsd --- patches/patch-scripts_makefile_openbsd 23 Jun 2011 22:50:27 -0000 1.32 +++ patches/patch-scripts_makefile_openbsd 3 Jul 2011 17:41:09 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-scripts_makefile_openbsd,v 1.32 2011/06/23 22:50:27 naddy Exp $ ---- scripts/makefile.openbsd.orig Fri Jun 25 18:31:16 2010 -+++ scripts/makefile.openbsd Mon Jun 20 13:22:02 2011 -@@ -7,11 +7,12 @@ +--- scripts/makefile.openbsd.orig Thu Mar 31 18:23:42 2011 ++++ scripts/makefile.openbsd Sun Jul 3 19:09:39 2011 +@@ -7,12 +7,11 @@ # and license in png.h PREFIX?= /usr/local @@ -10,31 +10,33 @@ $OpenBSD: patch-scripts_makefile_openbsd -MANDIR= ${PREFIX}/man/cat +MANDIR= ${PREFIX}/man/man +INCDIR= ${PREFIX}/include/libpng -+DOCDIR= ${PREFIX}/share/doc/png - --SHLIB_MAJOR= 0 --SHLIB_MINOR= 1.2.44 +-SHLIB_MAJOR= 15 +-SHLIB_MINOR= 1.5.2 +- LIB= png SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ -@@ -25,24 +26,42 @@ CPPFLAGS+= -I${.CURDIR} -DPNG_NO_MMX_CODE + pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \ +@@ -25,12 +24,30 @@ CPPFLAGS+= -I${.CURDIR} NOPROFILE= Yes --CLEANFILES+= pngtest.o pngtest -+CLEANFILES+= pngtest.o pngtest libpng-config +-CLEANFILES+= pngtest.o pngtest pnglibconf.h ++CLEANFILES+= pngtest.o pngtest pngvalid.o pngvalid pnglibconf.h libpng-config MAN= libpng.3 libpngpf.3 png.5 --DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO libpng.txt -+DOCS = libpng-1.2.44.txt +-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \ +- libpng-manual.txt -+all: ${_LIBS} libpng-config libpng.pc ++all: pnglibconf.h ${_LIBS} libpng-config libpng.pc ++ ++beforedepend: pnglibconf.h + +libpng.pc: -+ cat scripts/libpng.pc.in | sed -e s\!@prefix@!$(PREFIX)! \ -+ -e s\!@exec_prefix@!$(BINDIR)! -e s\!@libdir@!$(LIBDIR)! \ -+ -e s\!@includedir@!$(INCDIR)! \ -+ -e s\!@PNGLIB_VERSION@!$(PNGLIB_VERSION)!> libpng.pc ++ sed < scripts/libpng.pc.in -e s'!@prefix@!$(PREFIX)!' \ ++ -e 's!@exec_prefix@!$(BINDIR)!' -e 's!@libdir@!$(LIBDIR)!' \ ++ -e 's!@includedir@!$(INCDIR)!' \ ++ -e 's!@PNGLIB_VERSION@!$(PNGLIB_VERSION)!' > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ @@ -46,17 +48,27 @@ $OpenBSD: patch-scripts_makefile_openbsd + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + - pngtest.o: pngtest.c - ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} - + # see scripts/pnglibconf.mak for more options + pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ +@@ -41,13 +58,20 @@ pngtest.o: pngtest.c pngtest: pngtest.o ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm -test: pngtest -+test regress: pngtest - cd ${.OBJDIR} && env \ - LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest +- cd ${.OBJDIR} && env \ +- LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest ++pngvalid.o: pngvalid.c ++ ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} ++pngvalid: pngvalid.o ++ ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm ++ ++test regress: pngtest pngvalid ++ @LD_LIBRARY_PATH="${.OBJDIR}" srcdir=. ./test-pngtest.sh ++ @LD_LIBRARY_PATH="${.OBJDIR}" ./test-pngvalid-simple.sh ++ @LD_LIBRARY_PATH="${.OBJDIR}" ./test-pngvalid-full.sh ++ beforeinstall: - if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \ @@ -65,24 +77,22 @@ $OpenBSD: patch-scripts_makefile_openbsd fi if [ ! -d ${DESTDIR}${LIBDIR} ]; then \ ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \ -@@ -56,21 +75,24 @@ beforeinstall: +@@ -61,22 +85,19 @@ beforeinstall: if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \ ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \ fi - if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \ -+ if [ ! -d ${DESTDIR}${DOCDIR} ]; then \ -+ ${INSTALL} -d -o root -g wheel ${DESTDIR}${DOCDIR}; \ - fi + if [ ! -d ${DESTDIR}${LIBDIR}/pkgconfig ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/pkgconfig; \ -+ fi + fi afterinstall: @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a - @rm -f ${DESTDIR}${PREFIX}/include/png.h - @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h +- @rm -f ${DESTDIR}${PREFIX}/include/pnglibconf.h @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true + ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \ + -m ${BINMODE} libpng-config ${DESTDIR}${BINDIR} @@ -91,9 +101,8 @@ $OpenBSD: patch-scripts_makefile_openbsd + -m ${NONBINMODE} ${HDRS} ${DESTDIR}${INCDIR} ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ - -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include -+ -m ${NONBINMODE} libpng.pc ${DESTDIR}${LIBDIR}/pkgconfig - ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ +- ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ - -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png -+ -m ${NONBINMODE} ${DOCS} ${DESTDIR}${DOCDIR} ++ -m ${NONBINMODE} libpng.pc ${DESTDIR}${LIBDIR}/pkgconfig .include <bsd.lib.mk> Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/graphics/png/pkg/PLIST,v retrieving revision 1.24 diff -u -p -r1.24 PLIST --- pkg/PLIST 23 Jun 2011 22:50:27 -0000 1.24 +++ pkg/PLIST 3 Jul 2011 17:41:09 -0000 @@ -4,11 +4,10 @@ bin/libpng-config include/libpng/ include/libpng/png.h include/libpng/pngconf.h +include/libpng/pnglibconf.h lib/libpng.a lib/pkgconfig/ lib/pkgconfig/libpng.pc @man man/man3/libpng.3 @man man/man3/libpngpf.3 @man man/man5/png.5 -share/doc/png/ -share/doc/png/libpng-${VERSION}.txt
Index: Makefile =================================================================== RCS file: /cvs/ports/graphics/png/Makefile,v retrieving revision 1.78 diff -u -p -r1.78 Makefile --- Makefile 1 Jul 2011 17:09:36 -0000 1.78 +++ Makefile 3 Jul 2011 17:40:53 -0000 @@ -2,11 +2,11 @@ COMMENT= library for manipulating PNG images -VERSION= 1.2.44 +VERSION= 1.5.2 DISTNAME= libpng-${VERSION} PKGNAME= png-${VERSION} -REVISION= 0 -SHARED_LIBS= png 10.0 +SHARED_LIBS= png 11.0 \ + png15 11.0 # 15.2 CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libpng/} @@ -18,14 +18,15 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -SUBST_VARS= VERSION +USE_LIBTOOL= Yes +CONFIGURE_STYLE=gnu +CONFIGURE_ARGS= ${CONFIGURE_SHARED} -FAKE_FLAGS= PREFIX="${PREFIX}" - -MAKE_ENV= CC="${CC}" -MAKE_FILE= scripts/makefile.openbsd -MAKE_FLAGS= SHLIB_MAJOR=${LIBpng_VERSION:R} \ - SHLIB_MINOR=${LIBpng_VERSION:E} \ - PNGLIB_VERSION=${VERSION} +post-install: + cd ${PREFIX}/lib; \ + if [ -f libpng15.so.${LIBpng15_VERSION} ]; then \ + ln -sf libpng15.so.${LIBpng15_VERSION} \ + libpng.so.${LIBpng_VERSION}; \ + fi .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/graphics/png/distinfo,v retrieving revision 1.26 diff -u -p -r1.26 distinfo --- distinfo 27 Jun 2010 19:55:04 -0000 1.26 +++ distinfo 3 Jul 2011 17:40:53 -0000 @@ -1,5 +1,5 @@ -MD5 (libpng-1.2.44.tar.gz) = ibYvjaruqxNC4wfW0UEf8Q== -RMD160 (libpng-1.2.44.tar.gz) = ZFgC0qiz+SyrYQVgTisZjkgyVPQ= -SHA1 (libpng-1.2.44.tar.gz) = d2u45C2GvXGuWODZb4VHLB1jvus= -SHA256 (libpng-1.2.44.tar.gz) = bVvgKh2QQL9OggXgbJ+2oHDI/ACFnZ4XKcTED/EB9n0= -SIZE (libpng-1.2.44.tar.gz) = 829035 +MD5 (libpng-1.5.2.tar.gz) = MdRI65OhZGNZoj8bI0NKsw== +RMD160 (libpng-1.5.2.tar.gz) = 0Rh51Y1si7849KZuUp5qs01KHMw= +SHA1 (libpng-1.5.2.tar.gz) = ccMLmyMWmi2sWwp3lU2dkfjZRP4= +SHA256 (libpng-1.5.2.tar.gz) = HtKBgQNI27YdAkZcDf+FTBe4JvXF12zOMrwOatygIVY= +SIZE (libpng-1.5.2.tar.gz) = 964261 Index: patches/patch-libpng_3 =================================================================== RCS file: patches/patch-libpng_3 diff -N patches/patch-libpng_3 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libpng_3 3 Jul 2011 17:40:53 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- libpng.3.orig Sun Jul 3 08:20:25 2011 ++++ libpng.3 Sun Jul 3 08:20:40 2011 +@@ -1122,7 +1122,7 @@ rebuilt from scripts/pnglibconf.dfa using awk or it mu + + Hand editing is achieved by copying scripts/pnglibconf.h.prebuilt and changing + the lines defining the supported features, paying very close attention to the +-'option' information in scripts/pnglibconf.dfa that describes those features and ++\&'option' information in scripts/pnglibconf.dfa that describes those features and + their requirements. This is easy to get wrong. + + B. Configuration using DFA_XTRA Index: patches/patch-pngconf_h =================================================================== RCS file: patches/patch-pngconf_h diff -N patches/patch-pngconf_h --- patches/patch-pngconf_h 23 Aug 2009 14:44:18 -0000 1.8 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,15 +0,0 @@ -$OpenBSD: patch-pngconf_h,v 1.8 2009/08/23 14:44:18 naddy Exp $ ---- pngconf.h.orig Thu Aug 13 13:13:21 2009 -+++ pngconf.h Sun Aug 23 16:21:58 2009 -@@ -40,6 +40,11 @@ - #endif - #endif - -+/* libpng compile time options */ -+#ifndef PNG_NO_MMX_CODE -+# define PNG_NO_MMX_CODE -+#endif -+ - /* - * Added at libpng-1.2.8 - * Index: patches/patch-pngerror_c =================================================================== RCS file: /cvs/ports/graphics/png/patches/patch-pngerror_c,v retrieving revision 1.5 diff -u -p -r1.5 patch-pngerror_c --- patches/patch-pngerror_c 1 Jul 2011 17:09:36 -0000 1.5 +++ patches/patch-pngerror_c 3 Jul 2011 17:40:53 -0000 @@ -6,9 +6,9 @@ libpng "png_format_buffer()" Denial of S From upstream git: http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng/libpng;a=commitdiff;h=65e6d5a34f49acdb362a0625a706c6b914e670af ---- pngerror.c.orig Fri Jul 1 19:07:03 2011 -+++ pngerror.c Fri Jul 1 19:07:42 2011 -@@ -181,8 +181,13 @@ png_format_buffer(png_structp png_ptr, png_charp buffe +--- pngerror.c.orig Thu Mar 31 18:23:40 2011 ++++ pngerror.c Sat Jul 2 22:05:06 2011 +@@ -185,8 +185,13 @@ png_format_buffer(png_structp png_ptr, png_charp buffe { buffer[iout++] = ':'; buffer[iout++] = ' '; @@ -23,4 +23,4 @@ http://libpng.git.sourceforge.net/git/gi + buffer[iout] = '\0'; } } - + #endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */ Index: patches/patch-scripts_libpng_pc_in =================================================================== RCS file: patches/patch-scripts_libpng_pc_in diff -N patches/patch-scripts_libpng_pc_in --- patches/patch-scripts_libpng_pc_in 27 Jun 2010 19:55:04 -0000 1.18 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ -$OpenBSD: patch-scripts_libpng_pc_in,v 1.18 2010/06/27 19:55:04 kili Exp $ ---- scripts/libpng.pc.in.orig Sat Jun 26 02:31:16 2010 -+++ scripts/libpng.pc.in Sun Jun 27 08:23:08 2010 -@@ -1,10 +1,10 @@ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ --includedir=@includedir@/libpng12 -+includedir=@includedir@ - - Name: libpng - Description: Loads and saves PNG files - Version: 1.2.44 --Libs: -L${libdir} -lpng12 -+Libs: -L${libdir} -lpng -lz -lm - Cflags: -I${includedir} Index: patches/patch-scripts_makefile_openbsd =================================================================== RCS file: patches/patch-scripts_makefile_openbsd diff -N patches/patch-scripts_makefile_openbsd --- patches/patch-scripts_makefile_openbsd 23 Jun 2011 22:50:27 -0000 1.32 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,99 +0,0 @@ -$OpenBSD: patch-scripts_makefile_openbsd,v 1.32 2011/06/23 22:50:27 naddy Exp $ ---- scripts/makefile.openbsd.orig Fri Jun 25 18:31:16 2010 -+++ scripts/makefile.openbsd Mon Jun 20 13:22:02 2011 -@@ -7,11 +7,12 @@ - # and license in png.h - - PREFIX?= /usr/local -+BINDIR= ${PREFIX}/bin - LIBDIR= ${PREFIX}/lib --MANDIR= ${PREFIX}/man/cat -+MANDIR= ${PREFIX}/man/man -+INCDIR= ${PREFIX}/include/libpng -+DOCDIR= ${PREFIX}/share/doc/png - --SHLIB_MAJOR= 0 --SHLIB_MINOR= 1.2.44 - - LIB= png - SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ -@@ -25,24 +26,42 @@ CPPFLAGS+= -I${.CURDIR} -DPNG_NO_MMX_CODE - - NOPROFILE= Yes - --CLEANFILES+= pngtest.o pngtest -+CLEANFILES+= pngtest.o pngtest libpng-config - - MAN= libpng.3 libpngpf.3 png.5 --DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO libpng.txt -+DOCS = libpng-1.2.44.txt - -+all: ${_LIBS} libpng-config libpng.pc -+ -+libpng.pc: -+ cat scripts/libpng.pc.in | sed -e s\!@prefix@!$(PREFIX)! \ -+ -e s\!@exec_prefix@!$(BINDIR)! -e s\!@libdir@!$(LIBDIR)! \ -+ -e s\!@includedir@!$(INCDIR)! \ -+ -e s\!@PNGLIB_VERSION@!$(PNGLIB_VERSION)!> libpng.pc -+ -+libpng-config: -+ ( cat scripts/libpng-config-head.in; \ -+ echo prefix=\"$(PREFIX)\"; \ -+ echo I_opts=\"-I$(INCDIR)\"; \ -+ echo L_opts=\"-L$(LIBDIR)\"; \ -+ echo R_opts=\"-Wl,-rpath,$(LIBDIR)\"; \ -+ echo libs=\"-lpng -lz -lm\"; \ -+ cat scripts/libpng-config-body.in ) > libpng-config -+ chmod +x libpng-config -+ - pngtest.o: pngtest.c - ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} - - pngtest: pngtest.o - ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm - --test: pngtest -+test regress: pngtest - cd ${.OBJDIR} && env \ - LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest - - beforeinstall: -- if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \ -- ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \ -+ if [ ! -d ${DESTDIR}${INCDIR} ]; then \ -+ ${INSTALL} -d -o root -g wheel ${DESTDIR}${INCDIR}; \ - fi - if [ ! -d ${DESTDIR}${LIBDIR} ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \ -@@ -56,21 +75,24 @@ beforeinstall: - if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \ - fi -- if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \ -- ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \ -+ if [ ! -d ${DESTDIR}${DOCDIR} ]; then \ -+ ${INSTALL} -d -o root -g wheel ${DESTDIR}${DOCDIR}; \ - fi -+ if [ ! -d ${DESTDIR}${LIBDIR}/pkgconfig ]; then \ -+ ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/pkgconfig; \ -+ fi - - afterinstall: - @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a - @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a -- @rm -f ${DESTDIR}${PREFIX}/include/png.h -- @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h - @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true -+ ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \ -+ -m ${BINMODE} libpng-config ${DESTDIR}${BINDIR} - ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ -- -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include -+ -m ${NONBINMODE} ${HDRS} ${DESTDIR}${INCDIR} - ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ -- -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include -+ -m ${NONBINMODE} libpng.pc ${DESTDIR}${LIBDIR}/pkgconfig - ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ -- -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png -+ -m ${NONBINMODE} ${DOCS} ${DESTDIR}${DOCDIR} - - .include <bsd.lib.mk> Index: pkg/PFRAG.shared =================================================================== RCS file: /cvs/ports/graphics/png/pkg/PFRAG.shared,v retrieving revision 1.15 diff -u -p -r1.15 PFRAG.shared --- pkg/PFRAG.shared 26 Dec 2005 22:33:17 -0000 1.15 +++ pkg/PFRAG.shared 3 Jul 2011 17:40:53 -0000 @@ -1,2 +1,3 @@ -@comment $OpenBSD: PFRAG.shared,v 1.15 2005/12/26 22:33:17 steven Exp $ +@comment $OpenBSD$ @lib lib/libpng.so.${LIBpng_VERSION} +@lib lib/libpng15.so.${LIBpng15_VERSION} Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/graphics/png/pkg/PLIST,v retrieving revision 1.24 diff -u -p -r1.24 PLIST --- pkg/PLIST 23 Jun 2011 22:50:27 -0000 1.24 +++ pkg/PLIST 3 Jul 2011 17:40:53 -0000 @@ -1,14 +1,21 @@ -@comment $OpenBSD: PLIST,v 1.24 2011/06/23 22:50:27 naddy Exp $ +@comment $OpenBSD$ %%SHARED%% bin/libpng-config -include/libpng/ -include/libpng/png.h -include/libpng/pngconf.h +bin/libpng15-config +include/libpng15/ +include/libpng15/png.h +include/libpng15/pngconf.h +include/libpng15/pnglibconf.h +include/png.h +include/pngconf.h +include/pnglibconf.h lib/libpng.a +lib/libpng.la +lib/libpng15.a +lib/libpng15.la lib/pkgconfig/ lib/pkgconfig/libpng.pc +lib/pkgconfig/libpng15.pc @man man/man3/libpng.3 @man man/man3/libpngpf.3 @man man/man5/png.5 -share/doc/png/ -share/doc/png/libpng-${VERSION}.txt