@ -10,10 +10,7 @@
# OpenCV 3.X has an overlinking issue - unsuitable for core libraries
# OpenCV 3.X has an overlinking issue - unsuitable for core libraries
# Reported as https://github.com/opencv/opencv/issues/7001
# Reported as https://github.com/opencv/opencv/issues/7001
%global _without_opencv 1
%global _without_opencv 1
%if 0%{?rhel}
%global _without_frei0r 1
%global _without_frei0r 1
%endif
# flavor nonfree
# flavor nonfree
%if 0%{?_with_nonfree:1}
%if 0%{?_with_nonfree:1}
@ -26,12 +23,12 @@
%global _with_libnpp 1
%global _with_libnpp 1
%endif
%endif
%global _with_fdk_aac 1
%global _with_fdk_aac 1
%global _without_cdio 1
%global _without_cdio 0
%global _without_frei0r 1
%global _without_frei0r 0
%global _without_gpl 1
%global _without_gpl 0
%global _without_x264 1
%global _without_x264 0
%global _without_x265 1
%global _without_x265 0
%global _without_xvid 1
%global _without_xvid 0
%endif
%endif
# Disable nvenc when not relevant
# Disable nvenc when not relevant
@ -281,7 +278,7 @@ This package contains development files for %{name}
--enable-pthreads \\\
--enable-pthreads \\\
--disable-static \\\
--disable-static \\\
--enable-shared \\\
--enable-shared \\\
%{!?_without_gpl:--enable-gpl} \\\
--enable-gpl \\\
--disable-debug \\\
--disable-debug \\\
--disable-stripping
--disable-stripping
@ -317,13 +314,7 @@ cp -pr doc/examples/{*.c,Makefile,README} _doc/examples/
--enable-runtime-cpudetect \
--enable-runtime-cpudetect \
%endif
%endif
%ifarch %{power64}
%ifarch %{power64}
%ifarch ppc64
%ifarch ppc64 ppc64le
--cpu=g5 \
%endif
%ifarch ppc64p7
--cpu=power7 \
%endif
%ifarch ppc64le
--cpu=power8 \
--cpu=power8 \
%endif
%endif
--enable-pic \
--enable-pic \
@ -360,8 +351,10 @@ rm -r %{buildroot}%{_datadir}/%{name}/examples
install -pm755 tools/qt-faststart %{buildroot}%{_bindir}
install -pm755 tools/qt-faststart %{buildroot}%{_bindir}
%endif
%endif
%ldconfig_scriptlets libs
%post libs -p /sbin/ldconfig
%ldconfig_scriptlets -n libavdevice%{?flavor}
%postun libs -p /sbin/ldconfig
%post -n libavdevice%{?flavor} -p /sbin/ldconfig
%postun -n libavdevice%{?flavor} -p /sbin/ldconfig
%if 0%{!?_without_tools:1}
%if 0%{!?_without_tools:1}
%files
%files