# Contributor: William Pitcock # Maintainer: William Pitcock pkgname=musl pkgver=0.9.11 pkgrel=0 pkgdesc="the musl c library (libc) implementation" url="http://www.musl-libc.org/" arch="x86 x86_64 arm armel" license="MIT" depends="" depends_dev="" makedepends="$depends_dev" install="" subpackages="$pkgname-dev" [ "${CTARGET#*musl}" = "$CTARGET" ] && subpackages="$subpackages musl-gcc:crosstool" source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz 0001-fix-Makefile-so-make-install-works-before-include-bi.patch 0002-add-stubs-for-additional-legacy-ether.h-functions.patch crt-arm-Scrt1.s " _builddir="$srcdir"/musl-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done cp "$srcdir"/crt-arm-Scrt1.s crt/arm/Scrt1.s } build() { local _ldflags cd "$_builddir" [ "${CTARGET#*musl}" = "$CTARGET" ] && _ldflags="-Wl,-soname,libc-musl-${CARCH}.so" LDFLAGS="$LDFLAGS $_ldflags" \ ./configure --prefix=/usr \ --libdir=/lib \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm -f "$pkgdir"/usr/lib/*.la } crosstool() { mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/musl-gcc "$subpkgdir"/usr/bin } md5sums="70b17ca5c847e74e1c77fe8284bb1fa4 musl-0.9.11.tar.gz 1565f77513aa6779057ff184a2f91073 0001-fix-Makefile-so-make-install-works-before-include-bi.patch 76e0b13d63a6665b3f9ea3d3b00fecdb 0002-add-stubs-for-additional-legacy-ether.h-functions.patch 74917fb9427ccfa696d5c4969b0148bd crt-arm-Scrt1.s" sha256sums="8b81fd9b71becb7b674ea93fd65d82a039fab79ab738957a5e9ee47ba08a13fd musl-0.9.11.tar.gz 60e38a633d35eb44c7b12b3a2b0ea570c9462af7f966a9fcea4382fe6e6e6c6f 0001-fix-Makefile-so-make-install-works-before-include-bi.patch 6c916f34bb2dc89fc3de6786d9b7e2d2b829d9020e97097e46b97071be09405a 0002-add-stubs-for-additional-legacy-ether.h-functions.patch f622e052c674592487b711e87c5d1fb861a5240454cccdf9f6060247bbbb0255 crt-arm-Scrt1.s" sha512sums="7ca852eda3be7b34bfdaf1eb9e7d435987d5177f865737b211e62f4037825cc322436e1ff49c3f875b3a20679f6f21ba5ffff271d03d3d03c7a97854f4f51832 musl-0.9.11.tar.gz 80d9e3594c4f7471ea404216b40a44831bfa930f81792e566e83d7e1a158ee5d5f75129b67536c969f10fbe96aa549326ba461229fb0a08e0a3fd1bc569f95fc 0001-fix-Makefile-so-make-install-works-before-include-bi.patch 24415afa48c9e918c4c7a0c1e5a38bd150d03e92cde6bf709460c713de49a61128ea93103af601a54a6cf164bcedd304aa34933e97053e1b4ab41584ce44f768 0002-add-stubs-for-additional-legacy-ether.h-functions.patch 2c1214ebd5b053242e613e193758d22a324ab66ac773974c851603469b8c392d22e38a1a81a5fa10dfe2ba1cd2f1fb34d0b543ddae9bdbe17e7796334b809ce0 crt-arm-Scrt1.s"