Add python3-setuptools dependency for python 3.12
[platform/upstream/opencv.git] / packaging / opencv.spec
index b81f559..ef060a1 100644 (file)
@@ -1,4 +1,4 @@
-%if 0%{?_with_da_profile}
+%if 0%{?_with_da_profile}%{?CV_VIDEOIO_BACKEND_GSTREAMER}
 %define support_gstreamer 1
 %else
 %define support_gstreamer 0
@@ -6,10 +6,10 @@
 
 Name: opencv
 Summary: OpenCV library
-Version: 4.5.3
-Release: 5
+Version: 4.7.0
+Release: 7
 Group: Development/Libraries
-License: Apache-2.0 and BSD-3-Clause
+License: Apache-2.0
 Source0: %{name}-%{version}.tar.gz
 Source100: opencv-contrib-%{version}.tar.gz
 # In cmake/OpenCVDetectPython.cmake, python packages are installed
@@ -34,6 +34,7 @@ BuildRequires:  pkgconfig(libwebp)
 #support python3
 %if "%{?profile}" != "tv"
 BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
 BuildRequires:  python3-numpy-devel
 %endif
 
@@ -88,6 +89,10 @@ ARCH=riscv64
 # compatibility to opencv3
 sed -i 's/opencv4.pc/opencv.pc/g' cmake/OpenCVGenPkgconfig.cmake
 
+# FFMPEG's TIZEN_FEATURE_LIBAV feature.
+export CFLAGS+=" -DTIZEN_FEATURE_LIBAV"
+export CXXFLAGS+=" -DTIZEN_FEATURE_LIBAV"
+
 mkdir -p build
 cd build
 cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
@@ -115,6 +120,7 @@ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
        -DBUILD_opencv_python3=ON \
 %else
        -DBUILD_opencv_python3=OFF \
+       -DPARALLEL_ENABLE_PLUGINS=OFF \
 %endif
        -DBUILD_opencv_shape=OFF \
        -DBUILD_opencv_stitching=OFF \
@@ -145,7 +151,7 @@ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
        -DBUILD_opencv_img_hash=OFF \
        -DBUILD_opencv_line_descriptor=OFF \
        -DBUILD_opencv_matlab=OFF \
-       -DBUILD_opencv_optflow=OFF \
+       -DBUILD_opencv_optflow=ON \
        -DBUILD_opencv_ovis=OFF \
        -DBUILD_opencv_phase_unwrapping=OFF \
        -DBUILD_opencv_plot=ON \
@@ -236,6 +242,7 @@ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
        -DWITH_VTK=OFF \
        -DWITH_WIN32UI=OFF \
        -DWITH_XIMEA=OFF \
+       -DWITH_QUIRC=OFF \
 %if 0%{?support_gstreamer}
        -DWITH_GSTREAMER=ON \
 %else
@@ -305,7 +312,7 @@ fi
 %files
 %manifest opencv.manifest
 %defattr(-,root,root,-)
-%license LICENSE LICENSE.BSD-3-Clause
+%license LICENSE
 %{_libdir}/*.so*
 
 /usr/share/licenses/opencv4/*