[139383] branches/gsoc15-portfile/skel

chunyang at macports.org chunyang at macports.org
Fri Aug 14 13:28:40 PDT 2015


Revision: 139383
          https://trac.macports.org/changeset/139383
Author:   chunyang at macports.org
Date:     2015-08-14 13:28:40 -0700 (Fri, 14 Aug 2015)
Log Message:
-----------
skel: Add build_portfile proc and run it once for testing

Modified Paths:
--------------
    branches/gsoc15-portfile/skel

Modified: branches/gsoc15-portfile/skel
===================================================================
--- branches/gsoc15-portfile/skel	2015-08-14 20:23:37 UTC (rev 139382)
+++ branches/gsoc15-portfile/skel	2015-08-14 20:28:40 UTC (rev 139383)
@@ -23,4 +23,21 @@
     set fields($var) "replaceme"
 }
 
-parray fields
+proc build_portfile {} {
+    global fields
+
+    set modeline "# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4"
+    set svn_id_tag_line "# \$Id\$"
+
+    puts $modeline
+    puts $svn_id_tag_line
+
+    # NOTE: the order of iterating assoc array in this clean way is not
+    # predictable, it can be resolved by using $skel_required_variables, but
+    # it's fine for now since "port lint" seems to be unable to check order.
+    foreach {name val} [array get fields] {
+        puts [format "%-20s%s" $name $val]
+    }
+}
+
+build_portfile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150814/33c693f3/attachment.html>


More information about the macports-changes mailing list