#2 Fix libs variable in .pc files (bugzilla 1739368)
Merged 2 years ago by jdekloe. Opened 2 years ago by edigiacomo.
https://github.com/ARPA-SIMC/eccodes-rpm pagure-issue1739368  into  master

Use single quote
Emanuele Di Giacomo • 2 years ago  
Fix libs variable in .pc files (bugzilla 1739368)
Emanuele Di Giacomo • 2 years ago  
eccodes.spec
file modified
+2 -5
@@ -301,11 +301,8 @@

  # have no effect on the generated *.pc files.

  # These still contain an rpath reference, so patch them and remove 

  # the rpath using sed

- for pcfile in %{buildroot}/%{_libdir}/pkgconfig/*.pc ; do \

-   mv $pcfile $pcfile.orig; \

-   cat $pcfile.orig | sed 's|,-rpath,|,|g' > $pcfile ; \

-   rm $pcfile.orig; \

- done

+ sed -i 's|^libs=.*$|libs=-L${libdir} -leccodes|g' %{buildroot}/%{_libdir}/pkgconfig/eccodes.pc

+ sed -i 's|^libs=.*$|libs=-L${libdir} -leccodes_f90 -leccodes|g' %{buildroot}/%{_libdir}/pkgconfig/eccodes_f90.pc

  

  %ldconfig_scriptlets

  

no initial comment

Fix https://bugzilla.redhat.com/show_bug.cgi?id=1739368.

I've tried to patch the upstream to use CMAKE_SKIP_RPATH/CMAKE_SKIP_INSTALL_RPATH, but I think that it wotuld be less maintainable than this patch.

thanks for spotting this. Accepting your patch.

Pull-Request has been merged by jdekloe

2 years ago
Metadata