[92797] trunk/dports/_resources/port1.0/group/php-1.0.tcl

ryandesign at macports.org ryandesign at macports.org
Sun May 6 22:10:24 PDT 2012


Revision: 92797
          https://trac.macports.org/changeset/92797
Author:   ryandesign at macports.org
Date:     2012-05-06 22:10:24 -0700 (Sun, 06 May 2012)
Log Message:
-----------
php portgroup: add php.pecl_livecheck_stable option for pecl ports that want to livecheck non-stable versions

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/php-1.0.tcl

Modified: trunk/dports/_resources/port1.0/group/php-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/php-1.0.tcl	2012-05-07 05:08:40 UTC (rev 92796)
+++ trunk/dports/_resources/port1.0/group/php-1.0.tcl	2012-05-07 05:10:24 UTC (rev 92797)
@@ -55,6 +55,7 @@
 
 # Options that relate to the PHP extension.
 options php.branches
+option_proc php.branches        php._set_branches
 options php.build_dirs
 default php.build_dirs          {[php.build_dirs_proc]}
 options php.default_branch
@@ -62,11 +63,13 @@
 options php.extension_ini
 default php.extension_ini       {${php.rootname}.ini}
 options php.extensions
+options php.pecl_livecheck_stable
+default php.pecl_livecheck_stable yes
+option_proc php.pecl_livecheck_stable php._set_pecl_livecheck_stable
 options php.rootname
 default php.rootname            {[lindex ${php.extensions} 0]}
 options php.type
 default php.type                php
-option_proc php.branches        php._set_branches
 
 # Options that relate to the branch of PHP being used by a subport.
 options php
@@ -129,6 +132,20 @@
     }
 }
 
+proc php._set_pecl_livecheck_stable {option action args} {
+    global livecheck.regex
+    
+    if {"set" != ${action}} {
+        return
+    }
+    
+    if {${args}} {
+        livecheck.regex     {>([0-9.]+)</a></th>\s*<[^>]+>stable<}
+    } else {
+        livecheck.regex     {>([0-9.]+)</a></th>}
+    }
+}
+
 proc php.setup {extensions version {source ""}} {
     global php php.branch php.branches php.build_dirs php.config php.extension_ini php.extensions php.homepage php.ini_dir php.rootname php._bundled
     global destroot name subport
@@ -243,6 +260,8 @@
     }
     
     if {"pecl" == ${source}} {
+        global php.pecl_livecheck_stable
+        
         set php.homepage        http://pecl.php.net/package/${php.rootname}
         
         homepage                ${php.homepage}
@@ -251,7 +270,7 @@
         
         livecheck.type          regexm
         livecheck.url           ${php.homepage}
-        livecheck.regex         {>([0-9.]+)</a></th>\s*<[^>]+>stable<}
+        php.pecl_livecheck_stable yes
     }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120506/6d89039d/attachment-0001.html>


More information about the macports-changes mailing list