summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Karbowski <slashbeast@gentoo.org>2021-04-18 19:37:41 +0200
committerPiotr Karbowski <slashbeast@gentoo.org>2021-04-18 19:38:29 +0200
commite97dc41c25f9b126e66a67f8e514a5168e8b7654 (patch)
tree9791bf175fc45cac2aca5aabfd098a6c0962e73d /dev-libs/ncnn
parentmedia-gfx/waifu2x-ncnn-vulkan: 20210210 version bump (diff)
downloadgentoo-e97dc41c25f9b126e66a67f8e514a5168e8b7654.tar.gz
gentoo-e97dc41c25f9b126e66a67f8e514a5168e8b7654.tar.bz2
gentoo-e97dc41c25f9b126e66a67f8e514a5168e8b7654.zip
dev-libs/ncnn: 20210322 version bump.
Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org>
Diffstat (limited to 'dev-libs/ncnn')
-rw-r--r--dev-libs/ncnn/Manifest1
-rw-r--r--dev-libs/ncnn/files/ncnn-fix-glslang-include.patch13
-rw-r--r--dev-libs/ncnn/ncnn-20210322.ebuild41
3 files changed, 55 insertions, 0 deletions
diff --git a/dev-libs/ncnn/Manifest b/dev-libs/ncnn/Manifest
index 93f301844cbb..e72cd830e5e8 100644
--- a/dev-libs/ncnn/Manifest
+++ b/dev-libs/ncnn/Manifest
@@ -1,3 +1,4 @@
DIST ncnn-20200226.tar.gz 10363010 BLAKE2B 3f5e22ecffc7d36d7babb8c316eb95785f60b2938672cc2fc4a56ae8e4cc79fef8d498032117998a1813b4a5491b4b99f6941ac41be3fe8d6c6e3276ae46396e SHA512 e91694692e2c48ba4b404b26b382939be62c61e8452a09b8c1cdad351adcda1ea8bd19ded671f6c4c6cf979ccc49c181dd47e501a351fe89ecdf17a5395b3fab
DIST ncnn-20200413.tar.gz 10520160 BLAKE2B 10fc59f3a09d1a6b21a6c73b87dabd450279d2c30923b15266461360c6a63b7cc58f91e33c6563752161de3ca067098ed4f2d22963410fe3f72a8affbd39172e SHA512 3f3610f94cbfa6072347857675865b3b21e4cb330a3b889214e7e8cf6e7a558451979ee4ba727c28fc5919a38b27d3b0288dfbd1bfa06d92d3677b4035b019fd
DIST ncnn-20200727.tar.gz 10989866 BLAKE2B 27ec105d4ea24b1bcccfb64074f47332515112b7fed7b6f833c6d3fd846542f14248254d076e3d1e63eb16cedb51d16dd156890ca805f4160d7e6ceb3de1b46a SHA512 122653ee4fcf6e45665154ff6014eb3291d48174ec153b27ccb9013bd705a81e664e4c4ad94df5cb3ea661891115929562db45c7c714747fb6f7673b09a16b68
+DIST ncnn-20210322.tar.gz 11339362 BLAKE2B 26848f8c6598c98e10e62717bf4aa86f803b425848bdeebd7dacd752f57174e4c3a7fe56d309cafa150be7cb80176fbd8f487c9fe79bc957e29157b1781fe849 SHA512 78862bdbba3ae4127d856f514ea37903098e8a9e827ccbdc85faa498d8a343b4c404465b7f55d368f2ea867063340f33facf286c2bad6a0587b903ba8bbf2394
diff --git a/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch b/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch
new file mode 100644
index 000000000000..bd96a79e1755
--- /dev/null
+++ b/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch
@@ -0,0 +1,13 @@
+diff --git a/src/gpu.cpp b/src/gpu.cpp
+index ce1306c..468cd03 100644
+--- a/src/gpu.cpp
++++ b/src/gpu.cpp
+@@ -21,7 +21,7 @@
+ #include <vulkan/vulkan.h>
+
+ #include "glslang/SPIRV/GlslangToSpv.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include "glslang/Public/ShaderLang.h"
+
+ #include "command.h"
+ #include "layer.h"
diff --git a/dev-libs/ncnn/ncnn-20210322.ebuild b/dev-libs/ncnn/ncnn-20210322.ebuild
new file mode 100644
index 000000000000..0307bb67e2fb
--- /dev/null
+++ b/dev-libs/ncnn/ncnn-20210322.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="A high-performance neural network inference framework"
+HOMEPAGE="https://github.com/Tencent/ncnn"
+
+SRC_URI="https://github.com/Tencent/ncnn/archive/${PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND="
+ dev-util/glslang
+ dev-util/vulkan-headers
+ media-libs/vulkan-loader"
+
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+RESTRICT=test # Tests tries to use real GPU.
+
+PATCHES=( "${FILESDIR}"/ncnn-fix-glslang-include.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_TOOLCHAIN_FILE="${S}/toolchains/host.gcc.toolchain.cmake"
+ -DNCNN_BUILD_EXAMPLES=OFF
+ -DNCNN_BUILD_TOOLS=OFF
+ -DNCNN_VULKAN=ON
+ -DNCNN_SYSTEM_GLSLANG=ON
+ -DGLSLANG_TARGET_DIR="${EPREFIX}/usr/$(get_libdir)/cmake"
+ )
+
+ cmake_src_configure
+}