ksh: use _GNU_SOURCE on musl only.

This commit is contained in:
Christian Neukirchen 2015-05-23 21:42:48 +02:00
parent 931a41280f
commit 78f5ee9799

View file

@ -2,7 +2,7 @@
pkgname=ksh
version=2012.08.01
_debpkgver=93u+20120801
revision=3
revision=4
wrksrc=${pkgname}-${_debpkgver}
register_shell="/bin/ksh"
short_desc="AT&T's Korn shell (ksh93)"
@ -17,6 +17,7 @@ build_options="static"
case "$XBPS_TARGET_MACHINE" in
*-musl)
CFLAGS='-D_GNU_SOURCE'
post_extract() {
# Don't rewrite xxx64 to xxx.
sed -i '/define.*off_t/d' src/lib/libast/include/ast_std.h
@ -38,12 +39,10 @@ do_build() {
if [ "$build_option_static" ]; then
LDFLAGS+=" -static"
fi
echo $CC
export SHELL=/bin/sh # bin/package breaks on bash
$SHELL bin/package make \
CC="${CC}" LDFLAGS="${LDFLAGS}" \
CFLAGS="${CFLAGS} -D_GNU_SOURCE" \
CCFLAGS="${CFLAGS} -D_GNU_SOURCE" \
CFLAGS="${CFLAGS}" CCFLAGS="${CFLAGS}" \
HOSTTYPE="$($SHELL bin/package host canon $XBPS_CROSS_TRIPLET)"
}