diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2019-06-26 08:44:55 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2019-06-26 08:44:55 +0800 |
commit | 6231d3ec7470f8b52fcca3e8ed83f99821a4c215 (patch) | |
tree | 1e18ba7d5155fca212b806c546c8e7378c128760 /Mk | |
parent | 3333d6fb2814166529d91864d1364c4f6132bee3 (diff) | |
download | freebsd-ports-gnome-6231d3ec7470f8b52fcca3e8ed83f99821a4c215.tar.gz freebsd-ports-gnome-6231d3ec7470f8b52fcca3e8ed83f99821a4c215.tar.zst freebsd-ports-gnome-6231d3ec7470f8b52fcca3e8ed83f99821a4c215.zip |
Allow generate-symbols.sh to actually work.
It splits out symbols to PREFIX as well not LOCALBASE. Fix
check-stagedir.sh for that.
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Scripts/check-stagedir.sh | 4 | ||||
-rw-r--r-- | Mk/Scripts/generate-symbols.sh | 11 |
2 files changed, 7 insertions, 8 deletions
diff --git a/Mk/Scripts/check-stagedir.sh b/Mk/Scripts/check-stagedir.sh index 9037df598e6b..458410cf7690 100644 --- a/Mk/Scripts/check-stagedir.sh +++ b/Mk/Scripts/check-stagedir.sh @@ -95,14 +95,14 @@ setup_plist_seds() { unset PLIST_SUB_SED # Used for generate_plist sed_files_gen="${sed_portdocsexamples} /^share\/licenses/d; \ - \#${LOCALBASE}/lib/debug#d;" + \#${PREFIX}/lib/debug#d;" sed_dirs_gen="s,^,@dir ,; \ ${sed_portdocsexamples} \ /^@dir share\/licenses/d;" # These prevent ignoring DOCS/EXAMPLES dirs with sed_portdocsexamples sed_files="/^share\/licenses/d; \ - \#${LOCALBASE}/lib/debug#d;" + \#${PREFIX}/lib/debug#d;" sed_dirs="s,^,@dir ,; \ /^@dir share\/licenses/d;" diff --git a/Mk/Scripts/generate-symbols.sh b/Mk/Scripts/generate-symbols.sh index 942b1738c31d..a4e78ae481c8 100644 --- a/Mk/Scripts/generate-symbols.sh +++ b/Mk/Scripts/generate-symbols.sh @@ -17,7 +17,7 @@ find ${STAGEDIR} -type f \ > ${ELF_FILES} # Create all of the /usr/local/lib/* dirs -lib_dir="${STAGEDIR}.debug${PREFIX}/lib/debug" +lib_dir="${STAGEDIR}${PREFIX}/lib/debug" sed -e "s,^${STAGEDIR}${PREFIX}/,${lib_dir}/," -e 's,/[^/]*$,,' \ ${ELF_FILES} | sort -u | xargs mkdir -p @@ -27,13 +27,12 @@ while read -r staged_elf_file; do # Strip off filename lib_dir_dest="${lib_dir_dest%/*}" # Save symbols to f.debug - objcopy --only-keep-debug "${staged_elf_file}" \ - "${lib_dir_dest}/${elf_file_name}.debug" + debug_file_name="${lib_dir_dest}/${elf_file_name}.debug" + objcopy --only-keep-debug "${staged_elf_file}" "${debug_file_name}" # Strip and add a reference to f.debug for finding the symbols. objcopy --strip-debug --strip-unneeded \ - --add-gnu-debuglink="${lib_dir_dest}/${elf_file_name}.debug" \ - "${staged_elf_file}" + --add-gnu-debuglink="${debug_file_name}" "${staged_elf_file}" msg "Saved symbols for ${staged_elf_file}" -done < ${ELF_FILES} +done < ${ELF_FILES} 3>> ${TMPPLIST} rm -f ${ELF_FILES} |