[72793] trunk/dports/sysutils/coreutils
jeremyhu at macports.org
jeremyhu at macports.org
Tue Oct 26 19:01:28 PDT 2010
Revision: 72793
http://trac.macports.org/changeset/72793
Author: jeremyhu at macports.org
Date: 2010-10-26 19:01:25 -0700 (Tue, 26 Oct 2010)
Log Message:
-----------
coreutils: Address a possible build failure by pulling in a patch from upstream
Modified Paths:
--------------
trunk/dports/sysutils/coreutils/Portfile
Added Paths:
-----------
trunk/dports/sysutils/coreutils/files/
trunk/dports/sysutils/coreutils/files/stpncpy.patch
Modified: trunk/dports/sysutils/coreutils/Portfile
===================================================================
--- trunk/dports/sysutils/coreutils/Portfile 2010-10-27 01:13:23 UTC (rev 72792)
+++ trunk/dports/sysutils/coreutils/Portfile 2010-10-27 02:01:25 UTC (rev 72793)
@@ -31,6 +31,12 @@
port:gmp \
port:libiconv
+patchfiles stpncpy.patch
+patch.pre_args -p1
+
+use_autoreconf yes
+autoreconf.args -fvi
+
configure.args --program-prefix=g
post-destroot {
Added: trunk/dports/sysutils/coreutils/files/stpncpy.patch
===================================================================
--- trunk/dports/sysutils/coreutils/files/stpncpy.patch (rev 0)
+++ trunk/dports/sysutils/coreutils/files/stpncpy.patch 2010-10-27 02:01:25 UTC (rev 72793)
@@ -0,0 +1,40 @@
+diff --git a/lib/string.in.h b/lib/string.in.h
+index fb73770..bb6aa58 100644
+--- a/lib/string.in.h
++++ b/lib/string.in.h
+@@ -233,6 +233,7 @@ _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
+ #if @GNULIB_STPNCPY@
+ # if @REPLACE_STPNCPY@
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
++# undef stpncpy
+ # define stpncpy rpl_stpncpy
+ # endif
+ _GL_FUNCDECL_RPL (stpncpy, char *,
+diff --git a/m4/stpncpy.m4 b/m4/stpncpy.m4
+index d2344ac..158cc08 100644
+--- a/m4/stpncpy.m4
++++ b/m4/stpncpy.m4
+@@ -1,4 +1,4 @@
+-# stpncpy.m4 serial 11
++# stpncpy.m4 serial 12
+ dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 Free Software Foundation,
+ dnl Inc.
+ dnl This file is free software; the Free Software Foundation
+@@ -25,6 +25,7 @@ AC_DEFUN([gl_FUNC_STPNCPY],
+ dnl in AIX: dest + max(0,n-1)
+ dnl Only the glibc return value is useful in practice.
+
++ AC_CHECK_DECLS_ONCE([stpncpy])
+ AC_CHECK_FUNCS_ONCE([stpncpy])
+ if test $ac_cv_func_stpncpy = yes; then
+ AC_CACHE_CHECK([for working stpncpy], [gl_cv_func_stpncpy], [
+@@ -32,7 +33,9 @@ AC_DEFUN([gl_FUNC_STPNCPY],
+ #include <stdlib.h>
+ #include <string.h> /* for strcpy */
+ /* The stpncpy prototype is missing in <string.h> on AIX 4. */
++#if !HAVE_DECL_STPNCPY
+ extern char *stpncpy (char *dest, const char *src, size_t n);
++#endif
+ int main () {
+ const char *src = "Hello";
+ char dest[10];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101026/66873318/attachment.html>
More information about the macports-changes
mailing list