package.mk/recipes/musl/Makefile

27 lines
1016 B
Makefile
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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