public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/ncnn/, dev-libs/ncnn/files/
@ 2021-04-18 17:38 Piotr Karbowski
  0 siblings, 0 replies; 3+ messages in thread
From: Piotr Karbowski @ 2021-04-18 17:38 UTC (permalink / raw
  To: gentoo-commits

commit:     e97dc41c25f9b126e66a67f8e514a5168e8b7654
Author:     Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 18 17:37:41 2021 +0000
Commit:     Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
CommitDate: Sun Apr 18 17:38:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e97dc41c

dev-libs/ncnn: 20210322 version bump.

Signed-off-by: Piotr Karbowski <slashbeast <AT> gentoo.org>

 dev-libs/ncnn/Manifest                             |  1 +
 dev-libs/ncnn/files/ncnn-fix-glslang-include.patch | 13 +++++++
 dev-libs/ncnn/ncnn-20210322.ebuild                 | 41 ++++++++++++++++++++++
 3 files changed, 55 insertions(+)

diff --git a/dev-libs/ncnn/Manifest b/dev-libs/ncnn/Manifest
index 93f301844cb..e72cd830e5e 100644
--- a/dev-libs/ncnn/Manifest
+++ b/dev-libs/ncnn/Manifest
@@ -1,3 +1,4 @@
 DIST ncnn-20200226.tar.gz 10363010 BLAKE2B 3f5e22ecffc7d36d7babb8c316eb95785f60b2938672cc2fc4a56ae8e4cc79fef8d498032117998a1813b4a5491b4b99f6941ac41be3fe8d6c6e3276ae46396e SHA512 e91694692e2c48ba4b404b26b382939be62c61e8452a09b8c1cdad351adcda1ea8bd19ded671f6c4c6cf979ccc49c181dd47e501a351fe89ecdf17a5395b3fab
 DIST ncnn-20200413.tar.gz 10520160 BLAKE2B 10fc59f3a09d1a6b21a6c73b87dabd450279d2c30923b15266461360c6a63b7cc58f91e33c6563752161de3ca067098ed4f2d22963410fe3f72a8affbd39172e SHA512 3f3610f94cbfa6072347857675865b3b21e4cb330a3b889214e7e8cf6e7a558451979ee4ba727c28fc5919a38b27d3b0288dfbd1bfa06d92d3677b4035b019fd
 DIST ncnn-20200727.tar.gz 10989866 BLAKE2B 27ec105d4ea24b1bcccfb64074f47332515112b7fed7b6f833c6d3fd846542f14248254d076e3d1e63eb16cedb51d16dd156890ca805f4160d7e6ceb3de1b46a SHA512 122653ee4fcf6e45665154ff6014eb3291d48174ec153b27ccb9013bd705a81e664e4c4ad94df5cb3ea661891115929562db45c7c714747fb6f7673b09a16b68
+DIST ncnn-20210322.tar.gz 11339362 BLAKE2B 26848f8c6598c98e10e62717bf4aa86f803b425848bdeebd7dacd752f57174e4c3a7fe56d309cafa150be7cb80176fbd8f487c9fe79bc957e29157b1781fe849 SHA512 78862bdbba3ae4127d856f514ea37903098e8a9e827ccbdc85faa498d8a343b4c404465b7f55d368f2ea867063340f33facf286c2bad6a0587b903ba8bbf2394

diff --git a/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch b/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch
new file mode 100644
index 00000000000..bd96a79e175
--- /dev/null
+++ b/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch
@@ -0,0 +1,13 @@
+diff --git a/src/gpu.cpp b/src/gpu.cpp
+index ce1306c..468cd03 100644
+--- a/src/gpu.cpp
++++ b/src/gpu.cpp
+@@ -21,7 +21,7 @@
+ #include <vulkan/vulkan.h>
+ 
+ #include "glslang/SPIRV/GlslangToSpv.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include "glslang/Public/ShaderLang.h"
+ 
+ #include "command.h"
+ #include "layer.h"

diff --git a/dev-libs/ncnn/ncnn-20210322.ebuild b/dev-libs/ncnn/ncnn-20210322.ebuild
new file mode 100644
index 00000000000..0307bb67e2f
--- /dev/null
+++ b/dev-libs/ncnn/ncnn-20210322.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="A 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"
+KEYWORDS="~amd64 ~x86"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND="
+	dev-util/glslang
+	dev-util/vulkan-headers
+	media-libs/vulkan-loader"
+
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+RESTRICT=test # Tests tries to use real GPU.
+
+PATCHES=( "${FILESDIR}"/ncnn-fix-glslang-include.patch )
+
+src_configure() {
+	local mycmakeargs=(
+		-DCMAKE_TOOLCHAIN_FILE="${S}/toolchains/host.gcc.toolchain.cmake"
+		-DNCNN_BUILD_EXAMPLES=OFF
+		-DNCNN_BUILD_TOOLS=OFF
+		-DNCNN_VULKAN=ON
+		-DNCNN_SYSTEM_GLSLANG=ON
+		-DGLSLANG_TARGET_DIR="${EPREFIX}/usr/$(get_libdir)/cmake"
+	)
+
+	cmake_src_configure
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/ncnn/, dev-libs/ncnn/files/
@ 2021-05-31 19:30 Piotr Karbowski
  0 siblings, 0 replies; 3+ messages in thread
From: Piotr Karbowski @ 2021-05-31 19:30 UTC (permalink / raw
  To: gentoo-commits

commit:     182a324f44e60684c6c72750ead69fb7149b3012
Author:     Ionen Wolkens <sudinave <AT> gmail <DOT> com>
AuthorDate: Sat May 29 07:38:30 2021 +0000
Commit:     Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
CommitDate: Mon May 31 19:30:38 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=182a324f

dev-libs/ncnn: add 20210525

ebuild updates:
- respect $(get_libdir)
- build shared library over static (this new version also exports
  additional symbols needed by waifu2x-ncnn-vulkan for shared linking)
- install more docs
- add IUSE for tools and vulkan
- add ZLIB license for *_mathfun.h
- add temporary workaround for bug 730468
- scrubbed previous patch and added upstream issue link (still needed)

Closes: https://bugs.gentoo.org/730468
Signed-off-by: Ionen Wolkens <sudinave <AT> gmail.com>
Signed-off-by: Piotr Karbowski <slashbeast <AT> gentoo.org>

 dev-libs/ncnn/Manifest                             |  1 +
 dev-libs/ncnn/files/ncnn-fix-glslang-include.patch | 10 +--
 dev-libs/ncnn/metadata.xml                         |  4 ++
 dev-libs/ncnn/ncnn-20210525.ebuild                 | 76 ++++++++++++++++++++++
 4 files changed, 84 insertions(+), 7 deletions(-)

diff --git a/dev-libs/ncnn/Manifest b/dev-libs/ncnn/Manifest
index e72cd830e5e..6bb71095c01 100644
--- a/dev-libs/ncnn/Manifest
+++ b/dev-libs/ncnn/Manifest
@@ -2,3 +2,4 @@ DIST ncnn-20200226.tar.gz 10363010 BLAKE2B 3f5e22ecffc7d36d7babb8c316eb95785f60b
 DIST ncnn-20200413.tar.gz 10520160 BLAKE2B 10fc59f3a09d1a6b21a6c73b87dabd450279d2c30923b15266461360c6a63b7cc58f91e33c6563752161de3ca067098ed4f2d22963410fe3f72a8affbd39172e SHA512 3f3610f94cbfa6072347857675865b3b21e4cb330a3b889214e7e8cf6e7a558451979ee4ba727c28fc5919a38b27d3b0288dfbd1bfa06d92d3677b4035b019fd
 DIST ncnn-20200727.tar.gz 10989866 BLAKE2B 27ec105d4ea24b1bcccfb64074f47332515112b7fed7b6f833c6d3fd846542f14248254d076e3d1e63eb16cedb51d16dd156890ca805f4160d7e6ceb3de1b46a SHA512 122653ee4fcf6e45665154ff6014eb3291d48174ec153b27ccb9013bd705a81e664e4c4ad94df5cb3ea661891115929562db45c7c714747fb6f7673b09a16b68
 DIST ncnn-20210322.tar.gz 11339362 BLAKE2B 26848f8c6598c98e10e62717bf4aa86f803b425848bdeebd7dacd752f57174e4c3a7fe56d309cafa150be7cb80176fbd8f487c9fe79bc957e29157b1781fe849 SHA512 78862bdbba3ae4127d856f514ea37903098e8a9e827ccbdc85faa498d8a343b4c404465b7f55d368f2ea867063340f33facf286c2bad6a0587b903ba8bbf2394
+DIST ncnn-20210525.tar.gz 11578821 BLAKE2B 1b6dc67cb89e4761c6de256c8854c3969c553159c11713d9bbbe04abd027e9439ffb694e8129da4d965807d1ec326d643c71c00ee1f032dbf4c2271c2699ceb2 SHA512 5d919b6830f5a75c751d64476f5bf2b9b71ced1cee29e4156c4f01a9d7d8833dfdf8420747c55979c5b39b29fd63b5bf4bc3d27b756a617ef39f4e2ce4da2f93

diff --git a/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch b/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch
index bd96a79e175..00eb01f03fc 100644
--- a/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch
+++ b/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch
@@ -1,13 +1,9 @@
-diff --git a/src/gpu.cpp b/src/gpu.cpp
-index ce1306c..468cd03 100644
+Needed to use system's glslang rather than bundled.
+https://github.com/Tencent/ncnn/issues/2622
 --- a/src/gpu.cpp
 +++ b/src/gpu.cpp
-@@ -21,7 +21,7 @@
- #include <vulkan/vulkan.h>
- 
+@@ -23,3 +23,3 @@
  #include "glslang/SPIRV/GlslangToSpv.h"
 -#include "glslang/glslang/Public/ShaderLang.h"
 +#include "glslang/Public/ShaderLang.h"
  
- #include "command.h"
- #include "layer.h"

diff --git a/dev-libs/ncnn/metadata.xml b/dev-libs/ncnn/metadata.xml
index 5f85797b979..93b23a68d96 100644
--- a/dev-libs/ncnn/metadata.xml
+++ b/dev-libs/ncnn/metadata.xml
@@ -9,6 +9,10 @@
 		<email>sudinave@gmail.com</email>
 		<name>Ionen Wolkens</name>
 	</maintainer>
+	<use>
+		<flag name="tools">Enable installation of various tools in addition to the library</flag>
+		<flag name="vulkan">Enable vulkan compute support</flag>
+	</use>
 	<upstream>
 		<remote-id type="github">Tencent/ncnn</remote-id>
 	</upstream>

diff --git a/dev-libs/ncnn/ncnn-20210525.ebuild b/dev-libs/ncnn/ncnn-20210525.ebuild
new file mode 100644
index 00000000000..efac9e4e581
--- /dev/null
+++ b/dev-libs/ncnn/ncnn-20210525.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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"
+KEYWORDS="~amd64 ~x86"
+IUSE="tools +vulkan"
+
+# Need the static library to run tests:
+# -DNCNN_BUILD_TESTS=ON, -DNCNN_SHARED_LIB=OFF, USE=-vulkan (skip GPU)
+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
+
+	# Workaround build issues on AVX without AVX2 (bug #730468)
+	# This can be removed if CXXFLAGS="-mavx -mno-avx2" builds after a bump.
+	find src -type f -exec sed -i s/__AVX__/__AVX2__/g {} + || 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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/ncnn/, dev-libs/ncnn/files/
@ 2022-07-11 22:57 Ionen Wolkens
  0 siblings, 0 replies; 3+ messages in thread
From: Ionen Wolkens @ 2022-07-11 22:57 UTC (permalink / raw
  To: gentoo-commits

commit:     be1bf30c595989c033994179a8512121fc7f1eec
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 11 22:43:05 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Jul 11 22:56:11 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be1bf30c

dev-libs/ncnn: drop 20220420

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

 dev-libs/ncnn/Manifest                             |  1 -
 dev-libs/ncnn/files/ncnn-fix-glslang-include.patch |  9 ---
 dev-libs/ncnn/ncnn-20220420.ebuild                 | 73 ----------------------
 3 files changed, 83 deletions(-)

diff --git a/dev-libs/ncnn/Manifest b/dev-libs/ncnn/Manifest
index 38f8273d8755..44746ed474a8 100644
--- a/dev-libs/ncnn/Manifest
+++ b/dev-libs/ncnn/Manifest
@@ -1,2 +1 @@
-DIST ncnn-20220420.tar.gz 12158916 BLAKE2B fcecf395e54ff683bb8301365d805b99439b3797493e419fa8c99a325ebd1dfd80e65b08cffd9283fe453010a0cdde221aeeffa37e154335d2f6d7f6c6b9b138 SHA512 7c567bcd75cf36be7fbb16dba7f978ae965478afed8948e9e1c6f8c681ea678f769e64fae337a5c1d0bc1549bf922c1761b51a7822153a1eb4d267ef8adf1ecd
 DIST ncnn-20220701.tar.gz 12220010 BLAKE2B 3038500683c9ea1634777cb4158aea0d6c6e640cb4a31302b99c546f000fb91f5d75d01328cf35896b7579dc3172512d120612f973ae9881b4f95d101607adcb SHA512 4b7f539213c8f06a426d1633e881ceeabee84b5419e890eaa95447868a511cad8a4528d1e311c87ed322ccabbcfb38cc1725592fb6299ef9be7e068c43bbd0b2

diff --git a/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch b/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch
deleted file mode 100644
index 00eb01f03fc3..000000000000
--- a/dev-libs/ncnn/files/ncnn-fix-glslang-include.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-Needed to use system's glslang rather than bundled.
-https://github.com/Tencent/ncnn/issues/2622
---- a/src/gpu.cpp
-+++ b/src/gpu.cpp
-@@ -23,3 +23,3 @@
- #include "glslang/SPIRV/GlslangToSpv.h"
--#include "glslang/glslang/Public/ShaderLang.h"
-+#include "glslang/Public/ShaderLang.h"
- 

diff --git a/dev-libs/ncnn/ncnn-20220420.ebuild b/dev-libs/ncnn/ncnn-20220420.ebuild
deleted file mode 100644
index da09a4cf9ffd..000000000000
--- a/dev-libs/ncnn/ncnn-20220420.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# 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
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-11 22:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-18 17:38 [gentoo-commits] repo/gentoo:master commit in: dev-libs/ncnn/, dev-libs/ncnn/files/ Piotr Karbowski
  -- strict thread matches above, loose matches on Subject: below --
2021-05-31 19:30 Piotr Karbowski
2022-07-11 22:57 Ionen Wolkens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox