hooks/script-wrapper: create freetype-config wrapper; simplify code.
This commit is contained in:
parent
ebf5e555ac
commit
ffb0ebe230
1 changed files with 9 additions and 15 deletions
|
@ -5,20 +5,13 @@
|
||||||
|
|
||||||
WRAPPERDIR="${wrksrc}/.xbps/bin"
|
WRAPPERDIR="${wrksrc}/.xbps/bin"
|
||||||
|
|
||||||
icu_config_wrapper() {
|
generic_wrapper() {
|
||||||
[ ! -x ${XBPS_CROSS_BASE}/usr/bin/icu-config ] && return 0
|
local wrapper="$1"
|
||||||
|
[ ! -x ${XBPS_CROSS_BASE}/usr/bin/${wrapper} ] && return 0
|
||||||
|
|
||||||
echo "#!/bin/sh" >> ${WRAPPERDIR}/icu-config
|
echo "#!/bin/sh" >> ${WRAPPERDIR}/${wrapper}
|
||||||
echo "exec ${XBPS_CROSS_BASE}/usr/bin/icu-config --prefix=${XBPS_CROSS_BASE}/usr \"\$@\"" >> ${WRAPPERDIR}/icu-config
|
echo "exec ${XBPS_CROSS_BASE}/usr/bin/${wrapper} --prefix=${XBPS_CROSS_BASE}/usr \"\$@\"" >> ${WRAPPERDIR}/${wrapper}
|
||||||
chmod 755 ${WRAPPERDIR}/icu-config
|
chmod 755 ${WRAPPERDIR}/${wrapper}
|
||||||
}
|
|
||||||
|
|
||||||
libgcrypt_config_wrapper() {
|
|
||||||
[ ! -x ${XBPS_CROSS_BASE}/usr/bin/libgcrypt-config ] && return 0
|
|
||||||
|
|
||||||
echo "#!/bin/sh" >> ${WRAPPERDIR}/libgcrypt-config
|
|
||||||
echo "exec ${XBPS_CROSS_BASE}/usr/bin/libgcrypt-config --prefix=${XBPS_CROSS_BASE}/usr \"\$@\"" >> ${WRAPPERDIR}/libgcrypt-config
|
|
||||||
chmod 755 ${WRAPPERDIR}/libgcrypt-config
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hook() {
|
hook() {
|
||||||
|
@ -27,8 +20,9 @@ hook() {
|
||||||
mkdir -p ${WRAPPERDIR}
|
mkdir -p ${WRAPPERDIR}
|
||||||
|
|
||||||
# create wrapers
|
# create wrapers
|
||||||
icu_config_wrapper
|
generic_wrapper icu-config
|
||||||
libgcrypt_config_wrapper
|
generic_wrapper libgcrypt-config
|
||||||
|
generic_wrapper freetype-config
|
||||||
|
|
||||||
export PATH=${WRAPPERDIR}:$PATH
|
export PATH=${WRAPPERDIR}:$PATH
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue