File: 02_detect_libs.diff

package info (click to toggle)
python-gd 0.56%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 288 kB
  • sloc: ansic: 3,314; python: 278; makefile: 34
file content (47 lines) | stat: -rw-r--r-- 1,236 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
Author: Julián Moreno Patiño <darkjunix@gmail.com>
Bug-Debian: http://bugs.debian.org/651726
Bug-Ubuntu: https://launchpad.net/bugs/901525
Forwarded: no
Last-Update: 2012-01-02
--- 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.
 
@@ -43,7 +57,7 @@
     "/usr/local/lib", "/sw/lib", "/usr/lib",
     "/usr/lib/X11", "/usr/X11R6/lib",
     "/opt/gnome/lib",
-])
+]+mult_lib)
 
 # include_dirs are also non-portable; same trick here.
 
@@ -51,7 +65,7 @@
     "/usr/local/include", "/sw/include", "/usr/include",
     "/usr/include/X11", "/usr/X11R6/include",
     "/opt/gnome/include",
-])
+]+mult_inc)
 
 # Try to identify our libraries