summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>2011-08-31 03:52:50 -0500
committerYaakov Selkowitz <yselkowitz@users.sourceforge.net>2011-08-31 03:52:50 -0500
commita1bf6de474db86218dc6f1aaf6394e09f43f4986 (patch)
tree31b9b22b70f522558584b4ed7b8c0499050124c8
parentfeb6516ef92cea1b4ddd1c5ed1a89a8014edee77 (diff)
downloadcygwin-libiconv-a1bf6de474db86218dc6f1aaf6394e09f43f4986.tar.gz
cygwin-libiconv-a1bf6de474db86218dc6f1aaf6394e09f43f4986.tar.xz
cygwin-libiconv-a1bf6de474db86218dc6f1aaf6394e09f43f4986.zip
cygwin-libiconv 1.14-1
-rw-r--r--cygwin-libiconv.spec23
-rw-r--r--libiconv-1.13.1-reloc.patch418
-rw-r--r--libiconv-1.13.1-wchar.patch125
-rw-r--r--libiconv-1.14-wchar.patch103
-rw-r--r--sources2
5 files changed, 118 insertions, 553 deletions
diff --git a/cygwin-libiconv.spec b/cygwin-libiconv.spec
index 634b3df..ef45950 100644
--- a/cygwin-libiconv.spec
+++ b/cygwin-libiconv.spec
@@ -5,19 +5,19 @@
%global __find_provides %{_cygwin_findprovides}
Name: cygwin-libiconv
-Version: 1.13.1
+Version: 1.14
Release: 1
Summary: GNU libraries and utilities for character set conversion
License: GPLv2+ and LGPLv2+
Group: Development/Libraries
URL: http://www.gnu.org/software/libiconv/
-Source0: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{version}.tar.gz
-Patch0: libiconv-1.13.1-reloc.patch
-Patch1: libiconv-1.13.1-wchar.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
+Source0: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{version}.tar.gz
+Patch0: libiconv-1.14-wchar.patch
+
BuildRequires: cygwin-filesystem >= 2
BuildRequires: cygwin-gcc
BuildRequires: cygwin-binutils
@@ -46,8 +46,7 @@ Static version of the Cygwin Iconv library.
%prep
%setup -q -n libiconv-%{version}
rm -f m4/libtool.m4 m4/lt*.m4
-%patch0 -p2 -b .reloc~
-%patch1 -p1 -b .wchar~
+%patch0 -p2
autoreconf -f -i -v -I `pwd`/m4 -I `pwd`/srcm4
@@ -73,6 +72,12 @@ rm -rf $RPM_BUILD_ROOT%{_cygwin_mandir}
# files. If cygwin-gettext wasn't installed then there won't be any.
rm -rf $RPM_BUILD_ROOT%{_cygwin_datadir}/locale
+# We intentionally don't ship *.la files
+rm -f $RPM_BUILD_ROOT%{_cygwin_libdir}/*.la
+
+# Remove unnecessary Cygwin native binaries
+rm -f $RPM_BUILD_ROOT%{_cygwin_bindir}/*.exe
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -81,7 +86,6 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc COPYING COPYING.LIB
-%{_cygwin_bindir}/iconv.exe
%{_cygwin_bindir}/cygcharset-1.dll
%{_cygwin_bindir}/cygiconv-2.dll
%{_cygwin_includedir}/iconv.h
@@ -89,9 +93,7 @@ rm -rf $RPM_BUILD_ROOT
%{_cygwin_includedir}/localcharset.h
%{_cygwin_libdir}/charset.alias
%{_cygwin_libdir}/libcharset.dll.a
-%{_cygwin_libdir}/libcharset.la
%{_cygwin_libdir}/libiconv.dll.a
-%{_cygwin_libdir}/libiconv.la
%files static
%defattr(-,root,root,-)
@@ -100,5 +102,8 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Aug 31 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.14-1
+- Version bump.
+
* Wed Feb 16 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.13.1-1
- Initial RPM release, largely based on mingw32-iconv.
diff --git a/libiconv-1.13.1-reloc.patch b/libiconv-1.13.1-reloc.patch
deleted file mode 100644
index 0dbf869..0000000
--- a/libiconv-1.13.1-reloc.patch
+++ /dev/null
@@ -1,418 +0,0 @@
-diff -urN old//libiconv-1.13.1/lib/relocatable.c new//libiconv-1.13.1/lib/relocatable.c
---- old//libiconv-1.13.1/lib/relocatable.c 2009-06-21 07:17:33.000000000 -0400
-+++ new//libiconv-1.13.1/lib/relocatable.c 2011-01-27 21:36:15.149000000 -0500
-@@ -43,7 +43,7 @@
- # include "xalloc.h"
- #endif
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if defined _WIN32 || defined __WIN32__
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- #endif
-@@ -70,8 +70,8 @@
- ISSLASH(C) tests whether C is a directory separator character.
- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
-+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
- # define ISSLASH(C) ((C) == '/' || (C) == '\\')
- # define HAS_DEVICE(P) \
- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-@@ -80,7 +80,7 @@
- (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
- # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
- #else
-- /* Unix */
-+ /* Unix, Cygwin */
- # define ISSLASH(C) ((C) == '/')
- # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
- # define FILE_SYSTEM_PREFIX_LEN(P) 0
-@@ -281,7 +281,7 @@
- /* Full pathname of shared library, or NULL. */
- static char *shared_library_fullname;
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if defined _WIN32 || defined __WIN32__
-
- /* Determine the full pathname of the shared library when it is loaded. */
-
-@@ -303,37 +303,20 @@
- /* Shouldn't happen. */
- return FALSE;
-
-- {
--#if defined __CYGWIN__
-- /* On Cygwin, we need to convert paths coming from Win32 system calls
-- to the Unix-like slashified notation. */
-- static char location_as_posix_path[2 * MAX_PATH];
-- /* There's no error return defined for cygwin_conv_to_posix_path.
-- See cygwin-api/func-cygwin-conv-to-posix-path.html.
-- Does it overflow the buffer of expected size MAX_PATH or does it
-- truncate the path? I don't know. Let's catch both. */
-- cygwin_conv_to_posix_path (location, location_as_posix_path);
-- location_as_posix_path[MAX_PATH - 1] = '\0';
-- if (strlen (location_as_posix_path) >= MAX_PATH - 1)
-- /* A sign of buffer overflow or path truncation. */
-- return FALSE;
-- shared_library_fullname = strdup (location_as_posix_path);
--#else
-- shared_library_fullname = strdup (location);
--#endif
-- }
-+ shared_library_fullname = strdup (location);
- }
-
- return TRUE;
- }
-
--#else /* Unix except Cygwin */
-+#else /* Unix or Cygwin */
-
- static void
- find_shared_library_fullname ()
- {
--#if defined __linux__ && __GLIBC__ >= 2
-- /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
-+#if (defined __linux__ && __GLIBC__ >= 2) || defined __CYGWIN__
-+ /* Linux has /proc/self/maps. glibc 2 has the getline() function.
-+ Cygwin as well. */
- FILE *fp;
-
- /* Open the current process' maps file. It describes one VMA per line. */
-@@ -378,7 +361,7 @@
- #endif
- }
-
--#endif /* (WIN32 or Cygwin) / (Unix except Cygwin) */
-+#endif /* WIN32 / (Unix or Cygwin) */
-
- /* Return the full pathname of the current shared library.
- Return NULL if unknown.
-@@ -386,7 +369,7 @@
- static char *
- get_shared_library_fullname ()
- {
--#if !(defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)
-+#if !(defined _WIN32 || defined __WIN32__)
- static bool tried_find_shared_library_fullname;
- if (!tried_find_shared_library_fullname)
- {
-diff -urN old//libiconv-1.13.1/libcharset/lib/relocatable.c new//libiconv-1.13.1/libcharset/lib/relocatable.c
---- old//libiconv-1.13.1/libcharset/lib/relocatable.c 2009-06-21 07:17:33.000000000 -0400
-+++ new//libiconv-1.13.1/libcharset/lib/relocatable.c 2011-01-27 21:37:44.462000000 -0500
-@@ -43,7 +43,7 @@
- # include "xalloc.h"
- #endif
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if defined _WIN32 || defined __WIN32__
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- #endif
-@@ -70,8 +70,8 @@
- ISSLASH(C) tests whether C is a directory separator character.
- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
-+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
- # define ISSLASH(C) ((C) == '/' || (C) == '\\')
- # define HAS_DEVICE(P) \
- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-@@ -80,7 +80,7 @@
- (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
- # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
- #else
-- /* Unix */
-+ /* Unix, Cygwin */
- # define ISSLASH(C) ((C) == '/')
- # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
- # define FILE_SYSTEM_PREFIX_LEN(P) 0
-@@ -290,7 +290,7 @@
- /* Full pathname of shared library, or NULL. */
- static char *shared_library_fullname;
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if defined _WIN32 || defined __WIN32__
-
- /* Determine the full pathname of the shared library when it is loaded. */
-
-@@ -312,37 +312,20 @@
- /* Shouldn't happen. */
- return FALSE;
-
-- {
--#if defined __CYGWIN__
-- /* On Cygwin, we need to convert paths coming from Win32 system calls
-- to the Unix-like slashified notation. */
-- static char location_as_posix_path[2 * MAX_PATH];
-- /* There's no error return defined for cygwin_conv_to_posix_path.
-- See cygwin-api/func-cygwin-conv-to-posix-path.html.
-- Does it overflow the buffer of expected size MAX_PATH or does it
-- truncate the path? I don't know. Let's catch both. */
-- cygwin_conv_to_posix_path (location, location_as_posix_path);
-- location_as_posix_path[MAX_PATH - 1] = '\0';
-- if (strlen (location_as_posix_path) >= MAX_PATH - 1)
-- /* A sign of buffer overflow or path truncation. */
-- return FALSE;
-- shared_library_fullname = strdup (location_as_posix_path);
--#else
-- shared_library_fullname = strdup (location);
--#endif
-- }
-+ shared_library_fullname = strdup (location);
- }
-
- return TRUE;
- }
-
--#else /* Unix except Cygwin */
-+#else /* Unix or Cygwin */
-
- static void
- find_shared_library_fullname ()
- {
--#if defined __linux__ && __GLIBC__ >= 2
-- /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
-+#if (defined __linux__ && __GLIBC__ >= 2) || defined __CYGWIN__
-+ /* Linux has /proc/self/maps. glibc 2 has the getline() function.
-+ Cygwin as well. */
- FILE *fp;
-
- /* Open the current process' maps file. It describes one VMA per line. */
-@@ -387,7 +370,7 @@
- #endif
- }
-
--#endif /* (WIN32 or Cygwin) / (Unix except Cygwin) */
-+#endif /* WIN32 / (Unix or Cygwin) */
-
- /* Return the full pathname of the current shared library.
- Return NULL if unknown.
-@@ -395,7 +378,7 @@
- static char *
- get_shared_library_fullname ()
- {
--#if !(defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)
-+#if !(defined _WIN32 || defined __WIN32__)
- static bool tried_find_shared_library_fullname;
- if (!tried_find_shared_library_fullname)
- {
-diff -urN old//libiconv-1.13.1/srclib/progreloc.c new//libiconv-1.13.1/srclib/progreloc.c
---- old//libiconv-1.13.1/srclib/progreloc.c 2009-06-21 07:31:08.000000000 -0400
-+++ new//libiconv-1.13.1/srclib/progreloc.c 2011-01-27 21:32:15.012000000 -0500
-@@ -38,7 +38,7 @@
- # define WIN32_NATIVE
- #endif
-
--#if defined WIN32_NATIVE || defined __CYGWIN__
-+#if defined WIN32_NATIVE
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- #endif
-@@ -64,8 +64,8 @@
- ISSLASH(C) tests whether C is a directory separator character.
- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
-+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
- # define ISSLASH(C) ((C) == '/' || (C) == '\\')
- # define HAS_DEVICE(P) \
- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-@@ -74,7 +74,7 @@
- (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
- # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
- #else
-- /* Unix */
-+ /* Unix, Cygwin */
- # define ISSLASH(C) ((C) == '/')
- # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
- # define FILE_SYSTEM_PREFIX_LEN(P) 0
-@@ -90,7 +90,7 @@
-
- #if ENABLE_RELOCATABLE
-
--#ifdef __linux__
-+#if defined __linux__ || defined __CYGWIN__
- /* File descriptor of the executable.
- (Only used to verify that we find the correct executable.) */
- static int executable_fd = -1;
-@@ -100,12 +100,12 @@
- static bool
- maybe_executable (const char *filename)
- {
-- /* Woe32 lacks the access() function, but Cygwin doesn't. */
--#if !(defined WIN32_NATIVE && !defined __CYGWIN__)
-+ /* Woe32 lacks the access() function. */
-+#ifndef WIN32_NATIVE
- if (access (filename, X_OK) < 0)
- return false;
-
--#ifdef __linux__
-+#if defined __linux__ || defined __CYGWIN__
- if (executable_fd >= 0)
- {
- /* If we already have an executable_fd, check that filename points to
-@@ -136,7 +136,7 @@
- static char *
- find_executable (const char *argv0)
- {
--#if defined WIN32_NATIVE || defined __CYGWIN__
-+#if defined WIN32_NATIVE
- char location[MAX_PATH];
- int length = GetModuleFileName (NULL, location, sizeof (location));
- if (length < 0)
-@@ -144,36 +144,15 @@
- if (!IS_PATH_WITH_DIR (location))
- /* Shouldn't happen. */
- return NULL;
-- {
--#if defined __CYGWIN__
-- /* cygwin-1.5.13 (2005-03-01) or newer would also allow a Linux-like
-- implementation: readlink of "/proc/self/exe". But using the
-- result of the Win32 system call is simpler and is consistent with the
-- code in relocatable.c. */
-- /* On Cygwin, we need to convert paths coming from Win32 system calls
-- to the Unix-like slashified notation. */
-- static char location_as_posix_path[2 * MAX_PATH];
-- /* There's no error return defined for cygwin_conv_to_posix_path.
-- See cygwin-api/func-cygwin-conv-to-posix-path.html.
-- Does it overflow the buffer of expected size MAX_PATH or does it
-- truncate the path? I don't know. Let's catch both. */
-- cygwin_conv_to_posix_path (location, location_as_posix_path);
-- location_as_posix_path[MAX_PATH - 1] = '\0';
-- if (strlen (location_as_posix_path) >= MAX_PATH - 1)
-- /* A sign of buffer overflow or path truncation. */
-- return NULL;
-- /* Call canonicalize_file_name, because Cygwin supports symbolic links. */
-- return canonicalize_file_name (location_as_posix_path);
--#else
-- return xstrdup (location);
--#endif
-- }
--#else /* Unix && !Cygwin */
--#ifdef __linux__
-- /* The executable is accessible as /proc/<pid>/exe. In newer Linux
-- versions, also as /proc/self/exe. Linux >= 2.1 provides a symlink
-- to the true pathname; older Linux versions give only device and ino,
-- enclosed in brackets, which we cannot use here. */
-+
-+ return xstrdup (location);
-+
-+#else /* Unix or Cygwin */
-+#if defined __linux__ || defined __CYGWIN__
-+ /* The executable is accessible as /proc/<pid>/exe. In Cygwin and in
-+ newer Linux versions, also as /proc/self/exe. Linux >= 2.1 provides
-+ a symlink to the true pathname; older Linux versions give only device
-+ and ino, enclosed in brackets, which we cannot use here. */
- {
- char *link;
-
-diff -urN old//libiconv-1.13.1/srclib/relocatable.c new//libiconv-1.13.1/srclib/relocatable.c
---- old//libiconv-1.13.1/srclib/relocatable.c 2009-06-21 07:31:08.000000000 -0400
-+++ new//libiconv-1.13.1/srclib/relocatable.c 2011-01-27 21:34:51.320000000 -0500
-@@ -43,7 +43,7 @@
- # include "xalloc.h"
- #endif
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if defined _WIN32 || defined __WIN32__
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- #endif
-@@ -70,8 +70,8 @@
- ISSLASH(C) tests whether C is a directory separator character.
- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
-+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
- # define ISSLASH(C) ((C) == '/' || (C) == '\\')
- # define HAS_DEVICE(P) \
- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-@@ -80,7 +80,7 @@
- (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
- # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
- #else
-- /* Unix */
-+ /* Unix, Cygwin */
- # define ISSLASH(C) ((C) == '/')
- # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
- # define FILE_SYSTEM_PREFIX_LEN(P) 0
-@@ -290,7 +290,7 @@
- /* Full pathname of shared library, or NULL. */
- static char *shared_library_fullname;
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if defined _WIN32 || defined __WIN32__
-
- /* Determine the full pathname of the shared library when it is loaded. */
-
-@@ -312,37 +312,20 @@
- /* Shouldn't happen. */
- return FALSE;
-
-- {
--#if defined __CYGWIN__
-- /* On Cygwin, we need to convert paths coming from Win32 system calls
-- to the Unix-like slashified notation. */
-- static char location_as_posix_path[2 * MAX_PATH];
-- /* There's no error return defined for cygwin_conv_to_posix_path.
-- See cygwin-api/func-cygwin-conv-to-posix-path.html.
-- Does it overflow the buffer of expected size MAX_PATH or does it
-- truncate the path? I don't know. Let's catch both. */
-- cygwin_conv_to_posix_path (location, location_as_posix_path);
-- location_as_posix_path[MAX_PATH - 1] = '\0';
-- if (strlen (location_as_posix_path) >= MAX_PATH - 1)
-- /* A sign of buffer overflow or path truncation. */
-- return FALSE;
-- shared_library_fullname = strdup (location_as_posix_path);
--#else
-- shared_library_fullname = strdup (location);
--#endif
-- }
-+ shared_library_fullname = strdup (location);
- }
-
- return TRUE;
- }
-
--#else /* Unix except Cygwin */
-+#else /* Unix or Cygwin */
-
- static void
- find_shared_library_fullname ()
- {
--#if defined __linux__ && __GLIBC__ >= 2
-- /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
-+#if (defined __linux__ && __GLIBC__ >= 2) || defined __CYGWIN__
-+ /* Linux has /proc/self/maps. glibc 2 has the getline() function.
-+ Cygwin as well. */
- FILE *fp;
-
- /* Open the current process' maps file. It describes one VMA per line. */
-@@ -387,7 +370,7 @@
- #endif
- }
-
--#endif /* (WIN32 or Cygwin) / (Unix except Cygwin) */
-+#endif /* WIN32 / (Unix or Cygwin) */
-
- /* Return the full pathname of the current shared library.
- Return NULL if unknown.
-@@ -395,7 +378,7 @@
- static char *
- get_shared_library_fullname ()
- {
--#if !(defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)
-+#if !(defined _WIN32 || defined __WIN32__ )
- static bool tried_find_shared_library_fullname;
- if (!tried_find_shared_library_fullname)
- {
diff --git a/libiconv-1.13.1-wchar.patch b/libiconv-1.13.1-wchar.patch
deleted file mode 100644
index 44d05eb..0000000
--- a/libiconv-1.13.1-wchar.patch
+++ /dev/null
@@ -1,125 +0,0 @@
---- libiconv-1.13.1.orig/lib/iconv.c 2009-06-21 13:17:33.000000000 +0200
-+++ libiconv-1.13.1/lib/iconv.c 2011-01-27 12:46:21.544296281 +0100
-@@ -550,7 +550,7 @@ const char * iconv_canonicalize (const c
- if (ap->encoding_index == ei_local_wchar_t) {
- /* On systems which define __STDC_ISO_10646__, wchar_t is Unicode.
- This is also the case on native Woe32 systems. */
--#if __STDC_ISO_10646__ || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
-+#if __STDC_ISO_10646__ || defined _WIN32 || defined __WIN32__
- if (sizeof(wchar_t) == 4) {
- index = ei_ucs4internal;
- break;
---- libiconv-1.13.1.orig/lib/iconv_open1.h 2009-06-21 13:17:33.000000000 +0200
-+++ libiconv-1.13.1/lib/iconv_open1.h 2011-01-27 12:47:03.119371056 +0100
-@@ -98,7 +98,7 @@
- if (ap->encoding_index == ei_local_wchar_t) {
- /* On systems which define __STDC_ISO_10646__, wchar_t is Unicode.
- This is also the case on native Woe32 systems. */
--#if __STDC_ISO_10646__ || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
-+#if __STDC_ISO_10646__ || defined _WIN32 || defined __WIN32__
- if (sizeof(wchar_t) == 4) {
- to_index = ei_ucs4internal;
- break;
-@@ -174,7 +174,7 @@
- if (ap->encoding_index == ei_local_wchar_t) {
- /* On systems which define __STDC_ISO_10646__, wchar_t is Unicode.
- This is also the case on native Woe32 systems. */
--#if __STDC_ISO_10646__ || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
-+#if __STDC_ISO_10646__ || defined _WIN32 || defined __WIN32__
- if (sizeof(wchar_t) == 4) {
- from_index = ei_ucs4internal;
- break;
---- libiconv-1.13.1.orig/libcharset/lib/localcharset.c 2009-06-21 13:17:33.000000000 +0200
-+++ libiconv-1.13.1/libcharset/lib/localcharset.c 2011-01-27 11:53:33.201852883 +0100
-@@ -52,10 +52,6 @@
- # include <locale.h>
- # endif
- # endif
--# ifdef __CYGWIN__
--# define WIN32_LEAN_AND_MEAN
--# include <windows.h>
--# endif
- #elif defined WIN32_NATIVE
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
-@@ -117,7 +113,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)
- FILE *fp;
- const char *dir;
- const char *base = "charset.alias";
-@@ -276,7 +272,7 @@ get_charset_aliases (void)
- "DECKOREAN" "\0" "EUC-KR" "\0";
- # endif
-
--# if defined WIN32_NATIVE || defined __CYGWIN__
-+# if defined WIN32_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. */
-@@ -332,55 +328,14 @@ locale_charset (void)
-
- # if HAVE_LANGINFO_CODESET
-
-- /* Most systems support nl_langinfo (CODESET) nowadays. */
-- codeset = nl_langinfo (CODESET);
--
--# ifdef __CYGWIN__
-- /* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always
-- returns "US-ASCII". As long as this is not fixed, return the suffix
-- of the locale name from the environment variables (if present) or
-- the codepage as a number. */
-- if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
-- {
-- const char *locale;
-- static char buf[2 + 10 + 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];
-
-- locale = getenv ("LC_ALL");
-- if (locale == NULL || locale[0] == '\0')
-- {
-- locale = getenv ("LC_CTYPE");
-- if (locale == NULL || locale[0] == '\0')
-- locale = getenv ("LANG");
-- }
-- if (locale != NULL && locale[0] != '\0')
-- {
-- /* If the locale name contains an encoding after the dot, return
-- it. */
-- const char *dot = strchr (locale, '.');
--
-- if (dot != NULL)
-- {
-- const char *modifier;
--
-- dot++;
-- /* Look for the possible @... trailer and remove it, if any. */
-- modifier = strchr (dot, '@');
-- if (modifier == NULL)
-- return dot;
-- if (modifier - dot < sizeof (buf))
-- {
-- memcpy (buf, dot, modifier - dot);
-- buf [modifier - dot] = '\0';
-- return buf;
-- }
-- }
-- }
--
-- /* Woe32 has a function returning the locale's codepage as a number. */
-- sprintf (buf, "CP%u", GetACP ());
-- codeset = buf;
-- }
--# endif
-+ codeset_buf[0] = '\0';
-+ codeset = strncat (codeset_buf, nl_langinfo (CODESET), sizeof (codeset_buf));
-
- # else
-
diff --git a/libiconv-1.14-wchar.patch b/libiconv-1.14-wchar.patch
new file mode 100644
index 0000000..77df371
--- /dev/null
+++ b/libiconv-1.14-wchar.patch
@@ -0,0 +1,103 @@
+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 @@
+ # include <locale.h>
+ # endif
+ # endif
+-# ifdef __CYGWIN__
+-# define WIN32_LEAN_AND_MEAN
+-# include <windows.h>
+-# endif
+ #elif defined WIN32_NATIVE
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+@@ -124,7 +120,7 @@
+ cp = charset_aliases;
+ if (cp == NULL)
+ {
+-#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
++#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE)
+ const char *dir;
+ const char *base = "charset.alias";
+ char *file_name;
+@@ -309,7 +305,7 @@
+ "DECKOREAN" "\0" "EUC-KR" "\0";
+ # endif
+
+-# if defined WIN32_NATIVE || defined __CYGWIN__
++# if defined WIN32_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 @@
+
+ # if HAVE_LANGINFO_CODESET
+
+- /* Most systems support nl_langinfo (CODESET) nowadays. */
+- codeset = nl_langinfo (CODESET);
+-
+-# ifdef __CYGWIN__
+- /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always
+- returns "US-ASCII". Return the suffix of the locale name from the
+- environment variables (if present) or the codepage as a number. */
+- if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
+- {
+- const char *locale;
+- static char buf[2 + 10 + 1];
+-
+- locale = getenv ("LC_ALL");
+- if (locale == NULL || locale[0] == '\0')
+- {
+- locale = getenv ("LC_CTYPE");
+- if (locale == NULL || locale[0] == '\0')
+- locale = getenv ("LANG");
+- }
+- if (locale != NULL && locale[0] != '\0')
+- {
+- /* If the locale name contains an encoding after the dot, return
+- it. */
+- const char *dot = strchr (locale, '.');
+-
+- if (dot != NULL)
+- {
+- const char *modifier;
+-
+- dot++;
+- /* Look for the possible @... trailer and remove it, if any. */
+- modifier = strchr (dot, '@');
+- if (modifier == NULL)
+- return dot;
+- if (modifier - dot < sizeof (buf))
+- {
+- memcpy (buf, dot, modifier - dot);
+- buf [modifier - dot] = '\0';
+- return buf;
+- }
+- }
+- }
+-
+- /* 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).
+- 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
+- this conversion transparently (see winsup/cygwin/fhandler_console.cc),
+- converting to GetConsoleOutputCP(). This leads to correct results,
+- except when SetConsoleOutputCP has been called and a raster font is
+- in use. */
+- sprintf (buf, "CP%u", GetACP ());
+- codeset = buf;
+- }
+-# endif
++ /* 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];
++ codeset_buf[0] = '\0';
++ codeset = strncat (codeset_buf, nl_langinfo (CODESET), sizeof (codeset_buf));
+
+ # else
+
diff --git a/sources b/sources
index e38ff6c..62311aa 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7ab33ebd26687c744a37264a330bbe9a libiconv-1.13.1.tar.gz
+e34509b1623cec449dfeb73d7ce9c6c6 libiconv-1.14.tar.gz