Merge branch 'master' into perl-5.20
This commit is contained in:
commit
3765a86768
67 changed files with 764 additions and 528 deletions
|
@ -1,15 +1,5 @@
|
|||
# This snippet setups pkg-config vars.
|
||||
|
||||
set -a
|
||||
|
||||
if [ -z "$CHROOT_READY" ]; then
|
||||
PKG_CONFIG_PATH="${XBPS_MASTERDIR}/usr/lib/pkgconfig:${XBPS_MASTERDIR}/usr/share/pkgconfig"
|
||||
export PKG_CONFIG_PATH="${XBPS_MASTERDIR}/usr/lib/pkgconfig:${XBPS_MASTERDIR}/usr/share/pkgconfig"
|
||||
fi
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
PKG_CONFIG_SYSROOT_DIR="$XBPS_CROSS_BASE"
|
||||
PKG_CONFIG_PATH="$XBPS_CROSS_BASE/lib/pkgconfig:$XBPS_CROSS_BASE/usr/share/pkgconfig"
|
||||
PKG_CONFIG_LIBDIR="$XBPS_CROSS_BASE/lib/pkgconfig"
|
||||
fi
|
||||
|
||||
set +a
|
||||
|
|
|
@ -64,6 +64,10 @@ hook() {
|
|||
fi
|
||||
|
||||
find ${PKGDESTDIR} -type f | while read f; do
|
||||
if [[ $f =~ ^/usr/lib/debug/ ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
fname=$(basename "$f")
|
||||
for x in ${nostrip_files}; do
|
||||
if [ "$x" = "$fname" ]; then
|
||||
|
@ -77,6 +81,7 @@ hook() {
|
|||
fi
|
||||
case "$(file -bi "$f")" in
|
||||
application/x-executable*)
|
||||
chmod 755 "$f"
|
||||
if echo "$(file $f)" | grep -q "statically linked"; then
|
||||
# static binary
|
||||
$STRIP "$f"
|
||||
|
@ -97,6 +102,7 @@ hook() {
|
|||
fi
|
||||
;;
|
||||
application/x-sharedlib*)
|
||||
chmod 755 "$f"
|
||||
# shared library
|
||||
make_debug "$f"
|
||||
$STRIP --strip-unneeded "$f"
|
||||
|
@ -116,6 +122,7 @@ hook() {
|
|||
attach_debug "$f"
|
||||
;;
|
||||
application/x-archive*)
|
||||
chmod 644 "$f"
|
||||
$STRIP --strip-debug "$f"
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
|
||||
|
|
|
@ -44,14 +44,16 @@ generic_wrapper3() {
|
|||
|
||||
cp ${XBPS_CROSS_BASE}/usr/bin/${wrapper} ${WRAPPERDIR}
|
||||
sed -e "s,/usr/include,${XBPS_CROSS_BASE}/usr/include,g" -i ${WRAPPERDIR}/${wrapper}
|
||||
sed -e "s,/usr/lib,${XBPS_CROSS_BASE}/usr/lib,g" -i ${WRAPPERDIR}/${wrapper}
|
||||
sed -e "s,libdir=/usr/lib,libdir=${XBPS_CROSS_BASE}/usr/lib,g" -i ${WRAPPERDIR}/${wrapper}
|
||||
sed -e "s,^prefix=/usr,prefix=${XBPS_CROSS_BASE}/usr," -i ${WRAPPERDIR}/${wrapper}
|
||||
|
||||
chmod 755 ${WRAPPERDIR}/${wrapper}
|
||||
}
|
||||
|
||||
python_wrapper() {
|
||||
local wrapper="$1" version="$2"
|
||||
|
||||
[ -x ${WRAPPERDIR}/${wrapper} ] && return 0
|
||||
cat >>${WRAPPERDIR}/${wrapper}<<_EOF
|
||||
#!/bin/sh
|
||||
if [ "\$1" = "--includes" ]; then
|
||||
|
@ -62,12 +64,30 @@ _EOF
|
|||
chmod 755 ${WRAPPERDIR}/${wrapper}
|
||||
}
|
||||
|
||||
pkgconfig_wrapper() {
|
||||
if [ ! -x /usr/bin/pkg-config ]; then
|
||||
return 0
|
||||
fi
|
||||
[ -x ${WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-pkg-config ] && return 0
|
||||
cat >>${WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-pkg-config<<_EOF
|
||||
#!/bin/sh
|
||||
|
||||
export PKG_CONFIG_SYSROOT_DIR="$XBPS_CROSS_BASE"
|
||||
export PKG_CONFIG_PATH="$XBPS_CROSS_BASE/lib/pkgconfig:$XBPS_CROSS_BASE/usr/share/pkgconfig"
|
||||
export PKG_CONFIG_LIBDIR="$XBPS_CROSS_BASE/lib/pkgconfig"
|
||||
exec /usr/bin/pkg-config "\$@"
|
||||
_EOF
|
||||
chmod 755 ${WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-pkg-config
|
||||
ln -sf ${XBPS_CROSS_TRIPLET}-pkg-config ${WRAPPERDIR}/pkg-config
|
||||
}
|
||||
|
||||
hook() {
|
||||
[ -z "$CROSS_BUILD" ] && return 0
|
||||
|
||||
mkdir -p ${WRAPPERDIR}
|
||||
|
||||
# create wrapers
|
||||
pkgconfig_wrapper
|
||||
generic_wrapper icu-config
|
||||
generic_wrapper libgcrypt-config
|
||||
generic_wrapper freetype-config
|
||||
|
|
|
@ -262,6 +262,7 @@ install_pkg_deps() {
|
|||
#
|
||||
# Target build dependencies.
|
||||
#
|
||||
checkver="version"
|
||||
for i in ${build_depends} "RDEPS" ${run_depends}; do
|
||||
if [ "$i" = "RDEPS" ]; then
|
||||
rundep="runtime"
|
||||
|
|
|
@ -170,6 +170,7 @@ chroot_handler() {
|
|||
if [ ! -d $XBPS_MASTERDIR/xbps-packages ]; then
|
||||
mkdir -p $XBPS_MASTERDIR/xbps-packages
|
||||
fi
|
||||
ln -sf xbps-packages $XBPS_MASTERDIR/void-packages
|
||||
_chargs+=" -D ${XBPS_DISTDIR}"
|
||||
|
||||
[ -z "$action" -a -z "$pkg" ] && return 1
|
||||
|
|
|
@ -339,6 +339,14 @@ setup_pkg() {
|
|||
|
||||
export BUILD_CC="cc"
|
||||
export BUILD_CFLAGS="$XBPS_CFLAGS"
|
||||
export CC_FOR_BUILD="cc"
|
||||
export CXX_FOR_BUILD="g++"
|
||||
export CPP_FOR_BUILD="cpp"
|
||||
export LD_FOR_BUILD="ld"
|
||||
export CFLAGS_FOR_BUILD="$XBPS_CFLAGS"
|
||||
export CXXFLAGS_FOR_BUILD="$XBPS_CXXFLAGS"
|
||||
export CPPFLAGS_FOR_BUILD="$XBPS_CPPFLAGS"
|
||||
export LDFLAGS_FOR_BUILD="$XBPS_LDFLAGS"
|
||||
|
||||
if [ -n "$cross" ]; then
|
||||
export CC="${XBPS_CROSS_TRIPLET}-gcc"
|
||||
|
@ -386,4 +394,6 @@ setup_pkg() {
|
|||
msg_red "$pkgver: cannot be built, it's currently broken; exiting...\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export XBPS_WRAPPERDIR="${wrksrc}/.xbps/bin"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue