Can you please have a look if virtual/awk is sufficient or if gawk is needed.
These are the two awk scripts used in yelp-tools. Do either of them use gawk-only syntax? ##### BEGIN { for (i = 1; i <= 255; i++) chars[sprintf("%c", i)] = i; } { ret = ""; for (i = 1; i <= length($0); i++) { c = substr($0, i, 1); if (c ~ /['$urlencode_slash'a-zA-Z0-9._-]/) ret = ret c; else ret = ret sprintf("%%%X%X", int(chars[c] / 16), chars[c] % 16); } print ret; } ###### BEGIN { for(i = 0; i < 10; i++) hex[i] = i; hex["A"] = hex["a"] = 10; hex["B"] = hex["b"] = 11; hex["C"] = hex["c"] = 12; hex["D"] = hex["d"] = 13; hex["E"] = hex["e"] = 14; hex["F"] = hex["f"] = 15; } { ret = ""; for (i = 1; i <= length($0); i++) { c = substr($0, i, 1); if (c == "+") { ret = ret " "; } else if (c == "%") { c = sprintf("%c", hex[substr($0, i + 1, 1)] * 16 + hex[substr($0, i + 2, 1)]); ret = ret c; i += 2; } else { ret = ret c; } } print ret; }
Looks like gawk is really required; nawk fails on these scripts with syntax errors. +*yelp-tools-3.6.1-r1 (06 Feb 2013) + + 06 Feb 2013; Alexandre Rostovtsev <tetromino@gentoo.org> + yelp-tools-3.4.1.ebuild, yelp-tools-3.6.1.ebuild, + +yelp-tools-3.6.1-r1.ebuild, +files/yelp-tools-3.6.1-gawk.patch: + Require gawk, not generic awk; e.g. nawk reports syntax errors in yelp-tools + awk scripts (bug #455656, thanks to Christoph Junghans).
On further testing, it appears that yelp-tools works with all virtual/awk implementations except for nawk, which is completely broken (bug #455786). However, we cannot switch to virtual/awk until it's keyworded on amd64-fbsd. + 06 Feb 2013; Alexandre Rostovtsev <tetromino@gentoo.org> + yelp-tools-3.4.1.ebuild, yelp-tools-3.6.1.ebuild, + -yelp-tools-3.6.1-r1.ebuild, -files/yelp-tools-3.6.1-gawk.patch: + Undo previous commit: yelp-tools works with all virtual/awk implementations + except for nawk, which is buggy (see bug #455786). However, the ebuild + cannot switch to virtual/awk until it's keyworded on amd64-fbsd.
(In reply to comment #3) > On further testing, it appears that yelp-tools works with all virtual/awk > implementations except for nawk, which is completely broken (bug #455786). > > However, we cannot switch to virtual/awk until it's keyworded on amd64-fbsd. Added ~amd64-fbsd to virtual/awk (as sys-apps/gawk has it), so feel free to switch.
+ 06 Feb 2013; Alexandre Rostovtsev <tetromino@gentoo.org> + yelp-tools-3.4.1.ebuild, yelp-tools-3.6.1.ebuild: + Switch to virtual/awk since it has been keyworded.