Merge pull request #1236 from JPeterMugaas/iconv
libiconv - Update to libicon 1.15 - latest version
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
|
||||
|
||||
pkgname=('libiconv' 'libiconv-devel')
|
||||
pkgver=1.14
|
||||
pkgrel=2
|
||||
pkgver=1.15
|
||||
pkgrel=1
|
||||
pkgdesc='Libiconv is a conversion library'
|
||||
groups=('libraries')
|
||||
arch=('i686' 'x86_64')
|
||||
@@ -13,20 +13,49 @@ source=("https://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz"
|
||||
libiconv-1.14-reloc.patch
|
||||
libiconv-1.14-wchar.patch
|
||||
msys2-libiconv-1.14.patch)
|
||||
sha256sums=('72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613'
|
||||
sha256sums=('ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178'
|
||||
'0891f33528131003939c5e7fa610384834d580e80396f411de0b9f26ec1c520f'
|
||||
'ed5d4365512781b9b23473cc375a4a2c1491eae31b13b76cda2d55751bff5cdf'
|
||||
'd2a57c55683361e49e30ed0de10942e7fe4f4392dc47fe8a24c7b67b21ce9dd7'
|
||||
'2ec4b97974e60681d843fbd766e18df6df2a7c90a3ff8ccb709ad65edd649689')
|
||||
'f9186f805dbb136cc24ce389ecee5a4d4867eec722292bd77893524dcdedf190'
|
||||
'0c8f78f688c2f116a6441ba0dc9c4308d2d4845114b574dd8f0cd1165f070132'
|
||||
'849971a5b753222e672faf0d2b7c852e5e29ef07db12acd1d74f272ccc049d27')
|
||||
options=(!libtool)
|
||||
|
||||
# Helper macros to help make tasks easier #
|
||||
apply_patch_with_msg_p2() {
|
||||
for _patch in "$@"
|
||||
do
|
||||
msg2 "Applying $_patch"
|
||||
patch -Nbp2 -i "${srcdir}/$_patch"
|
||||
done
|
||||
}
|
||||
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
do
|
||||
msg2 "Applying $_patch"
|
||||
patch -Nbp1 -i "${srcdir}/$_patch"
|
||||
done
|
||||
}
|
||||
|
||||
del_file_exists() {
|
||||
for _fname in "$@"
|
||||
do
|
||||
if [ -f $_fname ]; then
|
||||
rm -rf $_fname
|
||||
fi
|
||||
done
|
||||
}
|
||||
# =========================================== #
|
||||
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/${pkgname}-${pkgver}
|
||||
|
||||
patch -p2 -i ${srcdir}/1.14-cross-install.patch
|
||||
patch -p2 -i ${srcdir}/libiconv-1.14-reloc.patch
|
||||
patch -p2 -i ${srcdir}/libiconv-1.14-wchar.patch
|
||||
patch -p1 -i ${srcdir}/msys2-libiconv-1.14.patch
|
||||
apply_patch_with_msg_p2 1.14-cross-install.patch \
|
||||
libiconv-1.14-reloc.patch \
|
||||
libiconv-1.14-wchar.patch
|
||||
apply_patch_with_msg \
|
||||
msys2-libiconv-1.14.patch
|
||||
|
||||
#./autogen.sh --skip-gnulib
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- old/libiconv-1.14/lib/relocatable.c 2011-08-07 13:48:03.000000000 -0400
|
||||
+++ new/libiconv-1.14/lib/relocatable.c 2011-10-15 03:14:13.195133600 -0400
|
||||
@@ -2,20 +2,18 @@
|
||||
Copyright (C) 2003-2006, 2008-2011 Free Software Foundation, Inc.
|
||||
--- old/libiconv-1.15/lib/relocatable.c.orig 2016-12-02 09:45:20.000000000 -0500
|
||||
+++ new/libiconv-1.15/lib/relocatable.c 2018-05-01 02:44:29.048431800 -0400
|
||||
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 2003-2006, 2008-2012 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2003.
|
||||
|
||||
- This program is free software; you can redistribute it and/or modify it
|
||||
@@ -15,24 +15,15 @@
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- Library General Public License for more details.
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU Lesser General Public License for more details.
|
||||
|
||||
- You should have received a copy of the GNU Library General Public
|
||||
- License along with this program; if not, write to the Free Software
|
||||
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
- USA. */
|
||||
+ You should have received a copy of the GNU Lesser General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Tell glibc's <stdio.h> to provide a prototype for getline().
|
||||
@@ -87,6 +85,19 @@
|
||||
# define FILE_SYSTEM_PREFIX_LEN(P) 0
|
||||
#endif
|
||||
|
||||
@@ -101,6 +101,19 @@
|
||||
#ifndef ENABLE_COSTLY_RELOCATABLE
|
||||
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
|
||||
# define ENABLE_COSTLY_RELOCATABLE 1
|
||||
+# else
|
||||
+# define ENABLE_COSTLY_RELOCATABLE 0
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
+/* Whether to enable the more costly support for relocatable libraries.
|
||||
+ It allows libraries to be have been installed with a different original
|
||||
+ prefix than the program. But it is quite costly, especially on Cygwin
|
||||
@@ -41,83 +32,11 @@
|
||||
+#ifndef ENABLE_COSTLY_RELOCATABLE
|
||||
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
|
||||
+# define ENABLE_COSTLY_RELOCATABLE 1
|
||||
+# else
|
||||
+# define ENABLE_COSTLY_RELOCATABLE 0
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
/* Original installation prefix. */
|
||||
static char *orig_prefix;
|
||||
static size_t orig_prefix_len;
|
||||
@@ -156,7 +167,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
|
||||
+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE)
|
||||
|
||||
/* Convenience function:
|
||||
Computes the current installation prefix, based on the original
|
||||
@@ -286,7 +297,7 @@
|
||||
|
||||
#endif /* !IN_LIBRARY || PIC */
|
||||
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
|
||||
/* Full pathname of shared library, or NULL. */
|
||||
static char *shared_library_fullname;
|
||||
@@ -332,7 +343,9 @@
|
||||
#if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__
|
||||
/* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
|
||||
function.
|
||||
- Cygwin >= 1.5 has /proc/self/maps and the getline() function too. */
|
||||
+ Cygwin >= 1.5 has /proc/self/maps and the getline() function too.
|
||||
+ But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on
|
||||
+ Cygwin 1.7. */
|
||||
FILE *fp;
|
||||
|
||||
/* Open the current process' maps file. It describes one VMA per line. */
|
||||
@@ -405,7 +418,7 @@
|
||||
const char *
|
||||
relocate (const char *pathname)
|
||||
{
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
static int initialized;
|
||||
|
||||
/* Initialization code for a shared library. */
|
||||
# else
|
||||
# define ENABLE_COSTLY_RELOCATABLE 0
|
||||
# endif
|
||||
--- old/libiconv-1.14/libcharset/lib/relocatable.c 2011-08-07 13:48:03.000000000 -0400
|
||||
+++ new/libiconv-1.14/libcharset/lib/relocatable.c 2011-10-15 03:14:27.878133600 -0400
|
||||
@@ -2,20 +2,18 @@
|
||||
Copyright (C) 2003-2006, 2008-2011 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2003.
|
||||
|
||||
- This program is free software; you can redistribute it and/or modify it
|
||||
- under the terms of the GNU Library General Public License as published
|
||||
- by the Free Software Foundation; either version 2, or (at your option)
|
||||
- any later version.
|
||||
+ This program is free software: you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU Lesser General Public License as published by
|
||||
+ the Free Software Foundation; either version 2.1 of the License, or
|
||||
+ (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- Library General Public License for more details.
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU Lesser General Public License for more details.
|
||||
|
||||
- You should have received a copy of the GNU Library General Public
|
||||
- License along with this program; if not, write to the Free Software
|
||||
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
- USA. */
|
||||
+ You should have received a copy of the GNU Lesser General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Tell glibc's <stdio.h> to provide a prototype for getline().
|
||||
@@ -87,6 +85,19 @@
|
||||
# define FILE_SYSTEM_PREFIX_LEN(P) 0
|
||||
#endif
|
||||
@@ -138,44 +57,6 @@
|
||||
/* Original installation prefix. */
|
||||
static char *orig_prefix;
|
||||
static size_t orig_prefix_len;
|
||||
@@ -156,7 +167,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
|
||||
+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE)
|
||||
|
||||
/* Convenience function:
|
||||
Computes the current installation prefix, based on the original
|
||||
@@ -286,7 +297,7 @@
|
||||
|
||||
#endif /* !IN_LIBRARY || PIC */
|
||||
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
|
||||
/* Full pathname of shared library, or NULL. */
|
||||
static char *shared_library_fullname;
|
||||
@@ -332,7 +343,9 @@
|
||||
#if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__
|
||||
/* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
|
||||
function.
|
||||
- Cygwin >= 1.5 has /proc/self/maps and the getline() function too. */
|
||||
+ Cygwin >= 1.5 has /proc/self/maps and the getline() function too.
|
||||
+ But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on
|
||||
+ Cygwin 1.7. */
|
||||
FILE *fp;
|
||||
|
||||
/* Open the current process' maps file. It describes one VMA per line. */
|
||||
@@ -405,7 +418,7 @@
|
||||
const char *
|
||||
relocate (const char *pathname)
|
||||
{
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
static int initialized;
|
||||
|
||||
/* Initialization code for a shared library. */
|
||||
--- old/libiconv-1.14/srclib/relocatable.c 2011-08-07 09:42:06.000000000 -0400
|
||||
+++ new/libiconv-1.14/srclib/relocatable.c 2011-10-15 03:14:37.739133600 -0400
|
||||
@@ -3,16 +3,16 @@
|
||||
@@ -219,51 +100,3 @@
|
||||
/* Original installation prefix. */
|
||||
static char *orig_prefix;
|
||||
static size_t orig_prefix_len;
|
||||
@@ -154,7 +167,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
|
||||
+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE)
|
||||
|
||||
/* Convenience function:
|
||||
Computes the current installation prefix, based on the original
|
||||
@@ -284,7 +297,7 @@
|
||||
|
||||
#endif /* !IN_LIBRARY || PIC */
|
||||
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
|
||||
/* Full pathname of shared library, or NULL. */
|
||||
static char *shared_library_fullname;
|
||||
@@ -330,7 +343,9 @@
|
||||
#if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__
|
||||
/* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
|
||||
function.
|
||||
- Cygwin >= 1.5 has /proc/self/maps and the getline() function too. */
|
||||
+ Cygwin >= 1.5 has /proc/self/maps and the getline() function too.
|
||||
+ But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on
|
||||
+ Cygwin 1.7. */
|
||||
FILE *fp;
|
||||
|
||||
/* Open the current process' maps file. It describes one VMA per line. */
|
||||
@@ -403,7 +418,7 @@
|
||||
const char *
|
||||
relocate (const char *pathname)
|
||||
{
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
static int initialized;
|
||||
|
||||
/* Initialization code for a shared library. */
|
||||
--- origsrc/libiconv-1.14/srcm4/gnulib-comp.m4 2011-08-07 09:42:12.000000000 -0400
|
||||
+++ src/libiconv-1.14/srcm4/gnulib-comp.m4 2011-08-30 02:40:45.597317000 -0400
|
||||
@@ -164,6 +164,7 @@ gl_UNISTD_MODULE_INDICATOR([readlink])
|
||||
gl_RELOCATABLE([$gl_source_base])
|
||||
if test $RELOCATABLE = yes; then
|
||||
AC_LIBOBJ([progreloc])
|
||||
+ AC_LIBOBJ([relocatable])
|
||||
fi
|
||||
gl_FUNC_READLINK_SEPARATE
|
||||
gl_CANONICALIZE_LGPL_SEPARATE
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
diff -urN origsrc//libiconv-1.14/libcharset/lib/localcharset.c src//libiconv-1.14/libcharset/lib/localcharset.c
|
||||
--- origsrc//libiconv-1.14/libcharset/lib/localcharset.c 2011-02-28 17:43:35.000000000 -0500
|
||||
+++ src//libiconv-1.14/libcharset/lib/localcharset.c 2011-08-28 00:16:57.238000000 -0400
|
||||
@@ -54,10 +54,6 @@
|
||||
--- old/libiconv-1.15/libcharset/lib/localcharset.c.orig 2018-05-01 03:53:41.205796300 -0400
|
||||
+++ new/libiconv-1.15/libcharset/lib/localcharset.c 2018-05-01 04:02:53.944507100 -0400
|
||||
@@ -53,10 +53,6 @@
|
||||
# include <locale.h>
|
||||
# endif
|
||||
# endif
|
||||
@@ -9,28 +8,28 @@ diff -urN origsrc//libiconv-1.14/libcharset/lib/localcharset.c src//libiconv-1.1
|
||||
-# define WIN32_LEAN_AND_MEAN
|
||||
-# include <windows.h>
|
||||
-# endif
|
||||
#elif defined WIN32_NATIVE
|
||||
#elif defined WINDOWS_NATIVE
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
@@ -124,7 +120,7 @@
|
||||
@@ -128,7 +124,7 @@ get_charset_aliases (void)
|
||||
cp = charset_aliases;
|
||||
if (cp == NULL)
|
||||
{
|
||||
-#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
|
||||
+#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE)
|
||||
-#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2)
|
||||
+#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined OS2)
|
||||
const char *dir;
|
||||
const char *base = "charset.alias";
|
||||
char *file_name;
|
||||
@@ -309,7 +305,7 @@
|
||||
@@ -313,7 +309,7 @@ get_charset_aliases (void)
|
||||
"DECKOREAN" "\0" "EUC-KR" "\0";
|
||||
# endif
|
||||
|
||||
-# if defined WIN32_NATIVE || defined __CYGWIN__
|
||||
+# if defined WIN32_NATIVE
|
||||
-# if defined WINDOWS_NATIVE || defined __CYGWIN__
|
||||
+# if defined WINDOWS_NATIVE
|
||||
/* To avoid the troubles of installing a separate file in the same
|
||||
directory as the DLL and of retrieving the DLL's directory at
|
||||
runtime, simply inline the aliases here. */
|
||||
@@ -365,64 +361,12 @@
|
||||
@@ -399,64 +395,12 @@ locale_charset (void)
|
||||
|
||||
# if HAVE_LANGINFO_CODESET
|
||||
|
||||
@@ -77,10 +76,10 @@ diff -urN origsrc//libiconv-1.14/libcharset/lib/localcharset.c src//libiconv-1.1
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /* Woe32 has a function returning the locale's codepage as a number:
|
||||
- GetACP(). This encoding is used by Cygwin, unless the user has set
|
||||
- the environment variable CYGWIN=codepage:oem (which very few people
|
||||
- do).
|
||||
- /* The Windows API has a function returning the locale's codepage as a
|
||||
- number: GetACP(). This encoding is used by Cygwin, unless the user
|
||||
- has set the environment variable CYGWIN=codepage:oem (which very few
|
||||
- people do).
|
||||
- Output directed to console windows needs to be converted (to
|
||||
- GetOEMCP() if the console is using a raster font, or to
|
||||
- GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
|
||||
@@ -95,9 +94,9 @@ diff -urN origsrc//libiconv-1.14/libcharset/lib/localcharset.c src//libiconv-1.1
|
||||
+ /* Most systems support nl_langinfo (CODESET) nowadays.
|
||||
+ POSIX allows that the returned pointer may point to a static area that
|
||||
+ may be overwritten by subsequent calls to setlocale or nl_langinfo. */
|
||||
+ static char codeset_buf[64];
|
||||
+ static char codeset_buf[65];
|
||||
+ codeset_buf[0] = '\0';
|
||||
+ codeset = strncat (codeset_buf, nl_langinfo (CODESET), sizeof (codeset_buf));
|
||||
+ codeset = strncat (codeset_buf, nl_langinfo (CODESET), sizeof (codeset_buf - 1));
|
||||
|
||||
# else
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user