%{?mingw_package_header}

%global mingw_build_win32 1
%global mingw_build_win64 1

%global mingw_pkg_name wxWidgets3
%global majorver 3
%global minorver 0

Summary:       MinGW port of the wxWidgets GUI library
Name:          mingw-%{mingw_pkg_name}
Version:       %{majorver}.%{minorver}.2
Release:       1%{?dist}
License:       wxWidgets

Group:         Development/Libraries
URL:           http://wxwidgets.org
Source:        https://github.com/wxWidgets/wxWidgets/releases/download/v%{version}/wxWidgets-%{version}.tar.bz2
# https://bugzilla.redhat.com/show_bug.cgi?id=1225148
# remove abort when ABI check fails
# Backport from wxGTK
Patch0:         %{name}-%{version}-abicheck.patch
# This is a collection of fixes from upstream
# to fix warnings and crashes. See bug for details:
# https://bugzilla.redhat.com/show_bug.cgi?id=1234211
Patch1:         %{name}-%{version}-upstreamfixes.patch
# This fixes the spinbutton on gtk 3.12+
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/312ae4c92cec95954557347c2b7a9e24d4398a59
Patch2:         %{name}-%{version}-spibuttfix.patch
# This fixes checkbox/radiobutton on gtk 3.14+
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/c1d150ed1228c155054cf1fa90932ced7371e6a4
Patch3:         %{name}-%{version}-checkradio.patch
# This fixes some wayland issues with GTK3
# For more details, see the upstream bug:
# http://trac.wxwidgets.org/ticket/16688
Patch4:         %{name}-%{version}-wayland.patch
# This fixes wxSTC compilation with GCC6
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/73e9e18ea09ffffcaac50237def0d9728a213c02
Patch5:         %{name}-%{version}-stc-gcc6.patch
# This fixes compilation of the strings tests with GCC6
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/01f62c02957cc1443ea761ddffe0b4322d987a1d
Patch6:         %{name}-%{version}-string-tests-gcc6.patch
# This prevents wxStaticText from widening each time SetLabel() is called
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/2bc3721f065fd7d47674ccaf7e8d9d6cc195aab5
Patch7:         %{name}-%{version}-getbestsize.patch
# These patches fix top level window sizing under Wayland
# For more details, see the upstream commits:
# https://github.com/wxWidgets/wxWidgets/commit/41be4271e18a21acbcc30d1e61653190f8ef7a6d
# https://github.com/wxWidgets/wxWidgets/commit/0388ce8e25535415d9bdd79ce14eb20e73859279
Patch8:         %{name}-%{version}-wayland-window-sizing1.patch
Patch9:         %{name}-%{version}-wayland-window-sizing2.patch
# This patch adds docs for the wxEVT_MEDIA_XXX event types (for Phoenix)
# For more details, see the upstream commits:
# https://github.com/wxWidgets/wxWidgets/commit/03903c1e459f108e0c464db24064e4cde84f174a
Patch10:        %{name}-%{version}-media-docs.patch
# Fixes issue with size allocation in GTK 3.19+
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/9fea81c069f9d803d79c4ce82f87a00a6e10b490
Patch11:        %{name}-%{version}-size-alloc-fix.patch
# Fixes the stop function of wxFontEnumerator
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/a19e512e80acdb2a777c3e44923ad0b1178db35a
Patch12:        %{name}-%{version}-font-enumerator-stop.patch
# Fixes wxNativeFontInfo::InitFromFont()
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/238a948ed01f27e05e2c0e08932e8da207590648
Patch13:        %{name}-%{version}-init-from-font.patch
# Fixes wxGetKeyState() from crashing on Wayland
# For more details, see the upstream commits (first is just a dependency patch):
# https://github.com/wxWidgets/wxWidgets/commit/2dd407609b8987634180c045e9a6d131db6f947e
# https://github.com/wxWidgets/wxWidgets/commit/79676e1e9d307c479c5aefa70c0fd052341d697e
# https://github.com/wxWidgets/wxWidgets/commit/98065821bbf0178981b50515094f565b703fcaa8
Patch14:        %{name}-%{version}-gtk-show-uri.patch
Patch15:        %{name}-%{version}-gtk-show-uri1.patch
Patch16:        %{name}-%{version}-wxgetkeystate.patch
# Fixes crash in wxGCDC::DrawEllipticArc()
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/148971013ee48926dfe153ca39c94be92acde37c
Patch17:        %{name}-%{version}-draw-elliptic-arc-crash.patch
# Fixes drag and drop issues with filenames containing percent symbols
# For more details, see the upstream commits:
# https://github.com/wxWidgets/wxWidgets/commit/8f29de5231e348d356b5f3962225362e8fd87ba9
# https://github.com/wxWidgets/wxWidgets/commit/0f9f942a5bbe0ed9f07ea2e1fef90a7e2db768e5
Patch18:        %{name}-%{version}-fix-percent-dnd.patch
Patch19:        %{name}-%{version}-fix-percent-dnd2.patch
# Fixes rename issues in Filezilla with overlay scrollbars disabled - note: the
# size-alloc-fix patch is also required.
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/8d7e0d045250fa78a7e7d5a25cecee43bb75db3a
Patch20:        %{name}-%{version}-scrolwin-sizing-loop.patch
# Fixes sizing issues on GTK 3.20+
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/6475376931bf316a4fd791114408f7c1fc2fe836
Patch21:        %{name}-%{version}-gtk-sizing-problems.patch
# Fixes non-default window background color with GTK+ >= 3.20
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/553ec7537c30636ddf6cbc157373477fb2e9da41
Patch22:        %{name}-%{version}-background-color.patch
# Fixes paint clipping region with GTK+ >= 3.20
# This resolves a regression in poedit after the -29 update
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/cd8811bf142172c4920ba13a685472ceb405ef78
Patch23:        %{name}-%{version}-paint-clipping-region.patch
# Changes ~wxPGChoicesData from private to protected
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/dcc23ceba8e1dba828e8b3e4633ac77acaad7562
Patch24:        %{name}-%{version}-wxpgchoicesdata-protected-destructor.patch
# Fixes unresizable windows on HiDPI displays
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/a97553a939b76df1564ffbfe9c919d1da5a34c5a
Patch25:        %{name}-%{version}-unresizable-windows-hidpi.patch
# Fixes rendering of check and radio buttons with GTK+ >= 3.20
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/ec023e99774d90e3ac16a3a5b4e55c6cdf9fb3c1
Patch26:        %{name}-%{version}-check-radio-button-rendering.patch
# Fixes blank menubar/toolbar when using wx[MT]B_DOCKABLE with GTK+ 3.20
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/57dce78348cbe93d53c1432ee224e27fdd726982
Patch27:        %{name}-%{version}-blank-menubar-toolbar.patch
# Use winsock2
Patch1000:      %{name}-%{version}-winsock2.patch

BuildArch:     noarch
BuildRequires: mingw32-filesystem >= 68
BuildRequires: mingw64-filesystem >= 68
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw64-gcc-c++
BuildRequires: mingw32-expat
BuildRequires: mingw64-expat
BuildRequires: mingw32-libjpeg
BuildRequires: mingw64-libjpeg
BuildRequires: mingw32-libpng
BuildRequires: mingw64-libpng
BuildRequires: mingw32-libtiff
BuildRequires: mingw64-libtiff
BuildRequires: mingw32-zlib
BuildRequires: mingw64-zlib
BuildRequires: gettext

%description
wxWidgets is the C++ cross-platform GUI library, offering classes for all
common GUI controls as well as a comprehensive set of helper classes for most
common application tasks, ranging from networking to HTML display and image
manipulation.

# Mingw32
%package -n mingw32-%{mingw_pkg_name}
Summary: %{summary}

%description -n mingw32-%{mingw_pkg_name}
wxWidgets is the C++ cross-platform GUI library, offering classes for all
common GUI controls as well as a comprehensive set of helper classes for most
common application tasks, ranging from networking to HTML display and image
manipulation.

# Mingw64
%package -n mingw64-%{mingw_pkg_name}
Summary: %{summary}

%description -n mingw64-%{mingw_pkg_name}
wxWidgets is the C++ cross-platform GUI library, offering classes for all
common GUI controls as well as a comprehensive set of helper classes for most
common application tasks, ranging from networking to HTML display and image
manipulation.

# Mingw32 static
%package -n mingw32-%{mingw_pkg_name}-static
Summary:  Static libraries for mingw32-%{mingw_pkg_name} development
Group:    Development/Libraries
Requires: mingw32-%{mingw_pkg_name} = %{version}-%{release}

%description -n mingw32-%{mingw_pkg_name}-static
The mingw32-%{mingw_pkg_name}-static package contains static library for
mingw32-%{mingw_pkg_name} development.

# Mingw64 static
%package -n mingw64-%{mingw_pkg_name}-static
Summary:  Static libraries for mingw64-%{mingw_pkg_name} development
Group:    Development/Libraries
Requires: mingw64-%{mingw_pkg_name} = %{version}-%{release}

%description -n mingw64-%{mingw_pkg_name}-static
The mingw64-%{mingw_pkg_name}-static package contains static library for
mingw64-%{mingw_pkg_name} development.

%{?mingw_debug_package}

%prep
%autosetup -n wxWidgets-%{version} -p1

# patch some installed files to avoid conflicts with 2.8.*
sed -i -e 's|aclocal)|aclocal/wxwin%{majorver}.m4)|' Makefile.in
sed -i -e 's|wxstd.mo|wxstd%{majorver}.mo|' Makefile.in
sed -i -e 's|wxmsw.mo|wxmsw%{majorver}.mo|' Makefile.in

#==========================================
%build

#========= Shared Libraries ==========
export MINGW_BUILDDIR_SUFFIX=_shared
%mingw_configure --enable-shared \
  --with-msw \
  --with-sdl \
  --enable-unicode \
  --enable-optimise \
  --with-regex=builtin \
  --enable-intl \
  --enable-no_deps \
  --disable-rpath \
  --enable-ipv6 \
  --without-subdirs

#Try to reduce linker memory footprint
sed -e 's|^CXXFLAGS = |CXXFLAGS = -fpermissive -fno-keep-inline-dllexport |' < build_win64_shared/Makefile > build_win64_shared/Makefile.xx
mv build_win64_shared/Makefile.xx build_win64_shared/Makefile

%mingw_make %{?_smp_mflags}

#========= Static Libraries ==========
export MINGW_BUILDDIR_SUFFIX=_static
%mingw_configure --disable-shared \
  --with-msw \
  --with-sdl \
  --enable-unicode \
  --enable-optimise \
  --with-regex=builtin \
  --disable-rpath \
  --without-subdirs

#TODO verify this doesn't overwrite anything from the shared build
%mingw_make %{?_smp_mflags}

#========= Locale ====================
make -C locale allmo

#==========================================
%install
export MINGW_BUILDDIR_SUFFIX=_shared
%mingw_make install DESTDIR=$RPM_BUILD_ROOT
export MINGW_BUILDDIR_SUFFIX=_static
%mingw_make install DESTDIR=$RPM_BUILD_ROOT
if ls $RPM_BUILD_ROOT%{mingw32_libdir}/*.dll ; then
  mv $RPM_BUILD_ROOT%{mingw32_libdir}/*.dll $RPM_BUILD_ROOT%{mingw32_bindir}
else
  echo "No 32bit shared libraries found."
fi
if ls $RPM_BUILD_ROOT%{mingw64_libdir}/*.dll ; then
  mv $RPM_BUILD_ROOT%{mingw64_libdir}/*.dll $RPM_BUILD_ROOT%{mingw64_bindir}
else
  echo "No 32bit shared libraries found."
fi

# we need to modify the absolute wx-config link to be relative or rpm complains
# (and our package wouldn't be relocatable)
wx_config_filename=$(basename $RPM_BUILD_ROOT%{mingw32_libdir}/wx/config/%{mingw32_target}-*-[0-9]*)
ln -sf ../lib/wx/config/$wx_config_filename $RPM_BUILD_ROOT%{mingw32_bindir}/wx-config
wx_config_filename=$(basename $RPM_BUILD_ROOT%{mingw64_libdir}/wx/config/%{mingw64_target}-*-[0-9]*)
ln -sf ../lib/wx/config/$wx_config_filename $RPM_BUILD_ROOT%{mingw64_bindir}/wx-config

# remove bakefiles for now until we have a working bakefile setup for mingw32
rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/bakefile
rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/bakefile

mv $RPM_BUILD_ROOT%{mingw32_bindir}/wx-config $RPM_BUILD_ROOT%{mingw32_bindir}/wx-config-%{majorver}.%{minorver}
mv $RPM_BUILD_ROOT%{mingw64_bindir}/wx-config $RPM_BUILD_ROOT%{mingw64_bindir}/wx-config-%{majorver}.%{minorver}

# find locale files
%find_lang wxstd%{majorver}
%find_lang wxmsw%{majorver}

%files -n mingw32-%{mingw_pkg_name} -f wxstd%{majorver}.lang -f wxmsw%{majorver}.lang
%doc docs/licence.txt docs/licendoc.txt docs/lgpl.txt docs/gpl.txt
%{mingw32_bindir}/wx-config-%{majorver}.%{minorver}
%{mingw32_bindir}/wxbase%{majorver}%{minorver}u_gcc_custom.dll
%{mingw32_bindir}/wxbase%{majorver}%{minorver}u_net_gcc_custom.dll
%{mingw32_bindir}/wxbase%{majorver}%{minorver}u_xml_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_adv_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_aui_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_core_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_gl_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_html_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_media_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_propgrid_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_qa_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_ribbon_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_richtext_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_stc_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_webview_gcc_custom.dll
%{mingw32_bindir}/wxmsw%{majorver}%{minorver}u_xrc_gcc_custom.dll
%{mingw32_includedir}/wx-%{majorver}.%{minorver}
%{mingw32_libdir}/libwx_baseu-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_baseu_net-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_baseu_xml-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_adv-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_aui-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_core-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_gl-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_html-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_media-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_propgrid-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_qa-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_ribbon-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_richtext-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_stc-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_webview-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%{mingw32_libdir}/libwx_mswu_xrc-%{majorver}.%{minorver}-%{mingw32_target}.dll.a
%dir %{mingw32_libdir}/wx
%dir %{mingw32_libdir}/wx/config
%{mingw32_libdir}/wx/config/%{mingw32_target}-msw-unicode-%{majorver}.%{minorver}
%dir %{mingw32_libdir}/wx/include
%{mingw32_libdir}/wx/include/%{mingw32_target}-msw-unicode-%{majorver}.%{minorver}
%{mingw32_datadir}/aclocal/wxwin%{majorver}.m4
#{mingw32_datadir}/bakefile
#{mingw32_datadir}/bakefile/presets
#{mingw32_datadir}/bakefile/presets/wx.bkl
#{mingw32_datadir}/bakefile/presets/wx_unix.bkl
#{mingw32_datadir}/bakefile/presets/wx_win32.bkl

%files -n mingw32-%{mingw_pkg_name}-static
%{mingw32_libdir}/libwx_baseu-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_baseu_net-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_baseu_xml-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_adv-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_aui-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_core-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_gl-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_html-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_media-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_propgrid-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_qa-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_ribbon-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_richtext-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_stc-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_webview-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwx_mswu_xrc-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwxregexu-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/libwxscintilla-%{majorver}.%{minorver}-%{mingw32_target}.a
%{mingw32_libdir}/wx/config/%{mingw32_target}-msw-unicode-static-%{majorver}.%{minorver}
%{mingw32_libdir}/wx/include/%{mingw32_target}-msw-unicode-static-%{majorver}.%{minorver}

%files -n mingw64-%{mingw_pkg_name} -f wxstd%{majorver}.lang -f wxmsw%{majorver}.lang
%doc docs/licence.txt docs/licendoc.txt docs/lgpl.txt docs/gpl.txt
%{mingw64_bindir}/wx-config-%{majorver}.%{minorver}
%{mingw64_bindir}/wxbase%{majorver}%{minorver}u_gcc_custom.dll
%{mingw64_bindir}/wxbase%{majorver}%{minorver}u_net_gcc_custom.dll
%{mingw64_bindir}/wxbase%{majorver}%{minorver}u_xml_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_adv_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_aui_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_core_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_gl_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_html_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_media_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_propgrid_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_qa_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_ribbon_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_richtext_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_stc_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_webview_gcc_custom.dll
%{mingw64_bindir}/wxmsw%{majorver}%{minorver}u_xrc_gcc_custom.dll
%{mingw64_includedir}/wx-%{majorver}.%{minorver}
%{mingw64_libdir}/libwx_baseu-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_baseu_net-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_baseu_xml-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_adv-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_aui-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_core-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_gl-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_html-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_media-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_propgrid-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_qa-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_ribbon-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_richtext-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_stc-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_webview-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%{mingw64_libdir}/libwx_mswu_xrc-%{majorver}.%{minorver}-%{mingw64_target}.dll.a
%dir %{mingw64_libdir}/wx
%dir %{mingw64_libdir}/wx/config
%{mingw64_libdir}/wx/config/%{mingw64_target}-msw-unicode-%{majorver}.%{minorver}
%dir %{mingw64_libdir}/wx/include
%{mingw64_libdir}/wx/include/%{mingw64_target}-msw-unicode-%{majorver}.%{minorver}
%{mingw64_datadir}/aclocal/wxwin%{majorver}.m4
#{mingw64_datadir}/bakefile
#{mingw64_datadir}/bakefile/presets
#{mingw64_datadir}/bakefile/presets/wx.bkl
#{mingw64_datadir}/bakefile/presets/wx_unix.bkl
#{mingw64_datadir}/bakefile/presets/wx_win32.bkl

%files -n mingw64-%{mingw_pkg_name}-static
%{mingw64_libdir}/libwx_baseu-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_baseu_net-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_baseu_xml-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_adv-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_aui-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_core-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_gl-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_html-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_media-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_propgrid-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_qa-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_ribbon-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_richtext-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_stc-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_webview-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwx_mswu_xrc-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwxregexu-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/libwxscintilla-%{majorver}.%{minorver}-%{mingw64_target}.a
%{mingw64_libdir}/wx/config/%{mingw64_target}-msw-unicode-static-%{majorver}.%{minorver}
%{mingw64_libdir}/wx/include/%{mingw64_target}-msw-unicode-static-%{majorver}.%{minorver}


%changelog
* Mon Jan 30 2017 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.1.0-1
- converted to mingw-wxWidgets3
- fix download URL
- make package coexist with wxWidgets (2.8)

* Mon Jan 02 2017 Jan Niklas Hasse <jhasse@bixense.com> - 3.1.0-1
- update to 3.1.0

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.12-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Nov 12 2015 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.8.12-19
- rebuild due to __GXX_ABI_VERSION change from 1008 to 1009

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.12-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Thu Feb 19 2015 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.8.12-17
- make wxString::ToULongLong work

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.12-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.12-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sat Jul 13 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.8.12-14
- Rebuild against libpng 1.6

* Sun Jan 27 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.8.12-13
- Rebuild against mingw-gcc 4.8 (win64 uses SEH exceptions now)

* Sat Aug 25 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.8.12-12
- Rebuild against latest libtiff

* Mon Aug 13 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.8.12-11
- enable 64bit build

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.12-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Feb 28 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.8.12-9
- Rebuild against the mingw-w64 toolchain

* Tue Jan 31 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.8.12-8
- Rebuild for libpng 1.5
- Dropped the png patch
- Dropped the dependency extraction overrides as that's done automatically as of RPM 4.9

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.12-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Jun 22 2011 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.8.12-6
- reinstate italian mo file

* Sun Jun 19 2011 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.8.12-5
- build mo files (reported by Fritz Elfert)

* Fri Jun 03 2011 Kalev Lember <kalev@smartlink.ee> - 2.8.12-4
- Rebuilt with mingw32-libjpeg-turbo, dropped jpeg_boolean patch (#604702)

* Mon May 23 2011 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.8.12-3
- transition to new package naming scheme

* Thu May  5 2011 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.8.12-2
- include license file

* Wed May  4 2011 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.8.12-1
- update to 2.8.12
- remove buildroot, defattr, clean

* Tue Apr 19 2011 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.8.11-1
- update to 2.8.11

* Tue Sep 8 2009 Michael Ansel <michael.ansel@gmail.com> - 2.8.10-1
- update to 2.8.10

* Tue Sep 8 2009 Michael Ansel <michael.ansel@gmail.com> - 2.8.9-3
- Adjust to Fedora packaging guidelines

* Wed Aug 26 2009 Michael Ansel <michael.ansel@gmail.com> - 2.8.9-2
- update for Fedora 11 (mingw -> mingw32)
- use mingw32 macros
- add static subpackage

* Thu Dec 18 2008 Keiichi Takahashi <bitwalk@users.soureforge.net> - 2.8.9-1
- update to 2.8.9

* Tue Aug 12 2008 Keiichi Takahashi <bitwalk@users.soureforge.net> - 2.8.8-1
- update to 2.8.8

* Sat Mar 15 2008 Keiichi Takahashi <bitwalk@users.soureforge.net> - 2.8.7-2
- rebuilt with current libraries.
- add BuildPrereq and Requires more explicitly.

* Thu Feb 28 2008 Keiichi Takahashi <bitwalk@users.soureforge.net> - 2.8.7-1
- initial release