Compare commits

..

4 commits

Author SHA1 Message Date
Scott Talbert
489bc8557a Fix merged specfile changelog ordering 2017-05-07 21:43:12 -04:00
Scott Talbert
884d0cd59e Merge branch 'master' into f25 2017-05-07 21:39:24 -04:00
Scott Talbert
87a683e165 Fix blank menubar/toolbar when using wx[MT]B_DOCKABLE (#1410729) 2017-01-07 09:14:32 -05:00
Scott Talbert
a4ade77653 Fix unresizable windows on HiDPI displays (#1402630)
Fix rendering of check and radio buttons on GTK+ 3.20+ (#1405841)
2016-12-28 12:12:03 -05:00
10 changed files with 3458 additions and 1 deletions

10
.gitignore vendored Normal file
View file

@ -0,0 +1,10 @@
/wxWidgets-3.0.0-docs-html.tar.bz2
/wxWidgets-3.0.0.tar.bz2
/wxWidgets-3.0.1-docs-html.tar.bz2
/wxWidgets-3.0.1.tar.bz2
/wxWidgets-3.0.2-docs-html.tar.bz2
/wxWidgets-3.0.2.tar.bz2
/wxWidgets-9518d52.tar.gz
/wxWidgets-f90b768.tar.gz
/wxWidgets-e4293e9.tar.gz
/wxWidgets-3.0.3.tar.bz2

View file

@ -1 +0,0 @@
Replaced by wxGTK (wxWidgets 3.2)

1
sources Normal file
View file

@ -0,0 +1 @@
SHA512 (wxWidgets-3.0.3.tar.bz2) = dfe53682d7cda1d460f336a890603c4e823078be4b05e7cf43ab36cb49247f702808aa939d9311705bdf5f96eaa076e7a8f77f4415bc07c5bfdc19e5deff1dd1

45
wx-config Normal file
View file

@ -0,0 +1,45 @@
#! /bin/sh
#
# Multilib-aware wrapper for the wx-config script
#
# Usage: wx-config [--arch <arch>] <regular wx-config options>
#
version=3.0
if [ $# -ge 2 ]; then
if [ $1 = "--arch" ]; then
arch=$2
shift 2
fi
fi
if [ -z $arch ]; then
arch=`uname -m`
fi
case $arch in
i?86|ppc|s390|sparc|arm*|ia64|mips|mipsel)
libdir=/usr/lib
;;
x86_64|ppc64|s390x|sparc64|aarch64|ppc64le|mips64*)
libdir=/usr/lib64
;;
*)
echo "Unsupported architecture '$arch'"
exit 8
;;
esac
wxconfig=$libdir/wx/config/gtk3-unicode-$version
# special case when using 32-bit userspace and 64-bit kernel
if [ ! -f $wxconfig -a \( $arch = ppc64 -o $arch = sparc64 \) ]; then
wxconfig=/usr/lib/wx/config/gtk3-unicode-$version
fi
if [ -x $wxconfig ]; then
exec $wxconfig $@
else
echo "wxWidgets3-devel isn't installed for architecture '$arch'"
exit 9
fi

View file

@ -0,0 +1,53 @@
From 57dce78348cbe93d53c1432ee224e27fdd726982 Mon Sep 17 00:00:00 2001
From: Paul Cornett <paulcor@users.noreply.github.com>
Date: Wed, 25 May 2016 09:39:50 -0700
Subject: [PATCH] Avoid blank menubar/toolbar when using wx[MT]B_DOCKABLE with
GTK+ 3.20
A GTK+ bug involving GtkHandleBox somehow prevents drawing of its child
since 3.19.7. Avoid this by disabling the docking functionality, which
is preferable to having the bar be blank.
See #17539
(cherry picked from commit 7e41ac405f4105a7703e37bffd8ab951159f5af0)
---
src/gtk/menu.cpp | 7 ++++++-
src/gtk/toolbar.cpp | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp
index 3c5426d..5aa3caf 100644
--- a/src/gtk/menu.cpp
+++ b/src/gtk/menu.cpp
@@ -141,7 +141,12 @@ void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long st
m_menubar = gtk_menu_bar_new();
- if (style & wxMB_DOCKABLE)
+ if ((style & wxMB_DOCKABLE)
+#ifdef __WXGTK3__
+ // using GtkHandleBox prevents menubar from drawing with GTK+ >= 3.19.7
+ && gtk_check_version(3,19,7)
+#endif
+ )
{
m_widget = gtk_handle_box_new();
gtk_container_add(GTK_CONTAINER(m_widget), m_menubar);
diff --git a/src/gtk/toolbar.cpp b/src/gtk/toolbar.cpp
index 9416f83..addf63a 100644
--- a/src/gtk/toolbar.cpp
+++ b/src/gtk/toolbar.cpp
@@ -388,7 +388,12 @@ bool wxToolBar::Create( wxWindow *parent,
#endif
GtkSetStyle();
- if (style & wxTB_DOCKABLE)
+ if ((style & wxTB_DOCKABLE)
+#ifdef __WXGTK3__
+ // using GtkHandleBox prevents toolbar from drawing with GTK+ >= 3.19.7
+ && gtk_check_version(3,19,7)
+#endif
+ )
{
m_widget = gtk_handle_box_new();

View file

@ -0,0 +1,256 @@
From ec023e99774d90e3ac16a3a5b4e55c6cdf9fb3c1 Mon Sep 17 00:00:00 2001
From: Paul Cornett <paulcor@users.noreply.github.com>
Date: Sat, 10 Dec 2016 21:49:06 -0800
Subject: [PATCH] Fix rendering of check and radio buttons with GTK+ >= 3.20
(cherry picked from commit e627970ba6126113fdf09db69c50582b369d0d8a)
---
src/gtk/renderer.cpp | 184 ++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 153 insertions(+), 31 deletions(-)
diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp
index 965d5fe..c89b0d3 100644
--- a/src/gtk/renderer.cpp
+++ b/src/gtk/renderer.cpp
@@ -503,6 +503,49 @@ wxRendererGTK::DrawComboBoxDropButton(wxWindow *win,
wxSize
wxRendererGTK::GetCheckBoxSize(wxWindow *WXUNUSED(win))
{
+#ifdef __WXGTK3__
+ int min_width, min_height;
+ GtkWidgetPath* path = gtk_widget_path_new();
+ GtkStyleContext* sc = gtk_style_context_new();
+ GtkStyleContext* sc1 = NULL;
+ gtk_widget_path_append_type(path, GTK_TYPE_CHECK_BUTTON);
+#if GTK_CHECK_VERSION(3,20,0)
+ if (gtk_check_version(3,20,0) == NULL)
+ {
+ gtk_widget_path_iter_set_object_name(path, -1, "checkbutton");
+ sc1 = gtk_style_context_new();
+ gtk_style_context_set_path(sc1, path);
+ gtk_widget_path_append_type(path, G_TYPE_NONE);
+ gtk_widget_path_iter_set_object_name(path, -1, "check");
+ gtk_style_context_set_path(sc, path);
+ gtk_style_context_set_parent(sc, sc1);
+ gtk_style_context_get(sc, GTK_STATE_FLAG_NORMAL,
+ "min-width", &min_width, "min-height", &min_height, NULL);
+ GtkBorder margin;
+ gtk_style_context_get_margin(sc, GTK_STATE_FLAG_NORMAL, &margin);
+ min_width += margin.left + margin.right;
+ min_height += margin.top + margin.bottom;
+ }
+ else
+#endif
+ {
+ gtk_style_context_set_path(sc, path);
+ GValue value = G_VALUE_INIT;
+ g_value_init(&value, G_TYPE_INT);
+ gtk_style_context_get_style_property(sc, "indicator-size", &value);
+ min_width = g_value_get_int(&value);
+ gtk_style_context_get_style_property(sc, "indicator-spacing", &value);
+ min_width += 2 * g_value_get_int(&value);
+ min_height = min_width;
+ g_value_unset(&value);
+ }
+ gtk_widget_path_unref(path);
+ g_object_unref(sc);
+ if (sc1)
+ g_object_unref(sc1);
+
+ return wxSize(min_width, min_height);
+#else // !__WXGTK3__
gint indicator_size, indicator_spacing;
gtk_widget_style_get(wxGTKPrivate::GetCheckButtonWidget(),
"indicator_size", &indicator_size,
@@ -511,6 +554,7 @@ wxRendererGTK::GetCheckBoxSize(wxWindow *WXUNUSED(win))
int size = indicator_size + indicator_spacing * 2;
return wxSize(size, size);
+#endif // !__WXGTK3__
}
void
@@ -519,6 +563,7 @@ wxRendererGTK::DrawCheckBox(wxWindow* win,
const wxRect& rect,
int flags )
{
+#ifndef __WXGTK3__
GtkWidget *button = wxGTKPrivate::GetCheckButtonWidget();
gint indicator_size, indicator_spacing;
@@ -527,7 +572,6 @@ wxRendererGTK::DrawCheckBox(wxWindow* win,
"indicator_spacing", &indicator_spacing,
NULL);
-#ifndef __WXGTK3__
GtkStateType state;
if ( flags & wxCONTROL_PRESSED )
@@ -551,31 +595,68 @@ wxRendererGTK::DrawCheckBox(wxWindow* win,
#ifdef __WXGTK3__
cairo_t* cr = wxGetGTKDrawable(win, dc);
- if (cr)
+ if (cr == NULL)
+ return;
+
+ int state = GTK_STATE_FLAG_NORMAL;
+ if (flags & wxCONTROL_CHECKED)
{
- int stateFlags = GTK_STATE_FLAG_NORMAL;
- if (flags & wxCONTROL_CHECKED)
- {
- stateFlags = GTK_STATE_FLAG_ACTIVE;
- if (gtk_check_version(3,14,0) == NULL)
- stateFlags = GTK_STATE_FLAG_CHECKED;
- }
- if (flags & wxCONTROL_DISABLED)
- stateFlags |= GTK_STATE_FLAG_INSENSITIVE;
- if (flags & wxCONTROL_UNDETERMINED)
- stateFlags |= GTK_STATE_FLAG_INCONSISTENT;
- if (flags & wxCONTROL_CURRENT)
- stateFlags |= GTK_STATE_FLAG_PRELIGHT;
- GtkStyleContext* sc = gtk_widget_get_style_context(button);
- gtk_style_context_save(sc);
- gtk_style_context_set_state(sc, GtkStateFlags(stateFlags));
- gtk_style_context_add_class(sc, GTK_STYLE_CLASS_CHECK);
- gtk_render_check(sc, cr,
- rect.x + (rect.width - indicator_size) / 2,
- rect.y + (rect.height - indicator_size) / 2,
- indicator_size, indicator_size);
- gtk_style_context_restore(sc);
+ state = GTK_STATE_FLAG_ACTIVE;
+ if (gtk_check_version(3,14,0) == NULL)
+ state = GTK_STATE_FLAG_CHECKED;
+ }
+ if (flags & wxCONTROL_DISABLED)
+ state |= GTK_STATE_FLAG_INSENSITIVE;
+ if (flags & wxCONTROL_UNDETERMINED)
+ state |= GTK_STATE_FLAG_INCONSISTENT;
+ if (flags & wxCONTROL_CURRENT)
+ state |= GTK_STATE_FLAG_PRELIGHT;
+
+ int min_width, min_height;
+ GtkWidgetPath* path = gtk_widget_path_new();
+ GtkStyleContext* sc = gtk_style_context_new();
+ GtkStyleContext* sc1 = NULL;
+ gtk_widget_path_append_type(path, GTK_TYPE_CHECK_BUTTON);
+#if GTK_CHECK_VERSION(3,20,0)
+ if (gtk_check_version(3,20,0) == NULL)
+ {
+ gtk_widget_path_iter_set_object_name(path, -1, "checkbutton");
+ sc1 = gtk_style_context_new();
+ gtk_style_context_set_path(sc1, path);
+ gtk_widget_path_append_type(path, G_TYPE_NONE);
+ gtk_widget_path_iter_set_object_name(path, -1, "check");
+ gtk_style_context_set_path(sc, path);
+ gtk_style_context_set_parent(sc, sc1);
+ gtk_style_context_get(sc, GTK_STATE_FLAG_NORMAL,
+ "min-width", &min_width, "min-height", &min_height, NULL);
+ }
+ else
+#endif
+ {
+ gtk_style_context_set_path(sc, path);
+ GValue value = G_VALUE_INIT;
+ g_value_init(&value, G_TYPE_INT);
+ gtk_style_context_get_style_property(sc, "indicator-size", &value);
+ min_width = g_value_get_int(&value);
+ min_height = min_width;
+ g_value_unset(&value);
}
+
+ // need save/restore for GTK+ 3.6 & 3.8
+ gtk_style_context_save(sc);
+ gtk_style_context_set_state(sc, GtkStateFlags(state));
+ const int x = rect.x + (rect.width - min_width) / 2;
+ const int y = rect.y + (rect.height - min_height) / 2;
+ gtk_render_background(sc, cr, x, y, min_width, min_height);
+ gtk_render_frame(sc, cr, x, y, min_width, min_height);
+ gtk_style_context_add_class(sc, "check");
+ gtk_render_check(sc, cr, x, y, min_width, min_height);
+ gtk_style_context_restore(sc);
+
+ gtk_widget_path_unref(path);
+ g_object_unref(sc);
+ if (sc1)
+ g_object_unref(sc1);
#else
GdkWindow* gdk_window = wxGetGTKDrawable(win, dc);
if (gdk_window == NULL)
@@ -869,8 +950,6 @@ void wxRendererGTK::DrawRadioBitmap(wxWindow* win, wxDC& dc, const wxRect& rect,
if (drawable == NULL)
return;
- GtkWidget* button = wxGTKPrivate::GetRadioButtonWidget();
-
#ifdef __WXGTK3__
int state = GTK_STATE_FLAG_NORMAL;
if (flags & wxCONTROL_CHECKED)
@@ -879,18 +958,61 @@ void wxRendererGTK::DrawRadioBitmap(wxWindow* win, wxDC& dc, const wxRect& rect,
if (gtk_check_version(3,14,0) == NULL)
state = GTK_STATE_FLAG_CHECKED;
}
- else if (flags & wxCONTROL_UNDETERMINED)
- state = GTK_STATE_FLAG_INCONSISTENT;
if (flags & wxCONTROL_DISABLED)
state |= GTK_STATE_FLAG_INSENSITIVE;
+ if (flags & wxCONTROL_UNDETERMINED)
+ state |= GTK_STATE_FLAG_INCONSISTENT;
+ if (flags & wxCONTROL_CURRENT)
+ state |= GTK_STATE_FLAG_PRELIGHT;
+
+ int min_width, min_height;
+ GtkWidgetPath* path = gtk_widget_path_new();
+ GtkStyleContext* sc = gtk_style_context_new();
+ GtkStyleContext* sc1 = NULL;
+ gtk_widget_path_append_type(path, GTK_TYPE_RADIO_BUTTON);
+#if GTK_CHECK_VERSION(3,20,0)
+ if (gtk_check_version(3,20,0) == NULL)
+ {
+ gtk_widget_path_iter_set_object_name(path, -1, "radiobutton");
+ sc1 = gtk_style_context_new();
+ gtk_style_context_set_path(sc1, path);
+ gtk_widget_path_append_type(path, G_TYPE_NONE);
+ gtk_widget_path_iter_set_object_name(path, -1, "radio");
+ gtk_style_context_set_path(sc, path);
+ gtk_style_context_set_parent(sc, sc1);
+ gtk_style_context_get(sc, GTK_STATE_FLAG_NORMAL,
+ "min-width", &min_width, "min-height", &min_height, NULL);
+ }
+ else
+#endif
+ {
+ gtk_style_context_set_path(sc, path);
+ GValue value = G_VALUE_INIT;
+ g_value_init(&value, G_TYPE_INT);
+ gtk_style_context_get_style_property(sc, "indicator-size", &value);
+ min_width = g_value_get_int(&value);
+ min_height = min_width;
+ g_value_unset(&value);
+ }
- GtkStyleContext* sc = gtk_widget_get_style_context(button);
+ // need save/restore for GTK+ 3.6 & 3.8
gtk_style_context_save(sc);
- gtk_style_context_add_class(sc, GTK_STYLE_CLASS_RADIO);
gtk_style_context_set_state(sc, GtkStateFlags(state));
- gtk_render_option(sc, drawable, rect.x, rect.y, rect.width, rect.height);
+ const int x = rect.x + (rect.width - min_width) / 2;
+ const int y = rect.y + (rect.height - min_height) / 2;
+ gtk_render_background(sc, drawable, x, y, min_width, min_height);
+ gtk_render_frame(sc, drawable, x, y, min_width, min_height);
+ gtk_style_context_add_class(sc, "radio");
+ gtk_render_option(sc, drawable, x, y, min_width, min_height);
gtk_style_context_restore(sc);
+
+ gtk_widget_path_unref(path);
+ g_object_unref(sc);
+ if (sc1)
+ g_object_unref(sc1);
#else
+ GtkWidget* button = wxGTKPrivate::GetRadioButtonWidget();
+
GtkShadowType shadow_type = GTK_SHADOW_OUT;
if ( flags & wxCONTROL_CHECKED )
shadow_type = GTK_SHADOW_IN;

View file

@ -0,0 +1,29 @@
From a97553a939b76df1564ffbfe9c919d1da5a34c5a Mon Sep 17 00:00:00 2001
From: Paul Cornett <paulcor@users.noreply.github.com>
Date: Mon, 21 Mar 2016 09:46:46 -0700
Subject: [PATCH] Avoid unresizable windows on HiDPI displays when using
SetSizeHints()
see #17456
(cherry picked from commit 4793e5b0a4e189e492287305859b278fed780080)
---
src/gtk/toplevel.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp
index 464fb3f..69fca2a 100644
--- a/src/gtk/toplevel.cpp
+++ b/src/gtk/toplevel.cpp
@@ -1273,8 +1273,9 @@ void wxTopLevelWindowGTK::DoSetSizeHints( int minW, int minH,
int hints_mask = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE;
hints.min_width = 1;
hints.min_height = 1;
- hints.max_width = INT_MAX;
- hints.max_height = INT_MAX;
+ // using INT_MAX for size will lead to integer overflow with HiDPI scaling
+ hints.max_width = INT_MAX / 16;
+ hints.max_height = INT_MAX / 16;
int decorSize_x;
int decorSize_y;
#ifdef HAS_CLIENT_DECOR

View file

@ -0,0 +1,14 @@
--- wxWidgets-3.0.2/src/common/appbase.cpp.abicheck 2015-05-28 12:36:40.697163073 +0900
+++ wxWidgets-3.0.2/src/common/appbase.cpp 2015-05-28 12:38:30.597154298 +0900
@@ -762,10 +762,7 @@
msg.Printf(wxT("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."),
lib.c_str(), progName.c_str(), prog.c_str());
- wxLogFatalError(msg.c_str());
-
- // normally wxLogFatalError doesn't return
- return false;
+ wxLogWarning(msg.c_str());
}
return true;

2495
wxGTK3-3.0.3-webkit2.patch Normal file

File diff suppressed because it is too large Load diff

555
wxGTK3.spec Normal file
View file

@ -0,0 +1,555 @@
%global srcname wxWidgets
%global wxgtkname wxGTK3
%global wxbasename wxBase3
#RHEL 6 does not have gtk3
#RHEL prior to 6 is unsupported by this package
%if 0%{?el6}
%global gtkver 2
%else
%global gtkver 3
%endif
#For git snapshots, set to 0 to use release instead:
%global usesnapshot 0
%if 0%{?usesnapshot}
%global commit0 e4293e9e39d2d6e7757ed5907ce66d2847d8e16a
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
%global snapshottag .git%{shortcommit0}
%endif
%global builddocs 1
Name: %{wxgtkname}
Version: 3.0.3
Release: 1%{?snapshottag}%{?dist}
Summary: GTK port of the wxWidgets GUI library
License: wxWidgets
Group: System Environment/Libraries
URL: http://www.wxwidgets.org/
%if 0%{?usesnapshot}
Source0: https://github.com/%{srcname}/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz
%else
Source0: https://github.com/%{srcname}/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}.tar.bz2
%endif
%if ! 0%{?builddocs}
Source1: https://github.com/%{srcname}/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}-docs-html.tar.bz2
%endif
Source10: wx-config
# https://bugzilla.redhat.com/show_bug.cgi?id=1225148
# remove abort when ABI check fails
# Backport from wxGTK
Patch0: %{name}-%{version}-abicheck.patch
# Patch to port to webkit2gtk
%if 0%{?fedora} > 25
Patch1: %{name}-%{version}-webkit2.patch
%endif
BuildRequires: gtk%{gtkver}-devel
#Note webkitgtk (GTK2) does not appear to be supported
%if %{gtkver} == 3
%if 0%{?fedora} < 26
BuildRequires: webkitgtk3-devel
%else
BuildRequires: webkitgtk4-devel
%endif
%endif
BuildRequires: zlib-devel
BuildRequires: libpng-devel
BuildRequires: libjpeg-devel
BuildRequires: libtiff-devel
BuildRequires: expat-devel
%if 0%{?fedora} < 26
BuildRequires: SDL-devel
%else
BuildRequires: SDL2-devel
%endif
BuildRequires: libGLU-devel
BuildRequires: libSM-devel
%if 0%{?fedora} < 26
BuildRequires: gstreamer-plugins-base-devel
%else
BuildRequires: gstreamer1-plugins-base-devel
%endif
BuildRequires: GConf2-devel
BuildRequires: gettext
BuildRequires: cppunit-devel
BuildRequires: libmspack-devel
BuildRequires: doxygen
Provides: %{srcname} = %{version}-%{release}
Provides: bundled(scintilla) = 3.2.1
Requires: %{wxbasename}%{?_isa} = %{version}-%{release}
%description
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
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.
%package devel
Group: Development/Libraries
Summary: Development files for the wxGTK3 library
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-gl = %{version}-%{release}
Requires: %{name}-media = %{version}-%{release}
%if 0%{?fedora} > 25
Requires: %{name}-webview = %{version}-%{release}
%endif
Requires: %{wxbasename} = %{version}-%{release}
Requires: gtk%{gtkver}-devel
Requires: libGLU-devel
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
Provides: %{srcname}-devel = %{version}-%{release}
%description devel
This package include files needed to link with the wxGTK3 library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
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.
%package gl
Summary: OpenGL add-on for the wxWidgets library
Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description gl
OpenGL (a 3D graphics API) add-on for the wxWidgets library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
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.
%package media
Summary: Multimedia add-on for the wxWidgets library
Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description media
Multimedia add-on for the wxWidgets library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
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.
%if 0%{?fedora} > 25
%package webview
Summary: WebView add-on for the wxWidgets library
Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description webview
WebView add-on for the wxWidgets library.
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
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.
%endif
%package -n %{wxbasename}
Summary: Non-GUI support classes from the wxWidgets library
Group: System Environment/Libraries
%description -n %{wxbasename}
Every wxWidgets application must link against this library. It contains
mandatory classes that any wxWidgets code depends on (like wxString) and
portability classes that abstract differences between platforms. wxBase can
be used to develop console mode applications -- it does not require any GUI
libraries or the X Window System.
%package docs
Group: Development/Libraries
Summary: Documentation for the wxGTK3 library
Requires: %{name} = %{version}-%{release}
Provides: %{srcname}-docs = %{version}-%{release}
BuildArch: noarch
%description docs
This package provides documentation for the %{srcname} library.
%package xmldocs
Group: Development/Libraries
Summary: XML Documentation for the wxGTK3 library
Requires: %{name} = %{version}-%{release}
Provides: %{srcname}-xmldocs = %{version}-%{release}
BuildArch: noarch
%description xmldocs
This package provides XML documentation for the %{srcname} library.
%prep
%if 0%{?usesnapshot}
%autosetup -n %{srcname}-%{commit0} %{!?builddocs:-a 1} -p1
%else
%autosetup -n %{srcname}-%{version} %{!?builddocs:-a 1} -p1
%endif
# patch some installed files to avoid conflicts with 2.8.*
sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in
sed -i -e 's|wxstd.mo|wxstd3.mo|' Makefile.in
sed -i -e 's|wxmsw.mo|wxmsw3.mo|' Makefile.in
# fix plugin dir for 64-bit
sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure
sed -i -e 's|/lib|/%{_lib}|' src/unix/stdpaths.cpp
# Trick configure into using pkg-config for cppunit-config
sed -i -e 's|$CPPUNIT_CONFIG --version|$CPPUNIT_CONFIG --modversion|' configure
%build
# likely still dereferences type-punned pointers
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
# fix unused-direct-shlib-dependency error:
export LDFLAGS="-Wl,--as-needed"
# Trick configure into using pkg-config for cppunit-config
export CPPUNIT_CONFIG="/usr/bin/pkg-config cppunit"
%if 0%{?usesnapshot}
#For snapshots, mo files need to be generated
pushd locale
make allmo
popd
%endif
%configure \
--with-gtk=%{gtkver} \
--with-opengl \
--with-sdl \
--with-gnomeprint \
--with-libmspack \
--enable-intl \
--enable-no_deps \
--disable-rpath \
--enable-ipv6
%make_build
#Docs
%if 0%{?builddocs}
WX_SKIP_DOXYGEN_VERSION_CHECK=1 docs/doxygen/regen.sh html
mv docs/doxygen/out/html .
%else
mv %{srcname}-%{version} html
%endif
pushd docs/doxygen
WX_SKIP_DOXYGEN_VERSION_CHECK=1 ./regen.sh xml
popd
%install
%makeinstall
# install our multilib-aware wrapper
##Remove installed
rm %{buildroot}%{_bindir}/wx-config
##Install new and symlink
install -p -D -m 755 %{SOURCE10} %{buildroot}%{_libexecdir}/%{name}/wx-config
ln -s ../..%{_libexecdir}/%{name}/wx-config %{buildroot}%{_bindir}/wx-config-3.0
touch %{buildroot}%{_bindir}/wx-config
##If gtk2
%if %{gtkver} == 2
sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_libexecdir}/%{name}/wx-config
%endif
#Alternatives setup with wxrc
mv %{buildroot}%{_bindir}/wxrc* %{buildroot}%{_libexecdir}/%{name}
ln -s ../..%{_libexecdir}/%{name}/wxrc-3.0 %{buildroot}%{_bindir}/wxrc-3.0
touch %{buildroot}%{_bindir}/wxrc
# move bakefiles to avoid conflicts with 2.8.*
mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3
mv %{buildroot}%{_datadir}/bakefile/presets/*.* %{buildroot}%{_datadir}/bakefile/presets/wx3
%find_lang wxstd3
%find_lang wxmsw3
cat wxmsw3.lang >> wxstd3.lang
%check
pushd tests
make %{?_smp_mflags} test
popd
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post gl -p /sbin/ldconfig
%postun gl -p /sbin/ldconfig
%post media -p /sbin/ldconfig
%postun media -p /sbin/ldconfig
%if 0%{?fedora} > 25
%post webview -p /sbin/ldconfig
%postun webview -p /sbin/ldconfig
%endif
%post -n %{wxbasename} -p /sbin/ldconfig
%postun -n %{wxbasename} -p /sbin/ldconfig
%post devel
if [ -f %{_bindir}/wx-config ] && [ ! -h %{_bindir}/wx-config ] ; then
rm %{_bindir}/wx-config
fi
%{_sbindir}/update-alternatives --install %{_bindir}/wx-config \
wx-config %{_libexecdir}/%{name}/wx-config 3
%{_sbindir}/update-alternatives --install %{_bindir}/wxrc \
wxrc %{_libexecdir}/%{name}/wxrc 3
%postun devel
if [ $1 -eq 0 ] ; then
%{_sbindir}/update-alternatives --remove wx-config %{_libexecdir}/%{name}/wx-config
%{_sbindir}/update-alternatives --remove wxrc %{_libexecdir}/%{name}/wxrc
fi
%files -f wxstd3.lang
%doc docs/changes.txt docs/gpl.txt docs/lgpl.txt docs/licence.txt
%doc docs/licendoc.txt docs/preamble.txt docs/readme.txt
%{_libdir}/libwx_gtk%{gtkver}u_adv-*.so.*
%{_libdir}/libwx_gtk%{gtkver}u_aui-*.so.*
%{_libdir}/libwx_gtk%{gtkver}u_core-*.so.*
%{_libdir}/libwx_gtk%{gtkver}u_html-*.so.*
%{_libdir}/libwx_gtk%{gtkver}u_propgrid-*.so.*
%{_libdir}/libwx_gtk%{gtkver}u_qa-*.so.*
%{_libdir}/libwx_gtk%{gtkver}u_ribbon-*.so.*
%{_libdir}/libwx_gtk%{gtkver}u_richtext-*.so.*
%{_libdir}/libwx_gtk%{gtkver}u_stc-*.so.*
%if %{gtkver} == 3
%if 0%{?fedora} < 26
%{_libdir}/libwx_gtk%{gtkver}u_webview-*.so.*
%endif
%endif
%{_libdir}/libwx_gtk%{gtkver}u_xrc-*.so.*
%files devel
%ghost %{_bindir}/wx-config
%ghost %{_bindir}/wxrc
%{_bindir}/wxrc-3.0
%{_bindir}/wx-config-3.0
%{_includedir}/wx-3.0
%{_libdir}/libwx_*.so
%{_libdir}/wx
%{_datadir}/aclocal/wxwin3.m4
%{_datadir}/bakefile/presets/wx3
#Exclude some python bitecode
%exclude %{_datadir}/bakefile/presets/wx3/*.pyc
%exclude %{_datadir}/bakefile/presets/wx3/*.pyo
%{_libexecdir}/%{name}
%if 0%{?fedora} > 25
%exclude %{_libdir}/wx/3.0
%endif
%files gl
%{_libdir}/libwx_gtk%{gtkver}u_gl-*.so.*
%files media
%{_libdir}/libwx_gtk%{gtkver}u_media-*.so.*
%if 0%{?fedora} > 25
%files webview
%{_libdir}/libwx_gtk%{gtkver}u_webview-*.so.*
%dir %{_libdir}/wx
%{_libdir}/wx/3.0
%endif
%files -n %{wxbasename}
%doc docs/changes.txt docs/gpl.txt docs/lgpl.txt docs/licence.txt
%doc docs/licendoc.txt docs/preamble.txt docs/readme.txt
%{_libdir}/libwx_baseu-*.so.*
%{_libdir}/libwx_baseu_net-*.so.*
%{_libdir}/libwx_baseu_xml-*.so.*
%files docs
%doc html
%files xmldocs
%doc docs/doxygen/out/xml/*
%changelog
* Wed May 03 2017 Scott Talbert <swt@techie.net> - 3.0.3-1
- New upstream release 3.0.3
- Update to latest WebKit2 patch (#1428997)
* Mon Apr 17 2017 Scott Talbert <swt@techie.net> - 3.0.3-0.8.gite4293e9
- Rebuild against SDL2
* Wed Mar 08 2017 Scott Talbert <swt@techie.net> - 3.0.3-0.7.gite4293e9
- Update to newer git snapshot
- Remove GStreamer patch as it has been incorporated upstream
* Sun Mar 05 2017 Scott Talbert <swt@techie.net> - 3.0.3-0.6.gitf90b768
- Add temporary patch for webkit2 port in rawhide, re-enable webview subpackage
* Thu Mar 02 2017 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.3-0.5.gitf90b768
- Disable webview subpackage in rawhide for now
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-0.4.gitf90b768
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat Jan 07 2017 Scott Talbert <swt@techie.net> - 3.0.2-32
- Fix blank menubar/toolbar when using wx[MT]B_DOCKABLE (#1410729)
* Fri Dec 30 2016 Scott Talbert <swt@techie.net> - 3.0.3-0.3.gitf90b768
- Switch to use GStreamer 1.0 (#1402628)
* Wed Dec 28 2016 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.3-0.2.gitf90b768
- Update to newer git snapshot
* Wed Dec 28 2016 Scott Talbert <swt@techie.net> - 3.0.2-31
- Fix unresizable windows on HiDPI displays (#1402630)
- Fix rendering of check and radio buttons on GTK+ 3.20+ (#1405841)
* Sat Dec 10 2016 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.3-0.1.git9518d52
- Update to git snapshot
* Mon Nov 21 2016 Scott Talbert <swt@techie.net> - 3.0.2-30
- Fix poedit regression in -29 - add paint clipping region patch (#1396747)
- Add patch to change ~wxPGChoicesData from private to protected
* Mon Nov 14 2016 Scott Talbert <swt@techie.net> - 3.0.2-29
- Fix some sizing problems with GTK3 (#1392102)
- Fix non-default window background color with GTK+ >= 3.20 (#1393847)
* Mon Oct 10 2016 Scott Talbert <swt@techie.net> - 3.0.2-28
- Fix rename issues in Filezilla with overlay scrollbars disabled (#1381765)
* Sat Oct 08 2016 Scott Talbert <swt@techie.net> - 3.0.2-27
- Add a -webview subpackage in F26+
* Tue Oct 04 2016 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-26
- Memory leak in last patch, add patch to fix it
- Change last patch to 3.0 branch for consistency
* Tue Oct 04 2016 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-25
- Add patch to fix bug 1381767
- Clean up spec file with autosetup
* Sat Sep 24 2016 Scott Talbert <swt@techie.net> - 3.0.2-24
- Add patch to fix crash in wxGCDC::DrawEllipticArc()
* Mon Sep 19 2016 Scott Talbert <swt@techie.net> - 3.0.2-23
- Fix alternatives implementation
* Mon Sep 19 2016 Scott Talbert <swt@techie.net> - 3.0.2-22
- Add patch to fix runtime link error due to previous patches
* Tue Sep 13 2016 Scott Talbert <swt@techie.net> - 3.0.2-21
- Add patch to resolve wxGetKeyState() crash on Wayland (#1266743)
- Add patch to fix wxFontEnumerator stop function
- Add patch to fix wxNativeFontInfo::InitFromFont()
* Sun Aug 28 2016 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-20
- Fix alternatives with wxGTK (#1077718)
* Mon Apr 4 2016 Tom Callaway <tcallawa@redhat.com> - 3.0.2-19
- Add patch to resolve window sizing issue with gtk 3.19+
* Sun Mar 20 2016 Scott Talbert <swt@techie.net> - 3.0.2-18
- Add patch for wxEVT_MEDIA_XXX event types (for Phoenix)
* Wed Feb 24 2016 Scott Talbert <swt@techie.net> - 3.0.2-17
- Add patch to resolve issue with wxStaticText growing, fixes RH#1282142
- Add patches to resolve issues under Wayland with window sizing, RH#1294229
* Tue Feb 23 2016 Scott Talbert <swt@techie.net> - 3.0.2-16
- Add -xmldocs subpackage containing XML documentation (needed for Phoenix)
* Tue Feb 23 2016 Scott Talbert <swt@techie.net> - 3.0.2-15
- Add GCC6 patches for STC and strings tests
- Adapt cppunit to use pkg-config (cppunit-config has been removed in F24)
- Fixes FTBFS in F24 Rawhide, RH#1308244
* Mon Feb 22 2016 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-14
- Should actually fix RH#1294712
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Dec 31 2015 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-12
- Remove python artifacts in bakefile dir, causes multilib devel conflict RH#1294712
- Fix package devel not owning created wx3 backfile preset dir
- Add support for MIPS to wx-config RH#1294895
- Wayland Patch
* Thu Nov 5 2015 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-11
- Added patch to fix checkbox and radio button issues for f21 onwards
* Sun Nov 1 2015 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-10
- Removed depreciated/retired libgnomeprintui22
* Sat Aug 22 2015 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-9
- Include spinbutton patch from upstream
* Mon Jun 22 2015 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-8
- Include some upstream patches to fix crashes and warnings
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu May 28 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.2-6
- Don't abort on ABI check, backport from wxGTK
* Mon May 04 2015 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.0.2-5
- Indicate that this package bundles scintilla 3.2.1.
* Thu Feb 26 2015 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-4
- Bump to rebuild, fix bug #1210239
* Thu Feb 26 2015 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-3
- Bump to rebuild for gcc 5.0 to fix some issues
* Tue Nov 04 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-2
- Moving things around again, hopefully fixing RH#1124402
- Adding symlinks to avoid breaking things
* Tue Nov 04 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-1
- Update to 3.0.2
* Mon Nov 03 2014 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 3.0.1-5
- Add aarch64 and ppc64le to list of 64-bit architectures
* Tue Sep 30 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.1-4
- Add conflict with wxgtk-devel again, temporary fix until it can be resolved
* Tue Sep 30 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.1-3
- Avoid gtk warnings, fixes RH#1147995
- Moving wxrc and wx-config to libexec instead of renaming
- Misc changes and spec error fixes, fixes RH#1124402
* Sat Jul 5 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.1-1
- Bump to 3.0.1 RH#1076617
* Tue Mar 18 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.0-6
- Removed disable-catch_segvs, see RH#1076617
* Mon Mar 17 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.0-5
- Renable combat28 - without it causes bugs RH#1076617 and a few others
* Wed Feb 19 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.0-4
- Fixed GTK3 bug with wx-config
- Fixed a unused-direct-shlib-dependency error
* Mon Feb 17 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.0-3
- Added patch to avoid build fail on gtk 3.10+
- Reverted patching to make devel package compatible with wxGTK-devel
- Added combatibility for RHEL 6+
- Changed all mention of GTK3 and GTK2 to GTK for consistency
* Mon Feb 10 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.0-2
- Changed to build against gtk3
- Add webkit to build requires
- Removed patching to make devel package compatible with wxGTK-devel
- Disable 2.8.* combatibility (redundant functionality)
* Sat Jan 4 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.0-1
- Initial build of wxwidgets version 3, mostly based on wxGTK spec