setools: Avoid using host libraries 14893/head
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Wed, 20 Jan 2021 00:20:55 +0000 (21:20 -0300)
committerEneas U de Queiroz <cotequeiroz@gmail.com>
Thu, 25 Feb 2021 00:41:15 +0000 (21:41 -0300)
This adds $STAGING_DIR to library search paths in setup.py, to avoid
picking up host libraries when linking.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
utils/setools/Makefile
utils/setools/patches/030-remove-host-paths.patch [new file with mode: 0644]

index bc7bed8a3fa2db0cbf082c9ebca28c4157135430..dbfb5d298e6b5b86cbebf8c9e92d6579ec7a56f1 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=setools
 PKG_VERSION:=4.3.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://github.com/SELinuxProject/setools/releases/download/4.3.0
diff --git a/utils/setools/patches/030-remove-host-paths.patch b/utils/setools/patches/030-remove-host-paths.patch
new file mode 100644 (file)
index 0000000..9455300
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/setup.py
++++ b/setup.py
+@@ -79,7 +79,8 @@ class QtHelpCommand(Command):
+ # Library linkage
+-lib_dirs = ['.', '/usr/lib64', '/usr/lib', '/usr/local/lib']
++owrt_staging_dir = os.environ["STAGING_DIR"]
++lib_dirs = ['.', owrt_staging_dir + '/usr/lib64', owrt_staging_dir + '/usr/lib', owrt_staging_dir + '/usr/local/lib' ]
+ include_dirs = []
+ with suppress(KeyError):