http://lists.gnu.org/archive/html/bug-gawk/2013-10/msg00038.html Even if the upstream submitted patch contains conditionals, it is enough to just add the value when defining _XOPEN_SOURCE_EXTENDED: --- gawk-4.1.0.ebuild +++ gawk-4.1.0.ebuild @@ -22,6 +22,9 @@ nls? ( sys-devel/gettext )" src_prepare() { + # http://lists.gnu.org/archive/html/bug-gawk/2013-10/msg00038.html + sed -i -e '/_XOPEN_SOURCE_EXTENDED$/s/$/ 1/' extension/inplace.c + # use symlinks rather than hardlinks, and disable version links sed -i \ -e '/^LN =/s:=.*:= $(LN_S):' \ Thank you!
There's one more sed necessary for AIX (not reported upstream yet) to get the extension modules working: src_prepare() { + # http://lists.gnu.org/archive/html/bug-gawk/2013-10/msg00038.html + sed -i -e '/_XOPEN_SOURCE_EXTENDED$/s/$/ 1/' extension/inplace.c + + # AIX ignores _BSD_SOURCE, needs _BSD instead + sed -i -e '/_BSD_SOURCE/a#define _BSD' extension/*.c + # use symlinks rather than hardlinks, and disable version links sed -i \ -e '/^LN =/s:=.*:= $(LN_S):' \
Created attachment 363260 [details, diff] Two upstream patches for portability, mainly for AIX. Now with that two upstream commits doing things slightly different merged into one patch: --- gawk-4.1.0.ebuild 13 May 2013 22:13:19 -0000 1.1 +++ gawk-4.1.0.ebuild 14 Nov 2013 14:32:23 -0000 @@ -22,6 +22,8 @@ nls? ( sys-devel/gettext )" src_prepare() { + epatch "${FILESDIR}/${PN}-4.1.0-ports.patch" #490266 + # use symlinks rather than hardlinks, and disable version links sed -i \ -e '/^LN =/s:=.*:= $(LN_S):' \
Without complaints, I plan to commit this by the end of this week.
Please proceed, that looks sensible. And yes, I prefer the diff over the sed.
Thank you!