diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-05-12 16:42:50 +0300 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-05-12 16:42:50 +0300 |
commit | 752d6256e5204b958b0ef7905675a940b5e9172f (patch) | |
tree | 330d16e6362a49cbed8875a777fe641a43376cd3 /dev-libs/ncnn | |
parent | 0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff) |
gentoo resync : 12.05.2022
Diffstat (limited to 'dev-libs/ncnn')
-rw-r--r-- | dev-libs/ncnn/Manifest | 4 | ||||
-rw-r--r-- | dev-libs/ncnn/ncnn-20210525-r1.ebuild (renamed from dev-libs/ncnn/ncnn-20210525.ebuild) | 4 | ||||
-rw-r--r-- | dev-libs/ncnn/ncnn-20220420.ebuild | 73 |
3 files changed, 78 insertions, 3 deletions
diff --git a/dev-libs/ncnn/Manifest b/dev-libs/ncnn/Manifest index 29ee2265b0d9..841b2d047895 100644 --- a/dev-libs/ncnn/Manifest +++ b/dev-libs/ncnn/Manifest @@ -1,4 +1,6 @@ AUX ncnn-fix-glslang-include.patch 281 BLAKE2B ae6293b2c16ee870d65cde7398cfe615ba3cbfa682edd5da0e92072d80f37f46f0fdc84648bb3757a266e1406d3289025344cff462ae2c3d84e232460db40759 SHA512 7e424a89b3d2a8b9cd4630e2ea8fd789569bef9bfcbea39c11fecf2cb0d9ece9639bd01e88735715d28fe7d92aa5eee9231d59cade55829f8d4af7e33a4f4adf DIST ncnn-20210525.tar.gz 11578821 BLAKE2B 1b6dc67cb89e4761c6de256c8854c3969c553159c11713d9bbbe04abd027e9439ffb694e8129da4d965807d1ec326d643c71c00ee1f032dbf4c2271c2699ceb2 SHA512 5d919b6830f5a75c751d64476f5bf2b9b71ced1cee29e4156c4f01a9d7d8833dfdf8420747c55979c5b39b29fd63b5bf4bc3d27b756a617ef39f4e2ce4da2f93 -EBUILD ncnn-20210525.ebuild 1804 BLAKE2B 32c7b8bb64ef7b4b177a940ca130048832f92a3190c6bb411786629b09d5a486bc306ba7753c1adebff6f40b989f048e1f5b2eaa0ab79767d936e68f51106b63 SHA512 893c53fdeeda50ba6cb4ea76eea68a961d7d77cc98fc4f93894ef3a5b944517480795d3a4f1233f66b7bb71741b74760ba9b7912b81d1a3a6597bd314266e05b +DIST ncnn-20220420.tar.gz 12158916 BLAKE2B fcecf395e54ff683bb8301365d805b99439b3797493e419fa8c99a325ebd1dfd80e65b08cffd9283fe453010a0cdde221aeeffa37e154335d2f6d7f6c6b9b138 SHA512 7c567bcd75cf36be7fbb16dba7f978ae965478afed8948e9e1c6f8c681ea678f769e64fae337a5c1d0bc1549bf922c1761b51a7822153a1eb4d267ef8adf1ecd +EBUILD ncnn-20210525-r1.ebuild 1868 BLAKE2B c384cbc3973e3a4f616a0c1b51fd6313ee0727cb0c1884eb55e8562ec3524059bafbb4cf6b066f8e654df2dac96b3c888cc41fc1e19aa97665262c02dad1345f SHA512 c12bd754d1f3f0cdb4367190c498af52e4dd359f96c0d98405fb29dadee6e7544cf2ae96117628a49b8dcc465453d8f9009afe4d2aeb25c4bdbb985d0c11ec66 +EBUILD ncnn-20220420.ebuild 1683 BLAKE2B c642f997a2dacfe882a15e299947a4728959e6165fa1fa446f043c70cc80201ca760a9be7ec21ed8c35439b87eab3dc7a0d930ffbec24c8f06940ade84708551 SHA512 ce3330ae73163f1cb5479b8ae7ee38a5e0ac3381e9127ce2442fe43eea565be46779cee315c159815c202531b827dfc6b59116375fec0c0c10c2db787525d714 MISC metadata.xml 602 BLAKE2B 09d7cf6d8eb19d516ac8f53f220808b16610320d8307cb19e34db48160d7e7a300fa3d773b8082a6a35972aad3e4831386b4f68cd754883d377fd4e1b2273d78 SHA512 b85b8572b6f5cdf569ea2137336026c071897f0d9c19fe8b44fb0745c5ca79dead6e2092d7b71a3bcf804eda20dfcfc78f79ee4e5c22eb58e565fb959085f4a6 diff --git a/dev-libs/ncnn/ncnn-20210525.ebuild b/dev-libs/ncnn/ncnn-20210525-r1.ebuild index efac9e4e5810..a6aa54a5132f 100644 --- a/dev-libs/ncnn/ncnn-20210525.ebuild +++ b/dev-libs/ncnn/ncnn-20210525-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -10,7 +10,7 @@ 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" +SLOT="0/${PV}" # currently has unstable ABI that often requires rebuilds KEYWORDS="~amd64 ~x86" IUSE="tools +vulkan" diff --git a/dev-libs/ncnn/ncnn-20220420.ebuild b/dev-libs/ncnn/ncnn-20220420.ebuild new file mode 100644 index 000000000000..da09a4cf9ffd --- /dev/null +++ b/dev-libs/ncnn/ncnn-20220420.ebuild @@ -0,0 +1,73 @@ +# 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=" + dev-util/glslang + tools? ( dev-libs/protobuf:= ) + vulkan? ( media-libs/vulkan-loader )" +DEPEND=" + ${RDEPEND} + vulkan? ( dev-util/vulkan-headers )" + +PATCHES=( + "${FILESDIR}"/${PN}-fix-glslang-include.patch +) + +DOCS=( README.md docs/. ) + +src_prepare() { + cmake_src_prepare + + sed -i "/DESTINATION/s| lib| $(get_libdir)|" src/CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=ON # for tools + -DGLSLANG_TARGET_DIR="${ESYSROOT}"/usr/$(get_libdir)/cmake + -DNCNN_BUILD_EXAMPLES=OFF + -DNCNN_BUILD_TOOLS=$(usex tools) + -DNCNN_PYTHON=OFF # missing portalocker, and nothing needs this for now + -DNCNN_SHARED_LIB=ON + -DNCNN_SYSTEM_GLSLANG=ON + -DNCNN_VERSION=${PV} # avoids libncnn.so.*.%Y%m%d (build date) + -DNCNN_VULKAN=$(usex vulkan) + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + if use tools; then + local tools=( + caffe/caffe2ncnn + darknet/darknet2ncnn + mxnet/mxnet2ncnn + ncnn2mem + ncnnmerge + ncnnoptimize + onnx/onnx2ncnn + quantize/{ncnn2int8,ncnn2table} + ) + dobin "${tools[@]/#/${BUILD_DIR}/tools/}" + fi +} |