mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
media-gfx/waifu2x-ncnn-vulkan: add 20250504
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST waifu2x-ncnn-vulkan-20220728.tar.gz 34076924 BLAKE2B 6ed310d57af52286a288b151f67a989ac41f8e248b2ad5f05392781a429c9f0ff1d79e8816c8c464cb5686692c2b4fe5dc2d50c4fc713a4887d044ee3cfda199 SHA512 ea17cbbcb7318586793222c6c7139f67395c49c567b601969b829fc426eb517308509b7c1da69171fcbf8e68baa5cec3e52e98159e3c5e6c35ce47a8514dadb7
|
||||
DIST waifu2x-ncnn-vulkan-20250504.tar.gz 34076915 BLAKE2B faac7a57062d240c32aa4bd45a2bda1183c91eaf1c67601476981f59f5540f888c5d2ad6328b48dddc1a03e300a3fe776920b477288dcb6ccf131e270459608f SHA512 174ac15420eb2b39477fecfb13b9ac328cec7328ffeb29e46d574c1852645b82688d6276443d4c2490e05766deea4c1f7513873875608a5ed992fffbaa8f8e16
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
Build system tries to get ncnn's dependencies and link with them
|
||||
likely(?) expecting a static ncnn. These checks have caused issues
|
||||
before [1] and even if that was fixed, there is no reason to do
|
||||
this and DEPEND for nothing.
|
||||
|
||||
Cannot do -DUSE_SYSTEM_NCNN=no given there is another condition
|
||||
using that that we do need.
|
||||
|
||||
[1] https://bugs.gentoo.org/922512
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -53,3 +53,3 @@
|
||||
|
||||
-if(USE_SYSTEM_NCNN)
|
||||
+if(0)
|
||||
find_package(Threads)
|
||||
@@ -0,0 +1,55 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
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"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/ncnn:=[vulkan]
|
||||
media-libs/libwebp:=
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
dev-util/glslang
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-20210521-no-lto.patch
|
||||
"${FILESDIR}"/${PN}-20250504-shared-ncnn.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
CMAKE_USE_DIR=${S}/src
|
||||
cmake_src_prepare
|
||||
|
||||
# match the models path that is used in src_install
|
||||
sed -e "/PATHSTR\|model path/s|models-|${EPREFIX}/usr/share/${PN}/models-|" \
|
||||
-i src/main.cpp || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DUSE_SYSTEM_NCNN=yes
|
||||
-DUSE_SYSTEM_WEBP=yes
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin "${BUILD_DIR}"/waifu2x-ncnn-vulkan
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r models/.
|
||||
|
||||
einstalldocs
|
||||
}
|
||||
Reference in New Issue
Block a user