File: 02_detect_libs.diff

package info (click to toggle)
python-gd 0.59-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 456 kB
  • ctags: 425
  • sloc: ansic: 1,655; python: 183; makefile: 6
file content (47 lines) | stat: -rw-r--r-- 1,304 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Description: Detect libraries from multiarch paths
Bug-Debian: http://bugs.debian.org/651726
Bug-Ubuntu: https://launchpad.net/bugs/901525
Forwarded: no
Last-Update: 2016-09-15
Author: Julián Moreno Patiño <julian@debian.org>
--- a/setup.py
+++ b/setup.py
@@ -36,6 +36,20 @@
         if lst[i] == itm:
             del lst[i]
 
+# Add multiarch paths
+
+mult_lib = []
+mult_inc = []
+
+try:
+    cmd = os.popen('dpkg-architecture -qDEB_HOST_MULTIARCH')
+    multiarch_path_component = cmd.readline().strip()
+    mult_lib = ['/usr/lib/'+multiarch_path_component]
+    mult_inc = ['/usr/include/'+multiarch_path_component]
+    cmd.close()
+except:
+    print "Can not import multiarch name"
+
 # library_dirs option is rather non-portable, but since I am targetting
 # Unixoid OS's I will just look for the usual suspects.
 
@@ -44,7 +58,7 @@
     "/usr/lib/i386-linux-gnu", "/usr/lib/x86_64-linux-gnu",
     "/usr/lib/X11", "/usr/X11R6/lib",
     "/opt/gnome/lib",
-])
+]+mult_lib)
 
 try:
     exotic_libdir = commands.getoutput("gdlib-config --libdir"),
@@ -58,7 +72,7 @@
     "/usr/local/include", "/sw/include", "/usr/include",
     "/usr/include/X11", "/usr/X11R6/include",
     "/opt/gnome/include",
-])
+]+mult_inc)
 
 try:
     exotic_incdir = commands.getoutput("gdlib-config --includedir"),