<pre style='margin:0'>
Jeremy Huddleston Sequoia (jeremyhu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/0cb09daf33fac510438172f70a672298b94b5c43">https://github.com/macports/macports-ports/commit/0cb09daf33fac510438172f70a672298b94b5c43</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 0cb09daf33fac510438172f70a672298b94b5c43
</span>Author: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
AuthorDate: Fri Mar 3 11:44:43 2017 -0800
<span style='display:block; white-space:pre;color:#404040;'> m4: Don't use %n in dynamic format strings passed to the host Libc
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This is a hack. Instructions for fixing this correctly are provided
</span><span style='display:block; white-space:pre;color:#404040;'> in a comment in the Portfile.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
</span>---
devel/m4/Portfile | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/m4/Portfile b/devel/m4/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index f24b3fd..53f6b61 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/m4/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/m4/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2,6 +2,7 @@ PortSystem 1.0
</span>
name m4
version 1.4.18
<span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories devel
license GPL-3+
installs_libs no
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -29,6 +30,21 @@ configure.args --program-prefix=g \
</span>
use_parallel_build yes
<span style='display:block; white-space:pre;background:#e0ffe0;'>+post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # This is a reinplace hack simply because I am unable to look a the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # current (GPLv3) source to come up with a proper fix. This hack was
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # derived by looking at the last GPLv2 version and making a guess that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # this workaround would be successful. If someone able to look at GPLv3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # code wants to come up with a proper fix, note that the solution is to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # not pass %n in dynamic strings to snprintf (rather than completely
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # disabling it). There is likely some code to control that already
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # since multiple Libcs (including glibc) disallow the usage of %n in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # dynamic strings.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "/define USE_SNPRINTF/s/USE_SNPRINTF.*$/USE_SNPRINTF 0/" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/lib/vasnprintf.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> post-destroot {
move ${destroot}${prefix}/share/info/m4.info ${destroot}${prefix}/share/info/gm4.info
</pre><pre style='margin:0'>
</pre>