Merge git://pkgs.fedoraproject.org/mingw32-gettext

This commit is contained in:
Erik van Pienbroek 2012-03-06 20:24:40 +01:00
commit 97c411d09b
4 changed files with 386 additions and 0 deletions

2
.gitignore vendored
View File

@ -0,0 +1,2 @@
gettext-0.17.tar.gz
/gettext-0.18.1.1.tar.gz

177
gettext-0.18.1.1-tml.patch Normal file
View File

@ -0,0 +1,177 @@
--- gettext-runtime/intl/printf.c
+++ gettext-runtime/intl/printf.c
@@ -69,7 +69,7 @@
#define STATIC static
/* This needs to be consistent with libgnuintl.h.in. */
-#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
+#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__
/* Don't break __attribute__((format(printf,M,N))).
This redefinition is only possible because the libc in NetBSD, Cygwin,
mingw does not have a function __printf__. */
--- gettext-runtime/intl/libgnuintl.h.in
+++ gettext-runtime/intl/libgnuintl.h.in
@@ -330,7 +330,7 @@
#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */
#undef printf
-#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
+#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__
/* Don't break __attribute__((format(printf,M,N))).
This redefinition is only possible because the libc in NetBSD, Cygwin,
mingw does not have a function __printf__.
---- gettext-tools/gnulib-lib/clean-temp.c
+++ gettext-tools/gnulib-lib/clean-temp.c
@@ -66,9 +66,11 @@
# endif
#endif
+#ifndef _WIN64
#ifndef uintptr_t
# define uintptr_t unsigned long
#endif
+#endif
#if !GNULIB_FCNTL_SAFER
/* The results of open() in this file are not used with fchdir,
--- gettext-tools/gnulib-lib/fstrcmp.c
+++ gettext-tools/gnulib-lib/fstrcmp.c
@@ -55,9 +55,11 @@
#include "minmax.h"
#include "xalloc.h"
+#ifndef _WIN64
#ifndef uintptr_t
# define uintptr_t unsigned long
#endif
+#endif
#define ELEMENT char
--- gettext-tools/gnulib-lib/gl_array_list.c
+++ gettext-tools/gnulib-lib/gl_array_list.c
@@ -55,9 +55,11 @@
/* Checked size_t computations. */
#include "xsize.h"
+#ifndef _WIN64
#ifndef uintptr_t
# define uintptr_t unsigned long
#endif
+#endif
/* -------------------------- gl_list_t Data Type -------------------------- */
--- gettext-tools/gnulib-lib/gl_linkedhash_list.c
+++ gettext-tools/gnulib-lib/gl_linkedhash_list.c
@@ -55,9 +55,11 @@
#include "xsize.h"
+#ifndef _WIN64
#ifndef uintptr_t
# define uintptr_t unsigned long
#endif
+#endif
#define WITH_HASHTABLE 1
--- gettext-tools/gnulib-lib/stdio.in.h
+++ gettext-tools/gnulib-lib/stdio.in.h
@@ -642,10 +642,6 @@
# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
|| (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
# if defined __GNUC__
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-/* Don't break __attribute__((format(printf,M,N))). */
-# define printf __printf__
-# endif
_GL_FUNCDECL_RPL_1 (__printf__, int,
(const char *format, ...)
__asm__ (@ASM_SYMBOL_PREFIX@
--- gettext-tools/gnulib-lib/tempname.c
+++ gettext-tools/gnulib-lib/tempname.c
@@ -54,6 +54,10 @@
#include <stdint.h>
#include <unistd.h>
+#ifdef _WIN32
+# include <direct.h>
+#endif
+
#include <sys/stat.h>
#if _LIBC
@@ -73,6 +73,10 @@
# define __xstat64(version, file, buf) stat (file, buf)
#endif
+#ifdef _WIN32
+# define mkdir(path,mode) _mkdir(path)
+#endif
+
#if ! (HAVE___SECURE_GETENV || _LIBC)
# define __secure_getenv getenv
#endif
--- gettext-tools/src/write-java.c
+++ gettext-tools/src/write-java.c
@@ -30,6 +30,10 @@
#include <stdio.h>
#include <string.h>
+#ifdef _WIN32
+# include <direct.h>
+#endif
+
#include <sys/stat.h>
#if !defined S_ISDIR && defined S_IFDIR
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
@@ -53,6 +53,10 @@
# define S_IXUSR 00100
#endif
+#ifdef _WIN32
+# define mkdir(path,mode) _mkdir(path)
+#endif
+
#include "c-ctype.h"
#include "error.h"
#include "xerror.h"
--- gettext-tools/src/write-csharp.c
+++ gettext-tools/src/write-csharp.c
@@ -29,6 +29,10 @@
#include <stdio.h>
#include <string.h>
+#ifdef _WIN32
+# include <direct.h>
+#endif
+
#include <sys/stat.h>
#if !defined S_ISDIR && defined S_IFDIR
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
@@ -70,6 +70,10 @@
# define S_IXOTH (S_IXUSR >> 6)
#endif
+#ifdef _WIN32
+# define mkdir(path,mode) _mkdir(path)
+#endif
+
#include "c-ctype.h"
#include "relocatable.h"
#include "error.h"
--- gettext-tools/woe32dll/export.h
+++ gettext-tools/woe32dll/export.h
@@ -90,7 +90,11 @@
--export-all-symbols is used. */
/* IMP(x) is a symbol that contains the address of x. */
+#ifdef _WIN64
+#define IMP(x) __imp_##x
+#else
#define IMP(x) _imp__##x
+#endif
/* Ensure that the variable x is exported from the library, and that a
pseudo-variable IMP(x) is available. */

206
mingw32-gettext.spec Normal file
View File

@ -0,0 +1,206 @@
%define __strip %{_mingw32_strip}
%define __objdump %{_mingw32_objdump}
%define __debug_install_post %{_mingw32_debug_install_post}
Name: mingw32-gettext
Version: 0.18.1.1
Release: 5%{?dist}
Summary: GNU libraries and utilities for producing multi-lingual messages
License: GPLv2+ and LGPLv2+
Group: Development/Libraries
URL: http://www.gnu.org/software/gettext/
Source0: http://ftp.gnu.org/pub/gnu/gettext/gettext-%{version}.tar.gz
# Fix compatibility with mingw-w64
Patch0: gettext-0.18.1.1-tml.patch
BuildArch: noarch
BuildRequires: mingw32-filesystem >= 68
BuildRequires: mingw32-runtime >= 3.15.1
BuildRequires: mingw32-gcc
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw32-binutils
BuildRequires: mingw32-win-iconv
BuildRequires: mingw32-termcap >= 1.3.1-3
# Possible extra BRs. These are used if available, but
# not required just for building.
#BuildRequires: mingw32-dlfcn
#BuildRequires: mingw32-libxml2
#BuildRequires: mingw32-expat
#BuildRequires: mingw32-glib2
%description
MinGW Windows Gettext library
%package static
Summary: Static version of the MinGW Windows Gettext library
Requires: %{name} = %{version}-%{release}
Group: Development/Libraries
%description static
Static version of the MinGW Windows Gettext library.
%{?_mingw32_debug_package}
%prep
%setup -q -n gettext-%{version}
%patch0 -p0
%build
# Some build workarounds
export gl_cv_func_memchr_works="yes"
export ac_cv_func_strnlen_working="yes"
%{_mingw32_configure} \
--disable-java \
--disable-native-java \
--disable-csharp \
--enable-static \
--enable-threads=win32 \
--without-emacs
make %{?_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT install
rm -f $RPM_BUILD_ROOT%{_mingw32_datadir}/locale/locale.alias
rm -f $RPM_BUILD_ROOT%{_mingw32_libdir}/charset.alias
# Remove documentation - already available in base gettext-devel.
rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir}/man1/
rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir}/man3/
rm -rf $RPM_BUILD_ROOT%{_mingw32_docdir}/gettext/
rm -rf $RPM_BUILD_ROOT%{_mingw32_docdir}/libasprintf/
rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/info/
%find_lang %{name} --all-name
%files -f %{name}.lang
%doc COPYING
%{_mingw32_bindir}/autopoint
%{_mingw32_bindir}/envsubst.exe
%{_mingw32_bindir}/gettext.exe
%{_mingw32_bindir}/gettext.sh
%{_mingw32_bindir}/gettextize
%{_mingw32_bindir}/libasprintf-0.dll
%{_mingw32_bindir}/libgettextlib-0-18-1.dll
%{_mingw32_bindir}/libgettextpo-0.dll
%{_mingw32_bindir}/libgettextsrc-0-18-1.dll
%{_mingw32_bindir}/libintl-8.dll
%{_mingw32_bindir}/msg*.exe
%{_mingw32_bindir}/ngettext.exe
%{_mingw32_bindir}/recode-sr-latin.exe
%{_mingw32_bindir}/xgettext.exe
%{_mingw32_includedir}/autosprintf.h
%{_mingw32_includedir}/gettext-po.h
%{_mingw32_includedir}/libintl.h
%{_mingw32_libdir}/gettext
%{_mingw32_libdir}/libasprintf.dll.a
%{_mingw32_libdir}/libasprintf.la
%{_mingw32_libdir}/libgettextlib.dll.a
%{_mingw32_libdir}/libgettextlib.la
%{_mingw32_libdir}/libgettextpo.dll.a
%{_mingw32_libdir}/libgettextpo.la
%{_mingw32_libdir}/libgettextsrc.dll.a
%{_mingw32_libdir}/libgettextsrc.la
%{_mingw32_libdir}/libintl.dll.a
%{_mingw32_libdir}/libintl.la
%{_mingw32_datadir}/gettext/
%{_mingw32_datadir}/aclocal/*m4
%files static
%{_mingw32_libdir}/libasprintf.a
%{_mingw32_libdir}/libgettextpo.a
%{_mingw32_libdir}/libintl.a
%changelog
* Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.18.1.1-5
- Rebuild against the mingw-w64 toolchain
- Added a patch to fix compatibility with mingw-w64
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.18.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Jul 6 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.18.1.1-3
- Rebuild again to fix incomplete dependencies
* Wed Jul 6 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.18.1.1-2
- Rebuild against win-iconv
* Mon May 23 2011 Kalev Lember <kalev@smartlink.ee> - 0.18.1.1-1
- Update to 0.18.1.1
- Spec cleanup
- Split debug symbols in -debuginfo subpackage
* Mon May 23 2011 Kalev Lember <kalev@smartlink.ee> - 0.17-16
- Removed html documentation and info pages
* Wed Apr 27 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.17.15
- Dropped the proxy-libintl pieces as the upstream gtk+ win32 maintainers
also decided to drop it and it's causing more harm than good
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sat Oct 16 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.17-13
- Replaced the libintl import library with a small wrapper library in order
to let other binaries have a soft-dependency on libintl-8.dll as proposed
on the fedora-mingw mailing list
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Fri Apr 3 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.17-11
- Added -static subpackage
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 0.17-9
- Rebuild for mingw32-gcc 4.4
* Fri Jan 23 2009 Richard W.M. Jones <rjones@redhat.com> - 0.17-8
- Use find_lang macro.
* Fri Jan 16 2009 Richard W.M. Jones <rjones@redhat.com> - 0.17-7
- Remove the manpages - already available in base Fedora gettext-devel.
- Use _smp_mflags for build.
- Added list of potential BRs.
- Added license file to doc section.
* Fri Oct 31 2008 Richard W.M. Jones <rjones@redhat.com> - 0.17-6
- Add fix for undefined Gnulib symbols (Farkas Levente).
- Rebuild against mingw32-termcap / libtermcap.
* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 0.17-5
- Rename mingw -> mingw32.
* Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 0.17-4
- Disable emacs lisp file install
* Thu Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 0.17-3
- Remove static libraries.
* Thu Sep 4 2008 Richard W.M. Jones <rjones@redhat.com> - 0.17-2
- Use RPM macros from mingw-filesystem.
* Tue Sep 2 2008 Daniel P. Berrange <berrange@redhat.com> - 0.17-1
- Initial RPM release, largely based on earlier work from several sources.

View File

@ -0,0 +1 @@
3dd55b952826d2b32f51308f2f91aa89 gettext-0.18.1.1.tar.gz