Pin GenAI 2026.4.1.0 to match Arch OpenVINO 2026.4.1. Restrict the package to edge while rc and stable retain 2026.3.1, derive the exact core dependency from the GenAI version, and keep updates manual. Set standard PCRE2 install paths for the current CMake build. Co-authored-by: GPT 6.1 Sol High <noreply@openai.com>
97 lines
3.1 KiB
Bash
97 lines
3.1 KiB
Bash
# Maintainer: Spencer Bull <spencer@omarchy.org>
|
|
|
|
pkgname=openvino-genai
|
|
pkgver=2026.4.1.0
|
|
pkgrel=1
|
|
epoch=1
|
|
pkgdesc="OpenVINO GenAI C and C++ runtime libraries"
|
|
arch=('x86_64')
|
|
url="https://github.com/openvinotoolkit/openvino.genai"
|
|
license=('Apache-2.0')
|
|
options=('!debug' '!lto')
|
|
depends=(
|
|
'gcc-libs'
|
|
'glibc'
|
|
'onetbb'
|
|
"openvino=${pkgver%.*}" # Match GenAI's core runtime version; includes libopenvino_c.so.
|
|
)
|
|
makedepends=(
|
|
'cmake'
|
|
'git'
|
|
'ninja'
|
|
'python'
|
|
)
|
|
optdepends=(
|
|
'openvino-intel-gpu-plugin: inference on Intel GPUs'
|
|
'openvino-intel-npu-plugin: inference on Intel NPUs'
|
|
)
|
|
|
|
_commit=ab01d1771e4adaa0e1e08e9d630def170572506c
|
|
source=(
|
|
"openvino.genai::git+$url.git#commit=$_commit"
|
|
'gcc-16-char8_t.patch'
|
|
'linear-attention-guard-constructor.patch'
|
|
)
|
|
sha256sums=(
|
|
'SKIP'
|
|
'6e685c1e45d4b2314fd55e2f791846cc9086413ba62a6bb5e31be5a5878a243c'
|
|
'61958d64dd7510ff0cb6da010f26fddba3e5dbc38691828163a63d54951d1b2a'
|
|
)
|
|
|
|
prepare() {
|
|
cd openvino.genai
|
|
patch -Np1 -i "$srcdir/gcc-16-char8_t.patch"
|
|
patch -Np1 -i "$srcdir/linear-attention-guard-constructor.patch"
|
|
git submodule update --init --recursive
|
|
}
|
|
|
|
build() {
|
|
CFLAGS+=" -ffile-prefix-map=$srcdir=/usr/src/$pkgname"
|
|
CXXFLAGS+=" -ffile-prefix-map=$srcdir=/usr/src/$pkgname"
|
|
|
|
cmake -S openvino.genai -B build -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_BINDIR=bin \
|
|
-DCMAKE_INSTALL_INCLUDEDIR=include \
|
|
-DCMAKE_SKIP_RPATH=ON \
|
|
-DENABLE_JS=OFF \
|
|
-DENABLE_MISAKI_CPP=OFF \
|
|
-DENABLE_PYTHON=OFF \
|
|
-DENABLE_SAMPLES=OFF \
|
|
-DENABLE_TESTS=OFF \
|
|
-DENABLE_TOOLS=OFF \
|
|
-DENABLE_XGRAMMAR=OFF
|
|
|
|
cmake --build build
|
|
}
|
|
|
|
check() {
|
|
LD_LIBRARY_PATH="$srcdir/build/openvino_genai:$srcdir/build/src/c${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \
|
|
python -c 'import ctypes; ctypes.CDLL("libopenvino_c.so"); ctypes.CDLL("libopenvino_genai_c.so")'
|
|
}
|
|
|
|
package() {
|
|
install -d "$pkgdir/usr/lib" "$pkgdir/usr/share/licenses/$pkgname"
|
|
|
|
cp -a build/openvino_genai/libopenvino_genai.so* "$pkgdir/usr/lib/"
|
|
cp -a build/openvino_genai/libopenvino_tokenizers.so* "$pkgdir/usr/lib/"
|
|
cp -a build/src/c/libopenvino_genai_c.so* "$pkgdir/usr/lib/"
|
|
|
|
# Consumers such as omawake load the unversioned name dynamically.
|
|
# Reject a missing/empty library or a broken symlink before publishing.
|
|
if [[ ! -s "$pkgdir/usr/lib/libopenvino_genai_c.so" ]]; then
|
|
error 'Required C binding is missing or empty: libopenvino_genai_c.so'
|
|
return 1
|
|
fi
|
|
|
|
install -Dm644 openvino.genai/LICENSE \
|
|
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
install -Dm644 openvino.genai/third-party-programs.txt \
|
|
"$pkgdir/usr/share/licenses/$pkgname/third-party-programs.txt"
|
|
install -Dm644 openvino.genai/thirdparty/openvino_tokenizers/LICENSE \
|
|
"$pkgdir/usr/share/licenses/$pkgname/openvino-tokenizers-LICENSE"
|
|
install -Dm644 openvino.genai/thirdparty/openvino_tokenizers/third-party-programs.txt \
|
|
"$pkgdir/usr/share/licenses/$pkgname/openvino-tokenizers-third-party-programs.txt"
|
|
}
|