mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
Add helper function to fixup libtool files
When "libdir" is not the final path where we install the library, libtool will mess up the relinking process and prepend the global library directories to the linker search path. If we fix the libdir path, libtool will insert it into the rpath in the binary, which is also pretty bonkers. Maybe, there is a way to do this correctly, but the various GNU mailing lists, Debian wiki, etc.. could not provide a better alternative than patching up libtool scripts. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
e97e355b64
commit
d5c8fce58b
3 changed files with 14 additions and 0 deletions
|
@ -20,6 +20,7 @@ deploy() {
|
|||
local DEPLOY="$2"
|
||||
local DEVDEPLOY="$3"
|
||||
|
||||
unfuck_libtool
|
||||
make DESTDIR="$DEPLOY" install
|
||||
|
||||
rm -r "$DEPLOY/share"
|
||||
|
|
|
@ -37,6 +37,7 @@ deploy() {
|
|||
|
||||
mkdir -p "$DEPLOY/var/lib/hwclock"
|
||||
|
||||
unfuck_libtool
|
||||
make DESTDIR="$DEPLOY" install
|
||||
strip_files ${DEPLOY}/{bin,lib}/*
|
||||
|
||||
|
|
12
util/misc.sh
12
util/misc.sh
|
@ -56,3 +56,15 @@ split_dev_deploy() {
|
|||
break
|
||||
done
|
||||
}
|
||||
|
||||
unfuck_libtool() {
|
||||
local libdir="$PKGDEPLOYDIR/$PKGNAME/lib"
|
||||
local f
|
||||
|
||||
for f in $(find $PKGBUILDDIR -type f -name '*.la'); do
|
||||
sed -i "s#libdir='.*'#libdir='$libdir'#g" "$f";
|
||||
done
|
||||
|
||||
sed -i -r "s/(finish_cmds)=.*$/\1=\"\"/" "$PKGBUILDDIR/libtool"
|
||||
sed -i -r "s/(hardcode_into_libs)=.*$/\1=no/" "$PKGBUILDDIR/libtool"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue