[109375] trunk/dports/devel/gtk-osx-application/Portfile

elelay at macports.org elelay at macports.org
Wed Aug 14 05:35:11 PDT 2013


Revision: 109375
          https://trac.macports.org/changeset/109375
Author:   elelay at macports.org
Date:     2013-08-14 05:35:11 -0700 (Wed, 14 Aug 2013)
Log Message:
-----------
gtk-osx-application : use active_variants, add livecheck

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-14 12:12:18 UTC (rev 109374)
+++ trunk/dports/devel/gtk-osx-application/Portfile	2013-08-14 12:35:11 UTC (rev 109375)
@@ -2,6 +2,7 @@
 # $Id$
 
 PortSystem 1.0
+PortGroup       active_variants 1.1
 
 name            gtk-osx-application
 conflicts       ige-mac-integration
@@ -20,12 +21,12 @@
                 dependencies to be built with variants +no_x11 +quartz
 
 homepage        http://live.gnome.org/GTK%2B/OSX/Integration
-master_sites    sourceforge:project/gtk-osx/GTK-OSX%20Build/
 
 platforms       darwin
 
+set myname      gtk-mac-integration
 master_sites    gnome:sources/gtk-mac-integration/${branch}/
-distname        gtk-mac-integration-${version}
+distname        ${myname}-${version}
 use_xz          yes
 
 checksums       md5     45a4d217d0a7d6f3d4f974f99ec50c29 \
@@ -34,36 +35,20 @@
 
 depends_build   port:pkgconfig
 
-if {[variant_isset gtk3]} {
-    pre-configure {
-        if {![file exists ${prefix}/lib/pkgconfig/gdk-quartz-3.0.pc]} {
-            ui_error "
+pre-configure {
 
-****
-**** 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 "
+  if {![active_variants $gtk_version quartz x11]} {
+    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
+**** 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.
 ****
 "
-            error "gtk2 +no_x11 +quartz not installed."
-        }
-    }
+    error "$gtk_version +no_x11 +quartz not installed."
+  }
 }
 
 variant python25 conflicts python26 description {Use Python 2.5} {
@@ -146,7 +131,11 @@
 
 }
 
-if {![variant_isset gtk3]} {
+if {[variant_isset gtk3]} {
+    set gtk_version gtk3
+} else {
+    set gtk_version gtk2
+
     # force gtk version to 2.0
     configure.args-append --with-gtk=gtk+-2.0
 }
@@ -157,3 +146,6 @@
 patchfiles-append       patch-bindings-python-gtkmacintegration-Makefile-in.diff \
                         patch-bindings-python-gtk_osxapplication-Makefile-in.diff \
                         patch-cocoa-menu-item-c.diff
+
+livecheck.type          gnome
+livecheck.name          ${myname}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130814/25188afe/attachment-0001.html>


More information about the macports-changes mailing list