aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2011-02-12 21:59:49 +0000
committerMichał Górny <mgorny@gentoo.org>2011-02-12 21:59:49 +0000
commit27ba50054f40618b57767549239cfdc2fddc6af8 (patch)
tree283275966c14abb80ea0a1564f66789ba28b5e88
parentIntegrate last batch of prefix changes. (diff)
downloadeselect-27ba50054f40618b57767549239cfdc2fddc6af8.tar.gz
eselect-27ba50054f40618b57767549239cfdc2fddc6af8.tar.bz2
eselect-27ba50054f40618b57767549239cfdc2fddc6af8.zip
Create symlinks for .debug files as well.
svn path=/trunk/extern/; revision=802
-rw-r--r--modules/opengl.eselect17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/opengl.eselect b/modules/opengl.eselect
index b9697ad..b08be8e 100644
--- a/modules/opengl.eselect
+++ b/modules/opengl.eselect
@@ -97,6 +97,21 @@ setup_soname_symlinks() {
fi
}
+# XXX: check prefix paths, remove old symlinks when no debug
+setup_debug_symlinks() {
+ local file=$(readlink -f "${1}")
+ local target=${DST_PREFIX}/lib/debug/$2
+ local debugfile=${PREFIX}/lib/debug/${file}.debug
+
+ if [[ -e "${file}" && -e "${debugfile}" ]]; then
+ mkdir -p "${target}" || die "Failed to create ${target}"
+
+ pushd "${target}" &> /dev/null
+ upgrade_file "${debugfile}" "${target}"
+ popd &> /dev/null
+ fi
+}
+
setup_lib_symlinks() {
local profile_libdir=$1
local target=$2
@@ -113,6 +128,7 @@ setup_lib_symlinks() {
for file in "${profile_libdir}"/libGL{,core}.{so,dylib,a}; do
upgrade_file "${file}" "${target}"
setup_soname_symlinks "${file}" "${target}"
+ setup_debug_symlinks "${file}" "${target}"
done
popd &> /dev/null
}
@@ -133,6 +149,7 @@ setup_extensions_symlinks() {
for file in "${src}"/*.{so,dylib,a}; do
upgrade_file "${file}" "${target}"
setup_soname_symlinks "${file}" "${target}"
+ setup_debug_symlinks "${file}" "${target}"
done
popd &> /dev/null
fi