summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-11-27 22:56:44 -0500
committerIonen Wolkens <ionen@gentoo.org>2022-11-27 23:11:54 -0500
commitb1ed87d16412d0c03ea0f8a8b54a312905aedaa7 (patch)
treef85f4289158d997f12f2b4676b3094de8140ffd7 /dev-libs
parentwww-client/chromium: drop 107.0.5304.87, 107.0.5304.110 (diff)
downloadgentoo-b1ed87d16412d0c03ea0f8a8b54a312905aedaa7.tar.gz
gentoo-b1ed87d16412d0c03ea0f8a8b54a312905aedaa7.tar.bz2
gentoo-b1ed87d16412d0c03ea0f8a8b54a312905aedaa7.zip
dev-libs/ncnn: add 20221128
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-20221128.ebuild46
2 files changed, 47 insertions, 0 deletions
diff --git a/dev-libs/ncnn/Manifest b/dev-libs/ncnn/Manifest
index f134295a0be4..bdbfc2a835a6 100644
--- a/dev-libs/ncnn/Manifest
+++ b/dev-libs/ncnn/Manifest
@@ -1 +1,2 @@
DIST ncnn-20220729.tar.gz 12235306 BLAKE2B ff7a5866c8746c078dcc927773f695d883d0cbb9e528d80addf730dd31bc1a401df4c5ab33baa398d26d8072ed2d0fd21e6e89cb03ddeca3fb84dbcaff8fd696 SHA512 0df877ee42edc32faa6891c8b234fc21064b18c1dc8c612b43757daf5f912530f3d015c783e6e199c2884616a88137d10f9c899528000f25e9d0881f028a9586
+DIST ncnn-20221128.tar.gz 12398376 BLAKE2B 2495996964bcebc9991a25a3198045f009880660ce4e284ece541add84b9343b0ea2119b34eef602a3811523b88fe53bbfc3e8a564e5e731767b6e886c4136af SHA512 dce9c3b22e7ec032467bff9bfc2092572540d4a378537ef20b0e646b58eee247306d05e029c315291baf74d26208bedfc03efc92703081344f7630b26b21092b
diff --git a/dev-libs/ncnn/ncnn-20221128.ebuild b/dev-libs/ncnn/ncnn-20221128.ebuild
new file mode 100644
index 000000000000..7827bc56ee58
--- /dev/null
+++ b/dev-libs/ncnn/ncnn-20221128.ebuild
@@ -0,0 +1,46 @@
+# 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 )"
+
+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
+}