From 42a33a8936e6a7f1b6197939a718143d2bdde055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 22 May 2020 13:46:00 +0700 Subject: [PATCH] libselinux: build for musl --- srcpkgs/libselinux/patches/fts.patch | 13 +++++++++++++ srcpkgs/libselinux/template | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 srcpkgs/libselinux/patches/fts.patch diff --git a/srcpkgs/libselinux/patches/fts.patch b/srcpkgs/libselinux/patches/fts.patch new file mode 100644 index 0000000000..c3df41d485 --- /dev/null +++ b/srcpkgs/libselinux/patches/fts.patch @@ -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 diff --git a/srcpkgs/libselinux/template b/srcpkgs/libselinux/template index 1515b5ee58..fdd8d63993 100644 --- a/srcpkgs/libselinux/template +++ b/srcpkgs/libselinux/template @@ -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}"