summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-02-23 04:17:35 -0500
committerIonen Wolkens <ionen@gentoo.org>2023-02-23 04:20:15 -0500
commit6ce6336b36eb2104ebc4e8f5a17ac45e25975d91 (patch)
treee8847a13c78c1a8c07f5b1eded7b7090682196b0 /dev-libs/ncnn
parentdev-ada/gnatcoll-db: update EAPI 7 -> 8 (diff)
downloadgentoo-6ce6336b36eb2104ebc4e8f5a17ac45e25975d91.tar.gz
gentoo-6ce6336b36eb2104ebc4e8f5a17ac45e25975d91.tar.bz2
gentoo-6ce6336b36eb2104ebc4e8f5a17ac45e25975d91.zip
dev-libs/ncnn: add 20230223
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-libs/ncnn')
-rw-r--r--dev-libs/ncnn/Manifest1
-rw-r--r--dev-libs/ncnn/ncnn-20230223.ebuild46
2 files changed, 47 insertions, 0 deletions
diff --git a/dev-libs/ncnn/Manifest b/dev-libs/ncnn/Manifest
index 33ddf32318e2..90bd9eeafe46 100644
--- a/dev-libs/ncnn/Manifest
+++ b/dev-libs/ncnn/Manifest
@@ -1 +1,2 @@
DIST ncnn-20221128.tar.gz 12398017 BLAKE2B 5afd52f1b91ecc875e937e00f00b2a1488e4fee2df03763f378036a7886e8a5e1573e4425cba05e47257bab1815dc7c30e629c4bafa975877dc8cfee01d59986 SHA512 589e52b63eabfac1f8e47acc34bef6a87ce365851a5c4d551665c321938a2d8e622ab211babac38771695b9f4443516577ba1634409a55c2436498a7d28d8218
+DIST ncnn-20230223.tar.gz 12475262 BLAKE2B 50b228b920f3c09640b1cdef8247b66a09bbacf64ac66b8fd601973c648221b1f9ff07b0069bdf1f7944db53cbca39c2fa4f3627e2b2ecc3e46e9dc4b38135ab SHA512 8c94a6aa082961da52a277aa49c44ce30bde942cfd8156d7f60a42b826fe918d8edec4d9c52ec3495e662f6d2e3d9a4709daeb9941cd6873dc100c7b11cee49a
diff --git a/dev-libs/ncnn/ncnn-20230223.ebuild b/dev-libs/ncnn/ncnn-20230223.ebuild
new file mode 100644
index 000000000000..cca348504cce
--- /dev/null
+++ b/dev-libs/ncnn/ncnn-20230223.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2023 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 )"
+
+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
+}