[37908] trunk/dports/python
ram at macports.org
ram at macports.org
Sat Jun 28 13:55:11 PDT 2008
Revision: 37908
http://trac.macosforge.org/projects/macports/changeset/37908
Author: ram at macports.org
Date: 2008-06-28 13:55:11 -0700 (Sat, 28 Jun 2008)
Log Message:
-----------
py-matplotlib/py25-matplotlib: link against MacPorts Tcl/Tk, closes #15706
Modified Paths:
--------------
trunk/dports/python/py-matplotlib/Portfile
trunk/dports/python/py-matplotlib/files/patch-setupext.py.diff
trunk/dports/python/py25-matplotlib/Portfile
trunk/dports/python/py25-matplotlib/files/patch-setupext.py.diff
Modified: trunk/dports/python/py-matplotlib/Portfile
===================================================================
--- trunk/dports/python/py-matplotlib/Portfile 2008-06-28 19:45:43 UTC (rev 37907)
+++ trunk/dports/python/py-matplotlib/Portfile 2008-06-28 20:55:11 UTC (rev 37908)
@@ -6,6 +6,7 @@
categories-append graphics math
name py-matplotlib
version 0.98.0
+revision 1
maintainers ram openmaintainer
platforms darwin
Modified: trunk/dports/python/py-matplotlib/files/patch-setupext.py.diff
===================================================================
--- trunk/dports/python/py-matplotlib/files/patch-setupext.py.diff 2008-06-28 19:45:43 UTC (rev 37907)
+++ trunk/dports/python/py-matplotlib/files/patch-setupext.py.diff 2008-06-28 20:55:11 UTC (rev 37908)
@@ -1,16 +1,16 @@
---- setupext.py.orig 2008-01-27 20:09:49.000000000 +0100
-+++ setupext.py 2008-01-27 20:11:05.000000000 +0100
+--- setupext.py.orig 2008-05-29 17:47:10.000000000 -0500
++++ setupext.py 2008-06-28 15:39:22.000000000 -0500
@@ -50,8 +50,7 @@
'linux2' : ['/usr/local', '/usr'],
'linux' : ['/usr/local', '/usr',],
'cygwin' : ['/usr/local', '/usr',],
- 'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
- '/usr', '/sw', '/usr/X11R6'],
-+ 'darwin' : ['@@MPORTS_PREFIX@@', '/usr'],
++ 'darwin' : ['@@MPORTS_PREFIX@@'],
'freebsd4' : ['/usr/local', '/usr'],
'freebsd5' : ['/usr/local', '/usr'],
'freebsd6' : ['/usr/local', '/usr'],
-@@ -327,6 +326,7 @@
+@@ -328,6 +327,7 @@
[os.path.join(p, 'lib64') for p in basedir[sys.platform] ] )
module.include_dirs.extend(incdirs)
@@ -18,3 +18,71 @@
module.include_dirs.append('.')
module.library_dirs.extend(libdirs)
+@@ -982,10 +982,10 @@
+ return tcl_lib, tcl_inc, tk_lib, tk_inc
+
+ def hardcoded_tcl_config():
+- tcl_inc = "/usr/local/include"
+- tk_inc = "/usr/local/include"
+- tcl_lib = "/usr/local/lib"
+- tk_lib = "/usr/local/lib"
++ tcl_inc = "@@MPORTS_PREFIX@@/include"
++ tk_inc = "@@MPORTS_PREFIX@@/include"
++ tcl_lib = "@@MPORTS_PREFIX@@/lib"
++ tk_lib = "@@MPORTS_PREFIX@@/lib"
+ return tcl_lib, tcl_inc, tk_lib, tk_inc
+
+ def add_tk_flags(module):
+@@ -1003,52 +1003,6 @@
+ raise RuntimeError('No tk/win32 support for this python version yet')
+ module.library_dirs.extend([os.path.join(sys.prefix, 'dlls')])
+
+- elif sys.platform == 'darwin':
+- # this config section lifted directly from Imaging - thanks to
+- # the effbot!
+-
+- # First test for a MacOSX/darwin framework install
+- from os.path import join, exists
+- framework_dirs = [
+- join(os.getenv('HOME'), '/Library/Frameworks'),
+- '/Library/Frameworks',
+- '/System/Library/Frameworks/',
+- ]
+-
+- # Find the directory that contains the Tcl.framework and Tk.framework
+- # bundles.
+- # XXX distutils should support -F!
+- tk_framework_found = 0
+- for F in framework_dirs:
+- # both Tcl.framework and Tk.framework should be present
+- for fw in 'Tcl', 'Tk':
+- if not exists(join(F, fw + '.framework')):
+- break
+- else:
+- # ok, F is now directory with both frameworks. Continure
+- # building
+- tk_framework_found = 1
+- break
+- if tk_framework_found:
+- # For 8.4a2, we must add -I options that point inside the Tcl and Tk
+- # frameworks. In later release we should hopefully be able to pass
+- # the -F option to gcc, which specifies a framework lookup path.
+- #
+- tk_include_dirs = [
+- join(F, fw + '.framework', H)
+- for fw in 'Tcl', 'Tk'
+- for H in 'Headers', 'Versions/Current/PrivateHeaders'
+- ]
+-
+- # For 8.4a2, the X11 headers are not included. Rather than include a
+- # complicated search, this is a hard-coded path. It could bail out
+- # if X11 libs are not found...
+- # tk_include_dirs.append('/usr/X11R6/include')
+- frameworks = ['-framework', 'Tcl', '-framework', 'Tk']
+- module.include_dirs.extend(tk_include_dirs)
+- module.extra_link_args.extend(frameworks)
+- module.extra_compile_args.extend(frameworks)
+-
+ # you're still here? ok we'll try it this way...
+ else:
+ success = False
Modified: trunk/dports/python/py25-matplotlib/Portfile
===================================================================
--- trunk/dports/python/py25-matplotlib/Portfile 2008-06-28 19:45:43 UTC (rev 37907)
+++ trunk/dports/python/py25-matplotlib/Portfile 2008-06-28 20:55:11 UTC (rev 37908)
@@ -6,6 +6,7 @@
categories-append graphics math
name py25-matplotlib
version 0.98.0
+revision 1
maintainers ram openmaintainer
platforms darwin
Modified: trunk/dports/python/py25-matplotlib/files/patch-setupext.py.diff
===================================================================
--- trunk/dports/python/py25-matplotlib/files/patch-setupext.py.diff 2008-06-28 19:45:43 UTC (rev 37907)
+++ trunk/dports/python/py25-matplotlib/files/patch-setupext.py.diff 2008-06-28 20:55:11 UTC (rev 37908)
@@ -1,16 +1,16 @@
---- setupext.py.orig 2008-01-27 20:09:49.000000000 +0100
-+++ setupext.py 2008-01-27 20:11:05.000000000 +0100
+--- setupext.py.orig 2008-05-29 17:47:10.000000000 -0500
++++ setupext.py 2008-06-28 15:39:22.000000000 -0500
@@ -50,8 +50,7 @@
'linux2' : ['/usr/local', '/usr'],
'linux' : ['/usr/local', '/usr',],
'cygwin' : ['/usr/local', '/usr',],
- 'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
- '/usr', '/sw', '/usr/X11R6'],
-+ 'darwin' : ['@@MPORTS_PREFIX@@', '/usr'],
++ 'darwin' : ['@@MPORTS_PREFIX@@'],
'freebsd4' : ['/usr/local', '/usr'],
'freebsd5' : ['/usr/local', '/usr'],
'freebsd6' : ['/usr/local', '/usr'],
-@@ -327,6 +326,7 @@
+@@ -328,6 +327,7 @@
[os.path.join(p, 'lib64') for p in basedir[sys.platform] ] )
module.include_dirs.extend(incdirs)
@@ -18,3 +18,71 @@
module.include_dirs.append('.')
module.library_dirs.extend(libdirs)
+@@ -982,10 +982,10 @@
+ return tcl_lib, tcl_inc, tk_lib, tk_inc
+
+ def hardcoded_tcl_config():
+- tcl_inc = "/usr/local/include"
+- tk_inc = "/usr/local/include"
+- tcl_lib = "/usr/local/lib"
+- tk_lib = "/usr/local/lib"
++ tcl_inc = "@@MPORTS_PREFIX@@/include"
++ tk_inc = "@@MPORTS_PREFIX@@/include"
++ tcl_lib = "@@MPORTS_PREFIX@@/lib"
++ tk_lib = "@@MPORTS_PREFIX@@/lib"
+ return tcl_lib, tcl_inc, tk_lib, tk_inc
+
+ def add_tk_flags(module):
+@@ -1003,52 +1003,6 @@
+ raise RuntimeError('No tk/win32 support for this python version yet')
+ module.library_dirs.extend([os.path.join(sys.prefix, 'dlls')])
+
+- elif sys.platform == 'darwin':
+- # this config section lifted directly from Imaging - thanks to
+- # the effbot!
+-
+- # First test for a MacOSX/darwin framework install
+- from os.path import join, exists
+- framework_dirs = [
+- join(os.getenv('HOME'), '/Library/Frameworks'),
+- '/Library/Frameworks',
+- '/System/Library/Frameworks/',
+- ]
+-
+- # Find the directory that contains the Tcl.framework and Tk.framework
+- # bundles.
+- # XXX distutils should support -F!
+- tk_framework_found = 0
+- for F in framework_dirs:
+- # both Tcl.framework and Tk.framework should be present
+- for fw in 'Tcl', 'Tk':
+- if not exists(join(F, fw + '.framework')):
+- break
+- else:
+- # ok, F is now directory with both frameworks. Continure
+- # building
+- tk_framework_found = 1
+- break
+- if tk_framework_found:
+- # For 8.4a2, we must add -I options that point inside the Tcl and Tk
+- # frameworks. In later release we should hopefully be able to pass
+- # the -F option to gcc, which specifies a framework lookup path.
+- #
+- tk_include_dirs = [
+- join(F, fw + '.framework', H)
+- for fw in 'Tcl', 'Tk'
+- for H in 'Headers', 'Versions/Current/PrivateHeaders'
+- ]
+-
+- # For 8.4a2, the X11 headers are not included. Rather than include a
+- # complicated search, this is a hard-coded path. It could bail out
+- # if X11 libs are not found...
+- # tk_include_dirs.append('/usr/X11R6/include')
+- frameworks = ['-framework', 'Tcl', '-framework', 'Tk']
+- module.include_dirs.extend(tk_include_dirs)
+- module.extra_link_args.extend(frameworks)
+- module.extra_compile_args.extend(frameworks)
+-
+ # you're still here? ok we'll try it this way...
+ else:
+ success = False
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080628/b2582969/attachment.html
More information about the macports-changes
mailing list