void-packages/srcpkgs/musl/template
Michael Gehring 03ac6893e5 musl: rebuild to fix -dbg
Fixes #7734
2017-09-23 22:51:12 +00:00

61 lines
1.7 KiB
Bash

# Template file for 'musl'.
pkgname=musl
version=1.1.16
revision=2
build_style=gnu-configure
configure_args="--prefix=/usr --disable-gcc-wrapper"
conflicts="glibc>=0"
bootstrap=yes
short_desc="The musl C library"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="MIT"
homepage="http://www.musl-libc.org/"
distfiles="http://www.musl-libc.org/releases/musl-${version}.tar.gz"
checksum=937185a5e5d721050306cf106507a006c3f1f86d86cd550024ea7be909071011
nostrip_files="libc.so"
shlib_provides="libc.so"
only_for_archs="i686-musl x86_64-musl armv5tel-musl armv6l-musl armv7l-musl aarch64-musl mips-musl mipsel-musl mipselhf-musl"
desc_option_bigstack="bigger default pthread stack size"
build_options="bigstack"
CFLAGS="$(vopt_if bigstack -DVOID_BIGSTACK)"
post_build() {
$CC $CFLAGS $LDFLAGS ${FILESDIR}/getent.c -o getent
$CC $CFLAGS $LDFLAGS ${FILESDIR}/getconf.c -o getconf
$CC $CFLAGS $LDFLAGS ${FILESDIR}/iconv.c -o iconv
}
do_install() {
# Move everything to /usr.
vmkdir usr/lib
ln -sfr ${DESTDIR}/usr/lib ${DESTDIR}/lib
make DESTDIR=${DESTDIR} install
rm ${DESTDIR}/lib
# provide ldd
vmkdir usr/bin
ln -s /usr/lib/libc.so ${DESTDIR}/usr/bin/ldd
# additional utils from Alpine/NetBSD
vbin iconv
vbin getent
vman ${FILESDIR}/getent.1
vbin getconf
vman ${FILESDIR}/getconf.1
# Fake ldconfig
ln -s true ${DESTDIR}/usr/bin/ldconfig
# Create xbps.d(5) arch override file
vmkdir usr/share/xbps.d
echo "architecture=${XBPS_TARGET_MACHINE}" > ${DESTDIR}/usr/share/xbps.d/musl-arch.conf
vlicense COPYRIGHT
}
musl-devel_package() {
depends="kernel-libc-headers ${sourcepkg}-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/*.o
}
}