2bb8ef8
From 0271bf4136e3a2bb476919eb9e984418ab95cb75 Mon Sep 17 00:00:00 2001
2bb8ef8
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2bb8ef8
Date: Fri, 25 Oct 2019 15:41:49 +0200
2bb8ef8
Subject: [PATCH] libselinux/src/Makefile: don't pass bogus -I and -L to python
2bb8ef8
 setup.py build_ext
2bb8ef8
2bb8ef8
Using $(DESTDIR) during the build does not follow the normal/standard
2bb8ef8
semantic of DESTDIR: it is normally only needed during the
2bb8ef8
installation. Therefore, a lot of build systems/environments don't
2bb8ef8
pass any DESTDIR at build time, which causes setup.py to be called
2bb8ef8
with -I /usr/include -L /usr/lib, which breaks cross-compilation.
2bb8ef8
2bb8ef8
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2bb8ef8
---
2bb8ef8
 libselinux/src/Makefile | 2 +-
2bb8ef8
 1 file changed, 1 insertion(+), 1 deletion(-)
2bb8ef8
2bb8ef8
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
2bb8ef8
index 2b1696a0c17b..3b8bad810de0 100644
2bb8ef8
--- a/libselinux/src/Makefile
2bb8ef8
+++ b/libselinux/src/Makefile
2bb8ef8
@@ -130,7 +130,7 @@ SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS)
2bb8ef8
 all: $(LIBA) $(LIBSO) $(LIBPC)
2bb8ef8
 
2bb8ef8
 pywrap: all selinuxswig_python_exception.i
2bb8ef8
-	CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR)
2bb8ef8
+	CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext
2bb8ef8
 
2bb8ef8
 rubywrap: all $(SWIGRUBYSO)
2bb8ef8
 
2bb8ef8
-- 
2bb8ef8
2.23.0
2bb8ef8