summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-07-21 01:01:36 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-07-21 01:37:48 -0400
commit1a2e8f89eb5f602f1381f5aab7dc849bc36a306c (patch)
treeeb9e0cbe96e2c85b4aa4da4c64e5c93adde432ad /dev-libs
parentgames-strategy/naev: add 0.9.4 (diff)
downloadgentoo-1a2e8f89eb5f602f1381f5aab7dc849bc36a306c.tar.gz
gentoo-1a2e8f89eb5f602f1381f5aab7dc849bc36a306c.tar.bz2
gentoo-1a2e8f89eb5f602f1381f5aab7dc849bc36a306c.zip
dev-libs/ncnn: add 20220721
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/ncnn/Manifest1
-rw-r--r--dev-libs/ncnn/ncnn-20220721.ebuild48
2 files changed, 49 insertions, 0 deletions
diff --git a/dev-libs/ncnn/Manifest b/dev-libs/ncnn/Manifest
index 44746ed474a8..174e06e9d5c7 100644
--- a/dev-libs/ncnn/Manifest
+++ b/dev-libs/ncnn/Manifest
@@ -1 +1,2 @@
DIST ncnn-20220701.tar.gz 12220010 BLAKE2B 3038500683c9ea1634777cb4158aea0d6c6e640cb4a31302b99c546f000fb91f5d75d01328cf35896b7579dc3172512d120612f973ae9881b4f95d101607adcb SHA512 4b7f539213c8f06a426d1633e881ceeabee84b5419e890eaa95447868a511cad8a4528d1e311c87ed322ccabbcfb38cc1725592fb6299ef9be7e068c43bbd0b2
+DIST ncnn-20220721.tar.gz 12235249 BLAKE2B 5d164a1f8531395e6bdbbb1ace07d5c7ef08db9afe62155126297b4911621aad4c5f71ccb3343207450dc4ea055f6da07aeb93f230098ab407eaa05ee31db8b9 SHA512 0d6c037661e8e6f9eebcfa58e306c8a6cf94a3739f04ab863209857adc4e8d01e19ba5d67b81d1e85bf2f8c9d6318a3a49acc989b5b014c6e68041dca23bb78c
diff --git a/dev-libs/ncnn/ncnn-20220721.ebuild b/dev-libs/ncnn/ncnn-20220721.ebuild
new file mode 100644
index 000000000000..3fc052ceb245
--- /dev/null
+++ b/dev-libs/ncnn/ncnn-20220721.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="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"
+
+LICENSE="BSD ZLIB"
+SLOT="0/${PV}" # currently has unstable ABI that often requires rebuilds
+KEYWORDS="~amd64 ~x86"
+IUSE="tools +vulkan"
+
+# Need the static library to run tests + skip vulkan / GPU:
+# -DNCNN_BUILD_TESTS=ON -DNCNN_SHARED_LIB=OFF -DNCNN_VULKAN=OFF
+RESTRICT="test"
+
+RDEPEND="
+ tools? ( dev-libs/protobuf:= )
+ vulkan? (
+ dev-util/glslang
+ media-libs/vulkan-loader
+ )"
+DEPEND="
+ ${RDEPEND}
+ vulkan? ( dev-util/vulkan-headers )"
+
+QA_PKGCONFIG_VERSION="1.0.${PV}"
+
+DOCS=( README.md docs/. )
+
+src_configure() {
+ local mycmakeargs=(
+ -DGLSLANG_TARGET_DIR="${ESYSROOT}"/usr/$(get_libdir)/cmake
+ -DNCNN_BUILD_EXAMPLES=OFF
+ -DNCNN_BUILD_TOOLS=$(usex tools)
+ -DNCNN_PYTHON=OFF # todo if something needs it
+ -DNCNN_SHARED_LIB=ON
+ -DNCNN_SYSTEM_GLSLANG=ON
+ -DNCNN_VERSION=${PV} # avoids libncnn.so.*.%Y%m%d using build date
+ -DNCNN_VULKAN=$(usex vulkan)
+ )
+
+ cmake_src_configure
+}