]> git.pld-linux.org Git - packages/vim.git/commitdiff
- hack around glibc brokeness wrt static linking and nss
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 16 Aug 2010 12:28:47 +0000 (12:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    vim.spec -> 1.516

vim.spec

index 017d8369e778d8feeca33161ac4d52f6b7e22c25..c9561ebd1ff9a288c3628c20b09b52bb890f3720 100644 (file)
--- a/vim.spec
+++ b/vim.spec
@@ -1,6 +1,10 @@
 # TODO
 # - evim manuals not installed if no gui is built, move to -gui packages?
 #
+# NOTE
+# - static package is not quite static, it must be linked with shared glibc
+#   because of glibc nss brokeness wrt all static linking
+#
 # Conditional build:
 %bcond_without static          # don't build static version
 %bcond_without athena          # don't build Athena Widgets-based gvim
@@ -8,7 +12,7 @@
 %bcond_without gtk             # don't build GTK+-based gvim support
 %bcond_without gnome           # don't build GNOME-based gvim support
 %bcond_without heavy           # don't build heavy (full-featured GNOME-based gvim/vim)
-%bcond_without gui                     # don't build any GUI
+%bcond_without gui             # don't build any GUI
 %bcond_with    perl            # with Perl interp in vim package
 %bcond_with    python          # with Python interp in vim package
 %bcond_with    ruby            # with Ruby interp in vim package
@@ -40,7 +44,7 @@ Summary(tr.UTF-8):    Gelişmiş bir vi sürümü
 Summary(uk.UTF-8):     Visual editor IMproved - Єдино Вірний Редактор :)
 Name:          vim
 Version:       %{ver}.%{patchlevel}
-Release:       4
+Release:       4.1
 Epoch:         4
 License:       Charityware
 Group:         Applications/Editors/Vim
@@ -762,6 +766,7 @@ install -d bin
 build() {
        set -x
        local target=$1
+       local shlink
        shift
 
        %{__make} distclean
@@ -786,11 +791,24 @@ build() {
                "$@"
 
        %{__make} vim
+       # Hack around glibc brokeness wrt static linking and NSS (Name Service Shit)
+       if [ "$target" = "vim.static" ]; then
+               echo "s| -l\([^ ]\+\)| %{_libdir}/lib\1.a|g" >>auto/link.sed
+               rm -f vim
+               %{__make} vim
+               shlink=$(ldd ./vim | grep -v "linux-vdso\|libc.so\|ld-linux.*" || :)
+               if [ -n "$shlink" ]; then
+                       echo "Looks like static link failed!"
+                       echo "These libs should be linked static:"
+                       echo $shlink
+                       return 1
+               fi
+       fi
        mv -f vim bin/$target
 }
 
 %if %{with static}
-LDFLAGS="%{rpmldflags} -static"
+#LDFLAGS="%{rpmldflags} -static"
 build vim.static \
        --disable-gui \
        --without-x \
@@ -804,7 +822,7 @@ build vim.static \
        --disable-multibyte \
        --disable-nls
 
-LDFLAGS="%{rpmldflags}"
+#LDFLAGS="%{rpmldflags}"
 %endif
 
 build vim.ncurses \
This page took 0.380655 seconds and 4 git commands to generate.