Files
haikuports/sci-libs/onnx/onnx-1.17.0.recipe
Alexander von Gluck 47ea51f320 cmake/meson: Mass fix packages with broken debuginfo (#12822)
* cmake/debuginfo: Mass fix packages with broken debuginfo

* rtl_sdr: Fix trailing whitespace

* meson/debuginfo: Mass fix packages with broken debuginfo

* clean up conflicts

---------

Co-authored-by: Luc Schrijvers <begasus@gmail.com>
2026-01-07 17:36:21 +01:00

91 lines
2.3 KiB
Bash

SUMMARY="Open standard for machine learning interoperability"
DESCRIPTION="Open Neural Network Exchange (ONNX) is an open ecosystem that empowers AI developers \
to choose the right tools as their project evolves. ONNX provides an open source format for AI \
models, both deep learning and traditional ML. It defines an extensible computation graph model, \
as well as definitions of built-in operators and standard data types. Currently we focus on the \
capabilities needed for inferencing (scoring)."
HOMEPAGE="https://github.com/onnx/onnx"
COPYRIGHT="2024 ONNX Project Contributors"
LICENSE="Apache v2"
REVISION="2"
SOURCE_URI="$HOMEPAGE/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="8d5e983c36037003615e5a02d36b18fc286541bf52de1a78f6cf9f32005a820e"
PATCHES="onnx-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
onnx$secondaryArchSuffix = $portVersion
lib:libonnx$secondaryArchSuffix
lib:libonnx_proto$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libprotobuf$secondaryArchSuffix
"
PROVIDES_devel="
onnx${secondaryArchSuffix}_devel = $portVersion
devel:libonnx$secondaryArchSuffix
devel:libonnx_proto$secondaryArchSuffix
"
REQUIRES_devel="
onnx$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgtest$secondaryArchSuffix
devel:libprotobuf$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
"
defineDebugInfoPackage onnx$secondaryArchSuffix \
"$libDir"/libonnx.so \
"$libDir"/libonnx_proto.so
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
$cmakeDirArgs \
-DONNX_USE_LITE_PROTO=OFF \
-DONNX_USE_PROTOBUF_SHARED_LIBS=ON \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DBUILD_SHARED_LIBS=ON \
-DONNX_VERIFY_PROTO3=ON \
-DONNX_BUILD_TESTS=ON \
-Wno-dev
make -C build $jobArgs
}
INSTALL()
{
make -C build install
# Fix usage of hardcoded "/include":
sed -e "s|\(\${_IMPORT_PREFIX}\)/include|\1/$relativeIncludeDir|" \
-i $libDir/cmake/ONNX/ONNXTargets.cmake
prepareInstalledDevelLibs \
libonnx \
libonnx_proto
packageEntries devel \
"$developDir" \
$libDir/cmake
}
TEST()
{
export LIBRARY_PATH="$sourceDir/build${LIBRARY_PATH:+:$LIBRARY_PATH}"
ctest --test-dir build --output-on-failure
}