summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2020-09-17 19:43:46 +0000
committerschmonz <schmonz@pkgsrc.org>2020-09-17 19:43:46 +0000
commitc385d4892d53cd1abba90ee3599adcb89cb47c65 (patch)
treed6f2e3c625ed046e606ceb169cad40e568ea4a6b
parentace7976a26fa621dc6ef00a91e860a5739c3b32d (diff)
downloadpkgsrc-c385d4892d53cd1abba90ee3599adcb89cb47c65.tar.gz
On macOS with clang 12, get explicit definitions of snprintf and
vsnprintf to avoid warnings (treated as errors) and thereby pass configure.
-rw-r--r--print/kpathsea/distinfo4
-rw-r--r--print/kpathsea/patches/patch-configure24
-rw-r--r--print/kpathsea/patches/patch-configure.ac26
3 files changed, 53 insertions, 1 deletions
diff --git a/print/kpathsea/distinfo b/print/kpathsea/distinfo
index f522d72a68b..c0b721309b2 100644
--- a/print/kpathsea/distinfo
+++ b/print/kpathsea/distinfo
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.25 2020/05/10 03:56:38 markd Exp $
+$NetBSD: distinfo,v 1.26 2020/09/17 19:43:46 schmonz Exp $
SHA1 (texlive-20200406-source.tar.xz) = 94b77331474d678ce75d9d6c673965fd7f93295b
RMD160 (texlive-20200406-source.tar.xz) = 7475f64f21c7ba7a2e7c6e9bfe534dd6d53e4bb9
SHA512 (texlive-20200406-source.tar.xz) = 65be52cb5e1b52f12feb62c6cf23e56c581b9dccb8d3b9ccc85c12c62b0cb67dd71de8d22d967d2cbf8403502c66bccb238523d13a0d081be104fc9f9c68b477
Size (texlive-20200406-source.tar.xz) = 55383320 bytes
SHA1 (patch-aa) = 049aa9e8655c749ba168316fe6a4af453c3c9194
+SHA1 (patch-configure) = da362d4ae11a49d3ad835e6ee43ec472b56b9f33
+SHA1 (patch-configure.ac) = 136dd6339e918ac65e660ede6eab373347df566c
SHA1 (patch-xputenv.c) = 75edfd8abdf2f0373a084095cfdd37865e628590
diff --git a/print/kpathsea/patches/patch-configure b/print/kpathsea/patches/patch-configure
new file mode 100644
index 00000000000..658fde5a360
--- /dev/null
+++ b/print/kpathsea/patches/patch-configure
@@ -0,0 +1,24 @@
+$NetBSD: patch-configure,v 1.1 2020/09/17 19:43:47 schmonz Exp $
+
+On macOS with clang 12, get explicit definitions of snprintf and
+vsnprintf to avoid warnings (treated as errors) and thereby pass
+configure.
+
+--- configure.orig 2020-01-16 22:02:50.000000000 +0000
++++ configure
+@@ -14045,6 +14045,7 @@ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <stdarg.h>
++#include <stdio.h>
+ char buf[16];
+ va_list ap;
+ int
+@@ -14074,6 +14075,7 @@ if test "$cross_compiling" = yes; then :
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++#include <stdio.h>
+ char buf[4] = "abc";
+ int
+ main ()
diff --git a/print/kpathsea/patches/patch-configure.ac b/print/kpathsea/patches/patch-configure.ac
new file mode 100644
index 00000000000..231a9756b94
--- /dev/null
+++ b/print/kpathsea/patches/patch-configure.ac
@@ -0,0 +1,26 @@
+$NetBSD: patch-configure.ac,v 1.1 2020/09/17 19:43:47 schmonz Exp $
+
+On macOS with clang 12, get explicit definitions of snprintf and
+vsnprintf to avoid warnings (treated as errors) and thereby pass
+configure.
+
+--- configure.ac.orig 2015-06-18 11:33:58.000000000 +0000
++++ configure.ac
+@@ -78,6 +78,7 @@ fi
+ AC_CACHE_CHECK([for $snfunc and $vsnfunc],
+ [kpse_cv_have_snfuncs],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
++ #include <stdio.h>
+ char buf[16];
+ va_list ap;]],
+ [[$snfunc (buf, 16, "%s", "abc");
+@@ -87,7 +88,8 @@ AC_CACHE_CHECK([for $snfunc and $vsnfunc
+ if test "x$kpse_cv_have_snfuncs" != xyes; then
+ AC_MSG_ERROR([Sorry, you need $snfunc and $vsnfunc.])
+ fi
+-AC_RUN_IFELSE([AC_LANG_PROGRAM([[char buf[4] = "abc";]],
++AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
++ char buf[4] = "abc";]],
+ [[if ($snfunc (buf, 1, "%s", "x") == 0 || buf[1] != 'b')
+ return 1;]])],
+ [],