[MacPorts] #2703: PATCH: make port accept variants with t's in variants.conf

MacPorts noreply at macports.org
Thu Mar 24 05:54:29 PDT 2016


#2703: PATCH: make port accept variants with t's in variants.conf
-----------------------+---------------------
  Reporter:  danchr@…  |      Owner:  rshaw@…
      Type:  defect    |     Status:  closed
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  1.0
Resolution:  fixed     |   Keywords:
      Port:            |
-----------------------+---------------------
Description changed by ryandesign@…:

Old description:

> Without the small patch below, having +gtk set in variants.conf will
> result in
> the 'g' variant being set, and port complaining about 'k' being invalid
> variant
> syntax.
>
> I don't know Tcl, so I have no idea what I'm doing, but it seems like it
> works :)
>

> Index: base/src/darwinports1.0/darwinports.tcl
> ===================================================================
> RCS file:
> /Volumes/src/cvs/od/proj/darwinports/base/src/darwinports1.0/darwinports.tcl,v
> retrieving revision 1.155
> diff -a -u -u -r1.155 darwinports.tcl
> --- base/src/darwinports1.0/darwinports.tcl     13 Feb 2005 03:07:20
> -0000     1.155
> +++ base/src/darwinports1.0/darwinports.tcl     18 Feb 2005 22:03:17
> -0000
> @@ -146,7 +146,7 @@
>                         while {[gets $fd line] >= 0} {
>                                 set line [string trimright $line]
>                                 if {![regexp {^[\ \t]*#.*$|^$} $line]} {
> -                                       foreach arg [split $line { \t}] {
> +                                       foreach arg [split $line "{ \t}"]
> {
>                                                 if {[regexp
> {^([-+])([-A-Za-z0-9_+\.]+)$} $arg match sign opt] == 1} {
>                                                         if {![info exists
> variations($opt)]} {
>                                                                 set
> variations($opt) $sign

New description:

 Without the small patch below, having +gtk set in variants.conf will
 result in
 the 'g' variant being set, and port complaining about 'k' being invalid
 variant
 syntax.

 I don't know Tcl, so I have no idea what I'm doing, but it seems like it
 works :)

 {{{
 Index: base/src/darwinports1.0/darwinports.tcl
 ===================================================================
 RCS file:
 /Volumes/src/cvs/od/proj/darwinports/base/src/darwinports1.0/darwinports.tcl,v
 retrieving revision 1.155
 diff -a -u -u -r1.155 darwinports.tcl
 --- base/src/darwinports1.0/darwinports.tcl     13 Feb 2005 03:07:20 -0000
 1.155
 +++ base/src/darwinports1.0/darwinports.tcl     18 Feb 2005 22:03:17 -0000
 @@ -146,7 +146,7 @@
                         while {[gets $fd line] >= 0} {
                                 set line [string trimright $line]
                                 if {![regexp {^[\ \t]*#.*$|^$} $line]} {
 -                                       foreach arg [split $line { \t}] {
 +                                       foreach arg [split $line "{ \t}"]
 {
                                                 if {[regexp
 {^([-+])([-A-Za-z0-9_+\.]+)$} $arg match sign opt] == 1} {
                                                         if {![info exists
 variations($opt)]} {
                                                                 set
 variations($opt) $sign
 }}}

--

-- 
Ticket URL: <https://trac.macports.org/ticket/2703#comment:4>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list