Revision
87671
Author
ryandesign@macports.org
Date
2011-12-01 01:19:27 -0800 (Thu, 01 Dec 2011)

Log Message

glib2, glib2-devel: avoid build (#32306) and runtime (#17530) errors when "python" is not version 2.5 through 2.7 inclusive

Modified Paths

Diff

Modified: trunk/dports/devel/glib2/Portfile (87670 => 87671)


--- trunk/dports/devel/glib2/Portfile	2011-12-01 09:03:30 UTC (rev 87670)
+++ trunk/dports/devel/glib2/Portfile	2011-12-01 09:19:27 UTC (rev 87671)
@@ -8,7 +8,7 @@
 conflicts                   glib2-devel
 set my_name                 glib
 version                     2.30.2
-revision                    1
+revision                    2
 set branch                  [join [lrange [split ${version} .] 0 1] .]
 categories                  devel
 maintainers                 ryandesign openmaintainer
@@ -66,6 +66,7 @@
 configure.args              --enable-static
 
 configure.perl              ${prefix}/bin/perl
+configure.python            /usr/bin/python
 configure.env-append        PERL_PATH=${configure.perl} \
                             PKG_CONFIG=false \
                             ZLIB_CFLAGS="-I${prefix}/include" \
@@ -82,6 +83,7 @@
     reinplace "s|path = \"/bin|path = \"${prefix}/bin:/bin|g" ${worksrcpath}/glib/gutils.c ${worksrcpath}/glib/gspawn.c
     reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/gio/xdgmime/xdgmime.c
     reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/gio/gdbusprivate.c
+    reinplace "s|#! */usr/bin/env python|#!${configure.python}|g" ${worksrcpath}/gio/gdbus-2.0/codegen/gdbus-codegen.in ${worksrcpath}/glib/gtester-report
 }
 
 post-configure {
@@ -106,6 +108,11 @@
     configure.args-append   --disable-dtrace
 }
 
+platform darwin 8 {
+    depends_lib-append      port:python27
+    configure.python        ${prefix}/bin/python2.7
+}
+
 livecheck.type              regex
 livecheck.url               http://ftp.gnome.org/pub/GNOME/sources/${my_name}/${branch}/?C=M&O=D
 livecheck.regex             ${my_name}-(\[0-9.\]+)\\.tar

Modified: trunk/dports/devel/glib2-devel/Portfile (87670 => 87671)


--- trunk/dports/devel/glib2-devel/Portfile	2011-12-01 09:03:30 UTC (rev 87670)
+++ trunk/dports/devel/glib2-devel/Portfile	2011-12-01 09:19:27 UTC (rev 87671)
@@ -8,7 +8,7 @@
 conflicts                   glib2
 set my_name                 glib
 version                     2.29.92
-revision                    1
+revision                    2
 set branch                  [join [lrange [split ${version} .] 0 1] .]
 categories                  devel
 maintainers                 ryandesign openmaintainer
@@ -66,6 +66,7 @@
 configure.args              --enable-static
 
 configure.perl              ${prefix}/bin/perl
+configure.python            /usr/bin/python
 configure.env-append        PERL_PATH=${configure.perl} \
                             PKG_CONFIG=false \
                             ZLIB_CFLAGS="-I${prefix}/include" \
@@ -82,6 +83,7 @@
     reinplace "s|path = \"/bin|path = \"${prefix}/bin:/bin|g" ${worksrcpath}/glib/gutils.c ${worksrcpath}/glib/gspawn.c
     reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/gio/xdgmime/xdgmime.c
     reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/gio/gdbusprivate.c
+    reinplace "s|#! */usr/bin/env python|#!${configure.python}|g" ${worksrcpath}/gio/gdbus-2.0/codegen/gdbus-codegen.in ${worksrcpath}/glib/gtester-report
 }
 
 post-configure {
@@ -106,6 +108,11 @@
     configure.args-append   --disable-dtrace
 }
 
+platform darwin 8 {
+    depends_lib-append      port:python27
+    configure.python        ${prefix}/bin/python2.7
+}
+
 livecheck.type              regex
 livecheck.url               http://ftp.gnome.org/pub/GNOME/sources/${my_name}/${branch}/?C=M&O=D
 livecheck.regex             ${my_name}-(\[0-9.\]+)\\.tar