diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 112 |
1 files changed, 72 insertions, 40 deletions
@@ -1,13 +1,13 @@ # Maintainer: Daniel Bermond <dbermond@archlinux.org> pkgname=openvino-git -pkgver=2020.2.r2962.g1ffeb24a41 +pkgver=2021.4.2.r2142.gf565e0f854 pkgrel=1 pkgdesc='A toolkit for developing artificial inteligence and deep learning applications (git version)' arch=('x86_64') url='https://docs.openvinotoolkit.org/' license=('Apache') -depends=('protobuf') +depends=('protobuf' 'numactl' 'libxml2') # GPU (clDNN) plugin: only Intel GPUs are supported: # https://github.com/openvinotoolkit/openvino/issues/452#issuecomment-722941119 optdepends=('intel-compute-runtime: for GPU (clDNN) plugin' @@ -26,27 +26,53 @@ conflicts=('openvino' 'intel-openvino-git') replaces=('intel-openvino-git') options=('!emptydirs') source=('git+https://github.com/openvinotoolkit/openvino.git' + 'oneDNN-openvinotoolkit'::'git+https://github.com/openvinotoolkit/oneDNN.git' + 'git+https://github.com/herumi/xbyak.git' + 'git+https://github.com/madler/zlib.git' + 'git+https://github.com/zeux/pugixml.git' 'git+https://github.com/opencv/ade.git' - 'git+https://github.com/openvinotoolkit/oneDNN.git' - 'googletest-openvinotoolkit'::'git+https://github.com/openvinotoolkit/googletest.git' 'git+https://github.com/gflags/gflags.git' - 'git+https://github.com/herumi/xbyak.git' + 'googletest-openvinotoolkit'::'git+https://github.com/openvinotoolkit/googletest.git' + 'git+https://github.com/KhronosGroup/OpenCL-ICD-Loader.git' + 'git+https://github.com/KhronosGroup/OpenCL-Headers.git' + 'git+https://github.com/KhronosGroup/OpenCL-CLHPP.git' + 'git+https://github.com/onnx/onnx.git' + 'git+https://github.com/protocolbuffers/protobuf.git' + 'git+https://github.com/pybind/pybind11.git' + 'git+https://github.com/intel/ittapi.git' + 'git+https://github.com/nithinn/ncc.git' + 'git+https://github.com/oneapi-src/oneDNN.git' + 'git+https://github.com/openvinotoolkit/open_model_zoo.git' + 'git+https://github.com/nlohmann/json.git' + 'git+https://github.com/pboettch/json-schema-validator.git' 'openvino.conf' - 'openvino.sh' 'setupvars.sh' '010-ade-disable-werror.patch' - '020-openvino-cldnn-disable-werror.patch') + '020-openvino-use-protobuf-shared-libs.patch') sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' - '66cbaab93a6097207ff0908db155d590ad30b5fe12b429473e0bdfa99d1fd37f' - '49a1cdd2357ac3c657b28d72aea1294e4af46389e41ed0d55ccbd12bd995058d' - 'cfcc5af35d7a50f83c780716f69f8a800b14bcf143f7abafd31a7a0dcb8c9ae8' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + '48b6a93bb54c36f9bc87a7f326b0a634f752f34f57f90a60dccc13f92fd96a9d' + '15918bfcab40965828e2f6250b16152dc9b8c078bd86f1929bb5fd38f19f854d' '502fcbb3fcbb66aa5149ad2cc5f1fa297b51ed12c5c9396a16b5795a03860ed0' - 'abf90c7b324ba7c8931da620fa136ff1ff5e834532ddf076fa5c95735d10abef') + '33233c69916485f1bef20c9d5f48bdba1189012ce8bad9dafc01249e7bc10f86') export GIT_LFS_SKIP_SMUDGE='1' @@ -55,26 +81,44 @@ prepare() { git -C openvino lfs pull "${source[0]/git+/}" git -C openvino submodule init - git -C openvino config --local submodule.inference-engine/thirdparty/ade.url "${srcdir}/ade" - git -C openvino config --local submodule.inference-engine/thirdparty/mkl-dnn.url "${srcdir}/oneDNN" - git -C openvino config --local submodule.inference-engine/tests/ie_test_utils/common_test_utils/gtest.url "${srcdir}/googletest-openvinotoolkit" - git -C openvino config --local submodule.inference-engine/samples/thirdparty/gflags.url "${srcdir}/gflags" + git -C openvino config --local submodule.src/plugins/intel_cpu/thirdparty/mkl-dnn.url "${srcdir}/oneDNN-openvinotoolkit" git -C openvino config --local submodule.thirdparty/xbyak.url "${srcdir}/xbyak" + git -C openvino config --local submodule.thirdparty/zlib/zlib.url "${srcdir}/zlib" + git -C openvino config --local submodule.thirdparty/pugixml.url "${srcdir}/pugixml" + git -C openvino config --local submodule.thirdparty/ade.url "${srcdir}/ade" + git -C openvino config --local submodule.thirdparty/gflags/gflags.url "${srcdir}/gflags" + git -C openvino config --local submodule.thirdparty/gtest/gtest.url "${srcdir}/googletest-openvinotoolkit" + git -C openvino config --local submodule.thirdparty/ocl/icd_loader.url "${srcdir}/OpenCL-ICD-Loader" + git -C openvino config --local submodule.thirdparty/ocl/cl_headers.url "${srcdir}/OpenCL-Headers" + git -C openvino config --local submodule.thirdparty/ocl/clhpp_headers.url "${srcdir}/OpenCL-CLHPP" + git -C openvino config --local submodule.thirdparty/onnx.url "${srcdir}/onnx" + git -C openvino config --local submodule.thirdparty/protobuf.url "${srcdir}/protobuf" + git -C openvino config --local submodule.src/bindings/python/thirdparty/pybind11.url "${srcdir}/pybind11" + git -C openvino config --local submodule.thirdparty/ittapi/ittapi.url "${srcdir}/ittapi" + git -C openvino config --local submodule.ncc.url "${srcdir}/ncc" + git -C openvino config --local submodule.thirdparty/onednn_gpu.url "${srcdir}/oneDNN" + git -C openvino config --local submodule.tools/pot/thirdparty/open_model_zoo.url "${srcdir}/open_model_zoo" + git -C openvino config --local submodule.thirdparty/json/nlohmann_json.url "${srcdir}/json" + git -C openvino config --local submodule.thirdparty/json/nlohmann_json_schema_validator.url "${srcdir}/json-schema-validator" git -C openvino submodule update - patch -d openvino/inference-engine/thirdparty/ade -Np1 -i "${srcdir}/010-ade-disable-werror.patch" - patch -d openvino -Np1 -i "${srcdir}/020-openvino-cldnn-disable-werror.patch" + patch -d openvino/thirdparty/ade -Np1 -i "${srcdir}/010-ade-disable-werror.patch" + patch -d openvino -Np1 -i "${srcdir}/020-openvino-use-protobuf-shared-libs.patch" } pkgver() { - git -C openvino describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' + local _version + local _revision + local _shorthash + _version="$(git -C openvino tag --list | sort -Vr | sed '/dev_/d' | head -n1)" + _revision="$(git -C openvino rev-list --count "${_version}..HEAD")" + _shorthash="$(git -C openvino rev-parse --short HEAD)" + printf '%s.r%s.g%s' "$_version" "$_revision" "$_shorthash" } build() { local _ocvmaj - local _pyver _ocvmaj="$(opencv_version | awk -F'.' '{ print $1 }')" - _pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')" export OpenCV_DIR="/usr/lib/cmake/opencv${_ocvmaj}" @@ -86,14 +130,10 @@ build() { -DENABLE_AVX512F:BOOL='OFF' \ -DENABLE_PROFILING_ITT:BOOL='OFF' \ -DENABLE_PYTHON:BOOL='ON' \ - -DPYTHON_EXECUTABLE='/usr/bin/python' \ - -DPYTHON_LIBRARY="/usr/lib/libpython${_pyver}.so" \ - -DPYTHON_INCLUDE_DIR="/usr/include/python${_pyver}" \ - -DENABLE_SPEECH_DEMO:BOOL='OFF' \ -DENABLE_OPENCV:BOOL='OFF' \ - -DNGRAPH_TEST_UTIL_ENABLE:BOOL='OFF' \ - -DNGRAPH_UNIT_TEST_ENABLE:BOOL='FALSE' \ - -DNGRAPH_USE_SYSTEM_PROTOBUF:BOOL='ON' \ + -DENABLE_CLANG_FORMAT:BOOL='OFF' \ + -DENABLE_NCC_STYLE:BOOL='OFF' \ + -DENABLE_SYSTEM_PROTOBUF:BOOL='ON' \ -DTREAT_WARNING_AS_ERROR:BOOL='OFF' \ -Wno-dev make -C build @@ -101,20 +141,12 @@ build() { package() { make -C build DESTDIR="$pkgdir" install - install -D -m644 openvino.conf -t "${pkgdir}/etc/ld.so.conf.d" - install -D -m755 openvino.sh -t "${pkgdir}/etc/profile.d" - install -D -m755 setupvars.sh -t "${pkgdir}/opt/intel/openvino/bin" local _gnaver - local _gnasover - local _gnasover_full - local _gnadir="${pkgdir}/opt/intel/openvino/deployment_tools/inference_engine/external/gna" - _gnaver="$(find openvino/inference-engine/temp -type d -name 'gna_*' | sed 's/^.*gna_//')" - _gnasover="$(find "${_gnadir}/lib" -type f -regextype 'posix-basic' -regex '.*/libgna\.so\.[0-9]*$' | sed 's/.*\.so\.//')" - _gnasover_full="$(find "${_gnadir}/lib" -type f -regextype 'posix-basic' -regex '.*/libgna\.so\.[0-9]*\..*' | sed 's/.*\.so\.//')" - cp -dr --no-preserve='ownership' "openvino/inference-engine/temp/gna_${_gnaver}/include" "$_gnadir" - rm "${_gnadir}/lib"/libgna.so{,".${_gnasover}"} - ln -s "libgna.so.${_gnasover_full}" "${_gnadir}/lib/libgna.so.${_gnasover}" - ln -s "libgna.so.${_gnasover}" "${_gnadir}/lib/libgna.so" + _gnaver="$(find openvino/temp -type d -name 'gna_*' | sed 's/.*_//')" + + cp -dr --no-preserve='ownership' "openvino/temp/gna_${_gnaver}/include" \ + "${pkgdir}/opt/intel/openvino/runtime/include/gna" + chmod -R a+r "${pkgdir}/opt/intel/openvino/runtime/include/gna" } |