commit:     b1ed87d16412d0c03ea0f8a8b54a312905aedaa7
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 28 03:56:44 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Nov 28 04:11:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1ed87d1

dev-libs/ncnn: add 20221128

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-libs/ncnn/Manifest             |  1 +
 dev-libs/ncnn/ncnn-20221128.ebuild | 46 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)

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
+}

Reply via email to