summaryrefslogtreecommitdiff
path: root/sysutils/file
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2014-11-07 11:17:12 +0000
committerschmonz <schmonz@pkgsrc.org>2014-11-07 11:17:12 +0000
commitd3aa1fb0e824b56e4e5260d2d51837e4a2369fc8 (patch)
tree467141e110217758fa12ba95917705cb7ebe5249 /sysutils/file
parent21dbcc9d093afa260b891c9f50a6bfd103362fbe (diff)
downloadpkgsrc-d3aa1fb0e824b56e4e5260d2d51837e4a2369fc8.tar.gz
Some OSes have locale_t in xlocale.h (patch from upstream).
Diffstat (limited to 'sysutils/file')
-rw-r--r--sysutils/file/distinfo7
-rw-r--r--sysutils/file/patches/patch-config.h.in26
-rw-r--r--sysutils/file/patches/patch-configure24
-rw-r--r--sysutils/file/patches/patch-configure.ac24
-rw-r--r--sysutils/file/patches/patch-src_file.c16
-rw-r--r--sysutils/file/patches/patch-src_file.h16
6 files changed, 112 insertions, 1 deletions
diff --git a/sysutils/file/distinfo b/sysutils/file/distinfo
index fa9a708e4be..d166772e924 100644
--- a/sysutils/file/distinfo
+++ b/sysutils/file/distinfo
@@ -1,7 +1,12 @@
-$NetBSD: distinfo,v 1.19 2014/10/26 06:04:34 ryoon Exp $
+$NetBSD: distinfo,v 1.20 2014/11/07 11:17:12 schmonz Exp $
SHA1 (file-5.20.tar.gz) = 4e93e9ae915f1812b05cc6012ae968fdb6416f8f
RMD160 (file-5.20.tar.gz) = a584dc0d254585c0f7a2cebab10b4115d88a3293
Size (file-5.20.tar.gz) = 725937 bytes
SHA1 (patch-aa) = d3aa3667e3d28ac1268b83de2de372ba083705fc
+SHA1 (patch-config.h.in) = 0b1b675715aba1a8a5a9827ff676c83857a23a93
+SHA1 (patch-configure) = 02bcdc6eda7816e02bd98457372cba34dc2e19f4
+SHA1 (patch-configure.ac) = 72b48d2e1b62d0bf3adc7c489a12c53901ef073d
+SHA1 (patch-src_file.c) = a9b6467125816a9a803083c7ccac6707e36b5fd2
+SHA1 (patch-src_file.h) = 258ba7b1c0e0c6e3a4571088ac91d20440c4dff6
SHA1 (patch-src_getline.c) = 23365ae99c8c5a4c4ff4e0d94b83798d12335112
diff --git a/sysutils/file/patches/patch-config.h.in b/sysutils/file/patches/patch-config.h.in
new file mode 100644
index 00000000000..197367bc634
--- /dev/null
+++ b/sysutils/file/patches/patch-config.h.in
@@ -0,0 +1,26 @@
+$NetBSD: patch-config.h.in,v 1.1 2014/11/07 11:17:12 schmonz Exp $
+
+Some OSes have locale_t in xlocale.h (patch from upstream).
+
+--- config.h.in.orig 2014-11-07 11:11:41.000000000 +0000
++++ config.h.in
+@@ -104,6 +104,9 @@
+ /* Define to 1 if you have the `pread' function. */
+ #undef HAVE_PREAD
+
++/* Define to 1 if you have the `setlocale' function. */
++#undef HAVE_SETLOCALE
++
+ /* Define to 1 if you have the <stddef.h> header file. */
+ #undef HAVE_STDDEF_H
+
+@@ -228,6 +231,9 @@
+ /* Define to 1 if `vfork' works. */
+ #undef HAVE_WORKING_VFORK
+
++/* Define to 1 if you have the <xlocale.h> header file. */
++#undef HAVE_XLOCALE_H
++
+ /* Define to 1 if you have the <zlib.h> header file. */
+ #undef HAVE_ZLIB_H
+
diff --git a/sysutils/file/patches/patch-configure b/sysutils/file/patches/patch-configure
new file mode 100644
index 00000000000..93ddcff95c0
--- /dev/null
+++ b/sysutils/file/patches/patch-configure
@@ -0,0 +1,24 @@
+$NetBSD: patch-configure,v 1.1 2014/11/07 11:17:12 schmonz Exp $
+
+Some OSes have locale_t in xlocale.h (patch from upstream).
+
+--- configure.orig 2014-11-07 10:49:37.000000000 +0000
++++ configure
+@@ -12785,7 +12785,7 @@ fi
+
+ done
+
+-for ac_header in getopt.h err.h
++for ac_header in getopt.h err.h xlocale.h
+ do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+@@ -14191,7 +14191,7 @@ fi
+ fi
+
+
+-for ac_func in strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale
++for ac_func in strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale
+ do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --git a/sysutils/file/patches/patch-configure.ac b/sysutils/file/patches/patch-configure.ac
new file mode 100644
index 00000000000..c83b70a56c2
--- /dev/null
+++ b/sysutils/file/patches/patch-configure.ac
@@ -0,0 +1,24 @@
+$NetBSD: patch-configure.ac,v 1.1 2014/11/07 11:17:12 schmonz Exp $
+
+Some OSes have locale_t in xlocale.h (patch from upstream).
+
+--- configure.ac.orig 2014-10-10 18:56:21.000000000 +0000
++++ configure.ac
+@@ -82,7 +82,7 @@ AC_HEADER_MAJOR
+ AC_HEADER_SYS_WAIT
+ AC_CHECK_HEADERS(stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h)
+ AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h)
+-AC_CHECK_HEADERS(getopt.h err.h)
++AC_CHECK_HEADERS(getopt.h err.h xlocale.h)
+ AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h)
+ AC_CHECK_HEADERS(zlib.h)
+
+@@ -138,7 +138,7 @@ else
+ fi])
+
+ dnl Checks for functions
+-AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale)
++AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale)
+
+ dnl Provide implementation of some required functions if necessary
+ AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r pread strcasestr fmtcheck)
diff --git a/sysutils/file/patches/patch-src_file.c b/sysutils/file/patches/patch-src_file.c
new file mode 100644
index 00000000000..2eb9be8fd03
--- /dev/null
+++ b/sysutils/file/patches/patch-src_file.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_file.c,v 1.1 2014/11/07 11:17:12 schmonz Exp $
+
+Some OSes have locale_t in xlocale.h (patch from upstream).
+
+--- src/file.c.orig 2014-09-11 15:05:33.000000000 +0000
++++ src/file.c
+@@ -142,7 +142,9 @@ main(int argc, char *argv[])
+ const char *magicfile = NULL; /* where the magic is */
+
+ /* makes islower etc work for other langs */
++#ifdef HAVE_SETLOCALE
+ (void)setlocale(LC_CTYPE, "");
++#endif
+
+ #ifdef __EMX__
+ /* sh-like wildcard expansion! Shouldn't hurt at least ... */
diff --git a/sysutils/file/patches/patch-src_file.h b/sysutils/file/patches/patch-src_file.h
new file mode 100644
index 00000000000..59b2211b163
--- /dev/null
+++ b/sysutils/file/patches/patch-src_file.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_file.h,v 1.1 2014/11/07 11:17:12 schmonz Exp $
+
+Some OSes have locale_t in xlocale.h (patch from upstream).
+
+--- src/file.h.orig 2014-09-11 15:05:33.000000000 +0000
++++ src/file.h
+@@ -474,6 +474,9 @@ protected int file_os2_apptype(struct ma
+ #if defined(HAVE_LOCALE_H)
+ #include <locale.h>
+ #endif
++#if defined(HAVE_XLOCALE_H)
++#include <xlocale.h>
++#endif
+
+ typedef struct {
+ const char *pat;