[MacPorts] #29410: gawk @3.1.8 --enable-switch not enabled.
#29410: gawk @3.1.8 --enable-switch not enabled. ------------------------------+--------------------------------------------- Reporter: axkibe@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: ------------------------------+--------------------------------------------- --enable-switch is not enabled for gawks macport build. It is necessary to work with scripts that have a switch statement in them. Both Linux and Windows version I tested have this enabled by default, so people just assume it to be widely avaiable. Please enable it by default. Simple patch makes it work: --- release/ports/lang/gawk/Portfile.orig 2011-05-09 17:26:34.000000000 +0200 +++ release/ports/lang/gawk/Portfile 2011-05-09 17:58:10.000000000 +0200 @@ -27,8 +27,10 @@ port:gettext configure.args --with-libiconv-prefix=${prefix} \ + --enable-switch \ ac_cv_libsigsegv=no test.run yes test.target check -- Ticket URL: <https://trac.macports.org/ticket/29410> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29410: gawk @3.1.8 --enable-switch not enabled. ------------------------------+--------------------------------------------- Reporter: axkibe@… | Owner: mschamschula@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: gawk ------------------------------+--------------------------------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => mschamschula@… * port: => gawk Old description:
--enable-switch is not enabled for gawks macport build. It is necessary to work with scripts that have a switch statement in them. Both Linux and Windows version I tested have this enabled by default, so people just assume it to be widely avaiable.
Please enable it by default.
Simple patch makes it work:
--- release/ports/lang/gawk/Portfile.orig 2011-05-09 17:26:34.000000000 +0200 +++ release/ports/lang/gawk/Portfile 2011-05-09 17:58:10.000000000 +0200 @@ -27,8 +27,10 @@ port:gettext
configure.args --with-libiconv-prefix=${prefix} \ + --enable-switch \ ac_cv_libsigsegv=no
test.run yes test.target check
New description: --enable-switch is not enabled for gawks macport build. It is necessary to work with scripts that have a switch statement in them. Both Linux and Windows version I tested have this enabled by default, so people just assume it to be widely avaiable. Please enable it by default. Simple patch makes it work: {{{ --- release/ports/lang/gawk/Portfile.orig 2011-05-09 17:26:34.000000000 +0200 +++ release/ports/lang/gawk/Portfile 2011-05-09 17:58:10.000000000 +0200 @@ -27,8 +27,10 @@ port:gettext configure.args --with-libiconv-prefix=${prefix} \ + --enable-switch \ ac_cv_libsigsegv=no test.run yes test.target check }}} -- Comment: It would be more helpful to attach the patch to the ticket rather than pasting the text inline in the description. -- Ticket URL: <https://trac.macports.org/ticket/29410#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29410: gawk @3.1.8: add --enable-switch ------------------------------+--------------------------------------------- Reporter: axkibe@… | Owner: mschamschula@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: haspatch | Port: gawk ------------------------------+--------------------------------------------- Changes (by ryandesign@…): * cc: ryandesign@… (added) * keywords: => haspatch * type: defect => enhancement Comment: Replying to [ticket:29410 axkibe@…]:
--enable-switch [...] is necessary to work with scripts that have a switch statement in them.
I am not familiar with this option. Can you please provide a test case -- a script I can run through gawk that will fail now but will succeed with your changes? -- Ticket URL: <https://trac.macports.org/ticket/29410#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29410: gawk @3.1.8: add --enable-switch ------------------------------+--------------------------------------------- Reporter: axkibe@… | Owner: mschamschula@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: haspatch | Port: gawk ------------------------------+--------------------------------------------- Comment(by axkibe@…): Any script that has a switch statement in it. E.g. Run this with: $ gawk -f switch.awk -v time="year" See also http://www.gnu.org/software/gawk/manual/html_node/Switch- Statement.html -------------- BEGIN { IGNORECASE = 1 switch(time) { case "year": timeformat = "%Y" break case "month": timeformat = "%Y-%b" break case "day": timeformat = "%Y-%b-%d" break case "hour": timeformat = "%Y-%b-%d %H" break case "minute": timeformat = "%Y-%b-%d %H:%M" break default: print "missing timeformat" exit } print timeformat exit } -------------- -- Ticket URL: <https://trac.macports.org/ticket/29410#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29410: gawk @3.1.8: add --enable-switch -------------------------------+-------------------------------------------- Reporter: axkibe@… | Owner: mschamschula@… Type: enhancement | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: fixed | Keywords: haspatch Port: gawk | -------------------------------+-------------------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: Fixed in r79954 by updating the port to version 4.0.0. Switch support is now always on. From the NEWS file: {{{ 10. switch / case is now enabled by default. There's no longer a need for a configure-time option. }}} -- Ticket URL: <https://trac.macports.org/ticket/29410#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts