diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-02-23 15:45:01 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-02-23 15:45:01 +0000 |
commit | 9217a0cce81e89f5648599fcda4e549903c7b9bd (patch) | |
tree | f544fe23d38f148dd56caedc70d93ccaf8a34389 /dev-libs/ncnn/ncnn-20230223.ebuild | |
parent | 8d15cb8238a384acdb70250a0cd213f2ab5f0ab6 (diff) |
gentoo auto-resync : 23:02:2023 - 15:45:01
Diffstat (limited to 'dev-libs/ncnn/ncnn-20230223.ebuild')
-rw-r--r-- | dev-libs/ncnn/ncnn-20230223.ebuild | 46 |
1 files changed, 46 insertions, 0 deletions
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 +} |