Add without_compat_opencv_pc with conditional

This commit is contained in:
Nicolas Chauvet 2020-03-26 09:10:36 +01:00
parent 4971907f32
commit bc40108ce3

View File

@ -327,7 +327,6 @@ popd
-DWITH_OPENMP=ON \
-DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \
-DOPENCV_GENERATE_PKGCONFIG=ON \
-DOPENCV_PC_FILE_NAME=opencv.pc \
%{?with_gdcm: -DWITH_GDCM=ON } \
%{?with_libmfx: -DWITH_MFX=ON } \
%{?with_clp: -DWITH_CLP=ON } \
@ -354,6 +353,11 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
ln -s opencv4/opencv2 %{buildroot}%{_includedir}
ln -s opencv4 %{buildroot}%{_datadir}/opencv
# For compatibility with existing opencv.pc application
%{!?without_compat_openvc_pc:
ln -s opencv4.pc %{buildroot}%{_libdir}/pkgconfig/opencv.pc
}
%check
# Check fails since we don't support most video
@ -417,7 +421,10 @@ popd
%dir %{_includedir}/opencv4
%{_includedir}/opencv4/opencv2
%{_libdir}/lib*.so
%{!?without_compat_openvc_pc:
%{_libdir}/pkgconfig/opencv.pc
}
%{_libdir}/pkgconfig/opencv4.pc
%{_libdir}/cmake/OpenCV/*.cmake
%files doc