Add gettext-printf_collision.patch

This commit is contained in:
Sandro Mani 2020-07-28 15:17:11 +02:00
parent 410e5b2ecf
commit 6c4c94f249
2 changed files with 32 additions and 7 deletions

View File

@ -0,0 +1,20 @@
diff -rupN gettext-0.20.2/gettext-runtime/intl/libgnuintl.in.h gettext-0.20.2-new/gettext-runtime/intl/libgnuintl.in.h
--- gettext-0.20.2/gettext-runtime/intl/libgnuintl.in.h 2020-04-14 03:32:21.000000000 +0200
+++ gettext-0.20.2-new/gettext-runtime/intl/libgnuintl.in.h 2020-07-28 14:51:42.012066985 +0200
@@ -410,6 +410,7 @@ extern int vasprintf (char **, const cha
#endif
#if @HAVE_WPRINTF@
+#ifndef __cplusplus
#undef fwprintf
#define fwprintf libintl_fwprintf
@@ -434,6 +435,8 @@ extern int vswprintf (wchar_t *, size_t,
#endif
+#endif
+
#endif

View File

@ -2,12 +2,14 @@
Name: mingw-gettext
Version: 0.20.2
Release: 2%{?dist}
Release: 3%{?dist}
Summary: GNU libraries and utilities for producing multi-lingual messages
License: GPLv2+ and LGPLv2+
URL: http://www.gnu.org/software/gettext/
Source0: http://ftp.gnu.org/pub/gnu/gettext/gettext-%{version}.tar.xz
# Don't override various *printf macros in C++, they collide with the std::xxx counterparts
Patch0: gettext-printf_collision.patch
BuildArch: noarch
@ -66,11 +68,11 @@ Requires: mingw64-gettext = %{version}-%{release}
Static version of the MinGW Windows Gettext library.
%?mingw_debug_package
%{?mingw_debug_package}
%prep
%setup -q -n gettext-%{version}
%autosetup -p1 -n gettext-%{version}
%build
%mingw_configure \
@ -81,11 +83,11 @@ Static version of the MinGW Windows Gettext library.
--enable-threads=win32 \
--without-emacs \
--disable-openmp
%mingw_make %{?_smp_mflags}
%mingw_make_build
%install
%mingw_make_install DESTDIR=%{buildroot}
%mingw_make_install
rm -f %{buildroot}%{mingw32_datadir}/locale/locale.alias
rm -f %{buildroot}%{mingw32_libdir}/charset.alias
@ -114,7 +116,7 @@ find %{buildroot} -name "*.la" -delete
# Win32
%files -n mingw32-gettext -f mingw32-%{name}.lang
%doc COPYING
%license COPYING
%{mingw32_bindir}/autopoint
%{mingw32_bindir}/envsubst.exe
%{mingw32_bindir}/gettext.exe
@ -155,7 +157,7 @@ find %{buildroot} -name "*.la" -delete
# Win64
%files -n mingw64-gettext -f mingw64-%{name}.lang
%doc COPYING
%license COPYING
%{mingw64_bindir}/autopoint
%{mingw64_bindir}/envsubst.exe
%{mingw64_bindir}/gettext.exe
@ -196,6 +198,9 @@ find %{buildroot} -name "*.la" -delete
%changelog
* Tue Jul 28 2020 Sandro Mani <manisandro@gmail.com> - 0.20.2-3
- Add gettext-printf_collision.patch
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild