~ubuntu-branches/ubuntu/gutsy/matplotlib/gutsy

« back to all changes in this revision

Viewing changes to debian/patches/build_fix.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2007-07-31 23:04:56 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070731230456-lfmr0h69yh1i37w1
Tags: 0.90.1-2ubuntu1
* Merge from Debian unstable. Remaining changes:
  + debian/rules:
    - Check only the files for the python version which just got installed
      (fixes FTBFS).
    - Modify Maintainer value to match DebianMaintainerField spec.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## build_fix.dpatch by Marco Presi (Zufus) <zufus@debian.org>
 
2
## build_fix.dpatch by Vittorio Palmisano <redclay81@gmail.com>
3
3
##
4
4
## All lines beginning with `## DP:' are a description of the patch.
5
5
## DP: No description.
6
6
 
7
7
@DPATCH@
8
 
--- ./setup.py.orig     2007-01-03 18:58:26.000000000 +0100
9
 
+++ ./setup.py  2007-01-03 19:08:16.000000000 +0100
10
 
@@ -28,21 +28,21 @@
 
8
diff -urNad matplotlib-0.90.1/setup.py.orig matplotlib-0.90.1/setup.py
 
9
--- matplotlib-0.90.1/setup.py.orig     2007-07-06 17:59:58.000000000 +0200
 
10
+++ matplotlib-0.90.1/setup.py  2007-07-06 18:04:52.000000000 +0200
 
11
@@ -28,13 +28,13 @@
11
12
 # it.  It makes very nice antialiased output and also supports alpha
12
13
 # blending
13
14
 BUILD_AGG          = 1
22
23
-BUILD_TKAGG        = 'auto'
23
24
+BUILD_TKAGG        = 1
24
25
 
25
 
 # build wxPython GUI with Agg renderer ; requires wxPython package
26
 
-BUILD_WXAGG        = 'auto'
27
 
+BUILD_WXAGG        = 0
28
 
 
 
26
 # build wxPython extension code to efficiently blit agg into wx.  Only
 
27
 # needed for wxpython <2.8 if you plan on doing animations
 
28
@@ -43,7 +43,7 @@
29
29
 
30
30
 # build a small extension to manage the focus on win32 platforms.
31
31
 #BUILD_WINDOWING        = 0
34
34
 
35
35
 
36
36
 VERBOSE = False # insert lots of diagnostic prints in extension code
37
 
@@ -201,75 +201,19 @@
38
 
 build_enthought(ext_modules, packages)
39
 
 
40
 
 if BUILD_GTK:
41
 
-    try:
42
 
-        import gtk
43
 
-    except ImportError:
44
 
-        print 'GTK requires pygtk'
45
 
-        BUILD_GTK = 0
46
 
-    except RuntimeError:
47
 
-        print 'pygtk present but import failed'
48
 
-        BUILD_GTK = 0
49
 
-    else:
50
 
-        version = (2,2,0)
51
 
-        if gtk.pygtk_version < version:
52
 
-            print "Error: GTK backend requires PyGTK %d.%d.%d (or later), " \
53
 
-                  "%d.%d.%d was detected." % (
54
 
-                version + gtk.pygtk_version)
55
 
-            BUILD_GTK = 0
56
 
-        else:
57
 
             build_gdk(ext_modules, packages, NUMERIX)
58
 
             rc['backend'] = 'GTK'
59
 
 
60
 
 if BUILD_GTKAGG:
61
 
-    try:
62
 
-        import gtk
63
 
-    except ImportError:
64
 
-        print 'GTKAgg requires pygtk'
65
 
-        BUILD_GTKAGG=0
66
 
-    except RuntimeError:
67
 
-        print 'pygtk present but import failed'
68
 
-        BUILD_GTKAGG = 0
69
 
-    else:
70
 
-        version = (2,2,0)
71
 
-        if gtk.pygtk_version < version:
72
 
-            print "Error: GTKAgg backend requires PyGTK %d.%d.%d " \
73
 
-                  "(or later), %d.%d.%d was detected." % (
74
 
-                version + gtk.pygtk_version)
75
 
-            BUILD_GTKAGG=0
76
 
-        else:
77
 
-            BUILD_AGG = 1
78
 
             build_gtkagg(ext_modules, packages, NUMERIX)
79
 
             rc['backend'] = 'GTKAgg'
80
 
 
 
37
@@ -226,15 +226,25 @@
 
38
 
 
39
 havegtk.gotit = None
 
40
 
 
41
+'''
 
42
 if BUILD_GTK and havegtk():
 
43
     build_gdk(ext_modules, packages, NUMERIX)
 
44
     rc['backend'] = 'GTK'
 
45
+'''
 
46
+build_gdk(ext_modules, packages, NUMERIX)
 
47
+rc['backend'] = 'GTK'
 
48
 
 
49
+'''
 
50
 if BUILD_GTKAGG and havegtk():
 
51
     BUILD_AGG = 1
 
52
     build_gtkagg(ext_modules, packages, NUMERIX)
 
53
     rc['backend'] = 'GTKAgg'
 
54
+'''
 
55
+
 
56
+build_gtkagg(ext_modules, packages, NUMERIX)
 
57
+rc['backend'] = 'GTKAgg'
 
58
 
 
59
+'''
81
60
 if BUILD_TKAGG:
82
 
-    try:
83
 
-        import Tkinter
84
 
-    except ImportError:
85
 
-        print 'TKAgg requires TkInter'
86
 
-        BUILD_TKAGG = 0
87
 
-    except RuntimeError:
88
 
-        print 'Tkinter present but import failed'
89
 
-        BUILD_TKAGG = 0
90
 
-    else:
91
 
-        try:
92
 
-            tk = Tkinter.Tk()
93
 
-            tk.withdraw()
94
 
-        except Tkinter.TclError:
95
 
-            print 'Tkinter present, but window failed to open'
96
 
-            BUILD_TKAGG = 0
97
 
-        else:
 
61
     try:
 
62
         import Tkinter
 
63
@@ -255,7 +265,12 @@
98
64
             BUILD_AGG = 1
99
65
             build_tkagg(ext_modules, packages, NUMERIX)
100
66
             rc['backend'] = 'TkAgg'
 
67
+'''
 
68
+BUILD_AGG = 1
 
69
+build_tkagg(ext_modules, packages, NUMERIX)
 
70
+rc['backend'] = 'TkAgg'
101
71
 
 
72
+"""
102
73
 if BUILD_WXAGG:
103
 
-    try:
104
 
-        import wxPython
105
 
-    except ImportError:
106
 
-        if BUILD_WXAGG != 'auto':
107
 
-            print 'WXAgg\'s accelerator requires wxPython'
108
 
-        BUILD_WXAGG = 0
109
 
-    else:
110
 
         BUILD_AGG = 1
111
 
         build_wxagg(ext_modules, packages, NUMERIX,
112
 
             not (isinstance(BUILD_WXAGG, str) # don't about if BUILD_WXAGG
113
 
@@ -331,6 +275,6 @@
114
 
       ext_modules = ext_modules,
115
 
       data_files = data_files,
116
 
       package_dir = {'': 'lib'},
117
 
-      cmdclass = {'install_data':smart_install_data},
118
 
+      #cmdclass = {'install_data':smart_install_data},
119
 
       **additional_params
120
 
       )
121
 
--- ./setupext.py.orig  2007-01-03 18:58:26.000000000 +0100
122
 
+++ ./setupext.py       2007-01-03 19:04:06.000000000 +0100
123
 
@@ -349,11 +349,11 @@
 
74
     try:
 
75
         import wx
 
76
@@ -270,7 +285,9 @@
 
77
                 not (isinstance(BUILD_WXAGG, str) # don't abort if BUILD_WXAGG
 
78
                      and BUILD_WXAGG.lower() == 'auto')) # is "auto"
 
79
         rc['backend'] = 'WXAgg'
 
80
+"""
 
81
 
 
82
+BUILD_AGG=1
 
83
 if BUILD_AGG:
 
84
     build_agg(ext_modules, packages, NUMERIX)
 
85
     if rc['backend'] == 'PS': rc['backend'] = 'Agg'
 
86
diff -urNad matplotlib-0.90.1/setupext.py.orig matplotlib-0.90.1/setupext.py
 
87
--- matplotlib-0.90.1/setupext.py.orig  2007-07-06 18:07:08.000000000 +0200
 
88
+++ matplotlib-0.90.1/setupext.py       2007-07-06 18:10:17.000000000 +0200
 
89
@@ -45,8 +45,8 @@
 
90
 
 
91
 basedir = {
 
92
     'win32'  : ['win32_static',],
 
93
-    'linux2' : ['/usr/local', '/usr',],
 
94
-    'linux'  : ['/usr/local', '/usr',],
 
95
+    'linux2' : ['/usr',],
 
96
+    'linux'  : ['/usr',],
 
97
     'cygwin' : ['/usr/local', '/usr',],
 
98
     'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
 
99
                 '/usr', '/sw'],
 
100
@@ -54,8 +54,8 @@
 
101
     'freebsd5' : ['/usr/local', '/usr'],
 
102
     'freebsd6' : ['/usr/local', '/usr'],
 
103
     'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',],
 
104
-    'gnukfreebsd5' : ['/usr/local', '/usr'],
 
105
-    'gnukfreebsd6' : ['/usr/local', '/usr'],
 
106
+    'gnukfreebsd5' : ['/usr'],
 
107
+    'gnukfreebsd6' : ['/usr'],
 
108
     'aix5' : ['/usr/local'],
 
109
 }
 
110
 
 
111
@@ -357,11 +357,11 @@
124
112
         print "Using default library and include directories for Tcl and Tk because a"
125
113
         print "Tk window failed to open.  You may need to define DISPLAY for Tk to work"
126
114
         print "so that setup can determine where your libraries are located."
132
120
+        o.tcl_lib = "/usr/lib"
133
121
+        o.tcl_inc = "/usr/include/tcl8.4"
134
122
+        o.tk_lib = "/usr/lib"
135
 
+        o.tk_inc = "/usr/include/tcl8.4"
 
123
+        o.tk_inc = "/usr/include/tcp8.4"
136
124
+        o.tkv = "8.4"
137
125
     else:
138
126
         tk.withdraw()
139
127
         o.tcl_lib = os.path.normpath(os.path.join(str(tk.getvar('tcl_library')), '../'))
 
128