diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2012-06-01 05:26:28 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2012-06-01 05:26:28 +0000 |
commit | 2b74a89bc8342f0b9b737c37d87737caf7b0ea1e (patch) | |
tree | c04604583d8be53b3ed7f10975be828c731f87cb /graphics/png | |
parent | 24315159daa0089f08acea4ba1b130fb6721ad5c (diff) | |
download | ports-2b74a89bc8342f0b9b737c37d87737caf7b0ea1e.tar.gz ports-2b74a89bc8342f0b9b737c37d87737caf7b0ea1e.zip |
- update png to 1.5.10
Notes
Notes:
svn path=/head/; revision=297915
Diffstat (limited to 'graphics/png')
-rw-r--r-- | graphics/png/Makefile | 53 | ||||
-rw-r--r-- | graphics/png/distinfo | 8 | ||||
-rw-r--r-- | graphics/png/files/patch-libpng.pc.in | 18 | ||||
-rw-r--r-- | graphics/png/files/patch-makefile.freebsd | 14 | ||||
-rw-r--r-- | graphics/png/files/patch-pngrutil.c | 20 | ||||
-rw-r--r-- | graphics/png/pkg-plist | 34 |
6 files changed, 64 insertions, 83 deletions
diff --git a/graphics/png/Makefile b/graphics/png/Makefile index 02145532f074..4ef14f656bf2 100644 --- a/graphics/png/Makefile +++ b/graphics/png/Makefile @@ -6,9 +6,9 @@ # PORTNAME= png -PORTVERSION= 1.4.11 +PORTVERSION= 1.5.10 CATEGORIES= graphics -MASTER_SITES= SF/lib${PORTNAME}/lib${PORTNAME}14/${PORTVERSION} +MASTER_SITES= SF/lib${PORTNAME}/lib${PORTNAME}15/${PORTVERSION} DISTNAME= lib${PORTNAME}-${PORTVERSION} DISTFILES= ${DISTNAME}${EXTRACT_SUFX} @@ -18,50 +18,63 @@ COMMENT= Library for manipulating PNG images MAKE_JOBS_SAFE= yes USE_XZ= yes +GNU_CONFIGURE= yes +USE_CMAKE= yes USE_LDCONFIG= yes -MAKEFILE= ${WRKSRC}/scripts/makefile.freebsd -ALL_TARGET= all libpng-config test -MAKE_FLAGS= ccopts="${CFLAGS}" ldopts="${LDFLAGS}" -f SHLIB_VER= 6 -MAKE_ENV= SHLIB_VER="${SHLIB_VER}" -PLIST_SUB= SHLIB_VER="${SHLIB_VER}" +CMAKE_ARGS+= -DPNG_MAN_DIR:STRING=man MAN3= libpng.3 libpngpf.3 MAN5= png.5 -MANCOMPRESSED= maybe OPTIONS= APNG "Animated PNG support" On -APNGDISTNAME= ${DISTNAME}-apng.patch - .include <bsd.port.pre.mk> .if !defined(WITHOUT_APNG) || make(makesum) || defined(FETCH_ALL) -MASTER_SITES+= SF/apng/libpng/libpng14:apng -DISTFILES+= ${APNGDISTNAME}.gz:apng +MASTER_SITES+= SF/lib${PORTNAME}-apng/libpng15/${PORTVERSION}:apng +DISTFILES+= ${DISTNAME}-apng.patch.gz:apng EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} .endif .if !defined(WITHOUT_APNG) -EXTRA_PATCHES= ${WRKSRC}/${APNGDISTNAME} +EXTRA_PATCHES= ${WRKSRC}/${DISTNAME}-apng.patch .endif post-extract: .if !defined(WITHOUT_APNG) @${LN} -sf ${WRKSRC} ${WRKSRC}/ - ${CP} ${DISTDIR}/${DIST_SUBDIR}/${APNGDISTNAME}.gz ${WRKSRC}/ - ${GZIP_CMD} -d ${WRKSRC}/${APNGDISTNAME}.gz + ${CP} ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}-apng.patch.gz ${WRKSRC}/ + ${GZIP_CMD} -d ${WRKSRC}/${DISTNAME}-apng.patch.gz .endif +post-patch: + ${REINPLACE_CMD} \ + -e 's|RELEASE}.0|RELEASE}|' \ + -e 's|LIBDIR}/pkgconfig|LIBDIR}data/pkgconfig|' \ + ${WRKSRC}/CMakeLists.txt + +post-build: + @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} test; then \ + if [ x != x${BUILD_FAIL_MESSAGE} ] ; then \ + ${ECHO_MSG} "===> Compilation failed unexpectedly."; \ + (${ECHO_CMD} ${BUILD_FAIL_MESSAGE}) | ${FMT} 75 79 ; \ + fi; \ + ${FALSE}; \ + fi) + pre-su-install: @${MKDIR} ${PREFIX}/include/libpng @${MKDIR} ${PREFIX}/libdata/pkgconfig post-install: - ${SED} -e 's|@PREFIX@|${PREFIX}|' ${WRKSRC}/scripts/libpng.pc.in \ - > ${WRKSRC}/scripts/libpng.pc - ${INSTALL_DATA} ${WRKSRC}/scripts/libpng.pc \ - ${PREFIX}/libdata/pkgconfig/libpng14.pc - ${LN} -sf libpng14.pc ${PREFIX}/libdata/pkgconfig/libpng.pc + ${INSTALL_DATA} ${WRKSRC}/pngdebug.h ${WRKSRC}/pnginfo.h \ + ${WRKSRC}/pngpriv.h ${WRKSRC}/pngstruct.h \ + ${PREFIX}/include/libpng15/ + ${RMDIR} ${PREFIX}/include/libpng + ${RM} ${PREFIX}/libdata/pkgconfig/libpng.pc + ${LN} -sf libpng15.pc ${PREFIX}/libdata/pkgconfig/libpng.pc + ${RM} ${PREFIX}/lib/libpng15.so.15 + ${MV} ${PREFIX}/lib/libpng15.so.15.10 ${PREFIX}/lib/libpng15.so.15 .include <bsd.port.post.mk> diff --git a/graphics/png/distinfo b/graphics/png/distinfo index 1ea447a092b1..f6630fe54659 100644 --- a/graphics/png/distinfo +++ b/graphics/png/distinfo @@ -1,4 +1,4 @@ -SHA256 (libpng-1.4.11.tar.xz) = 4200ca1c758ffda2a85af573bf057bbe00f209d6d1b8e2d7d75ace38115e5eb1 -SIZE (libpng-1.4.11.tar.xz) = 548088 -SHA256 (libpng-1.4.11-apng.patch.gz) = 4e697de6d5fd87231aaee5055f17c3de1fd61c19757f5506f3e6239277fced91 -SIZE (libpng-1.4.11-apng.patch.gz) = 9199 +SHA256 (libpng-1.5.10.tar.xz) = dd49c39710a6ef8a550923ba17d3496b08ce769e47122d9150df4763bf49605d +SIZE (libpng-1.5.10.tar.xz) = 702752 +SHA256 (libpng-1.5.10-apng.patch.gz) = 0464b2df97853c426f35f97d12800b4dcb5760fc4c787fc4987ae0fb870a997f +SIZE (libpng-1.5.10-apng.patch.gz) = 10127 diff --git a/graphics/png/files/patch-libpng.pc.in b/graphics/png/files/patch-libpng.pc.in deleted file mode 100644 index 372f46391835..000000000000 --- a/graphics/png/files/patch-libpng.pc.in +++ /dev/null @@ -1,18 +0,0 @@ ---- scripts/libpng.pc.in.orig 2009-12-03 02:46:02.000000000 +0100 -+++ scripts/libpng.pc.in 2010-01-12 13:49:36.000000000 +0100 -@@ -1,10 +1,10 @@ --prefix=@prefix@ --exec_prefix=@exec_prefix@ --libdir=@libdir@ --includedir=@includedir@/libpng14 -+prefix=@PREFIX@ -+exec_prefix=${prefix} -+libdir=${exec_prefix}/lib -+includedir=${prefix}/include/libpng - - Name: libpng - Description: Loads and saves PNG files - Version: 1.4.11 --Libs: -L${libdir} -lpng14 -+Libs: -L${libdir} -lpng -lz -lm - Cflags: -I${includedir} diff --git a/graphics/png/files/patch-makefile.freebsd b/graphics/png/files/patch-makefile.freebsd index d81023af2185..e35f35b313ba 100644 --- a/graphics/png/files/patch-makefile.freebsd +++ b/graphics/png/files/patch-makefile.freebsd @@ -1,5 +1,5 @@ ---- scripts/makefile.freebsd.orig 2010-01-03 06:05:38.000000000 +0100 -+++ scripts/makefile.freebsd 2010-01-18 13:25:13.000000000 +0100 +--- scripts/makefile.freebsd.orig 2011-01-06 14:02:38.000000000 +0100 ++++ scripts/makefile.freebsd 2011-01-07 11:16:17.000000000 +0100 @@ -11,17 +11,17 @@ LIB= png SHLIB_MAJOR= ${SHLIB_VER} @@ -14,7 +14,7 @@ -LIBDIR= /lib +#DESTDIR= ${PREFIX} +LIBDIR= ${PREFIX}/lib - INCS= png.h pngconf.h pngpriv.h + INCS= png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h -INCSDIR= /include/libpng +INCSDIR= ${PREFIX}/include/libpng INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk @@ -22,9 +22,9 @@ -MANDIR= /man/man +MANDIR= ${PREFIX}/man/man SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \ - libpng/pngconf.h ${INCSDIR}/../pngconf.h - LDADD+= -lm -lz -@@ -45,4 +45,22 @@ + libpng/pngconf.h ${INCSDIR}/../pngconf.h \ + libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h +@@ -50,4 +50,22 @@ writelock: chmod a-w *.[ch35] $(DOCS) scripts/* @@ -44,6 +44,6 @@ +beforeinstall: libpng-config + ${BSD_INSTALL_SCRIPT} \ + libpng-config ${PREFIX}/bin -+ ln -sf libpng-config ${PREFIX}/bin/libpng14-config ++ ln -sf libpng-config ${PREFIX}/bin/libpng15-config + .include <bsd.lib.mk> diff --git a/graphics/png/files/patch-pngrutil.c b/graphics/png/files/patch-pngrutil.c deleted file mode 100644 index 677cbfd3919b..000000000000 --- a/graphics/png/files/patch-pngrutil.c +++ /dev/null @@ -1,20 +0,0 @@ ----pngrutil.c.orig 2012/02/10 19:43:42 121491 -+++ pngrutil.c 2012/02/10 19:45:46 121492 -@@ -363,8 +363,15 @@ - { - /* Success (maybe) - really uncompress the chunk. */ - png_size_t new_size = 0; -- png_charp text = png_malloc_warn(png_ptr, -- prefix_size + expanded_size + 1); -+ png_charp text = NULL; -+ /* Need to check for both truncation (64-bit platforms) and integer -+ * overflow. -+ */ -+ if (prefix_size + expanded_size > prefix_size && -+ prefix_size + expanded_size < 0xffffffffU) -+ { -+ text = png_malloc_warn(png_ptr, prefix_size + expanded_size + 1); -+ } - - if (text != NULL) - { diff --git a/graphics/png/pkg-plist b/graphics/png/pkg-plist index 8dcab4dfa031..9bc30bd4dc93 100644 --- a/graphics/png/pkg-plist +++ b/graphics/png/pkg-plist @@ -1,17 +1,23 @@ -@unexec rm -f %D/bin/libpng14-config bin/libpng-config -@exec ln -sf %f %D/bin/libpng14-config -include/libpng/png.h -@exec ln -sf libpng/%f %D/include/%f -@unexec rm -f %D/include/%f -include/libpng/pngconf.h -@exec ln -sf libpng/%f %D/include/%f -@unexec rm -f %D/include/%f -include/libpng/pngpriv.h +bin/libpng15-config +include/libpng15/png.h +include/libpng15/pngconf.h +include/libpng15/pngdebug.h +include/libpng15/pnginfo.h +include/libpng15/pnglibconf.h +include/libpng15/pngpriv.h +include/libpng15/pngstruct.h +include/png.h +include/pngconf.h +include/pnglibconf.h lib/libpng.a lib/libpng.so -lib/libpng.so.%%SHLIB_VER%% -libdata/pkgconfig/libpng14.pc -@exec ln -sf %f %D/libdata/pkgconfig/libpng.pc -@unexec rm -f %D/libdata/pkgconfig/libpng.pc -@dirrm include/libpng +libdata/pkgconfig/libpng15.pc +libdata/pkgconfig/libpng.pc +lib/libpng/libpng15-release.cmake +lib/libpng/libpng15.cmake +lib/libpng15.a +lib/libpng15.so +lib/libpng15.so.15 +@dirrm lib/libpng +@dirrm include/libpng15 |