Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Oct 2019 12:58:04 +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: r513943 - in head/graphics: . waifu2x-ncnn-vulkan
Message-ID:  <201910071258.x97Cw4s9016405@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Mon Oct  7 12:58:04 2019
New Revision: 513943
URL: https://svnweb.freebsd.org/changeset/ports/513943

Log:
  graphics/waifu2x-ncnn-vulkan: add new port
  
  ncnn implementation of waifu2x converter. Runs fast on Intel / AMD /
  Nvidia with Vulkan API.
  
  https://github.com/nihui/waifu2x-ncnn-vulkan

Added:
  head/graphics/waifu2x-ncnn-vulkan/
  head/graphics/waifu2x-ncnn-vulkan/Makefile   (contents, props changed)
  head/graphics/waifu2x-ncnn-vulkan/distinfo   (contents, props changed)
  head/graphics/waifu2x-ncnn-vulkan/pkg-descr   (contents, props changed)
Modified:
  head/graphics/Makefile   (contents, props changed)

Modified: head/graphics/Makefile
==============================================================================
--- head/graphics/Makefile	Mon Oct  7 12:27:40 2019	(r513942)
+++ head/graphics/Makefile	Mon Oct  7 12:58:04 2019	(r513943)
@@ -1061,6 +1061,7 @@
     SUBDIR += vv
     SUBDIR += waffle
     SUBDIR += waifu2x-converter-cpp
+    SUBDIR += waifu2x-ncnn-vulkan
     SUBDIR += wayland
     SUBDIR += wayland-protocols
     SUBDIR += waylandpp

Added: head/graphics/waifu2x-ncnn-vulkan/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/waifu2x-ncnn-vulkan/Makefile	Mon Oct  7 12:58:04 2019	(r513943)
@@ -0,0 +1,48 @@
+# $FreeBSD$
+
+PORTNAME=	waifu2x-ncnn-vulkan
+DISTVERSION=	20190712-5
+DISTVERSIONSUFFIX=	-g1c705b3
+CATEGORIES=	graphics
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Scale and denoise images using convolutional neural networks
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	glslangValidator:devel/glslang \
+		${LOCALBASE}/include/vulkan/vulkan.h:devel/vulkan-headers \
+		${LOCALBASE}/lib/libvulkan.so:graphics/vulkan-loader \
+		${LOCALBASE}/lib/libncnn.a:science/ncnn
+
+USES=		cmake compiler:${OPENMP}c++11-lib
+USE_GITHUB=	yes
+GH_ACCOUNT=	nihui
+CMAKE_SOURCE_PATH=	${WRKSRC}/src
+LDFLAGS+=	-lpthread # XXX Convert ncnn to shared library
+PLIST_FILES=	bin/${PORTNAME}
+PORTDATA=	*
+
+.if !exists(/usr/include/omp.h)
+# XXX ports/199603 + ports/210337
+OPENMP=		gcc-
+.endif
+
+pre-configure:
+	@if ${GREP} -q 'NCNN_VULKAN.*0' ${LOCALBASE}/include/ncnn/platform.h; then \
+		${ECHO_MSG} "${PKGNAME}: Needs ncnn built with VULKAN enabled."; \
+		return 1; \
+	fi
+
+post-patch:
+	@${REINPLACE_CMD} -e '/PATHSTR/s,models-,${DATADIR}/&,' \
+		${WRKSRC}/src/main.cpp
+
+do-install:
+	${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} \
+		${STAGEDIR}${PREFIX}/bin
+	(cd ${WRKSRC}/models && ${COPYTREE_SHARE} "${PORTDATA}" \
+		${STAGEDIR}${DATADIR})
+
+.include <bsd.port.mk>

Added: head/graphics/waifu2x-ncnn-vulkan/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/waifu2x-ncnn-vulkan/distinfo	Mon Oct  7 12:58:04 2019	(r513943)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1568475940
+SHA256 (nihui-waifu2x-ncnn-vulkan-20190712-5-g1c705b3_GH0.tar.gz) = d16c65620a3a67e4729f5673aaa6ec4bcc7add681acd11ffde0cb459ebefcc83
+SIZE (nihui-waifu2x-ncnn-vulkan-20190712-5-g1c705b3_GH0.tar.gz) = 28917017

Added: head/graphics/waifu2x-ncnn-vulkan/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/waifu2x-ncnn-vulkan/pkg-descr	Mon Oct  7 12:58:04 2019	(r513943)
@@ -0,0 +1,4 @@
+ncnn implementation of waifu2x converter. Runs fast on Intel / AMD /
+Nvidia with Vulkan API.
+
+WWW: https://github.com/nihui/waifu2x-ncnn-vulkan



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