[Dist/Tizen] Revise packaging to fix build breaks on gcc 13
[platform/upstream/dldt.git] / packaging / openvino.spec
index 8758372..6c3d782 100644 (file)
@@ -17,7 +17,7 @@
 
 %define _extra_cmake_flags %{_cmake_lib_suffix_flag} %{_cmake_sse_support_flag} -DLINUX_OS_NAME="Tizen %{tizen_full_version}"
 
-%ifarch x86_64 i686 armv7l aarch64
+%ifarch x86_64 i686 armv7l aarch64 armv7hl
 
 %ifarch x86_64
 %define install_arch    intel64
@@ -27,7 +27,7 @@
 %define install_arch    i686
 %endif
 
-%ifarch armv7l
+%ifarch armv7l armv7hl
 %define install_arch    armv7l
 %endif
 
@@ -59,10 +59,18 @@ Source1003:     openvino.pc.in
 Patch0:         0001-CMake-Do-not-call-get_linux_name-when-LINUX_OS_NAME-.patch
 Patch1:         0002-CMake-Add-a-variable-to-resolve-dependency-on-TBB-us.patch
 Patch2:         0003-VPU-CMake-Add-a-cmake-option-to-skip-downloading-MVN.patch
+Patch3:         0004-Tizen-Fix-build-breaks-on-Tizen-GCC-13.patch
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(libtbb)
 BuildRequires:  pkgconfig(libusb-1.0)
 BuildRequires:  pkg-config
+Requires:       intel-mvnc-firmware
+## Please note that when you include openvino in a Tizen image (via mic/tic),
+## you need to specify firmware type instead of intel-mvnc-firmware or
+## relying on dependency resolution.
+## E.g., add "mvnc-2x8x-firmware" to image explicitly.
+## If you want to support NCS 1 and 2 simultaneously, install both firmware
+## packages.
 
 %description
 OpenVINO™ toolkit, short for Open Visual Inference and Neural network Optimization toolkit,
@@ -76,6 +84,7 @@ availability to the developer community to innovate deep learning and AI solutio
 %package devel
 Summary:        Development package for OpenVINO™ Toolkit
 Requires:       %{name} = %{version}-%{release}
+Recommends:     mvnc-2x8x-firmware
 
 %description devel
 Development package for Open Visual Inference and Neural network Optimization toolkit.
@@ -86,6 +95,7 @@ This contains corresponding header files and static archives.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 cp %{SOURCE1} .
 cp %{SOURCE1001} ./inference-engine/thirdparty
 cp %{SOURCE1002} ./inference-engine/thirdparty
@@ -101,7 +111,9 @@ popd
 rm -rf build && mkdir -p build
 pushd build
 CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS=${CFLAGS/-Wall/};
+CFLAGS=`echo ${CFLAGS} -Wno-format-truncation`
 CXXFLAGS="${CXXFLAGS:-%optflags}"; export CXXFLAGS=${CXXFLAGS/-Wall/};
+CXXFLAGS=`echo ${CXXFLAGS} -Wno-format-truncation -Wno-unused-const-variable -Wno-free-nonheap-object -Wno-deprecated-declarations -Wno-array-bounds`
 FFLAGS="${FFLAGS:-%optflags}"; export FFLAGS=${FFLAGS/-Wall/};
 cmake .. \
         -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \