62 lines
1.7 KiB
Bash
62 lines
1.7 KiB
Bash
# Template file for 'musl'
|
|
pkgname=musl
|
|
reverts="1.2.0_1"
|
|
version=1.1.24
|
|
revision=22
|
|
archs="*-musl"
|
|
bootstrap=yes
|
|
build_style=gnu-configure
|
|
configure_args="--prefix=/usr --disable-gcc-wrapper"
|
|
short_desc="Musl C library"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="MIT"
|
|
homepage="https://musl.libc.org/"
|
|
distfiles="https://musl.libc.org/releases/musl-${version}.tar.gz"
|
|
checksum=1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
|
|
|
|
nostrip_files="libc.so"
|
|
shlib_provides="libc.so"
|
|
|
|
post_build() {
|
|
$CC $CFLAGS $LDFLAGS -fpie ${FILESDIR}/getent.c -o getent
|
|
$CC $CFLAGS $LDFLAGS -fpie ${FILESDIR}/getconf.c -o getconf
|
|
$CC $CFLAGS $LDFLAGS -fpie ${FILESDIR}/iconv.c -o iconv
|
|
$CC $CFLAGS $LDFLAGS -fpie -c ${FILESDIR}/__stack_chk_fail_local.c -o __stack_chk_fail_local.o
|
|
$AR r libssp_nonshared.a __stack_chk_fail_local.o
|
|
}
|
|
|
|
do_install() {
|
|
# Move everything to /usr.
|
|
vmkdir usr/lib
|
|
ln -s usr/lib ${DESTDIR}/lib
|
|
make DESTDIR=${DESTDIR} install
|
|
rm ${DESTDIR}/lib
|
|
# provide ldd
|
|
vmkdir usr/bin
|
|
ln -s ../lib${XBPS_TARGET_WORDSIZE}/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
|
|
# additional symbols from libssp_nonshared (necessary on i386 and PPC)
|
|
vinstall libssp_nonshared.a 755 usr/lib
|
|
# Fake ldconfig
|
|
ln -s true ${DESTDIR}/usr/bin/ldconfig
|
|
|
|
vlicense COPYRIGHT
|
|
}
|
|
|
|
musl-devel_package() {
|
|
depends="kernel-libc-headers ${sourcepkg}-${version}_${revision}"
|
|
replaces="libssp-devel<=12.2.0_1"
|
|
conflicts="libssp-devel<=12.2.0_1"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.o"
|
|
}
|
|
}
|