aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2022-04-24 08:46:32 +0000
committerJan Beich <jbeich@FreeBSD.org>2022-11-30 16:34:05 +0000
commitb48ee7fe13b1543c3bd2bb6e8af8e6912e926e73 (patch)
treefe05e47718258f148f5beb4721d6167d9bc2614f
parentfb6a9af3e898ad5476fbd13b1e5dd8be9aab865b (diff)
downloadports-b48ee7fe13b1543c3bd2bb6e8af8e6912e926e73.tar.gz
ports-b48ee7fe13b1543c3bd2bb6e8af8e6912e926e73.zip
graphics/realesrgan-ncnn-vulkan: add new port
ncnn implementation of Real-ESRGAN, a practical algorithm for general image restoration. https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/realesrgan-ncnn-vulkan/Makefile47
-rw-r--r--graphics/realesrgan-ncnn-vulkan/distinfo9
-rw-r--r--graphics/realesrgan-ncnn-vulkan/pkg-descr2
4 files changed, 59 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index 885c539e19c1..80d1cfd9fe2b 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -993,6 +993,7 @@
SUBDIR += rawtherapee
SUBDIR += rayshade
SUBDIR += reactphysics3d
+ SUBDIR += realesrgan-ncnn-vulkan
SUBDIR += reallyslick
SUBDIR += realsr-ncnn-vulkan
SUBDIR += recastnavigation
diff --git a/graphics/realesrgan-ncnn-vulkan/Makefile b/graphics/realesrgan-ncnn-vulkan/Makefile
new file mode 100644
index 000000000000..2da566f44549
--- /dev/null
+++ b/graphics/realesrgan-ncnn-vulkan/Makefile
@@ -0,0 +1,47 @@
+PORTNAME= realesrgan-ncnn-vulkan
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.2.0
+CATEGORIES= graphics
+# https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan/issues/29
+MASTER_SITES= https://dev.gentoo.org/~slashbeast/distfiles/${PORTNAME}/:models
+DISTFILES= Real-ESRGAN-v0.2.5.0-models.tar.xz:models
+
+MAINTAINER= jbeich@FreeBSD.org
+COMMENT= Scale and denoise images using convolutional neural networks
+WWW= https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= glslangValidator:graphics/glslang \
+ vulkan-headers>0:graphics/vulkan-headers
+LIB_DEPENDS= libwebp.so:graphics/webp \
+ libvulkan.so:graphics/vulkan-loader
+
+USES= cmake compiler:${OPENMP}c++11-lib
+USE_GITHUB= yes
+GH_ACCOUNT= xinntao
+GH_PROJECT= Real-ESRGAN-ncnn-vulkan
+GH_TUPLE= KhronosGroup:glslang:11.1.0-44-g4afd6917:glslang/src/ncnn/glslang \
+ Tencent:ncnn:20220420-5-g6125c9f4:ncnn/src/ncnn
+CMAKE_SOURCE_PATH= ${WRKSRC}/src
+CMAKE_ON= USE_SYSTEM_WEBP
+PLIST_FILES= bin/${PORTNAME}
+PORTDATA= models*
+
+.if !exists(/usr/include/omp.h)
+# XXX ports/199603: LLVM openmp in base doesn't support armv6, armv7 yet
+OPENMP= gcc-
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e '/PATHSTR/s,models,${DATADIR}/&,' \
+ ${WRKSRC}/src/main.cpp
+
+do-install:
+ ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} \
+ ${STAGEDIR}${PREFIX}/bin
+ (cd ${WRKDIR} && ${COPYTREE_SHARE} "${PORTDATA}" \
+ ${STAGEDIR}${DATADIR})
+
+.include <bsd.port.mk>
diff --git a/graphics/realesrgan-ncnn-vulkan/distinfo b/graphics/realesrgan-ncnn-vulkan/distinfo
new file mode 100644
index 000000000000..0fa02634e893
--- /dev/null
+++ b/graphics/realesrgan-ncnn-vulkan/distinfo
@@ -0,0 +1,9 @@
+TIMESTAMP = 1650789992
+SHA256 (Real-ESRGAN-v0.2.5.0-models.tar.xz) = 1c858d2d0a0500735852c0559bf29e868aae5dbd1aff7f5900688701bee1264a
+SIZE (Real-ESRGAN-v0.2.5.0-models.tar.xz) = 39195532
+SHA256 (xinntao-Real-ESRGAN-ncnn-vulkan-v0.2.0_GH0.tar.gz) = 346663b1924b2a1bfa655d656bfbba6b09f76ff75e4eee9d1fff4bfdef8b5712
+SIZE (xinntao-Real-ESRGAN-ncnn-vulkan-v0.2.0_GH0.tar.gz) = 138744
+SHA256 (KhronosGroup-glslang-11.1.0-44-g4afd6917_GH0.tar.gz) = 5ec414384bafcac14d096ca20205f811b61caf287ea1f7c30745735e7f483ae6
+SIZE (KhronosGroup-glslang-11.1.0-44-g4afd6917_GH0.tar.gz) = 3296291
+SHA256 (Tencent-ncnn-20220420-5-g6125c9f4_GH0.tar.gz) = 418e27336f405b35748ddc7e4588f4b449369e727dae119a45b332eca0fc6dcc
+SIZE (Tencent-ncnn-20220420-5-g6125c9f4_GH0.tar.gz) = 12160283
diff --git a/graphics/realesrgan-ncnn-vulkan/pkg-descr b/graphics/realesrgan-ncnn-vulkan/pkg-descr
new file mode 100644
index 000000000000..1315733fcd65
--- /dev/null
+++ b/graphics/realesrgan-ncnn-vulkan/pkg-descr
@@ -0,0 +1,2 @@
+ncnn implementation of Real-ESRGAN, a practical algorithm for general
+image restoration.