void-packages/srcpkgs/musl/template
Juan RP ee35e3a806 musl: fix help2man and others erroring out with invalid locale UTF-8-CODE-UNITS.
This happened when the code incorrectly used the C locale, which on musl is just
UTF-8.

Close #2425
2015-09-01 08:44:22 +02:00

44 lines
1.3 KiB
Bash

# Template file for 'musl'.
pkgname=musl
version=1.1.11
revision=2
build_pie=yes
build_style=gnu-configure
configure_args="--prefix=/usr --disable-gcc-wrapper"
conflicts="glibc>=0"
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=bb9e6da51b7b12641f5d1abb39705c6c6c1b2fbd20002362948aa736a0aa353f
nostrip_files="libc.so"
shlib_provides="libc.so"
only_for_archs="i686-musl x86_64-musl armv6l-musl armv7l-musl aarch64-musl mips-musl mipsel-musl"
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
# 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
}