musl recipe

master
Philippe Pittoli 2021-03-27 23:53:06 +01:00
parent 49299dc96d
commit f53b5521f8
1 changed files with 26 additions and 0 deletions

26
recipes/musl/Makefile Normal file
View File

@ -0,0 +1,26 @@
name = musl
version = 1.2.2
URL = https://www.musl-libc.org/releases/musl-$(version).tar.gz
# Edit this if you somehow need to build a prefixed version of musl.
SLOT ?= /
libdir = $(SLOT)/lib
configure_backend = configure_autotools
CONFIGURE_OPTIONS_USER = --libdir=$(PREFIX)/lib --syslibdir=$(libdir) --enable-shared --enable-static
SYSCONF ?= ../../
include $(SYSCONF)/package.mk
post_fake_root_install:
# FIXME: Thisll have to eventually be more automated.
# FIXME: That path has to be edited on other architectures.
$(Q)mkdir -p $(pkg_fake_root_dir)/etc
$(Q)echo $(libdir) >> $(pkg_fake_root_dir)/etc/ld-musl-x86_64.path
$(Q)echo /usr/baguette/lib >> $(pkg_fake_root_dir)/etc/ld-musl-x86_64.path
$(Q)echo /usr/bad/lib >> $(pkg_fake_root_dir)/etc/ld-musl-x86_64.path
$(Q)echo /usr/local/lib >> $(pkg_fake_root_dir)/etc/ld-musl-x86_64.path
for lib in libm libpthread librt libdl; do \
ln -s $(libdir)/libc.so "$(pkg_fake_root_dir)/$(libdir)/$${lib}.so" ; \
done