Revision
96105
Author
ryandesign@macports.org
Date
2012-07-31 13:48:51 -0700 (Tue, 31 Jul 2012)

Log Message

gimp-help-en: add python variants so that we can use the right python (#35285)

Modified Paths

Diff

Modified: trunk/dports/graphics/gimp-help-en/Portfile (96104 => 96105)


--- trunk/dports/graphics/gimp-help-en/Portfile	2012-07-31 20:43:50 UTC (rev 96104)
+++ trunk/dports/graphics/gimp-help-en/Portfile	2012-07-31 20:48:51 UTC (rev 96105)
@@ -40,10 +40,34 @@
                 port:gettext \
                 port:pngcrush
 
+post-patch {
+    reinplace "s|#!/usr/bin/env python|#!${configure.python}|" \
+        ${worksrcpath}/tools/xml2po.py
+}
+
 configure.args  --without-gimp
 
 configure.env   ALL_LINGUAS='${lingua}'
 
+variant python25 conflicts python26 python27 description {Use python 2.5} {
+    depends_build-append    port:py25-libxml2
+    configure.python        ${prefix}/bin/python2.5
+}
+
+variant python26 conflicts python25 python27 description {Use python 2.6} {
+    depends_build-append    port:py26-libxml2
+    configure.python        ${prefix}/bin/python2.6
+}
+
+variant python27 conflicts python25 python26 description {Use python 2.7} {
+    depends_build-append    port:py27-libxml2
+    configure.python        ${prefix}/bin/python2.7
+}
+
+if {![variant_isset python25] && ![variant_isset python26] && ![variant_isset python27]} {
+    default_variants +python27
+}
+
 livecheck.type  regex
 livecheck.url   http://gimp.cp-dev.com/gimp/help/
 livecheck.regex ${gname}-(\\d+(?:\\.\\d+)*)${extract.suffix}