[145160] contrib/portfile-gen/portfile-gen

raimue at macports.org raimue at macports.org
Wed Jan 27 03:08:58 PST 2016


Revision: 145160
          https://trac.macports.org/changeset/145160
Author:   raimue at macports.org
Date:     2016-01-27 03:08:58 -0800 (Wed, 27 Jan 2016)
Log Message:
-----------
portfile-gen: support github port group

Modified Paths:
--------------
    contrib/portfile-gen/portfile-gen

Modified: contrib/portfile-gen/portfile-gen
===================================================================
--- contrib/portfile-gen/portfile-gen	2016-01-27 10:29:30 UTC (rev 145159)
+++ contrib/portfile-gen/portfile-gen	2016-01-27 11:08:58 UTC (rev 145160)
@@ -10,9 +10,8 @@
 
 set MY_VERSION 0.2
 
-set supportedGroups [list perl5 php python ruby]
+set supportedGroups [list perl5 php python ruby github]
 
-
 proc printUsage {{channel stderr}} {
    puts $channel "Usage: $::argv0 \[-h\] \[-g portgroup\] <portname> <portversion>"
    puts $channel "   -g   Specify a port group to use (perl5, python, etc)"
@@ -20,7 +19,7 @@
    puts $channel ""
    puts $channel "portname      name to use for the port; for group-based ports, don't"
    puts $channel "              use the prefix (py-, p5-, etc) as this will add that"
-   puts $channel "              for you when needed"
+   puts $channel "              for you when needed. For github, use githubuser/reponame."
    puts $channel "portversion   version to use for the port"
 }
 
@@ -64,6 +63,12 @@
 set portname [lindex $::argv 0]
 set portversion [lindex $::argv 1]
 
+if {$groupCode eq "github"} {
+    set verlist [split $portname /]
+    set github.user [lindex ${verlist} 0]
+    set portname    [lindex ${verlist} 1]
+}
+
 puts "# -*- 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"
 puts "# \$Id\$"
 puts ""
@@ -96,6 +101,11 @@
       puts "ruby.setup          ${portname} ${portversion}"
       puts "categories-append   replaceme"
    }
+   github {
+       puts "PortGroup           github 1.0"
+       puts ""
+       puts "github.setup        ${github.user} ${portname} ${portversion}"
+   }
    default {
       puts ""
       puts "name                ${portname}"
@@ -130,6 +140,8 @@
    }
    ruby {
    }
+   github {
+   }
    default {
       puts ""
       puts "homepage            replaceme"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160127/2f3e7303/attachment.html>


More information about the macports-changes mailing list