From bc40108ce3cf3f2356cf5b5a34c621103d2a4815 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 26 Mar 2020 09:10:36 +0100 Subject: [PATCH] Add without_compat_opencv_pc with conditional --- opencv.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/opencv.spec b/opencv.spec index db11351..d59da81 100644 --- a/opencv.spec +++ b/opencv.spec @@ -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