From f53b5521f84a7ef6d1db38204678ce09ea52f712 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Sat, 27 Mar 2021 23:53:06 +0100 Subject: [PATCH] musl recipe --- recipes/musl/Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 recipes/musl/Makefile diff --git a/recipes/musl/Makefile b/recipes/musl/Makefile new file mode 100644 index 0000000..62941fb --- /dev/null +++ b/recipes/musl/Makefile @@ -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: This’ll 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