diff options
| -rw-r--r-- | .extras/nvchecker.toml | 5 | ||||
| -rw-r--r-- | .gitleaksignore | 4 | ||||
| -rw-r--r-- | openvino/010-openvino-disable-werror.patch | 13 | ||||
| -rw-r--r-- | openvino/020-openvino-use-protobuf-shared-libs.patch | 11 | ||||
| -rw-r--r-- | openvino/README | 9 | ||||
| -rw-r--r-- | openvino/openvino.SlackBuild | 175 | ||||
| -rw-r--r-- | openvino/openvino.info | 26 | ||||
| -rw-r--r-- | openvino/slack-desc | 19 |
8 files changed, 262 insertions, 0 deletions
diff --git a/.extras/nvchecker.toml b/.extras/nvchecker.toml index a66c070..7cd78df 100644 --- a/.extras/nvchecker.toml +++ b/.extras/nvchecker.toml @@ -181,6 +181,11 @@ gitea = "quickshell/quickshell" use_max_tag = true prefix = "v" +[openvino] +source = "github" +github = "openvinotoolkit/openvino" +use_latest_release = true + [pcsx2] source = "github" github = "PCSX2/pcsx2" diff --git a/.gitleaksignore b/.gitleaksignore new file mode 100644 index 0000000..cf798f2 --- /dev/null +++ b/.gitleaksignore @@ -0,0 +1,4 @@ +# openvino bundles deps pinned to upstream git commit SHAs. gitleaks' +# generic-api-key entropy rule occasionally flags a 40-hex commit hash as a +# secret. These are public commit hashes, not credentials. +openvino/openvino.SlackBuild:generic-api-key:37 diff --git a/openvino/010-openvino-disable-werror.patch b/openvino/010-openvino-disable-werror.patch new file mode 100644 index 0000000..2a168ec --- /dev/null +++ b/openvino/010-openvino-disable-werror.patch @@ -0,0 +1,13 @@ +--- a/src/plugins/intel_gpu/CMakeLists.txt ++++ b/src/plugins/intel_gpu/CMakeLists.txt +@@ -46,10 +46,6 @@ set(INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") + add_subdirectory(thirdparty) + include(thirdparty/cmake/rapidjson.cmake) + +-if(CMAKE_COMPILER_IS_GNUCXX) +- ov_add_compiler_flags(-Werror) +-endif() +- + add_subdirectory(src/runtime) + add_subdirectory(src/kernel_selector) + add_subdirectory(src/graph) diff --git a/openvino/020-openvino-use-protobuf-shared-libs.patch b/openvino/020-openvino-use-protobuf-shared-libs.patch new file mode 100644 index 0000000..b72bd88 --- /dev/null +++ b/openvino/020-openvino-use-protobuf-shared-libs.patch @@ -0,0 +1,11 @@ +--- a/thirdparty/dependencies.cmake ++++ b/thirdparty/dependencies.cmake +@@ -318,7 +318,7 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND + # Note: Debian / Ubuntu / RHEL libprotobuf.a can only be used with -DBUILD_SHARED_LIBS=OFF + # because they are compiled without -fPIC + if(NOT DEFINED Protobuf_USE_STATIC_LIBS) +- set(Protobuf_USE_STATIC_LIBS ON) ++ set(Protobuf_USE_STATIC_LIBS OFF) + endif() + if(CMAKE_VERBOSE_MAKEFILE) + set(Protobuf_DEBUG ON) diff --git a/openvino/README b/openvino/README new file mode 100644 index 0000000..be1b885 --- /dev/null +++ b/openvino/README @@ -0,0 +1,9 @@ +OpenVINO is an open-source toolkit for optimizing and deploying AI +inference. + +Supported hardware: +https://docs.openvino.ai/2024/about-openvino/system-requirements.html + +The dependency "tbb" needs to be compiled with its optional +dependency hwloc, otherwise libtbbbind-2.5 is missing and openvino +will fail to build. diff --git a/openvino/openvino.SlackBuild b/openvino/openvino.SlackBuild new file mode 100644 index 0000000..236c9ce --- /dev/null +++ b/openvino/openvino.SlackBuild @@ -0,0 +1,175 @@ +#!/bin/bash + +# Slackware build script for openvino + +# Copyright 2024 Johannes Schoepfer, Germany +# Copyright 2026 Danilo M. <danix@danix.xyz> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=openvino +VERSION=${VERSION:-2026.2.1} +# All bundled deps are pinned to the exact commit openvino references at this +# tag (its git submodule gitlinks), downloaded as archive/<sha> tarballs. +COMMIT_MLAS=d1bc25ec4660cddd87804fcf03b2411b5dfb2e94 +COMMIT_ONEDNN=87f65fdd1927b1d0cbdf0ea37728146abfbffb52 +COMMIT_ONEDNN_GPU=20db47e2d3c4df1b66e93bed2e97d30da175512d +COMMIT_FLATBUFFERS=595bf0007ab1929570c7671f091313c8fc20644e +COMMIT_ONNX=e709452ef2bbc1d113faf678c24e6d3467696e83 +COMMIT_ITTAPI=ca45fef1a12cef3316e6ff362a4d36571270e392 +COMMIT_PROTOBUF=f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c +COMMIT_XBYAK=0d67fd1530016b7c56f3cd74b3fca920f4c3e2b4 +BUILD=${BUILD:-2} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "arm" ]; then + SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z +cd $PRGNAM-$VERSION + +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} + -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} + + +patch -p1 < $CWD/010-openvino-disable-werror.patch +patch -p1 < $CWD/020-openvino-use-protobuf-shared-libs.patch + +# Each bundled dep ships as a git submodule; upstream leaves an empty +# placeholder dir where it expects the source. We drop in the pinned tarball +# and symlink the placeholder to whatever top-level dir it unpacks, so the +# extracted dir name (a commit hash) never has to be spelled out here. Bumping +# a dep is then just a new SHA/URL/md5 in the vars and .info, no edits below. +# args: <parent-dir> <placeholder-name> <tarball> +bundle_dep() { + ( cd "$1" + rmdir "$2" + top=$(tar tf "$CWD/$3" | head -1 | cut -d/ -f1) + tar xf "$CWD/$3" + ln -s "$top" "$2" + ) +} + +# Flatbuffers from SBo provide broken cmake files (static-lib removed but +# static-lib-cmake-files not removed), so bundle upstream's copy. +bundle_dep thirdparty/flatbuffers flatbuffers "flatbuffers-$COMMIT_FLATBUFFERS.tar.gz" +bundle_dep thirdparty/onnx onnx "onnx-$COMMIT_ONNX.tar.gz" +bundle_dep thirdparty/ittapi ittapi "ittapi-$COMMIT_ITTAPI.tar.gz" +bundle_dep thirdparty/protobuf protobuf "protobuf-$COMMIT_PROTOBUF.tar.gz" +# Bundle xbyak rather than use the system package: its cmake config exports a +# bare -isystem /usr/include, which breaks GCC 15's #include_next <stdlib.h>. +# Its submodule sits directly at thirdparty/xbyak (no nested wrapper dir). +bundle_dep thirdparty xbyak "xbyak-$COMMIT_XBYAK.tar.gz" +bundle_dep src/plugins/intel_cpu/thirdparty mlas "mlas-$COMMIT_MLAS.tar.gz" +bundle_dep src/plugins/intel_cpu/thirdparty onednn "oneDNN-$COMMIT_ONEDNN.tar.gz" +bundle_dep src/plugins/intel_gpu/thirdparty onednn_gpu "oneDNN-$COMMIT_ONEDNN_GPU.tar.gz" + +# npu plugin needs avx and does not build with the default x86_64 arch +mkdir -p build +cd build + # Configure with no network: openvino's cmake otherwise fetches prebuilt + # deps (e.g. TBB) from storage.openvinotoolkit.org via aria2c, which would + # silently pull in unvetted binaries. Skipped where unshare is not permitted + # (containers without CAP_SYS_ADMIN); the pinned bundled deps still apply. + unshare -n true 2>/dev/null && NETNS="unshare -n" || NETNS="" + $NETNS cmake \ + -G Ninja \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_INSTALL_PREFIX=/usr/share/openvino \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DENABLE_AVX2=OFF \ + -DENABLE_AVX512F=OFF \ + -DENABLE_CPPLINT=OFF \ + -DENABLE_SYSTEM_FLATBUFFERS=OFF \ + -DENABLE_SYSTEM_PUGIXML=ON \ + -DENABLE_SYSTEM_SNAPPY=ON \ + -DENABLE_SYSTEM_TBB=ON \ + -DENABLE_PROFILING_ITT=ON \ + -DENABLE_TBBBIND_2_5=OFF \ + -DENABLE_JS=OFF \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_INTEL_CPU=ON \ + -DENABLE_INTEL_GPU=ON \ + -DENABLE_INTEL_NPU=OFF \ + -DCMAKE_BUILD_TYPE=Release .. + "${NINJA:=ninja}" + DESTDIR=$PKG $NINJA install/strip +cd .. + +# We don't build samples, so we remove samples stub files +rm -rf $PKG/usr/share/openvino/samples + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/openvino/openvino.info b/openvino/openvino.info new file mode 100644 index 0000000..a127b07 --- /dev/null +++ b/openvino/openvino.info @@ -0,0 +1,26 @@ +PRGNAM="openvino" +VERSION="2026.2.1" +HOMEPAGE="https://github.com/openvinotoolkit/openvino/" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://github.com/openvinotoolkit/openvino/archive/2026.2.1/openvino-2026.2.1.tar.gz \ + https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94/mlas-d1bc25ec4660cddd87804fcf03b2411b5dfb2e94.tar.gz \ + https://github.com/openvinotoolkit/oneDNN/archive/87f65fdd1927b1d0cbdf0ea37728146abfbffb52/oneDNN-87f65fdd1927b1d0cbdf0ea37728146abfbffb52.tar.gz \ + https://github.com/oneapi-src/oneDNN/archive/20db47e2d3c4df1b66e93bed2e97d30da175512d/oneDNN-20db47e2d3c4df1b66e93bed2e97d30da175512d.tar.gz \ + https://github.com/google/flatbuffers/archive/595bf0007ab1929570c7671f091313c8fc20644e/flatbuffers-595bf0007ab1929570c7671f091313c8fc20644e.tar.gz \ + https://github.com/onnx/onnx/archive/e709452ef2bbc1d113faf678c24e6d3467696e83/onnx-e709452ef2bbc1d113faf678c24e6d3467696e83.tar.gz \ + https://github.com/intel/ittapi/archive/ca45fef1a12cef3316e6ff362a4d36571270e392/ittapi-ca45fef1a12cef3316e6ff362a4d36571270e392.tar.gz \ + https://github.com/protocolbuffers/protobuf/archive/f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c/protobuf-f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c.tar.gz \ + https://github.com/herumi/xbyak/archive/0d67fd1530016b7c56f3cd74b3fca920f4c3e2b4/xbyak-0d67fd1530016b7c56f3cd74b3fca920f4c3e2b4.tar.gz" +MD5SUM_x86_64="d912a0b8f832cc526fc90e7c0fe4abbd \ + 0e87473410db355fd9251a2e1337dc32 \ + 09c8e12d3638ee7fb084035e3c99b914 \ + e8aa621185319f2a4ad195e9380a3f2a \ + 16699a34eed210ecfe6c4d164926350c \ + d4b12189e7665ae1211181b6a4905700 \ + 66726ae396392a1fa43156a0c764ec5e \ + dbd2ff372e1033676a0c3798a8df4a07 \ + 9d5a8e3ba68b0d1b693e503a31761779" +REQUIRES="pugixml tbb snappy OpenCL-CLHPP" +MAINTAINER="danix" +EMAIL="danix@danix.xyz" diff --git a/openvino/slack-desc b/openvino/slack-desc new file mode 100644 index 0000000..d5180cd --- /dev/null +++ b/openvino/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +openvino: openvino (toolkit for optimizing and deploying AI inference) +openvino: +openvino: OpenVINO is an open-source toolkit for optimizing and deploying AI +openvino: inference. +openvino: +openvino: Supported hardware: +openvino: https://docs.openvino.ai/2024/about-openvino/system-requirements.html +openvino: +openvino: +openvino: https://github.com/openvinotoolkit/openvino/ +openvino: |
