From 379c85fefab1f3e77c84aec89d74febb79645af2 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Thu, 18 Jun 2015 22:30:44 -0400 Subject: file: update --- src/file-1-fixes.patch | 105 +++++++++++++++---------------------------------- src/file.mk | 4 +- 2 files changed, 34 insertions(+), 75 deletions(-) diff --git a/src/file-1-fixes.patch b/src/file-1-fixes.patch index 0adc428..f4f9f97 100644 --- a/src/file-1-fixes.patch +++ b/src/file-1-fixes.patch @@ -1,81 +1,40 @@ This file is part of MXE. See index.html for further information. -This patch has been taken from: -https://github.com/file/file/commit/fc71117317bfe752a1adc2512530ec8e59c54a0c.patch +Contains ad hoc patches for cross building. -From fc71117317bfe752a1adc2512530ec8e59c54a0c Mon Sep 17 00:00:00 2001 -From: Christos Zoulas -Date: Sat, 11 Oct 2014 15:03:16 +0000 -Subject: [PATCH] locale autoconf fixes +From afe77055b3e244d82cf4dedc82af15524b34d908 Mon Sep 17 00:00:00 2001 +From: MXE +Date: Thu, 18 Jun 2015 22:19:17 -0400 +Subject: [PATCH] {gm,local}time_r: Fix function signature ---- - ChangeLog | 5 +++++ - configure.ac | 4 ++-- - src/file.c | 4 +++- - src/file.h | 5 ++++- - 4 files changed, 14 insertions(+), 4 deletions(-) -diff --git a/ChangeLog b/ChangeLog -index 2b1bad9..b42e3d7 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,8 @@ -+2014-10-11 15:02 Christos Zoulas -+ -+ * fix autoconf glue for setlocale and locale_t; some OS's -+ have locale_t in xlocale.h -+ - 2014-10-10 15:01 Christos Zoulas +diff --git a/src/gmtime_r.c b/src/gmtime_r.c +index 963dfee..7e27ed6 100644 +--- a/src/gmtime_r.c ++++ b/src/gmtime_r.c +@@ -9,7 +9,7 @@ FILE_RCSID("@(#)$File: gmtime_r.c,v 1.1 2015/01/09 19:28:32 christos Exp $") - * release 5.20 -diff --git a/configure.ac b/configure.ac -index 545c6bd..e0b1c39 100644 ---- a/configure.ac -+++ b/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) + /* asctime_r is not thread-safe anyway */ + struct tm * +-gmtime_r(const time_t t, struct tm *tm) ++gmtime_r(const time_t *t, struct tm *tm) + { + struct tm *tmp = gmtime(t); + if (tmp == NULL) +diff --git a/src/localtime_r.c b/src/localtime_r.c +index 69d78d9..35c3b40 100644 +--- a/src/localtime_r.c ++++ b/src/localtime_r.c +@@ -9,7 +9,7 @@ FILE_RCSID("@(#)$File: localtime_r.c,v 1.1 2015/01/09 19:28:32 christos Exp $") -@@ -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/src/file.c b/src/file.c -index 8720772..b6c2c38 100644 ---- a/src/file.c -+++ b/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/src/file.h b/src/file.h -index 85e3936..fdbc889 100644 ---- a/src/file.h -+++ b/src/file.h -@@ -474,6 +474,9 @@ protected int file_os2_apptype(struct magic_set *, const char *, const void *, - #if defined(HAVE_LOCALE_H) - #include - #endif -+#if defined(HAVE_XLOCALE_H) -+#include -+#endif - - typedef struct { - const char *pat; + /* asctime_r is not thread-safe anyway */ + struct tm * +-localtime_r(const time_t t, struct tm *tm) ++localtime_r(const time_t *t, struct tm *tm) + { + struct tm *tmp = localtime(t); + if (tmp == NULL) +-- +1.9.1 + diff --git a/src/file.mk b/src/file.mk index 7be2d8d..3e2e11e 100644 --- a/src/file.mk +++ b/src/file.mk @@ -3,8 +3,8 @@ PKG := file $(PKG)_IGNORE := -$(PKG)_VERSION := 5.20 -$(PKG)_CHECKSUM := 4e93e9ae915f1812b05cc6012ae968fdb6416f8f +$(PKG)_VERSION := 5.23 +$(PKG)_CHECKSUM := c817fb4c27f01934993ece3b013adbdc4deab67e $(PKG)_SUBDIR := file-$($(PKG)_VERSION) $(PKG)_FILE := file-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://ftp.cross-lfs.org/pub/clfs/conglomeration/file/$($(PKG)_FILE) -- cgit v0.12