Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 2015 18:07:12 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r397627 - head/graphics/waifu2x-converter-cpp
Message-ID:  <201509231807.t8NI7C9L060973@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Wed Sep 23 18:07:11 2015
New Revision: 397627
URL: https://svnweb.freebsd.org/changeset/ports/397627

Log:
  graphics/waifu2x-converter-cpp: miscellaneous fixes
  
  - Add manpage from AUR package [1]
  - Update --version output to match reality
  - Strip bogus RPATH from installed files
  - Unbreak .png images under DOCSDIR after USES=dos2unix
  - Preserve w2xconv.h's mtime to avoid rebuild in consumers
  
  Suggested by:	@ctrlcctrlv on github [1]

Modified:
  head/graphics/waifu2x-converter-cpp/Makefile   (contents, props changed)
  head/graphics/waifu2x-converter-cpp/distinfo   (contents, props changed)

Modified: head/graphics/waifu2x-converter-cpp/Makefile
==============================================================================
--- head/graphics/waifu2x-converter-cpp/Makefile	Wed Sep 23 17:02:59 2015	(r397626)
+++ head/graphics/waifu2x-converter-cpp/Makefile	Wed Sep 23 18:07:11 2015	(r397627)
@@ -3,7 +3,12 @@
 PORTNAME=	waifu2x-converter-cpp
 DISTVERSION=	1.0.0-237
 DISTVERSIONSUFFIX=	-gca65c93
+PORTREVISION=	1
 CATEGORIES=	graphics
+MASTER_SITES=	https://aur.archlinux.org/cgit/aur.git/plain/:manpage
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
+		${PORTNAME:C/-.*//}.1.gz?h=${PORTNAME:C/-.*//}-git\&id=5c150a5:manpage
+EXTRACT_ONLY=	${DISTFILES:N*\:manpage:C/:.*//}
 
 MAINTAINER=	jbeich@FreeBSD.org
 COMMENT=	Scale and denoise images using convolutional neural networks
@@ -21,13 +26,16 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	tanakamura
 
 USES=		cmake compiler:c++11-lib dos2unix
+DOS2UNIX_GLOB=	*.cpp *.hpp
 CMAKE_ARGS=	-DOPENCV_PREFIX="${LOCALBASE}" \
-		-DOpenCL_LIBRARY="${LOCALBASE}/lib/libOpenCL.so"
+		-DOpenCL_LIBRARY="${LOCALBASE}/lib/libOpenCL.so" \
+		-DCMAKE_SKIP_RPATH=on # XXX use cmake install() instead
 CFLAGS+=	-D_GLIBCXX_USE_C99 -D_GLIBCXX_USE_C99_MATH_TR1 \
 		-D_DECLARE_C99_LDBL_MATH # XXX ports/193528
 LDFLAGS+=	-Wl,--as-needed # avoid overlinking (opencv deps)
 USE_LDCONFIG=	yes
 PLIST_FILES=	bin/${PORTNAME} \
+		man/man1/${PORTNAME}.1.gz \
 		include/w2xconv.h \
 		lib/libw2xc.so
 PORTDATA=	models_rgb
@@ -38,20 +46,30 @@ OPTIONS_DEFAULT=SIMD
 
 SIMD_CMAKE_OFF=	-DX86OPT=off
 
+post-extract:
+	@${GZCAT} ${_DISTDIR}/${DISTFILES:M*\:manpage:C/:.*//} \
+		>${WRKDIR}/${PORTNAME}.1
+
 post-patch:
 	@${REINPLACE_CMD} -e 's,-O2,,; /SYMBOL/s,-s,,' \
 		${WRKSRC}/CMakeLists.txt
 	@${REINPLACE_CMD} -e '/"models/s,","${DATADIR}/,' \
+		-e '/CmdLine/s,${PORTVERSION:R},${DISTVERSIONFULL},' \
 		${WRKSRC}/src/main.cpp
+	@${REINPLACE_CMD} -e 's,${PORTNAME:C/-.*//},${PORTNAME},' \
+		-e 's,\(version\) [^"]*,\1 ${DISTVERSIONFULL},' \
+		${WRKDIR}/${PORTNAME}.1
 
 pre-install:
 # XXX Fails on 9.x with error code 10
-	-(cd ${WRKSRC} && ./runtest)
+	-(cd ${WRKSRC} && LD_LIBRARY_PATH=. ./runtest)
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_MAN} ${WRKDIR}/${PORTNAME}.1 \
+		${STAGEDIR}${MAN1PREFIX}/man/man1
 	${INSTALL_LIB} ${WRKSRC}/libw2xc.so ${STAGEDIR}${PREFIX}/lib
-	${INSTALL_DATA} ${WRKSRC}/src/w2xconv.h ${STAGEDIR}${PREFIX}/include
+	${INSTALL_DATA} -p ${WRKSRC}/src/w2xconv.h ${STAGEDIR}${PREFIX}/include
 	(cd ${WRKSRC} && ${COPYTREE_SHARE} \
 		"${PORTDATA}" ${STAGEDIR}${DATADIR})
 

Modified: head/graphics/waifu2x-converter-cpp/distinfo
==============================================================================
--- head/graphics/waifu2x-converter-cpp/distinfo	Wed Sep 23 17:02:59 2015	(r397626)
+++ head/graphics/waifu2x-converter-cpp/distinfo	Wed Sep 23 18:07:11 2015	(r397627)
@@ -1,2 +1,4 @@
 SHA256 (tanakamura-waifu2x-converter-cpp-1.0.0-237-gca65c93_GH0.tar.gz) = 5b34ecc43a9c9f976ab92c72b1ba6f45b8470ea05bb976738e732c3c01290c8e
 SIZE (tanakamura-waifu2x-converter-cpp-1.0.0-237-gca65c93_GH0.tar.gz) = 14848013
+SHA256 (waifu2x.1.gz?h=waifu2x-git&id=5c150a5) = bfad3e87e43f20573ab068c386e150f93fb4cc37400b8f4aaf4734c9afbd1489
+SIZE (waifu2x.1.gz?h=waifu2x-git&id=5c150a5) = 1242



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509231807.t8NI7C9L060973>