summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2022-09-05 21:17:17 +0200
committerAlfredo Tupone <tupone@gentoo.org>2022-09-05 21:17:17 +0200
commit764ac8c0ebda9e392bac2cf0fa609a94aaf45972 (patch)
tree74430c2f3483bb195ad0d1fd746243a609bdf6bf /sci-libs/onnx/onnx-1.11.0-r2.ebuild
parentdev-java/hamcrest-core: re-keyword 1.3-r3 for ~amd64-linux, ~x64-solaris (diff)
downloadgentoo-764ac8c0ebda9e392bac2cf0fa609a94aaf45972.tar.gz
gentoo-764ac8c0ebda9e392bac2cf0fa609a94aaf45972.tar.bz2
gentoo-764ac8c0ebda9e392bac2cf0fa609a94aaf45972.zip
sci-libs/onnx: depend on protbuf slot
Closes: https://bugs.gentoo.org/868576 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'sci-libs/onnx/onnx-1.11.0-r2.ebuild')
-rw-r--r--sci-libs/onnx/onnx-1.11.0-r2.ebuild40
1 files changed, 40 insertions, 0 deletions
diff --git a/sci-libs/onnx/onnx-1.11.0-r2.ebuild b/sci-libs/onnx/onnx-1.11.0-r2.ebuild
new file mode 100644
index 000000000000..31f993817030
--- /dev/null
+++ b/sci-libs/onnx/onnx-1.11.0-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8..11} )
+inherit python-any-r1 cmake
+
+DESCRIPTION="Open Neural Network Exchange (ONNX)"
+HOMEPAGE="https://github.com/onnx/onnx"
+SRC_URI="https://github.com/onnx/${PN}/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+RESTRICT="test"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-libs/protobuf:="
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-util/patchelf
+"
+
+src_configure() {
+ local mycmakeargs=(
+ -DONNX_USE_PROTOBUF_SHARED_LIBS=ON
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ patchelf --set-soname libonnxifi.so "${D}"/usr/lib/libonnxifi.so \
+ || die
+ mv "${D}"/usr/lib/libonnxifi.so "${D}"/usr/$(get_libdir)/libonnxifi.so \
+ || die
+}