[gerbv] Hack libtool to not add rpath. Propagate RPM_OPT_FLAGS to CFLAGS. Pass -ldl through LIBS. Fix date o

corsepiu corsepiu at fedoraproject.org
Tue Jul 5 11:02:28 UTC 2011


commit a8d0ee2291453f7524a0041da9d8d13ed51ea5aa
Author: Ralf Corsépius <corsepiu at fedoraproject.org>
Date:   Tue Jul 5 13:02:10 2011 +0200

    Hack libtool to not add rpath.
    Propagate RPM_OPT_FLAGS to CFLAGS.
    Pass -ldl through LIBS.
    Fix date of previous changelog entry.
    Remove "unused-direct-shlib-dependencies" libtool hacking.

 gerbv.spec |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/gerbv.spec b/gerbv.spec
index 859121f..5a443ca 100644
--- a/gerbv.spec
+++ b/gerbv.spec
@@ -3,7 +3,7 @@
 
 Name:             gerbv
 Version:          2.5.0
-Release:          1%{?dist}
+Release:          2%{?dist}
 Summary:          Gerber file viewer from the gEDA toolkit
 
 Group:            Applications/Engineering
@@ -49,18 +49,19 @@ you will need to install %{name}-devel.
 %setup -q
 
 %build
-export CFLAGS="$CXXFLAGS -ldl -lpthread"
-
 # default measurement units set to millimeters
 %configure             \
    --enable-exportpng  \
    --enable-unit-mm    \
    --disable-update-desktop-database \
    --disable-static    \
-   --enable-gtk2
+   --enable-gtk2 \
+   CFLAGS="${RPM_OPT_FLAGS}" \
+   LIBS="-ldl -lpthread"
 
-# clean unused-direct-shlib-dependencies
-sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
+# Don't use rpath
+sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
 
 %{__make} %{?_smp_mflags}
 
@@ -138,7 +139,14 @@ touch --no-create %{_datadir}/icons/hicolor || :
 
 
 %Changelog
-* Sun Jun 03 2011 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 2.5.0-1
+* Tue Jul 05 2011 Ralf Corsépius <corsepiu at fedoraproject.org> - 2.5.0-2
+- Hack libtool to not add rpath.
+- Propagate RPM_OPT_FLAGS to CFLAGS.
+- Pass -ldl through LIBS.
+- Fix date of previous changelog entry.
+- Remove "unused-direct-shlib-dependencies" libtool hacking.
+
+* Sun Jul 03 2011 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 2.5.0-1
 - new upstream release
 
 * Thu Jul 01 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 2.4.0-1


More information about the scm-commits mailing list