libselinux: build for musl

This commit is contained in:
Đoàn Trần Công Danh 2020-05-22 13:46:00 +07:00
parent dcb2cfb4af
commit 42a33a8936
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,13 @@
diff --git utils/Makefile utils/Makefile
index 3615063..3c1be17 100644
--- utils/Makefile
+++ utils/Makefile
@@ -47,6 +47,8 @@ override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
override LDFLAGS += -L../src
override LDLIBS += -lselinux
PCRE_LDLIBS ?= -lpcre
+FTS_LDLIBS ?=
+override LDLIBS += $(FTS_LDLIBS)
ifeq ($(ANDROID_HOST),y)
TARGETS=sefcontext_compile

View file

@ -14,6 +14,11 @@ homepage="https://www.nsa.gov/what-we-do/research/selinux/"
distfiles="https://github.com/SELinuxProject/selinux/releases/download/20191204/${pkgname}-${version}.tar.gz"
checksum=2ea2b30f671dae9d6b1391cbe8fb2ce5d36a3ee4fb1cd3c32f0d933c31b82433
if [ "$XBPS_TARGET_LIBC" = musl ]; then
makedepends+=" musl-fts-devel"
export FTS_LDLIBS="-lfts"
fi
libselinux-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"