diff options
-rw-r--r-- | scripts/libmakepkg/tidy/strip.sh.in | 9 | ||||
-rw-r--r-- | scripts/makepkg.sh.in | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in index 8a1d6096..e8f54be4 100644 --- a/scripts/libmakepkg/tidy/strip.sh.in +++ b/scripts/libmakepkg/tidy/strip.sh.in @@ -58,9 +58,9 @@ strip_file() { # copy source files to debug directory local f t while read -r t; do - f=${t/$dbgsrc/"$srcdir"} - mkdir -p "${t%/*}" - cp -- "$f" "$t" + f=${t/${dbgsrcdir}/"$srcdir"} + mkdir -p "${dbgsrc/"$dbgsrcdir"/}${t%/*}" + cp -- "$f" "${dbgsrc/"$dbgsrcdir"/}$t" done < <(source_files "$binary") # copy debug symbols to debug directory @@ -104,7 +104,8 @@ tidy_strip() { if check_option "debug" "y"; then dbgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@/usr/lib/debug" - dbgsrc="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@${DBGSRCDIR:-/usr/src/debug}" + dbgsrcdir="${DBGSRCDIR:-/usr/src/debug}" + dbgsrc="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@$dbgsrcdir" mkdir -p "$dbgdir" "$dbgsrc" fi diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 8251e71b..a74e7b39 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -379,10 +379,8 @@ prepare_buildenv() { fi if check_option "debug" "y"; then - if [[ -v DBGSRCDIR ]]; then - DEBUG_CFLAGS+=" -fdebug-prefix-map=$srcdir=$DBGSRCDIR" - DEBUG_CXXFLAGS+=" -fdebug-prefix-map=$srcdir=$DBGSRCDIR" - fi + DEBUG_CFLAGS+=" -fdebug-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}" + DEBUG_CXXFLAGS+=" -fdebug-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}" CFLAGS+=" $DEBUG_CFLAGS" CXXFLAGS+=" $DEBUG_CXXFLAGS" fi |