[79958] trunk/dports/_resources/port1.0/livecheck/googlecode.tcl

dports at macports.org dports at macports.org
Thu Jun 30 14:57:42 PDT 2011


Revision: 79958
          http://trac.macports.org/changeset/79958
Author:   dports at macports.org
Date:     2011-06-30 14:57:41 -0700 (Thu, 30 Jun 2011)
Log Message:
-----------
googlecode livecheck: use $name as ${livecheck.name}, if it can't be
extracted from the homepage URL

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/livecheck/googlecode.tcl

Modified: trunk/dports/_resources/port1.0/livecheck/googlecode.tcl
===================================================================
--- trunk/dports/_resources/port1.0/livecheck/googlecode.tcl	2011-06-30 21:49:58 UTC (rev 79957)
+++ trunk/dports/_resources/port1.0/livecheck/googlecode.tcl	2011-06-30 21:57:41 UTC (rev 79958)
@@ -2,10 +2,16 @@
 #
 # This file contains the defaults for googlecode.
 
-if {$has_homepage && ${livecheck.name} eq "default"
-    && ([regexp {^http://code.google.com/p/([^/]+)} $homepage _ tag]
-        || [regexp {^http://(.*).googlecode.com} $homepage _ tag])} {
+if {${livecheck.name} eq "default"} {
+    # Extract the googlecode project name from the homepage, if possible
+    if {$has_homepage
+        && ([regexp {^http://code.google.com/p/([^/]+)} $homepage _ tag]
+            || [regexp {^http://(.*).googlecode.com} $homepage _ tag])} {
         set livecheck.name $tag
+    } else {
+        # Otherwise, fall back on the port name
+        set livecheck.name $name
+    }
 }
 if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
     set livecheck.url "http://code.google.com/p/${livecheck.name}/downloads/list"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110630/8df87f12/attachment.html>


More information about the macports-changes mailing list