2019-10-07 14:58:04 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= waifu2x-ncnn-vulkan
|
2020-05-30 09:14:42 +02:00
|
|
|
DISTVERSION= 20200530
|
2019-10-07 14:58:04 +02:00
|
|
|
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 \
|
2020-05-30 09:14:42 +02:00
|
|
|
vulkan-headers>0:devel/vulkan-headers
|
|
|
|
LIB_DEPENDS= libwebpdecoder.so:graphics/webp \
|
|
|
|
libvulkan.so:graphics/vulkan-loader
|
2019-10-07 14:58:04 +02:00
|
|
|
|
2020-05-30 09:14:42 +02:00
|
|
|
USES= cmake compiler:${OPENMP}c++11-lib localbase:ldflags
|
2019-10-07 14:58:04 +02:00
|
|
|
USE_GITHUB= yes
|
|
|
|
GH_ACCOUNT= nihui
|
2020-05-30 09:14:42 +02:00
|
|
|
GH_TUPLE= KhronosGroup:glslang:8.13.3743-39-gd39b8afc:glslang/src/ncnn/glslang \
|
|
|
|
Tencent:ncnn:20200413-74-g15111fa:ncnn/src/ncnn
|
2019-10-07 14:58:04 +02:00
|
|
|
CMAKE_SOURCE_PATH= ${WRKSRC}/src
|
|
|
|
PLIST_FILES= bin/${PORTNAME}
|
|
|
|
PORTDATA= *
|
|
|
|
|
|
|
|
.if !exists(/usr/include/omp.h)
|
2020-03-08 22:55:54 +01:00
|
|
|
# XXX ports/199603: LLVM openmp in base doesn't support aarch64, armv6, armv7 yet
|
2019-10-07 14:58:04 +02:00
|
|
|
OPENMP= gcc-
|
|
|
|
.endif
|
|
|
|
|
2020-05-30 09:14:42 +02:00
|
|
|
post-extract:
|
|
|
|
@${ECHO_CMD} >${WRKSRC}/src/libwebp/CMakeLists.txt
|
2019-10-07 14:58:04 +02:00
|
|
|
|
|
|
|
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>
|