smlinux/base/musl/musl.SMBuild
PktSurf c56c7ed62b Upgraded base/musl to 1.2.3
Upgraded base/gzip to 1.12
2022-09-26 23:21:49 +05:30

63 lines
No EOL
2.6 KiB
Text
Executable file

app=musl
version=1.2.3
build=1sml
homepage="http://www.musl-libc.org/"
download="https://musl.libc.org/releases/musl-$version.tar.gz"
desc="Simple, fast and POSIX-compliant C library"
requires="musl"
preservestaticlibs=1
build() {
mkandenterbuilddir
rm -rf $app-$version
tar xf $srcdir/$app-$version.tar.?z*
cd $app-$version
fixbuilddirpermissions
# Thanks sabotage
cp $srcdir/musl-wcsnrtombs.c src/multibyte/wcsnrtombs.c
./configure \
--prefix=""
make
make install DESTDIR=$pkg
# Some additional stuff from alpine
mkdir -p addons && cd addons
cp $srcdir/{getconf.c,getent.c,iconv.c} .
gcc -o getconf getconf.c ; install -Dm 755 getconf $pkg/bin/getconf
gcc -o getent getent.c ; install -Dm 755 getent $pkg/bin/getent
gcc -o iconv iconv.c ; install -Dm 755 iconv $pkg/bin/iconv
cd ..
( cd $pkg/lib
# Remove the symlink, it'll break upgrades and make the system useless
rm ld-musl-$arch.so.1
# Copy the libc.so as the $arch-specific file
cp libc.so ld-musl-$arch.so.1
)
cp COPYRIGHT $pkgdocs/
cp $srcdir/{cdefs.h,queue.h,stab.h,tree.h} $pkg/include/sys/
[ "$arch" = "aarch64" ] && install -Dm 644 $srcdir/asm.hwcap.h $pkg/include/asm/hwcap.h
mkfinalpkg
}
sha512sums="
9332f713d3eb7de4369bc0327d99252275ee52abf523ee34b894b24a387f67579787f7c72a46cf652e090cffdb0bc3719a4e7b84dca66890b6a37f12e8ad089c musl-1.2.3.tar.gz
0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c
378d70e65bcc65bb4e1415354cecfa54b0c1146dfb24474b69e418cdbf7ad730472cd09f6f103e1c99ba6c324c9560bccdf287f5889bbc3ef0bdf0e08da47413 getent.c
9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf iconv.c
fb9ee91cf8fd6330727b67fee8f4f7c4e603839c5cbd8fa9e838bf2f5f68558119d0535de54643d56ddbc2ac5dcd38878818e91da7c6dd15c10422c84270d2ef musl-wcsnrtombs.c
3af049adb95230efab7e71964e9cb4a5a4d6b4a10adec43e1540fc2a10dbc77ed96511bc862c2f13deb6d599298d3ec2610ad0107898f6105ba4705f973737db asm.hwcap.h
8c3fddd73b696a38e633953715c79c47703739be27ee085fc6c960a57b6746ca05bf6406f7e6126cc1a13204254fd5830afb566624e1f298f4d6b58216013c28 cdefs.h
19cec4d39310285eb49ad1beae86884080e0152f9477757513050211b31f95ee7283a64ae95939683df09231cfb021ace816b26981ad05f4fff0a39519f935fe queue.h
cd57bec6b2462b08b54dcfc6ba37e1d5289fcdd9463f22ea091679aa8006e24d89c9d57637c0e7a5bfbf02d06e93aa4cb3c0d066400aa1b698a8ae66a9cb7b8e stab.h
07cb70f2f0ddb31e23dd913c6f561fc9885667c5803fdf3a559676c99d08834b4104589bacb5d17b4a0b379c68c81a1cf3173832b3da33a7b936fa7b93706844 tree.h
"