media-gfx/waifu2x-ncnn-vulkan-20200224: new package.
authorPiotr Karbowski <slashbeast@gentoo.org>
Sun, 29 Mar 2020 21:06:10 +0000 (23:06 +0200)
committerPiotr Karbowski <slashbeast@gentoo.org>
Sun, 29 Mar 2020 21:09:02 +0000 (23:09 +0200)
Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org>
media-gfx/waifu2x-ncnn-vulkan/Manifest [new file with mode: 0644]
media-gfx/waifu2x-ncnn-vulkan/metadata.xml [new file with mode: 0644]
media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20200224.ebuild [new file with mode: 0644]

diff --git a/media-gfx/waifu2x-ncnn-vulkan/Manifest b/media-gfx/waifu2x-ncnn-vulkan/Manifest
new file mode 100644 (file)
index 0000000..95bc6fd
--- /dev/null
@@ -0,0 +1 @@
+DIST waifu2x-ncnn-vulkan-20200224.tar.gz 34063828 BLAKE2B 9fa00abd31f0d81dd785be5253e44f5bd4082ae9b2fcae747562eb6c577fd7cccdfeaf7421d09c54119fd36285dffcc68d2889ddc06d1a6ddf47ea418066367e SHA512 13531a186817da99efb60fc0b16d0d3f455d0f2d2c9b4b53ddaedf7c50f622b2e5385e4f5dd29668cf845444b39645f0b7e810ab5084aa1e3ca6dbaf424a4e13
diff --git a/media-gfx/waifu2x-ncnn-vulkan/metadata.xml b/media-gfx/waifu2x-ncnn-vulkan/metadata.xml
new file mode 100644 (file)
index 0000000..7c9fd12
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>slashbeast@gentoo.org</email>
+               <name>Piotr Karbowski</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">nihui/waifu2x-ncnn-vulkan</remote-id>
+       </upstream>
+</pkgmetadata>
diff --git a/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20200224.ebuild b/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20200224.ebuild
new file mode 100644 (file)
index 0000000..bd150b3
--- /dev/null
@@ -0,0 +1,42 @@
+# 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
+       media-libs/vulkan-loader"
+
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+#S="${WORKDIR}/${P}/src"
+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_install() {
+       dobin "${BUILD_DIR}"/waifu2x-ncnn-vulkan
+
+       insinto "/usr/share/${PN}"
+       doins -r models/*
+}
+