mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
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
This commit is contained in:
parent
3267f99cb5
commit
ae16cb6f1b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=513943
4 changed files with 56 additions and 0 deletions
|
@ -1061,6 +1061,7 @@
|
|||
SUBDIR += vv
|
||||
SUBDIR += waffle
|
||||
SUBDIR += waifu2x-converter-cpp
|
||||
SUBDIR += waifu2x-ncnn-vulkan
|
||||
SUBDIR += wayland
|
||||
SUBDIR += wayland-protocols
|
||||
SUBDIR += waylandpp
|
||||
|
|
48
graphics/waifu2x-ncnn-vulkan/Makefile
Normal file
48
graphics/waifu2x-ncnn-vulkan/Makefile
Normal file
|
@ -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>
|
3
graphics/waifu2x-ncnn-vulkan/distinfo
Normal file
3
graphics/waifu2x-ncnn-vulkan/distinfo
Normal file
|
@ -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
|
4
graphics/waifu2x-ncnn-vulkan/pkg-descr
Normal file
4
graphics/waifu2x-ncnn-vulkan/pkg-descr
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue