Opened 19 years ago
Last modified 9 years ago
#4805 closed enhancement
py-matplotlib could have variant tk — at Initial Version
Reported by: | than@… | Owned by: | darwinports-bugs@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | py-matplotlib |
Description
I like to use the interative version of py-matplotlib (where you don't always have to type show() after each plot command). This only works with the tkAgg backend, which is disabled for some reason in the current Portfile.
I would actually argue that tkAgg should be enabled by default, but I leave that to wiser heads than mine. I used the following patch to the py-matplotlib Portfile to enable the tkAgg backend as a variant:
--- Portfile Mon Jul 4 05:48:43 2005 +++ Portfile.tk Fri Sep 2 10:12:39 2005 @@ -37,8 +37,13 @@
reinplace
"s|BUILD_GTKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTKAGG=1|" \
${worksrcpath}/setup.py
}
- reinplace
"s|BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=0|" \ + if {![variant_isset tk]} { + reinplace "s|BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=0|" \
${worksrcpath}/setup.py
+ } else { + reinplace "s|BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=1|" \ + ${worksrcpath}/setup.py + }
}
post-patch { reinplace "s|@@DPORTS_PREFIX@@|${prefix}|"
${worksrcpath}/setupext.py } @@ -61,3 +66,6 @@
depends_lib-append port:py-gtk2
}
+variant tk { + depends_lib-append port:py-tkinter +}