File: 0003-include-host-triplet-in-library-search.patch

package info (click to toggle)
python-iptables 0.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 584 kB
  • sloc: python: 2,758; makefile: 93; ansic: 77
file content (32 lines) | stat: -rw-r--r-- 1,001 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: =?utf-8?q?=22IOhannes_m_zm=C3=B6lnig_=28Debian/GNU=29=22?=
 <umlaeute@debian.org>
Date: Wed, 18 Apr 2018 21:36:00 +0200
Subject: include host-triplet in library search

---
 iptc/util.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/iptc/util.py b/iptc/util.py
index ae5fb9b..268430d 100644
--- a/iptc/util.py
+++ b/iptc/util.py
@@ -84,8 +84,18 @@ def _find_library(*names):
         ext = get_config_var("EXT_SUFFIX")
     else:
         ext = get_config_var('SO')
+    try:
+        triplet = get_config_var('MULTIARCH')
+    except:
+        triplet = ''
+    if triplet in ext:
+        triplet = None
+    else:
+        triplet = '.' + triplet
     for name in names:
         libnames = [name, "lib" + name, name + ext, "lib" + name + ext]
+        if triplet:
+            libnames += [name + triplet + ext, "lib" + name + triplet + ext]
         libdir = os.environ.get('IPTABLES_LIBDIR', None)
         if libdir is not None:
             libdirs = libdir.split(':')