Bug 186593 - [patch] graphics/png fails when CMAKE_NINJA is set
[patch] graphics/png fails when CMAKE_NINJA is set
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Dirk Meyer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-09 16:10 UTC by Adam Weinberger
Modified: 2014-02-14 18:11 UTC (History)
0 users

See Also:


Attachments
png.patch (646 bytes, patch)
2014-02-09 16:10 UTC, Adam Weinberger
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Weinberger freebsd_committer 2014-02-09 16:10:00 UTC
graphics/png fails when it's built with ninja. It dies while forcing you
to run the optional tests.

Fix: There are two possible fixes. The first is to use the attached patch,
which uses MAKE_CMD (which ninja.mk sets) instead of MAKE.

But the option I'd like to suggest is to stop forcing users to run the tests.
Just turn the post-build: into test: or wrap it in DEVELOPER or something.
Users are smart enough to figure out whether they want to waste cycles on
optional tests (hint: I bet they don't).
How-To-Repeat: 
[root@apnoea /usr/ports/BUILD/png] CMAKE_NINJA=yes make
===>  Building for png-1.5.17
ninja: no work to do.
make[2]: make[2]: don't know how to make test. Stop

make[2]: stopped in /usr/BUILD-ports/png/work/libpng-1.5.17
[: xTry: unexpected operator
*** Error code 1

Stop.
make[1]: stopped in /usr/BUILD-ports/png
*** Error code 1

Stop.
make: stopped in /usr/BUILD-ports/png
Comment 1 Edwin Groothuis freebsd_committer 2014-02-09 16:10:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter freebsd_committer 2014-02-14 14:47:52 UTC
Author: dinoex
Date: Fri Feb 14 14:47:44 2014
New Revision: 344216
URL: http://svnweb.freebsd.org/changeset/ports/344216
QAT: https://qat.redports.org/buildarchive/r344216/

Log:
  - update to 1.5.18
  - new option PNGTEST
  
  - support CMAKE_NINJA=yes
  PR:		186593
  Submitted by:	Adam Weinberger

Modified:
  head/graphics/png/Makefile
  head/graphics/png/distinfo

Modified: head/graphics/png/Makefile
==============================================================================
--- head/graphics/png/Makefile	Fri Feb 14 14:43:04 2014	(r344215)
+++ head/graphics/png/Makefile	Fri Feb 14 14:47:44 2014	(r344216)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	png
-PORTVERSION=	1.5.17
+PORTVERSION=	1.5.18
 CATEGORIES=	graphics
 MASTER_SITES=	SF/lib${PORTNAME}/lib${PORTNAME}15/${PORTVERSION}
 DISTNAME=	lib${PORTNAME}-${PORTVERSION}
@@ -21,26 +21,27 @@ USE_LDCONFIG=	yes
 CMAKE_ARGS+=	-DPNG_MAN_DIR:STRING=man
 SOSUFFIX=	.${PORTVERSION:E}
 
-OPTIONS_DEFINE=APNG
-OPTIONS_DEFAULT=APNG
+OPTIONS_DEFINE=APNG PNGTEST
+OPTIONS_DEFAULT=APNG PNGTEST
 APNG_DESC=Enable Animated PNG support
+PNGTEST_DESC=Enable Regression Test (recommended)
 
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MAPNG} || make(makesum) || defined(FETCH_ALL)
 MASTER_SITES+=	SF/apng/libpng/libpng15/:apng
 DISTFILES+=	${DISTNAME}-apng.patch.gz:apng
-EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
+EXTRACT_ONLY+=	${DISTNAME}${EXTRACT_SUFX}
 .endif
 .if ${PORT_OPTIONS:MAPNG}
-EXTRA_PATCHES=	${WRKSRC}/${DISTNAME}-apng.patch
+EXTRA_PATCHES+=	${WRKSRC}/${DISTNAME}-apng.unix
 .endif
 
 post-extract:
 .if ${PORT_OPTIONS:MAPNG}
-	@${LN} -sf ${WRKSRC} ${WRKSRC}/
 	${CP} ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}-apng.patch.gz ${WRKSRC}/
 	${GZIP_CMD} -d ${WRKSRC}/${DISTNAME}-apng.patch.gz
+	${TR} -d '\r' < ${WRKSRC}/${DISTNAME}-apng.patch > ${WRKSRC}/${DISTNAME}-apng.unix
 .endif
 
 post-patch:
@@ -49,14 +50,16 @@ post-patch:
 		-e 's|LIBDIR}/pkgconfig|LIBDIR}data/pkgconfig|' \
 		${WRKSRC}/CMakeLists.txt
 
+.if ${PORT_OPTIONS:MPNGTEST}
 post-build:
-	@(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} test; then \
+	(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${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)
+.endif
 
 pre-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/include/libpng

Modified: head/graphics/png/distinfo
==============================================================================
--- head/graphics/png/distinfo	Fri Feb 14 14:43:04 2014	(r344215)
+++ head/graphics/png/distinfo	Fri Feb 14 14:47:44 2014	(r344216)
@@ -1,4 +1,4 @@
-SHA256 (libpng-1.5.17.tar.xz) = 572631353d4ac12433765f7db55e824c2fd4b16019fa41d6738b5e92471292a7
-SIZE (libpng-1.5.17.tar.xz) = 721568
-SHA256 (libpng-1.5.17-apng.patch.gz) = 87e9bb553217d7be8c5eaadd3eeab8fb6eb185e7675bdf8b8363898b4abba9a0
-SIZE (libpng-1.5.17-apng.patch.gz) = 9510
+SHA256 (libpng-1.5.18.tar.xz) = c093c2f779fecb029e51b73d6d646b77edce882474326485f50347606e383585
+SIZE (libpng-1.5.18.tar.xz) = 730340
+SHA256 (libpng-1.5.18-apng.patch.gz) = 9b0d8edb61808e9863997055f7fbb1574877ff8aae50d477b9d97fcab65166b7
+SIZE (libpng-1.5.18-apng.patch.gz) = 9580
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Dirk Meyer freebsd_committer 2014-02-14 18:10:50 UTC
State Changed
From-To: open->closed

committed, thanks.