diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/file-1-fixes.patch | 81 | ||||
-rw-r--r-- | src/file.mk | 5 |
2 files changed, 84 insertions, 2 deletions
diff --git a/src/file-1-fixes.patch b/src/file-1-fixes.patch new file mode 100644 index 0000000..0adc428 --- /dev/null +++ b/src/file-1-fixes.patch @@ -0,0 +1,81 @@ +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 + +From fc71117317bfe752a1adc2512530ec8e59c54a0c Mon Sep 17 00:00:00 2001 +From: Christos Zoulas <christos@zoulas.com> +Date: Sat, 11 Oct 2014 15:03:16 +0000 +Subject: [PATCH] locale autoconf fixes + +--- + 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 <christos@zoulas.com> ++ ++ * fix autoconf glue for setlocale and locale_t; some OS's ++ have locale_t in xlocale.h ++ + 2014-10-10 15:01 Christos Zoulas <christos@zoulas.com> + + * 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) + +@@ -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 <locale.h> + #endif ++#if defined(HAVE_XLOCALE_H) ++#include <xlocale.h> ++#endif + + typedef struct { + const char *pat; diff --git a/src/file.mk b/src/file.mk index 3233dee..d60aad9 100644 --- a/src/file.mk +++ b/src/file.mk @@ -3,8 +3,8 @@ PKG := file $(PKG)_IGNORE := -$(PKG)_VERSION := 5.19 -$(PKG)_CHECKSUM := 0dff09eb44fde1998be79e8d312e9be4456d31ee +$(PKG)_VERSION := 5.20 +$(PKG)_CHECKSUM := 4e93e9ae915f1812b05cc6012ae968fdb6416f8f $(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) @@ -24,6 +24,7 @@ define $(PKG)_BUILD # version. Therefore we build a native one ourselves first. cp -Rp '$(1)' '$(1).native' + cd '$(1).native' && autoreconf -fi cd '$(1).native' && ./configure \ --disable-shared $(MAKE) -C '$(1).native/src' -j '$(JOBS)' file |