[52378] trunk/dports/_resources/port1.0/livecheck
nox at macports.org
nox at macports.org
Mon Jun 15 05:46:31 PDT 2009
Revision: 52378
http://trac.macports.org/changeset/52378
Author: nox at macports.org
Date: 2009-06-15 05:46:30 -0700 (Mon, 15 Jun 2009)
Log Message:
-----------
_resources: Set livecheck.name to ${name} if the project name could not be extracted from ${homepage} in gnu and sourceforge livechecks.
Modified Paths:
--------------
trunk/dports/_resources/port1.0/livecheck/gnu.tcl
trunk/dports/_resources/port1.0/livecheck/sourceforge.tcl
Modified: trunk/dports/_resources/port1.0/livecheck/gnu.tcl
===================================================================
--- trunk/dports/_resources/port1.0/livecheck/gnu.tcl 2009-06-15 12:05:43 UTC (rev 52377)
+++ trunk/dports/_resources/port1.0/livecheck/gnu.tcl 2009-06-15 12:46:30 UTC (rev 52378)
@@ -2,9 +2,12 @@
#
# This file contains the defaults for gnu.
-if {$has_homepage && [regexp {^http://www.gnu.org/software/([^/]+)} $homepage _ tag] &&
- ${livecheck.name} eq "default"} {
+if {${livecheck.name} eq "default"} {
+ if {$has_homepage && [regexp {^http://www.gnu.org/software/([^/]+)} $homepage _ tag]} {
set livecheck.name $tag
+ } else {
+ set livecheck.name ${name}
+ }
}
if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
set livecheck.url "http://ftp.gnu.org/gnu/${livecheck.name}/?C=M&O=D"
Modified: trunk/dports/_resources/port1.0/livecheck/sourceforge.tcl
===================================================================
--- trunk/dports/_resources/port1.0/livecheck/sourceforge.tcl 2009-06-15 12:05:43 UTC (rev 52377)
+++ trunk/dports/_resources/port1.0/livecheck/sourceforge.tcl 2009-06-15 12:46:30 UTC (rev 52378)
@@ -2,12 +2,18 @@
#
# This file contains the defaults for sourceforge.
+if {${livecheck.name} eq "default"} {
+ if {$has_homepage && [regexp {^http://([^.]+)\.(?:sf|sourceforge)\.net\y} $homepage _ tag]} {
+ set livecheck.name $tag
+ } elseif {$has_homepage && [regexp {^http://(?:sf|sourceforge)\.net/projects/([^/]+)\y} $homepage _ tag]} {
+ set livecheck.name $tag
+ } else {
+ set livecheck.name ${name}
+ }
+}
if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
set livecheck.url "http://sourceforge.net/export/rss2_projfiles.php?project=${livecheck.name}"
}
-if {${livecheck.name} eq "default"} {
- set livecheck.name ${name}
-}
if {${livecheck.distname} eq "default"} {
set livecheck.distname ${livecheck.name}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090615/a5c9e14a/attachment.html>
More information about the macports-changes
mailing list