[109119] trunk/dports/devel/gtk-osx-application/Portfile
elelay at macports.org
elelay at macports.org
Wed Aug 7 23:23:18 PDT 2013
Revision: 109119
https://trac.macports.org/changeset/109119
Author: elelay at macports.org
Date: 2013-08-07 23:23:18 -0700 (Wed, 07 Aug 2013)
Log Message:
-----------
gtk-osx-application: fix #40021 - gtk3 support
Modified Paths:
--------------
trunk/dports/devel/gtk-osx-application/Portfile
Modified: trunk/dports/devel/gtk-osx-application/Portfile
===================================================================
--- trunk/dports/devel/gtk-osx-application/Portfile 2013-08-08 05:32:17 UTC (rev 109118)
+++ trunk/dports/devel/gtk-osx-application/Portfile 2013-08-08 06:23:18 UTC (rev 109119)
@@ -32,22 +32,40 @@
depends_build port:pkgconfig
-pre-configure {
- if {![file exists ${prefix}/lib/pkgconfig/gdk-quartz-2.0.pc]} {
- ui_error "
+if {[variant_isset gtk3]} {
+ pre-configure {
+ if {![file exists ${prefix}/lib/pkgconfig/gdk-quartz-3.0.pc]} {
+ ui_error "
****
+**** gtk-osx-application is meant to be used only in a GTK3 quartz
+**** development environment but your version of GTK3 does not
+**** support quartz. Please make sure that port gtk3 and all its
+**** dependencies are built with variants +no_x11 +quartz and try again.
+****
+"
+ error "gtk3 +no_x11 +quartz not installed."
+ }
+ }
+} else {
+ pre-configure {
+ if {![file exists ${prefix}/lib/pkgconfig/gdk-quartz-2.0.pc]} {
+ ui_error "
+
+****
**** gtk-osx-application is meant to be used only in a GTK2 quartz
**** development environment but your version of GTK2 does not
**** support quartz. Please make sure that port gtk2 and all its
**** dependencies are built with variants +no_x11 +quartz and try again.
****
"
- error "gtk2 +no_x11 +quartz not installed."
+ error "gtk2 +no_x11 +quartz not installed."
+ }
}
}
variant python25 conflicts python26 description {Use Python 2.5} {
+ # no gtk3 code because gtk3 + python25 not supported
depends_lib-append port:py25-pygtk
set python_prefix ${frameworks_dir}/Python.framework/Versions/2.5
@@ -59,31 +77,78 @@
}
variant python26 conflicts python25 description {Use Python 2.6} {
- depends_lib-append port:py26-pygtk
- set python_prefix ${frameworks_dir}/Python.framework/Versions/2.6
- configure.python ${python_prefix}/bin/python2.6
- configure.env-append PYGTK_CODEGEN=${python_prefix}/bin/pygtk-codegen-2.0
- configure.env-append PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0
- configure.pkg_config_path ${python_prefix}/lib/pkgconfig/
- configure.pre_args --prefix=${python_prefix}
+ if {[variant_isset gtk3]} {
+
+ depends_lib-append port:py26-gobject3
+
+ # don't bother configuring python because it's not needed (only gir matters)
+
+ } else {
+
+ depends_lib-append port:py26-pygtk
+ set python_prefix ${frameworks_dir}/Python.framework/Versions/2.6
+
+ configure.python ${python_prefix}/bin/python2.6
+ configure.env-append PYGTK_CODEGEN=${python_prefix}/bin/pygtk-codegen-2.0
+ configure.env-append PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0
+ configure.pkg_config_path ${python_prefix}/lib/pkgconfig/
+ configure.pre_args --prefix=${python_prefix}
+
+ }
+
}
variant python27 conflicts python26 conflicts python25 description {Use Python 2.7} {
- depends_lib-append port:py27-pygtk
- set python_prefix ${frameworks_dir}/Python.framework/Versions/2.7
- configure.python ${python_prefix}/bin/python2.7
- configure.env-append PYGTK_CODEGEN=${python_prefix}/bin/pygtk-codegen-2.0
- configure.env-append PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0
- configure.pkg_config_path ${python_prefix}/lib/pkgconfig/
- configure.pre_args --prefix=${python_prefix}
+ if {[variant_isset gtk3]} {
+
+ depends_lib-append port:py27-gobject3
+
+ # don't bother configuring python because it's not needed (only gir matters)
+
+ } else {
+
+ depends_lib-append port:py27-pygtk
+
+ set python_prefix ${frameworks_dir}/Python.framework/Versions/2.7
+
+ configure.python ${python_prefix}/bin/python2.7
+ configure.env-append PYGTK_CODEGEN=${python_prefix}/bin/pygtk-codegen-2.0
+ configure.env-append PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0
+ configure.pkg_config_path ${python_prefix}/lib/pkgconfig/
+ configure.pre_args --prefix=${python_prefix}
+
+ }
+
}
-if {![variant_isset python25] && ![variant_isset python26] && ![variant_isset python27]} {
+variant no_python description {Don't build python bindings, don't require any python} {
+}
+
+if {![variant_isset python25] && ![variant_isset python26] && ![variant_isset python27] && ![variant_isset no_python]} {
default_variants +python27
}
+
+# gtk3 conflicts with python25 because PyGObject3 is not compatible with python 2.5
+variant gtk3 conflicts python25 description {Use gtk3} {
+
+ depends_lib-append port:gtk3
+
+ # force gtk version
+ configure.args-append --with-gtk=gtk+-3.0
+
+ # to put strings folder in /opt/local/share, not in python Framework share
+ configure.args-append --datadir=${prefix}/share
+
+}
+
+if {![variant_isset gtk3]} {
+ # force gtk version to 2.0
+ configure.args-append --with-gtk=gtk+-2.0
+}
+
configure.ccache no
configure.cmd-append --libdir=${prefix}/lib --includedir=${prefix}/include
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130807/b2003731/attachment.html>
More information about the macports-changes
mailing list