diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2022-07-28 10:30:21 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2022-07-28 10:34:54 -0400 |
commit | dea41123b0bae6b23c485361468a8a245a8718d6 (patch) | |
tree | 4f78cb867f3c79d990b4f0caf4c65a4068e9a6d0 /media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20220728.ebuild | |
parent | net-vpn/i2p: add github upstream metadata (diff) | |
download | gentoo-dea41123b0bae6b23c485361468a8a245a8718d6.tar.gz gentoo-dea41123b0bae6b23c485361468a8a245a8718d6.tar.bz2 gentoo-dea41123b0bae6b23c485361468a8a245a8718d6.zip |
media-gfx/waifu2x-ncnn-vulkan: bump the waifu to 20220728
Albeit no real changes given we're using system ncnn.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20220728.ebuild')
-rw-r--r-- | media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20220728.ebuild | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20220728.ebuild b/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20220728.ebuild new file mode 100644 index 000000000000..640620c62e2e --- /dev/null +++ b/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20220728.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2022 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:= + media-libs/vulkan-loader" +DEPEND=" + ${RDEPEND} + dev-util/glslang + dev-util/vulkan-headers" + +PATCHES=( + "${FILESDIR}"/${PN}-20210521-no-lto.patch +) + +src_prepare() { + CMAKE_USE_DIR=${S}/src + cmake_src_prepare + + # Update all paths to match installation for models. + sed "/PATHSTR\|model path/s|models-|${EPREFIX}/usr/share/${PN}/models-|" \ + -i src/main.cpp || die +} + +src_configure() { + local mycmakeargs=( + -DGLSLANG_TARGET_DIR="${ESYSROOT}"/usr/$(get_libdir)/cmake + -DUSE_SYSTEM_NCNN=ON + -DUSE_SYSTEM_WEBP=ON + ) + + cmake_src_configure +} + +src_install() { + dobin "${BUILD_DIR}"/waifu2x-ncnn-vulkan + + insinto /usr/share/${PN} + doins -r models/. + + einstalldocs +} |