summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Karbowski <slashbeast@gentoo.org>2020-08-30 20:26:39 +0200
committerPiotr Karbowski <slashbeast@gentoo.org>2020-08-30 20:27:41 +0200
commit7787ee8de60429997ffd7e3f03c043203c5f0f6e (patch)
treee600b36f74bdf8ee5dd951a91fc3b7123962fb4b /media-gfx/waifu2x-ncnn-vulkan
parentdev-libs/ncnn: 20200727 bump (diff)
downloadgentoo-7787ee8de60429997ffd7e3f03c043203c5f0f6e.tar.gz
gentoo-7787ee8de60429997ffd7e3f03c043203c5f0f6e.tar.bz2
gentoo-7787ee8de60429997ffd7e3f03c043203c5f0f6e.zip
media-gfx/waifu2x-ncnn-vulkan: 20200818 bump
Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org>
Diffstat (limited to 'media-gfx/waifu2x-ncnn-vulkan')
-rw-r--r--media-gfx/waifu2x-ncnn-vulkan/Manifest1
-rw-r--r--media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20200818.ebuild51
2 files changed, 52 insertions, 0 deletions
diff --git a/media-gfx/waifu2x-ncnn-vulkan/Manifest b/media-gfx/waifu2x-ncnn-vulkan/Manifest
index 0bfe764ae8b8..25add50da392 100644
--- a/media-gfx/waifu2x-ncnn-vulkan/Manifest
+++ b/media-gfx/waifu2x-ncnn-vulkan/Manifest
@@ -1,2 +1,3 @@
DIST waifu2x-ncnn-vulkan-20200224.tar.gz 34063828 BLAKE2B 9fa00abd31f0d81dd785be5253e44f5bd4082ae9b2fcae747562eb6c577fd7cccdfeaf7421d09c54119fd36285dffcc68d2889ddc06d1a6ddf47ea418066367e SHA512 13531a186817da99efb60fc0b16d0d3f455d0f2d2c9b4b53ddaedf7c50f622b2e5385e4f5dd29668cf845444b39645f0b7e810ab5084aa1e3ca6dbaf424a4e13
DIST waifu2x-ncnn-vulkan-20200414.tar.gz 34063752 BLAKE2B eb52cc3cf857bdb428497acf8721d51abd6e067b4ae2f126833dfcf8402eae118cfa112b310b366e3e945b871b8c3306e5d826426c43e66b6e1055729644f222 SHA512 c0c5d40fdbf0b643b589d5bca5460ec59fbf38ede33af510c4b30b3211f18cd44d665980a11c13ee922cacf7a05d89b076078bcb8fa59c0523ad6b985a804d97
+DIST waifu2x-ncnn-vulkan-20200818.tar.gz 34073325 BLAKE2B 125c0b975e6aab20fc20563c1edc669a4741779366f9aff20d0f695f56f29d0e1728c1fd1130cdaf4adb6a2c8dad348e262580702519004581b2055ae38ac315 SHA512 6f40885fd91cde3206198da3bf2103d1867a8f35549340cc697819dea2b3e06932203a95a7fda2c636658b40fdc1d3f0f4c4e3e13ba142f9a8ad8475ff1b8f58
diff --git a/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20200818.ebuild b/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20200818.ebuild
new file mode 100644
index 000000000000..028da39f4e2d
--- /dev/null
+++ b/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20200818.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="waifu2x converter using ncnn and vulkan"
+HOMEPAGE="https://github.com/nihui/waifu2x-ncnn-vulkan"
+
+SRC_URI="https://github.com/nihui/waifu2x-ncnn-vulkan/archive/${PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+
+DEPEND="
+ >=dev-libs/ncnn-20200727
+ media-libs/vulkan-loader
+ media-libs/libwebp
+ dev-util/glslang"
+
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+CMAKE_USE_DIR="${S}/src"
+
+src_prepare() {
+ # Make finding models actually possible.
+ sed -i 's|path_t model = PATHSTR("models-cunet")|path_t model = PATHSTR("/usr/share/waifu2x-ncnn-vulkan/models-cunet")|' src/main.cpp
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DUSE_SYSTEM_NCNN=ON"
+ "-DUSE_SYSTEM_WEBP=ON"
+ "-DGLSLANG_TARGET_DIR=${EPREFIX}/usr/$(get_libdir)/cmake"
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ dobin "${BUILD_DIR}"/waifu2x-ncnn-vulkan
+
+ insinto "/usr/share/${PN}"
+ doins -r models/*
+}