[62246] trunk/dports/www/tidy/Portfile

nox at macports.org nox at macports.org
Fri Jan 1 12:40:54 PST 2010


Revision: 62246
          http://trac.macports.org/changeset/62246
Author:   nox at macports.org
Date:     2010-01-01 12:40:53 -0800 (Fri, 01 Jan 2010)
Log Message:
-----------
Fix tidy livecheck

Modified Paths:
--------------
    trunk/dports/www/tidy/Portfile

Modified: trunk/dports/www/tidy/Portfile
===================================================================
--- trunk/dports/www/tidy/Portfile	2010-01-01 20:40:43 UTC (rev 62245)
+++ trunk/dports/www/tidy/Portfile	2010-01-01 20:40:53 UTC (rev 62246)
@@ -42,8 +42,25 @@
 	system "ln -fs libtidy-0.99.0.0.0.dylib ${destroot}${prefix}/lib/libtidy.0.dylib"
 }
 
-livecheck.type		regex
-livecheck.url		[lindex ${master_sites} 1]?M=D
-livecheck.regex		tidy_src_(\\d+)
-livecheck.version	[strsed ${version} {/^[0-9][0-9]//}]
+proc get_livecheck_version version {
+    set d [string range ${version} 6 7]
+    if {[string index ${d} 0] eq "0"} {
+        set d [string index ${d} 1]
+    }
+    set months {
+        January February March April May June July August September October
+        November December
+    }
+    set m [string range ${version} 4 5]
+    if {[string index ${m} 0] eq "0"} {
+        set m [string index ${m} 1]
+    }
+    return "${d} [lindex ${months} [expr ${m} - 1]] [string range ${version} 0 3]"
+}
 
+ui_msg [get_livecheck_version ${version}]
+
+livecheck.type      regex
+livecheck.url       http://tidy.cvs.sourceforge.net/viewvc/*checkout*/tidy/tidy/src/version.h
+livecheck.regex     {"(.+)"}
+eval livecheck.version   [get_livecheck_version ${version}]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100101/25905d4f/attachment.html>


More information about the macports-changes mailing list