diff options
author | Ivan Puntiy | 2020-06-30 23:56:50 +0300 |
---|---|---|
committer | Ivan Puntiy | 2020-06-30 23:57:48 +0300 |
commit | 978cd64c27c5c79507d939df201043ea76d38dbf (patch) | |
tree | 583a1895799df6e2ac14827de9fdfc5b19e6aba2 | |
parent | 1501a1666dc78ec3ceafe6c73cdcd057c5c65937 (diff) | |
download | aur-978cd64c27c5c79507d939df201043ea76d38dbf.tar.gz |
GCC10 fix
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | fix-narrowing.patch | 27 |
3 files changed, 38 insertions, 2 deletions
@@ -20,7 +20,9 @@ pkgbase = mingw-w64-wxmsw options = !strip options = !buildflags source = https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5.1/wxWidgets-3.0.5.1.tar.bz2 + source = fix-narrowing.patch sha1sums = 406ac736f61d88a3a866aa501e01e408a642c6e7 + sha1sums = 8657efb04e2c7befb83c3c9e5981f99b8484babf pkgname = mingw-w64-wxmsw @@ -14,11 +14,18 @@ depends=(mingw-w64-crt mingw-w64-expat mingw-w64-libpng mingw-w64-libjpeg-turbo options=(staticlibs !strip !buildflags) conflicts=(mingw-w64-wxmsw2.9 mingw-w64-wxmsw-static) provides=(mingw-w64-wxmsw2.9 mingw-w64-wxmsw-static) -source=("https://github.com/wxWidgets/wxWidgets/releases/download/v${pkgver}/wxWidgets-${pkgver}.tar.bz2") -sha1sums=('406ac736f61d88a3a866aa501e01e408a642c6e7') +source=("https://github.com/wxWidgets/wxWidgets/releases/download/v${pkgver}/wxWidgets-${pkgver}.tar.bz2" + "fix-narrowing.patch") +sha1sums=('406ac736f61d88a3a866aa501e01e408a642c6e7' + '8657efb04e2c7befb83c3c9e5981f99b8484babf') _architectures="i686-w64-mingw32 x86_64-w64-mingw32" +prepare() { + cd "${srcdir}/wxWidgets-${pkgver}" + patch --forward --strip=1 --input="${srcdir}/fix-narrowing.patch" +} + build() { local _build_flags="\ --with-msw \ diff --git a/fix-narrowing.patch b/fix-narrowing.patch new file mode 100644 index 000000000000..e197948e8850 --- /dev/null +++ b/fix-narrowing.patch @@ -0,0 +1,27 @@ +From fd81223a2f878757158b5266c362da71d43abee5 Mon Sep 17 00:00:00 2001 +From: Maarten Bent <MaartenBent@users.noreply.github.com> +Date: Thu, 16 Aug 2018 20:08:56 +0200 +Subject: [PATCH] Fix c++11-narrowing error when using clang on Windows + +Case value 0xfffffd9f results in the following error: +error: case value evaluates to 4294966687, which cannot be narrowed to type +'DISPID' (aka 'long') [-Wc++11-narrowing] +--- + src/msw/mediactrl_am.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/msw/mediactrl_am.cpp b/src/msw/mediactrl_am.cpp +index 1b8c9e6bd7f..5379eda8afc 100644 +--- a/src/msw/mediactrl_am.cpp ++++ b/src/msw/mediactrl_am.cpp +@@ -1530,7 +1530,9 @@ void wxAMMediaBackend::Move(int WXUNUSED(x), int WXUNUSED(y), + //--------------------------------------------------------------------------- + void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent& event) + { +- switch(event.GetDispatchId()) ++ // cast to unsigned long to fix narrowing error with case 0xfffffd9f ++ // when using clang ++ switch (static_cast<unsigned long>(event.GetDispatchId())) + { + case 0x00000001: // statechange in IActiveMovie + case 0x00000bc4: // playstatechange in IMediaPlayer |