[138229] trunk/dports/devel/gtk-osx-application

elelay at macports.org elelay at macports.org
Thu Jul 2 11:59:53 PDT 2015


Revision: 138229
          https://trac.macports.org/changeset/138229
Author:   elelay at macports.org
Date:     2015-07-02 11:59:53 -0700 (Thu, 02 Jul 2015)
Log Message:
-----------
gtk-osx-application: replaced by {py27-,}gtk-osx-application-{common-,}gtk{2,3}

Modified Paths:
--------------
    trunk/dports/devel/gtk-osx-application/Portfile
    trunk/dports/devel/gtk-osx-application/files/patch-bindings-python-gtkmacintegration-Makefile-in.diff

Modified: trunk/dports/devel/gtk-osx-application/Portfile
===================================================================
--- trunk/dports/devel/gtk-osx-application/Portfile	2015-07-02 17:42:40 UTC (rev 138228)
+++ trunk/dports/devel/gtk-osx-application/Portfile	2015-07-02 18:59:53 UTC (rev 138229)
@@ -6,7 +6,7 @@
 
 name            gtk-osx-application
 conflicts       ige-mac-integration
-version         2.0.7
+version         2.0.8
 license         LGPL-2.1
 set branch      [join [lrange [split ${version} .] 0 1] .]
 categories      devel
@@ -16,9 +16,9 @@
 
 long_description \
 		A simple library whose purpose is to \
-		allow GTK2 quartz applications to integrate with \
-		the Mac OS X menu bar. Requires gtk2 and its \
-                dependencies to be built with variants +no_x11 +quartz
+		allow GTK quartz applications to integrate with \
+		the Mac OS X menu bar. Requires gtk2 or gtk3 and its \
+		dependencies to be built with variant +quartz
 
 homepage        https://wiki.gnome.org/Projects/GTK%2B/OSX/Integration
 
@@ -30,110 +30,140 @@
 use_xz          yes
 
 # sha256 from upstream, rmd160 computed locally
-checksums       sha256    e6de70da740b452f18c113a7ebb6772936a0fb9873137514090849820e296eb7 \
-                rmd160    495f68d23e45306ddc6e5a05ed665f5af187c062
+checksums       sha256    74fce9dbc5efe4e3d07a20b24796be1b1d6c3ac10a0ee6b1f1d685c809071b79 \
+                rmd160    53fd44172a3fa076e4401b6aac1adb10b76a5b7c
 
 
 depends_build   port:pkgconfig
 
+set gtk_version gtk2
+
 pre-configure {
 
-  if {![active_variants $gtk_version quartz x11]} {
+  if {${name} eq ${subport}} {
     ui_error "
+The gtk-osx-application port has been replaced by 'gtk-osx-application-gtk2'
+and 'gtk-osx-application-gtk3'.
+Please `sudo port deactivate gtk-osx-application`
+followed by `sudo port upgrade -u outdated` or another command to update.
+Then if all works as intended `sudo port uninstall gtk-osx-application`
+"
+    return -code error
+  }
 
-****
-**** gtk-osx-application is meant to be used only in a GTK quartz
-**** development environment but your version of GTK does not
-**** support quartz.  Please make sure that port $gtk_version and all its
-**** dependencies are built with variants +no_x11 +quartz and try again.
-****
+  if {![active_variants $gtk_version quartz ""]} {
+    ui_error "
+${subport} is meant to be used only in a GTK quartz
+development environment but your version of GTK does not
+support quartz.  Please make sure that port $gtk_version and all its
+dependencies are built with variants +quartz and try again.
 "
-    error "$gtk_version +no_x11 +quartz not installed."
+    error "$gtk_version +quartz not installed."
   }
 }
 
-variant python26 conflicts python27 description {Use Python 2.6} {
+# py27-gtk-osx-application-gtk3 is not needed (only gir matters).
+# If a python gtk3 program requires gtk-osx-application, add
+#    depends_lib-append port:gtk-osx-application-gtk3 \
+#                       port:py27-gobject3
 
-    if {[variant_isset gtk3]} {
+subport py27-gtk-osx-application-gtk2 {
+    set gtk_version gtk2
 
-    	depends_lib-append port:py26-gobject3
+    depends_lib-append port:py27-pygtk \
+                       port:gtk-osx-application-gtk2
+    
+    set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.7
 
-        # don't bother configuring python because it's not needed (only gir matters)
+    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}
 
-    } else {
 
-        depends_lib-append port:py26-pygtk
-        set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.6
+    configure.args-append --with-gtk2 --without-gtk3 --disable-introspection
 
-        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}
-
+    # enable-python defaults to all, but it must be set to
+    # 'yes' otherwise pygtk bindings are not built.
+    # By the way, I had no success configuring with --python=all
+    # as per README (configure rejected the option).
+    # So no gir for gtk2 variant
+    configure.args-append --enable-python=yes
+    
+    post-destroot {
+        delete ${destroot}${prefix}/include
+        delete ${destroot}${prefix}/lib
+        delete ${destroot}${prefix}/share
     }
-
 }
 
-variant python27 conflicts python26 description {Use Python 2.7} {
+subport gtk-osx-application-gtk3 {
+    set gtk_version gtk3
+    
+    depends_lib-append port:gtk3 \
+                       path:include/gtkmacintegration/gtk-mac-bundle.h:gtk-osx-application-common-gtk3
 
-    if {[variant_isset gtk3]} {
+    
+    # force gtk version
+    configure.args-append --with-gtk3 --without-gtk2
 
-    	depends_lib-append port:py27-gobject3
+    configure.args-append --enable-python=no
 
-        # don't bother configuring python because it's not needed (only gir matters)
+    post-destroot {
+        delete ${destroot}${prefix}/include
+        delete ${destroot}${prefix}/lib/pkgconfig/gtk-mac-integration.pc
+        delete ${destroot}${prefix}/share/strings
+    }
+}
 
-    } else {
+subport gtk-osx-application-common-gtk3 {
+    set gtk_version gtk3
+    
+    depends_lib-append port:gtk3
 
-        depends_lib-append port:py27-pygtk
-    	
-        set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.7
+    
+    # force gtk version
+    configure.args-append --with-gtk3 --without-gtk2
 
-        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}
+    configure.args-append --enable-python=no
 
+    post-destroot {
+        delete ${destroot}${prefix}/lib
+        delete ${destroot}${prefix}/share/gir-1.0
     }
-
 }
 
-variant no_python conflicts python26 conflicts python27 description {
-        Don't build python bindings, don't require any python} {
-}
+subport gtk-osx-application-gtk2 {
+    set gtk_version gtk2
 
-if {![variant_isset python26] && ![variant_isset python27] && ![variant_isset no_python]} {
-    default_variants +python27
-}
+    depends_lib-append port:gtk2 \
+                       path:include/gtkmacintegration/gtk-mac-bundle.h:gtk-osx-application-common-gtk2
 
+    # force gtk version to 2.0
+    configure.args-append --with-gtk2 --without-gtk3  --disable-introspection
 
-variant gtk3 description {Use gtk3} {
-    
-    depends_lib-append port:gtk3
-    
-    # force gtk version
-    configure.args-append --with-gtk=gtk+-3.0
+    configure.args-append --enable-python=no
 
-    # to put strings folder in /opt/local/share, not in python Framework share
-    configure.args-append --datadir=${prefix}/share
-
+    post-destroot {
+        delete ${destroot}${prefix}/include
+        delete ${destroot}${prefix}/lib/pkgconfig/gtk-mac-integration.pc
+        delete ${destroot}${prefix}/share/strings
+    }
 }
 
-if {[variant_isset gtk3]} {
-    set gtk_version gtk3
-} else {
+subport gtk-osx-application-common-gtk2 {
     set gtk_version gtk2
 
+    depends_lib-append port:gtk2
+
     # force gtk version to 2.0
-    configure.args-append --with-gtk=gtk+-2.0
-    # enable-python defaults to all, but it must be set to
-    # 'yes' otherwise pygtk bindings are not built.
-    # By the way, I had no success configuring with --python=all
-    # as per README (configure rejected the option).
-    # So no gir for gtk2 variant
-    if {[variant_isset python26] || [variant_isset python27]} {
-      configure.args-append --enable-python=yes
+    configure.args-append --with-gtk2 --without-gtk3 --disable-introspection
+
+    configure.args-append --enable-python=no
+
+    post-destroot {
+        delete ${destroot}${prefix}/lib
     }
 }
 

Modified: trunk/dports/devel/gtk-osx-application/files/patch-bindings-python-gtkmacintegration-Makefile-in.diff
===================================================================
--- trunk/dports/devel/gtk-osx-application/files/patch-bindings-python-gtkmacintegration-Makefile-in.diff	2015-07-02 17:42:40 UTC (rev 138228)
+++ trunk/dports/devel/gtk-osx-application/files/patch-bindings-python-gtkmacintegration-Makefile-in.diff	2015-07-02 18:59:53 UTC (rev 138229)
@@ -1,12 +1,11 @@
---- bindings/python/gtkmacintegration/Makefile.in.old	2013-01-19 17:30:25.000000000 +0100
-+++ bindings/python/gtkmacintegration/Makefile.in	2013-01-19 17:31:37.000000000 +0100
-@@ -344,7 +344,7 @@
- top_build_prefix = @top_build_prefix@
+--- bindings/python/gtkmacintegration/Makefile.in.orig	2015-06-22 19:51:48.000000000 +0200
++++ bindings/python/gtkmacintegration/Makefile.in	2015-06-22 19:48:03.000000000 +0200
+@@ -399,7 +399,7 @@
  top_builddir = @top_builddir@
  top_srcdir = @top_srcdir@
  AM_CPPFLAGS = -I$(top_srcdir)/src $(PYTHON_INCLUDES)
 -gtkmacintegrationdir = $(libdir)/python$(PYTHON_VERSION)/site-packages/gtkmacintegration
 +gtkmacintegrationdir = @pythondir@/gtkmacintegration
  gtkmacintegration_PYTHON = __init__.py
- gtkmacintegration_LTLIBRARIES = _gtkmacintegration.la
+ gtkmacintegration_LTLIBRARIES = $(am__append_1) $(am__append_2)
  headers = \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150702/9dd86a9d/attachment.html>


More information about the macports-changes mailing list