[82495] trunk/dports/python
ram at macports.org
ram at macports.org
Sun Aug 14 14:25:53 PDT 2011
Revision: 82495
http://trac.macports.org/changeset/82495
Author: ram at macports.org
Date: 2011-08-14 14:25:50 -0700 (Sun, 14 Aug 2011)
Log Message:
-----------
python/py*-matplotlib: unify
Modified Paths:
--------------
trunk/dports/python/py-matplotlib/Portfile
trunk/dports/python/py-matplotlib/files/patch-setup.cfg.diff
trunk/dports/python/py-matplotlib/files/patch-setupext.py.diff
Added Paths:
-----------
trunk/dports/python/py-matplotlib/files/patch-04b4e50919.diff
Removed Paths:
-------------
trunk/dports/python/py25-matplotlib/
trunk/dports/python/py26-matplotlib/
trunk/dports/python/py27-matplotlib/
Modified: trunk/dports/python/py-matplotlib/Portfile
===================================================================
--- trunk/dports/python/py-matplotlib/Portfile 2011-08-14 20:13:49 UTC (rev 82494)
+++ trunk/dports/python/py-matplotlib/Portfile 2011-08-14 21:25:50 UTC (rev 82495)
@@ -1,13 +1,13 @@
# $Id$
PortSystem 1.0
-PortGroup python24 1.0
+PortGroup python 1.0
categories-append graphics math
name py-matplotlib
-version 0.99.0
-revision 5
-maintainers nomaintainer
+version 1.0.1
+revision 4
+maintainers ram openmaintainer
platforms darwin
description matlab-like syntax for creating plots in python
@@ -22,39 +22,54 @@
master_sites sourceforge:matplotlib
distname matplotlib-${version}
-checksums md5 8e019e17396e816cc2ef52843532e727 \
- sha1 5c267e96ecebe0654683b6325f423c53ae5ccd39 \
- rmd160 e69f3d6c877e2854becf71a25e4ba56f2ced8735
+checksums md5 2196c0482d5b33dc8d33f67bbafc1323 \
+ sha1 c7a832f28a66817626e7a8af21e14ea0e15f4008 \
+ rmd160 e3e326f7f31ef995253da483444cb593b8e6753b
+python.versions 24 25 26 27
+
depends_lib-append port:freetype \
- port:libpng \
- port:py-dateutil \
- port:py-tz \
- port:py-numpy \
- port:py-configobj \
- port:py-pyobjc2 \
- port:py-pyobjc2-cocoa
+ port:libpng
+if {${subport} == "py24-matplotlib"} {
+ depends_lib-append port:py-dateutil \
+ port:py-tz \
+ port:py-numpy \
+ port:py-configobj \
+ port:py-pyobjc2 \
+ port:py-pyobjc2-cocoa
+} elseif {${subport} != ${name}} {
+ depends_lib-append port:py${python.version}-dateutil \
+ port:py${python.version}-tz \
+ port:py${python.version}-numpy \
+ port:py${python.version}-configobj \
+ port:py${python.version}-pyobjc-cocoa
+}
+
patchfiles patch-setupext.py.diff \
patch-setup.cfg.diff \
- patch-disable_optional_deps.diff
+ patch-disable_optional_deps.diff \
+ patch-04b4e50919.diff
-build.env MPLIB_BASE="${prefix}"
+build.env MPLIB_BASE="${prefix}" PKG_CONFIG_PATH="${python.prefix}/lib/pkgconfig/"
post-patch {
reinplace "s|@@MPORTS_PREFIX@@|${prefix}|" ${worksrcpath}/setupext.py
+ reinplace "s|@@PYTHON_BRANCH@@|${prefix}|" ${worksrcpath}/setupext.py
}
post-destroot {
- xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} \
- ${destroot}${prefix}/share/${name}
+ if {${name} != ${subport}} {
+ xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport} \
+ ${destroot}${prefix}/share/${subport}
xinstall -m 644 -W ${worksrcpath} CHANGELOG INSTALL \
INTERACTIVE KNOWN_BUGS README.txt TODO \
- ${destroot}${prefix}/share/doc/${name}
+ ${destroot}${prefix}/share/doc/${subport}
file copy ${worksrcpath}/license \
- ${destroot}${prefix}/share/doc/${name}
+ ${destroot}${prefix}/share/doc/${subport}
file copy ${worksrcpath}/examples \
- ${destroot}${prefix}/share/${name}
+ ${destroot}${prefix}/share/${subport}
+ }
}
post-activate {
@@ -64,20 +79,23 @@
\nhttp://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend\n"
}
-platform darwin 8 {
- depends_lib-append port:py-pyobjc
- depends_lib-delete port:py-pyobjc2 port:py-pyobjc2-cocoa
-}
-
variant cairo description "Enable Cairo backends" {
- depends_lib-append port:py-cairo
+ if {${subport} == "py24-matplotlib"} {
+ depends_lib-append port:py-cario
+ } elseif {${subport} != ${name}} {
+ depends_lib-append port:py${python.version}-cairo
+ }
post-patch {
reinplace "s|MP_Cairo=False|MP_Cairo=True|" ${worksrcpath}/setupext.py
}
}
variant gtk2 description "Enable GTKAgg backend" {
- depends_lib-append port:py-gtk2
+ if {${subport} == "py24-matplotlib"} {
+ depends_lib-append port:py-gtk
+ } elseif {${subport} != ${name}} {
+ depends_lib-append port:py${python.version}-gtk
+ }
post-patch {
reinplace "s|^gtk=False|gtk=True|" ${worksrcpath}/setup.cfg
reinplace "s|^gtkagg=False|gtkagg=True|" ${worksrcpath}/setup.cfg
@@ -85,21 +103,33 @@
}
variant tkinter description "Enable tkAgg backend" {
- depends_lib-append port:py-tkinter
+ if {${subport} == "py24-matplotlib"} {
+ depends_lib-append port:py-tkinter
+ } elseif {${subport} != ${name}} {
+ depends_lib-append port:py${python.version}-tkinter
+ }
post-patch {
reinplace "s|^tkagg=False|tkagg=True|" ${worksrcpath}/setup.cfg
}
}
variant wxpython description "Enable wxAgg backend" {
- depends_lib-append port:py-wxpython
+ if {${subport} == "py24-matplotlib"} {
+ depends_lib-append port:py-wxpython
+ } elseif {${subport} != ${name}} {
+ depends_lib-append port:py${python.version}-wxpython
+ }
post-patch {
reinplace "s|^wxagg=False|wxagg=True|" ${worksrcpath}/setup.cfg
}
}
variant qt4 description "Enable QT4Agg backend" {
- depends_lib-append port:py-pyqt4
+ if {${subport} == "py24-matplotlib"} {
+ depends_lib-append port:py-pyqt4
+ } elseif {${subport} != ${name}} {
+ depends_lib-append port:py${python.version}-pyqt4
+ }
post-patch {
reinplace "s|MP_QT4=False|MP_QT4=True|" ${worksrcpath}/setupext.py
}
@@ -119,8 +149,10 @@
}
}
-if { ![variant_isset gtk2] && ![variant_isset tkinter] && ![variant_isset wxpython] && ![variant_isset qt4] } {
+if { ![variant_isset gtk2] && ![variant_isset tkinter] && ![variant_isset qt4] } {
default_variants +tkinter
}
-livecheck.type none
+livecheck.type regex
+livecheck.url ${homepage}
+livecheck.regex {matplotlib (\d+(\.\d+)*) is available}
Copied: trunk/dports/python/py-matplotlib/files/patch-04b4e50919.diff (from rev 82494, trunk/dports/python/py27-matplotlib/files/patch-04b4e50919.diff)
===================================================================
--- trunk/dports/python/py-matplotlib/files/patch-04b4e50919.diff (rev 0)
+++ trunk/dports/python/py-matplotlib/files/patch-04b4e50919.diff 2011-08-14 21:25:50 UTC (rev 82495)
@@ -0,0 +1,16 @@
+--- setupext.py
++++ setupext.py
+@@ -843,8 +843,12 @@ def check_for_tk():
+ gotit = False
+
+ if gotit:
++ try:
++ tk_v = Tkinter.__version__.split()[-2]
++ except IndexError:
++ tk_v = 'version not identified'
+ print_status("Tkinter", "Tkinter: %s, Tk: %s, Tcl: %s" %
+- (Tkinter.__version__.split()[-2], Tkinter.TkVersion, Tkinter.TclVersion))
++ (tk_v, Tkinter.TkVersion, Tkinter.TclVersion))
+ else:
+ print_status("Tkinter", "no")
+ if explanation is not None:
Modified: trunk/dports/python/py-matplotlib/files/patch-setup.cfg.diff
===================================================================
--- trunk/dports/python/py-matplotlib/files/patch-setup.cfg.diff 2011-08-14 20:13:49 UTC (rev 82494)
+++ trunk/dports/python/py-matplotlib/files/patch-setup.cfg.diff 2011-08-14 21:25:50 UTC (rev 82495)
@@ -1,5 +1,5 @@
--- setup.cfg 1970-01-01 01:00:00.000000000 +0100
-+++ setup.cfg 2008-12-16 12:27:37.000000000 +0000
++++ setup.cfg 2010-01-04 22:52:57.000000000 +0000
@@ -0,0 +1,9 @@
+[gui_support]
+gtk=False
Modified: trunk/dports/python/py-matplotlib/files/patch-setupext.py.diff
===================================================================
--- trunk/dports/python/py-matplotlib/files/patch-setupext.py.diff 2011-08-14 20:13:49 UTC (rev 82494)
+++ trunk/dports/python/py-matplotlib/files/patch-setupext.py.diff 2011-08-14 21:25:50 UTC (rev 82495)
@@ -1,24 +1,31 @@
---- setupext.py 2009-08-01 14:15:24.000000000 -0500
-+++ setupext.py 2009-08-07 08:35:26.000000000 -0500
-@@ -50,8 +50,7 @@
+--- setupext.py 2009-08-23 06:27:32.000000000 +0100
++++ setupext.py 2010-01-04 22:59:27.000000000 +0000
+@@ -50,15 +50,7 @@
'linux2' : ['/usr/local', '/usr'],
'linux' : ['/usr/local', '/usr',],
'cygwin' : ['/usr/local', '/usr',],
-- 'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
+- '_darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
- '/usr', '/sw'],
+- # it appears builds with darwin are broken because of all the
+- # different flags the deps can be compile with, so I am pushing
+- # people to :
+- # make -f make.osx fetch deps mpl_build mpl_install
+-
+- 'darwin' : [],
+-
+ 'darwin' : ['@@MPORTS_PREFIX@@'],
'freebsd4' : ['/usr/local', '/usr'],
'freebsd5' : ['/usr/local', '/usr'],
'freebsd6' : ['/usr/local', '/usr'],
-@@ -320,6 +319,7 @@
+@@ -327,6 +319,7 @@
[os.path.join(p, 'lib64') for p in basedir[sys.platform] ] )
module.include_dirs.extend(incdirs)
-+ module.include_dirs.extend(['@@MPORTS_PREFIX@@/include/python2.4'])
++ module.include_dirs.extend(['@@MPORTS_PREFIX@@/include/python@@PYTHON_BRANCH@@'])
module.include_dirs.append('.')
module.library_dirs.extend(libdirs)
-@@ -949,10 +949,10 @@
+@@ -956,10 +949,10 @@
return tcl_lib, tcl_inc, tk_lib, tk_inc
def hardcoded_tcl_config():
@@ -33,7 +40,7 @@
return tcl_lib, tcl_inc, tk_lib, tk_inc
def add_tk_flags(module):
-@@ -973,52 +973,6 @@
+@@ -980,52 +973,6 @@
raise RuntimeError('No tk/win32 support for this python version yet')
module.library_dirs.extend([os.path.join(sys.prefix, 'dlls')])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110814/dc0ce42e/attachment-0001.html>
More information about the macports-changes
mailing list