aboutsummaryrefslogtreecommitdiff
path: root/graphics/png/Makefile
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2012-06-01 05:26:28 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2012-06-01 05:26:28 +0000
commit2b74a89bc8342f0b9b737c37d87737caf7b0ea1e (patch)
treec04604583d8be53b3ed7f10975be828c731f87cb /graphics/png/Makefile
parent24315159daa0089f08acea4ba1b130fb6721ad5c (diff)
downloadports-2b74a89bc8342f0b9b737c37d87737caf7b0ea1e.tar.gz
ports-2b74a89bc8342f0b9b737c37d87737caf7b0ea1e.zip
Notes
Diffstat (limited to 'graphics/png/Makefile')
-rw-r--r--graphics/png/Makefile53
1 files changed, 33 insertions, 20 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>