You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.1 KiB
53 lines
1.1 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
4 years ago
|
# 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"
|
||
|
|
||
|
LICENSE="MIT"
|
||
|
SLOT="0"
|
||
3 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
4 years ago
|
|
||
3 years ago
|
# Pin dev-libs/ncnn near bundled copy until more stable.
|
||
|
RDEPEND="
|
||
|
~dev-libs/ncnn-20210525[vulkan]
|
||
|
dev-util/glslang
|
||
|
media-libs/libwebp:=
|
||
|
media-libs/vulkan-loader"
|
||
4 years ago
|
DEPEND="
|
||
3 years ago
|
${RDEPEND}
|
||
|
dev-util/vulkan-headers"
|
||
4 years ago
|
|
||
|
src_prepare() {
|
||
3 years ago
|
CMAKE_USE_DIR="${S}/src"
|
||
4 years ago
|
cmake_src_prepare
|
||
3 years ago
|
|
||
|
# Update all paths to match installation for models.
|
||
|
sed "/PATHSTR\|model path/s|models-|${EPREFIX}/usr/share/${PN}/models-|" \
|
||
|
-i src/main.cpp || die
|
||
4 years ago
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
local mycmakeargs=(
|
||
3 years ago
|
-DGLSLANG_TARGET_DIR="${ESYSROOT}"/usr/$(get_libdir)/cmake
|
||
|
-DUSE_SYSTEM_NCNN=ON
|
||
|
-DUSE_SYSTEM_WEBP=ON
|
||
4 years ago
|
)
|
||
|
|
||
|
cmake_src_configure
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
dobin "${BUILD_DIR}"/waifu2x-ncnn-vulkan
|
||
|
|
||
3 years ago
|
insinto /usr/share/${PN}
|
||
|
doins -r models/.
|
||
|
|
||
|
einstalldocs
|
||
4 years ago
|
}
|