blob: 13879f0a5aefdacb2faf380ca5d7b553004595e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#!/bin/sh
MAKEDEPS=""
DEPS=""
PKG_VER=1.2.2
SOURCE=https://musl.libc.org/releases/musl-$PKG_VER.tar.gz
ADDITIONAL="
https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/musl-mlfs/fix-utmp-wtmp-paths.patch
https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/musl-mlfs/change-scheduler-functions-Linux-compatib.patch
https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/musl-alpine/0001-riscv64-define-ELF_NFPREG.patch
https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/musl-alpine/handle-aux-at_base.patch
https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/musl-alpine/syscall-cp-epoll.patch
"
DESC="Implementation of the C standard library built on top of the Linux system call API"
prepare () {
for p in *.patch; do
patch -Np1 -i $p || true
done
}
build () {
CARCH=x86_64
LDFLAGS="$LDFLAGS -Wl,-soname,libc.musl-${CARCH}.so.1" \
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-gcc-wrapper
make
}
package () {
make DESTDIR=$PKG_DEST install &&
install -d $PKG_DEST/etc
install -d $PKG_DEST/bin
install -d $PKG_DEST/lib
ln -s /lib/ld-musl-x86_64.so.1 $PKG_DEST/bin/ldd
ln -s libc.so $PKG_DEST/usr/lib/libc.musl-x86_64.so.1
cat > $PKG_DEST/etc/ld-musl-x86_64.path << "EOF"
/lib
/usr/local/lib
/usr/lib
EOF
rm $PKG_DEST/usr/include/utmpx.h
}
|