<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/0cac06ccb3c9acf2bbbbf2bbaa24757dcebfcbeb">https://github.com/macports/macports-ports/commit/0cac06ccb3c9acf2bbbbf2bbaa24757dcebfcbeb</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 0cac06ccb3c9acf2bbbbf2bbaa24757dcebfcbeb
</span>Author: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
AuthorDate: Tue Mar 7 16:31:42 2017 -0800
<span style='display:block; white-space:pre;color:#404040;'> gzip: 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>---
archivers/gzip/Portfile | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/archivers/gzip/Portfile b/archivers/gzip/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index c110d83..cc46137 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/archivers/gzip/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/archivers/gzip/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2,6 +2,7 @@ PortSystem 1.0
</span>
name gzip
version 1.8
<span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories archivers
license GPL-3+
installs_libs no
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -28,6 +29,21 @@ installs_libs no
</span> configure.args --disable-silent-rules \
DEFS=NO_ASM
<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 {
set docdir ${prefix}/share/doc/${name}
xinstall -d ${destroot}${docdir}
</pre><pre style='margin:0'>
</pre>