Ticket #12624: trac-12624.patch
| File trac-12624.patch, 3.8 KB (added by Snark, 15 months ago) |
|---|
-
SPKG.txt
# HG changeset patch # User Julien Puydt <julien.puydt@laposte.net> # Date 1330756823 -3600 # Node ID bd7171f038f5117ac690b8a974f1de494bc8c7ed # Parent f6c1b095cb85bfa7922069c44c83627dba249977 Added support for debian multiarch diff -r f6c1b095cb85 -r bd7171f038f5 SPKG.txt
a b 25 25 26 26 == Special Update/Build Instructions == 27 27 28 * debian-multiarch.patch (already applied to patches/Setup.py): adds support for multi-arch on debian-based distributions 29 28 30 * Patch Setup.py: we link against libpng12 instead of libpng. There are also changes to the library handling on Cygwin, so this might need to be fixed. 29 31 30 32 == Changelog == -
patches/Setup.py
diff -r f6c1b095cb85 -r bd7171f038f5 patches/Setup.py
a b 1 1 # Setup for gdmodule 0.50 and later 2 2 3 3 from distutils.core import setup, Extension 4 import os, glob, sys, string 4 from distutils.spawn import find_executable 5 import os, glob, sys, string, subprocess 5 6 6 7 # version of this gdmodule package 7 8 this_version = "0.56" … … 36 37 if lst[i] == itm: 37 38 del lst[i] 38 39 40 # Add multiarch paths 41 42 mult_lib = [] 43 mult_inc = [] 44 45 if find_executable('dpkg-architecture'): 46 cmd = subprocess.Popen('dpkg-architecture -qDEB_HOST_MULTIARCH'.split(), 47 stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 48 stdout, stderr = cmd.communicate() 49 multiarch_path_component = stdout.strip() 50 mult_lib = ['/usr/lib/'+multiarch_path_component] 51 mult_inc = ['/usr/include/'+multiarch_path_component] 52 39 53 # library_dirs option is rather non-portable, but since I am targetting 40 54 # Unixoid OS's I will just look for the usual suspects. 41 55 … … 44 58 "/usr/local/lib", "/sw/lib", "/usr/lib", 45 59 "/usr/lib/X11", "/usr/X11R6/lib", 46 60 "/opt/gnome/lib", 47 ] )61 ]+mult_lib) 48 62 49 63 50 64 # include_dirs are also non-portable; same trick here. … … 54 68 "/usr/local/include", "/sw/include", "/usr/include", 55 69 "/usr/include/X11", "/usr/X11R6/include", 56 70 "/opt/gnome/include", 57 ] )71 ]+mult_inc) 58 72 59 73 # Try to identify our libraries 60 74 -
new file patches/debian-multiarch.patch
diff -r f6c1b095cb85 -r bd7171f038f5 patches/debian-multiarch.patch
- + 1 --- Setup.py 2012-03-03 07:32:57.000000000 +0100 2 +++ Setup.py 2012-03-03 07:38:59.000000000 +0100 3 @@ -1,7 +1,8 @@ 4 # Setup for gdmodule 0.50 and later 5 6 from distutils.core import setup, Extension 7 -import os, glob, sys, string 8 +from distutils.spawn import find_executable 9 +import os, glob, sys, string, subprocess 10 11 # version of this gdmodule package 12 this_version = "0.56" 13 @@ -36,6 +37,19 @@ 14 if lst[i] == itm: 15 del lst[i] 16 17 +# Add multiarch paths 18 + 19 +mult_lib = [] 20 +mult_inc = [] 21 + 22 +if find_executable('dpkg-architecture'): 23 + cmd = subprocess.Popen('dpkg-architecture -qDEB_HOST_MULTIARCH'.split(), 24 + stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 25 + stdout, stderr = cmd.communicate() 26 + multiarch_path_component = stdout.strip() 27 + mult_lib = ['/usr/lib/'+multiarch_path_component] 28 + mult_inc = ['/usr/include/'+multiarch_path_component] 29 + 30 # library_dirs option is rather non-portable, but since I am targetting 31 # Unixoid OS's I will just look for the usual suspects. 32 33 @@ -44,7 +58,7 @@ 34 "/usr/local/lib", "/sw/lib", "/usr/lib", 35 "/usr/lib/X11", "/usr/X11R6/lib", 36 "/opt/gnome/lib", 37 -]) 38 +]+mult_lib) 39 40 41 # include_dirs are also non-portable; same trick here. 42 @@ -54,7 +68,7 @@ 43 "/usr/local/include", "/sw/include", "/usr/include", 44 "/usr/include/X11", "/usr/X11R6/include", 45 "/opt/gnome/include", 46 -]) 47 +]+mult_inc) 48 49 # Try to identify our libraries 50
