aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Stephen P. Bennett <spb@exherbo.org> 2006-09-02 23:27:55 +0000
committerAvatar Stephen P. Bennett <spb@exherbo.org> 2006-09-02 23:27:55 +0000
commit9b80b7cadb8e88e747d4d48d24d8e44658cce5a6 (patch)
tree2fafe2af4cfe0ad0e74f42ae3b02f4dc7b8ed039
parent049d50faf821c6da7e0d44da027135b46950f8ac (diff)
downloadpaludis-9b80b7cadb8e88e747d4d48d24d8e44658cce5a6.tar.gz
paludis-9b80b7cadb8e88e747d4d48d24d8e44658cce5a6.tar.xz
Fix --libdir handling in econf to take account of --prefix passed by the ebuild
-rw-r--r--ebuild/build_functions.bash14
1 files changed, 12 insertions, 2 deletions
diff --git a/ebuild/build_functions.bash b/ebuild/build_functions.bash
index 153e3e7..d4abaa9 100644
--- a/ebuild/build_functions.bash
+++ b/ebuild/build_functions.bash
@@ -40,12 +40,22 @@ econf()
[[ -z "${CBUILD}" ]] || LOCAL_EXTRA_ECONF="--build=${CBUILD} ${LOCAL_EXTRA_ECONF}"
[[ -z "${CTARGET}" ]] || LOCAL_EXTRA_ECONF="--target=${CTARGET} ${LOCAL_EXTRA_ECONF}"
- # Check that this is actually what's wanted for multilib etc.
+ # If the ebuild passed in --prefix, use that to set --libdir. KDE at least needs this.
+
+ ECONF_PREFIX=/usr
+ for i in "$@"; do
+ if [[ ${i} == --prefix=* ]]; then
+ ECONF_PREFIX=${i#--prefix=}
+ elif [[ ${i} == --exec-prefix=* ]]; then
+ ECONF_PREFIX=${i#--exec-prefix=}
+ fi
+ done
+
local libcmd=
if [[ -n "${ABI}" ]] ; then
local v="LIBDIR_${ABI}"
if [[ -n "${!v}" ]] ; then
- libcmd="--libdir=/usr/$(ebuild_get_libdir)"
+ libcmd="--libdir=${ECONF_PREFIX}/$(ebuild_get_libdir)"
fi
fi