Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=9afa59ca7a6eab88f34ded627dcd5f65eb31ebd3

commit 9afa59ca7a6eab88f34ded627dcd5f65eb31ebd3
Author: James Buren <[email protected]>
Date:   Thu Nov 19 10:38:36 2015 +0100

include/lib32.sh: add workaround to build.
should now fix symbolic links from packages like glibc
which have usr/lib symlinks to lib.

diff --git a/source/include/lib32.sh b/source/include/lib32.sh
index d202694..0654ed5 100644
--- a/source/include/lib32.sh
+++ b/source/include/lib32.sh
@@ -64,7 +64,13 @@ 
source=(http://ftp.frugalware.org/pub/frugalware/frugalware-current/frugalware-i
###
Fbuildlib32()
{
+       local old new IFS
+
+       # Extract fpm.
tar -xf "$_F_archive_name-${pkgver//_/-}-i686.fpm" || Fdie
+
+       # Copy and map all directories to their new name.
+       IFS=$' '
for i in "${_F_lib32_dirs[@]}"
do
old="${i%:*}"
@@ -75,6 +81,24 @@ Fbuildlib32()
Fcprel "$old/" "$new/"
fi
done
+
+       # Try to fix broken symlinks between lib and usr/lib.
+       # This at least solves issues with glibc.
+       IFS=$'\n'
+       for i in `find -L "$Fdestdir" -type l`
+       do
+               target=`readlink "$i"`
+               for j in "${_F_lib32_dirs[@]}"
+               do
+                       old="${j%:*}"
+                       new="${j#*:}"
+                       if [[ "$target" =~ "/$old/" ]]
+                       then
+                               Fln "${target/$old/$new}" "${i/$Fdestdir/}"
+                               break
+                       fi
+               done
+       done
}

###
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to