hooks/pre-configure/02-script-wrapper.sh: add wrapper for install(1) to prevent stripping.
This commit is contained in:
parent
5b845c0ac7
commit
e02a68f524
2 changed files with 51 additions and 3 deletions
|
@ -79,10 +79,18 @@ _EOF
|
|||
ln -sf ${XBPS_CROSS_TRIPLET}-pkg-config ${XBPS_WRAPPERDIR}/pkg-config
|
||||
}
|
||||
|
||||
install_wrapper() {
|
||||
install -m0755 ${XBPS_COMMONDIR}/hooks/pre-configure/install-wrapper \
|
||||
${XBPS_WRAPPERDIR}/install
|
||||
}
|
||||
|
||||
hook() {
|
||||
export PATH="$XBPS_WRAPPERDIR:$PATH"
|
||||
|
||||
install_wrapper
|
||||
|
||||
[ -z "$CROSS_BUILD" ] && return 0
|
||||
|
||||
# create wrapers
|
||||
pkgconfig_wrapper
|
||||
generic_wrapper icu-config
|
||||
generic_wrapper libgcrypt-config
|
||||
|
@ -112,6 +120,4 @@ hook() {
|
|||
generic_wrapper3 libetpan-config
|
||||
python_wrapper python-config 2.7
|
||||
python_wrapper python3.4-config 3.4m
|
||||
|
||||
export PATH="$XBPS_WRAPPERDIR:$PATH"
|
||||
}
|
||||
|
|
42
common/hooks/pre-configure/install-wrapper
Executable file
42
common/hooks/pre-configure/install-wrapper
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
# install-wrapper - run install(1), but never strip
|
||||
set -e
|
||||
|
||||
# taken from install (GNU coreutils) 8.23
|
||||
opts='bcCdDg:m:o:psS:t:TvZ'
|
||||
longopts='backup::,compare,directory,group:,mode:,owner:,preserve-timestamps,\
|
||||
strip:,strip-program:,suffix:,target-directory:,no-target-directory,verbose,\
|
||||
preserve-context,context::,help,version'
|
||||
|
||||
parsed="$(getopt -o "$opts" --long "$longopts" -n 'install(wrapper)' -- "$@")"
|
||||
eval set -- "$parsed"
|
||||
|
||||
iopts=()
|
||||
while :; do
|
||||
case "$1" in
|
||||
-s|--strip)
|
||||
echo "install-wrapper: overriding call to strip(1)." 1>&2
|
||||
iopts+=("$1" --strip-program=true)
|
||||
shift;;
|
||||
--strip-program)
|
||||
echo "install-wrapper: dropping strip program '$2'." 1>&2
|
||||
shift 2;;
|
||||
-b|-c|-C|--compare|-d|--directory|-D|-p|--preserve-timestamps|\
|
||||
-T|--no-target-directory|-v|--verbose|--preserve-context|-Z|\
|
||||
--help|--version)
|
||||
iopts+=("$1")
|
||||
shift;;
|
||||
-g|--group|-m|--mode|-o|--owner|-S|--suffix|-t|--target-directory|\
|
||||
--backup|--context)
|
||||
iopts+=("$1" "$2")
|
||||
shift 2;;
|
||||
--)
|
||||
shift
|
||||
break;;
|
||||
*)
|
||||
echo 'cant happen, report a bug' 1>&2
|
||||
exit 111;;
|
||||
esac
|
||||
done
|
||||
|
||||
exec /usr/bin/install "${iopts[@]}" -- "$@"
|
Loading…
Reference in a new issue