[44330] trunk/dports/python/py-matplotlib
ram at macports.org
ram at macports.org
Fri Dec 26 06:11:39 PST 2008
Revision: 44330
http://trac.macports.org/changeset/44330
Author: ram at macports.org
Date: 2008-12-26 06:11:37 -0800 (Fri, 26 Dec 2008)
Log Message:
-----------
python/py-matplotlib: sync with py25-matplotlib, closes #17765 & #17766
Modified Paths:
--------------
trunk/dports/python/py-matplotlib/Portfile
Added Paths:
-----------
trunk/dports/python/py-matplotlib/files/patch-disable_optional_deps.diff
trunk/dports/python/py-matplotlib/files/patch-setup.cfg.diff
Modified: trunk/dports/python/py-matplotlib/Portfile
===================================================================
--- trunk/dports/python/py-matplotlib/Portfile 2008-12-26 11:56:12 UTC (rev 44329)
+++ trunk/dports/python/py-matplotlib/Portfile 2008-12-26 14:11:37 UTC (rev 44330)
@@ -5,7 +5,7 @@
categories-append graphics math
name py-matplotlib
-version 0.98.3
+version 0.98.5.1
maintainers nomaintainer
platforms darwin
@@ -21,48 +21,23 @@
master_sites sourceforge:matplotlib
distname matplotlib-${version}
-checksums md5 d6b579f52705df584650fb6f61302f92 \
- sha1 9d3ded193cdbebf7d02aaf48372359eb3621a3eb \
- rmd160 960356e1822aec9f196f60337730c0bc6d3531d6
+checksums md5 57c2dbe87642001ada2baca7c49c826f \
+ sha1 bb78b4a169b97fbebfc436771053473786e3126c \
+ rmd160 4c0ec6ec649ab954a002bea111e0185969639100
depends_lib-append port:freetype \
port:libpng \
port:py-dateutil \
port:py-tz \
- port:py-numpy
+ port:py-numpy \
+ port:py-configobj
-patchfiles patch-setupext.py.diff
+patchfiles patch-setupext.py.diff \
+ patch-setup.cfg.diff \
+ patch-disable_optional_deps.diff
build.env MPLIB_BASE="${prefix}"
-post-extract {
- if {[variant_isset gtk2]} {
- reinplace "s|^BUILD_GTKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTKAGG=1|" \
- ${worksrcpath}/setup.py
- reinplace "s|^BUILD_GTK\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTK=1|" \
- ${worksrcpath}/setup.py
- } else {
- reinplace "s|^BUILD_GTKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTKAGG=0|" \
- ${worksrcpath}/setup.py
- reinplace "s|^BUILD_GTK\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTK=0|" \
- ${worksrcpath}/setup.py
- }
- if {[variant_isset tkinter]} {
- reinplace "s|^BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=1|" \
- ${worksrcpath}/setup.py
- } else {
- reinplace "s|^BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=0|" \
- ${worksrcpath}/setup.py
- }
- if {[variant_isset wxpython]} {
- reinplace "s|^BUILD_WXAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_WXAGG=1|" \
- ${worksrcpath}/setup.py
- } else {
- reinplace "s|^BUILD_WXAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_WXAGG=0|" \
- ${worksrcpath}/setup.py
- }
-}
-
post-patch {
reinplace "s|@@MPORTS_PREFIX@@|${prefix}|" ${worksrcpath}/setupext.py
}
@@ -70,7 +45,7 @@
post-destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} \
${destroot}${prefix}/share/${name}
- xinstall -m 644 -W ${worksrcpath} API_CHANGES CHANGELOG INSTALL \
+ xinstall -m 644 -W ${worksrcpath} CHANGELOG INSTALL \
INTERACTIVE KNOWN_BUGS README.txt TODO \
${destroot}${prefix}/share/doc/${name}
file copy ${worksrcpath}/license \
@@ -79,18 +54,56 @@
${destroot}${prefix}/share/${name}
}
-variant cairo description "Allow to use cairo for interactive plotting" {
+post-activate {
+ ui_msg "\nThe default backend is now the non-interactive Agg backend, different
+backends can be specified using the ~/.matplotlib/matplotlibrc file.
+More details, regarding backends, can be found in the matplotlib FAQ:
+\nhttp://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend\n"
+}
+
+variant cairo description "Enable Cairo backends" {
depends_lib-append port:py-cairo
+ post-patch {
+ reinplace "s|MP_Cairo=False|MP_Cairo=True|" ${worksrcpath}/setupext.py
+ }
}
-variant gtk2 conflicts tkinter wxpython description "Use GTKAgg for interactive plotting" {
+
+variant gtk2 description "Enable GTKAgg backend" {
depends_lib-append port:py-gtk
+ post-patch {
+ reinplace "s|^gtk=False|gtk=True|" ${worksrcpath}/setup.cfg
+ reinplace "s|^gtkagg=False|gtkagg=True|" ${worksrcpath}/setup.cfg
+ }
}
-variant tkinter conflicts gtk2 wxpython description "Use tkAgg for interactive plotting" {
+
+variant tkinter description "Enable tkAgg backend" {
depends_lib-append port:py-tkinter
+ post-patch {
+ reinplace "s|^tkagg=False|tkagg=True|" ${worksrcpath}/setup.cfg
+ }
}
-variant wxpython conflicts gtk2 tkinter description "Use wxAgg for interactive plotting" {
+
+variant wxpython description "Enable wxAgg backend" {
depends_lib-append port:py-wxpython
+ post-patch {
+ reinplace "s|^wxagg=False|wxagg=True|" ${worksrcpath}/setup.cfg
+ }
}
+
+variant latex description "Enable LaTeX support" {
+ depends_lib-append port:texlive
+ post-patch {
+ reinplace "s|MP_LaTeX=False|MP_LaTeX=True|" ${worksrcpath}/setupext.py
+ }
+}
+
+variant ghostscript description "Enable GhostScript support" {
+ depends_lib-append port:ghostscript
+ post-patch {
+ reinplace "s|MP_GhostScript=False|MP_GhostScript=True|" ${worksrcpath}/setupext.py
+ }
+}
+
if { ![variant_isset gtk2] && ![variant_isset tkinter] && ![variant_isset wxpython] } {
default_variants +tkinter
}
Copied: trunk/dports/python/py-matplotlib/files/patch-disable_optional_deps.diff (from rev 44329, trunk/dports/python/py25-matplotlib/files/patch-disable_optional_deps.diff)
===================================================================
--- trunk/dports/python/py-matplotlib/files/patch-disable_optional_deps.diff (rev 0)
+++ trunk/dports/python/py-matplotlib/files/patch-disable_optional_deps.diff 2008-12-26 14:11:37 UTC (rev 44330)
@@ -0,0 +1,163 @@
+--- setupext.py.orig 2008-12-26 09:37:15.000000000 +0000
++++ setupext.py 2008-12-26 10:54:54.000000000 +0000
+@@ -350,43 +350,58 @@
+ return '.'.join(temp)
+
+ def check_for_qt():
+- try:
+- import pyqtconfig
+- except ImportError:
++ MP_QT=False
++ if MP_QT:
++ try:
++ import pyqtconfig
++ except ImportError:
++ print_status("Qt", "no")
++ return False
++ else:
++ try:
++ qt_version = pyqtconfig.Configuration().qt_version
++ qt_version = convert_qt_version(qt_version)
++ except AttributeError:
++ qt_version = "<unknown>"
++ print_status("Qt", "Qt: %s, PyQt: %s" %
++ (qt_version,
++ pyqtconfig.Configuration().pyqt_version_str))
++ return True
++ else:
+ print_status("Qt", "no")
+ return False
+- else:
+- try:
+- qt_version = pyqtconfig.Configuration().qt_version
+- qt_version = convert_qt_version(qt_version)
+- except AttributeError:
+- qt_version = "<unknown>"
+- print_status("Qt", "Qt: %s, PyQt: %s" %
+- (qt_version,
+- pyqtconfig.Configuration().pyqt_version_str))
+- return True
+
+ def check_for_qt4():
+- try:
+- from PyQt4 import pyqtconfig
+- except ImportError:
++ MP_QT4=False
++ if MP_QT4:
++ try:
++ from PyQt4 import pyqtconfig
++ except ImportError:
++ print_status("Qt4", "no")
++ return False
++ else:
++ print_status("Qt4", "Qt: %s, PyQt4: %s" %
++ (convert_qt_version(pyqtconfig.Configuration().qt_version),
++ pyqtconfig.Configuration().pyqt_version_str))
++ return True
++ else:
+ print_status("Qt4", "no")
+ return False
+- else:
+- print_status("Qt4", "Qt: %s, PyQt4: %s" %
+- (convert_qt_version(pyqtconfig.Configuration().qt_version),
+- pyqtconfig.Configuration().pyqt_version_str))
+- return True
+
+ def check_for_cairo():
+- try:
+- import cairo
+- except ImportError:
++ MP_Cairo=False
++ if MP_Cairo:
++ try:
++ import cairo
++ except ImportError:
++ print_status("Cairo", "no")
++ return False
++ else:
++ print_status("Cairo", cairo.version)
++ return True
++ else:
+ print_status("Cairo", "no")
+ return False
+- else:
+- print_status("Cairo", cairo.version)
+- return True
+
+ def check_for_datetime():
+ try:
+@@ -503,36 +518,51 @@
+ return False
+
+ def check_for_dvipng():
+- try:
+- stdin, stdout = run_child_process('dvipng -version')
+- print_status("dvipng", stdout.readlines()[1].split()[-1])
+- return True
+- except (IndexError, ValueError):
++ MP_LaTeX=False
++ if MP_LaTeX:
++ try:
++ stdin, stdout = run_child_process('dvipng -version')
++ print_status("dvipng", stdout.readlines()[1].split()[-1])
++ return True
++ except (IndexError, ValueError):
++ print_status("dvipng", "no")
++ return False
++ else:
+ print_status("dvipng", "no")
+ return False
+
+ def check_for_ghostscript():
+- try:
+- if sys.platform == 'win32':
+- command = 'gswin32c --version'
+- else:
+- command = 'gs --version'
+- stdin, stdout = run_child_process(command)
+- print_status("ghostscript", stdout.read()[:-1])
+- return True
+- except (IndexError, ValueError):
++ MP_GhostScript=False
++ if MP_GhostScript:
++ try:
++ if sys.platform == 'win32':
++ command = 'gswin32c --version'
++ else:
++ command = 'gs --version'
++ stdin, stdout = run_child_process(command)
++ print_status("ghostscript", stdout.read()[:-1])
++ return True
++ except (IndexError, ValueError):
++ print_status("ghostscript", "no")
++ return False
++ else:
+ print_status("ghostscript", "no")
+- return False
++ return True
+
+ def check_for_latex():
+- try:
+- stdin, stdout = run_child_process('latex -version')
+- line = stdout.readlines()[0]
+- pattern = '3\.1\d+'
+- match = re.search(pattern, line)
+- print_status("latex", match.group(0))
+- return True
+- except (IndexError, ValueError, AttributeError):
++ MP_LaTeX=False
++ if MP_LaTeX:
++ try:
++ stdin, stdout = run_child_process('latex -version')
++ line = stdout.readlines()[0]
++ pattern = '3\.1\d+'
++ match = re.search(pattern, line)
++ print_status("latex", match.group(0))
++ return True
++ except (IndexError, ValueError, AttributeError):
++ print_status("latex", "no")
++ return False
++ else:
+ print_status("latex", "no")
+ return False
+
Copied: trunk/dports/python/py-matplotlib/files/patch-setup.cfg.diff (from rev 44327, trunk/dports/python/py25-matplotlib/files/patch-setup.cfg.diff)
===================================================================
--- trunk/dports/python/py-matplotlib/files/patch-setup.cfg.diff (rev 0)
+++ trunk/dports/python/py-matplotlib/files/patch-setup.cfg.diff 2008-12-26 14:11:37 UTC (rev 44330)
@@ -0,0 +1,12 @@
+--- setup.cfg 1970-01-01 01:00:00.000000000 +0100
++++ setup.cfg 2008-12-16 12:27:37.000000000 +0000
+@@ -0,0 +1,9 @@
++[gui_support]
++gtk=False
++gtkagg=False
++tkagg=False
++wxagg=False
++macosx=True
++
++[rc_options]
++backend=Agg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081226/bf0e3085/attachment-0001.html>
More information about the macports-changes
mailing list