49 lines
1.4 KiB
Diff
49 lines
1.4 KiB
Diff
|
From db0f2f382e31c44eef8f636d5698f9f4b11b4eeb Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
|
||
|
Date: Mon, 12 Oct 2020 17:46:16 +0300
|
||
|
Subject: [PATCH] libselinux: Add build option to disable X11 backend
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
|
||
|
---
|
||
|
libselinux/Makefile | 5 ++++-
|
||
|
libselinux/src/Makefile | 4 ++++
|
||
|
2 files changed, 8 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/libselinux/Makefile b/libselinux/Makefile
|
||
|
index 6a43b243f4da..cb5872b7b090 100644
|
||
|
--- a/libselinux/Makefile
|
||
|
+++ b/libselinux/Makefile
|
||
|
@@ -17,7 +17,10 @@ endif
|
||
|
ifeq ($(DISABLE_BOOL),y)
|
||
|
DISABLE_FLAGS+= -DDISABLE_BOOL
|
||
|
endif
|
||
|
-export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST
|
||
|
+ifeq ($(DISABLE_X11),y)
|
||
|
+ DISABLE_FLAGS+= -DNO_X_BACKEND
|
||
|
+endif
|
||
|
+export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST DISABLE_X11
|
||
|
|
||
|
USE_PCRE2 ?= n
|
||
|
ifeq ($(USE_PCRE2),y)
|
||
|
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
|
||
|
index 190016e2af34..be0b6eec6f6d 100644
|
||
|
--- a/libselinux/src/Makefile
|
||
|
+++ b/libselinux/src/Makefile
|
||
|
@@ -126,6 +126,10 @@ DISABLE_FLAGS+= -DNO_ANDROID_BACKEND
|
||
|
SRCS:= $(filter-out label_backends_android.c, $(SRCS))
|
||
|
endif
|
||
|
|
||
|
+ifeq ($(DISABLE_X11),y)
|
||
|
+SRCS:= $(filter-out label_x.c, $(SRCS))
|
||
|
+endif
|
||
|
+
|
||
|
SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS)
|
||
|
|
||
|
all: $(LIBA) $(LIBSO) $(LIBPC)
|
||
|
--
|
||
|
2.29.0
|
||
|
|