From 19f9cdbd9447354b9a6058897401c05bb44f35f5 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Oct 04 2017 00:55:27 +0000 Subject: Merge with compat-wxGTK3-gtk2 --- diff --git a/wx-config b/wx-config index 84e1d2d..cd27264 100644 --- a/wx-config +++ b/wx-config @@ -32,9 +32,15 @@ case $arch in esac wxconfig=$libdir/wx/config/gtk3-unicode-$version +if [ ! -f $wxconfig ]; then + wxconfig=$libdir/wx/config/gtk2-unicode-$version +fi # 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 + if [ ! -f $wxconfig ]; then + wxconfig=/usr/lib/wx/config/gtk2-unicode-$version + fi fi if [ -x $wxconfig ]; then diff --git a/wxGTK3.spec b/wxGTK3.spec index 2f43253..a837363 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -1,13 +1,11 @@ %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 +%global wxwidgetsgtk2 compat-wxWidgets-gtk2 +%global wxgtk2name compat-wxGTK3-gtk2 +%global wxbasegtk2name compat-wxBase3-gtk2 +%global gtk2dir bld_gtk2 +%global gtk3dir bld_gtk3 #For git snapshots, set to 0 to use release instead: %global usesnapshot 0 @@ -20,11 +18,11 @@ Name: %{wxgtkname} Version: 3.0.3 -Release: 5%{?snapshottag}%{?dist} +Release: 6%{?snapshottag}%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries -URL: http://www.wxwidgets.org/ +URL: https://www.wxwidgets.org/ %if 0%{?usesnapshot} Source0: https://github.com/%{srcname}/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz @@ -46,15 +44,13 @@ Patch1: %{name}-%{version}-webkit2.patch # https://github.com/wxWidgets/wxWidgets/commit/ce1dce113c5eda42f49ba3278bb21c61872ca37d Patch2: %{name}-%{version}-avoid-tlw-destroy-assert.patch -BuildRequires: gtk%{gtkver}-devel -#Note webkitgtk (GTK2) does not appear to be supported -%if %{gtkver} == 3 +BuildRequires: gtk2-devel +BuildRequires: gtk3-devel %if 0%{?fedora} < 26 BuildRequires: webkitgtk3-devel %else BuildRequires: webkitgtk4-devel %endif -%endif BuildRequires: zlib-devel BuildRequires: libpng-devel BuildRequires: libjpeg-devel @@ -81,6 +77,7 @@ BuildRequires: doxygen Provides: %{srcname} = %{version}-%{release} Provides: bundled(scintilla) = 3.2.1 Requires: %{wxbasename}%{?_isa} = %{version}-%{release} +Requires: %{name}-i18n = %{version}-%{release} %description wxWidgets is the GTK port of the C++ cross-platform wxWidgets @@ -89,6 +86,35 @@ comprehensive set of helper classes for most common application tasks, ranging from networking to HTML display and image manipulation. +%package -n %{wxgtk2name} +Summary: GTK port of the wxWidgets GUI library +Provides: %{wxwidgetsgtk2} = %{version}-%{release} +Provides: bundled(scintilla) = 3.2.1 +Requires: %{wxbasename}%{?_isa} = %{version}-%{release} +Requires: %{name}-i18n = %{version}-%{release} + +%description -n %{wxgtk2name} +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 -n %{wxbasename}-devel +Group: Development/Libraries +Summary: Development files for the wxBase3 library +Requires: %{wxbasename}%{?_isa} = %{version}-%{release} +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives + +%description -n %{wxbasename}-devel +This package include files needed to link with the wxBase3 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 devel Group: Development/Libraries Summary: Development files for the wxGTK3 library @@ -99,10 +125,9 @@ Requires: %{name}-media = %{version}-%{release} Requires: %{name}-webview = %{version}-%{release} %endif Requires: %{wxbasename} = %{version}-%{release} -Requires: gtk%{gtkver}-devel +Requires: %{wxbasename}-devel%{?_isa} = %{version}-%{release} +Requires: gtk3-devel Requires: libGLU-devel -Requires(post): %{_sbindir}/update-alternatives -Requires(postun): %{_sbindir}/update-alternatives Provides: %{srcname}-devel = %{version}-%{release} %description devel @@ -113,6 +138,26 @@ comprehensive set of helper classes for most common application tasks, ranging from networking to HTML display and image manipulation. +%package -n %{wxgtk2name}-devel +Group: Development/Libraries +Summary: Development files for the wxGTK3 library +Requires: %{wxgtk2name}%{?_isa} = %{version}-%{release} +Requires: %{wxgtk2name}-gl = %{version}-%{release} +Requires: %{wxgtk2name}-media = %{version}-%{release} +Requires: %{wxbasename} = %{version}-%{release} +Requires: %{wxbasename}-devel%{?_isa} = %{version}-%{release} +Requires: gtk2-devel +Requires: libGLU-devel +Provides: %{wxwidgetsgtk2}-devel = %{version}-%{release} + +%description -n %{wxgtk2name}-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 @@ -126,6 +171,32 @@ comprehensive set of helper classes for most common application tasks, ranging from networking to HTML display and image manipulation. +%package -n %{wxgtk2name}-gl +Summary: OpenGL add-on for the wxWidgets library +Group: System Environment/Libraries +Requires: %{wxgtk2name}%{?_isa} = %{version}-%{release} + +%description -n %{wxgtk2name}-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 i18n +Summary: i18n message catalogs for the wxWidgets library +Group: System Environment/Libraries +BuildArch: noarch + +%description i18n +i18n message catalogs 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 @@ -139,6 +210,19 @@ comprehensive set of helper classes for most common application tasks, ranging from networking to HTML display and image manipulation. +%package -n %{wxgtk2name}-media +Summary: Multimedia add-on for the wxWidgets library +Group: System Environment/Libraries +Requires: %{wxgtk2name}%{?_isa} = %{version}-%{release} + +%description -n %{wxgtk2name}-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 @@ -157,6 +241,8 @@ ranging from networking to HTML display and image manipulation. %package -n %{wxbasename} Summary: Non-GUI support classes from the wxWidgets library Group: System Environment/Libraries +Provides: %{wxbasegtk2name} = %{version}-%{release} +Obsoletes: %{wxbasegtk2name} < %{version}-%{release} %description -n %{wxbasename} Every wxWidgets application must link against this library. It contains @@ -171,6 +257,9 @@ Group: Development/Libraries Summary: Documentation for the wxGTK3 library Requires: %{name} = %{version}-%{release} Provides: %{srcname}-docs = %{version}-%{release} +Provides: %{wxwidgetsgtk2}-docs = %{version}-%{release} +Provides: %{wxgtk2name}-docs = %{version}-%{release} +Obsoletes: %{wxgtk2name}-docs < %{version}-%{release} BuildArch: noarch %description docs @@ -182,6 +271,8 @@ Group: Development/Libraries Summary: XML Documentation for the wxGTK3 library Requires: %{name} = %{version}-%{release} Provides: %{srcname}-xmldocs = %{version}-%{release} +Provides: %{wxgtk2name}-xmldocs = %{version}-%{release} +Obsoletes: %{wxgtk2name}-xmldocs < %{version}-%{release} BuildArch: noarch %description xmldocs @@ -224,8 +315,28 @@ make allmo popd %endif +%global _configure ../configure + +mkdir %{gtk2dir} +pushd %{gtk2dir} +%configure \ + --with-gtk=2 \ + --with-opengl \ + --with-sdl \ + --with-gnomeprint \ + --with-libmspack \ + --enable-intl \ + --enable-no_deps \ + --disable-rpath \ + --enable-ipv6 + +%make_build +popd + +mkdir %{gtk3dir} +pushd %{gtk3dir} %configure \ - --with-gtk=%{gtkver} \ + --with-gtk=3 \ --with-opengl \ --with-sdl \ --with-gnomeprint \ @@ -236,6 +347,7 @@ popd --enable-ipv6 %make_build +popd #Docs %if 0%{?builddocs} @@ -250,7 +362,13 @@ WX_SKIP_DOXYGEN_VERSION_CHECK=1 ./regen.sh xml popd %install +pushd %{gtk2dir} %makeinstall +popd + +pushd %{gtk3dir} +%makeinstall +popd # install our multilib-aware wrapper ##Remove installed @@ -259,10 +377,6 @@ rm %{buildroot}%{_bindir}/wx-config 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} @@ -278,19 +392,37 @@ mv %{buildroot}%{_datadir}/bakefile/presets/*.* %{buildroot}%{_datadir}/bakefile cat wxmsw3.lang >> wxstd3.lang %check +# TODO: eventually actually run the tests instead of just compiling them +pushd %{gtk2dir} +pushd tests +make %{?_smp_mflags} test +popd +popd + +pushd %{gtk3dir} pushd tests make %{?_smp_mflags} test popd +popd %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%post -n %{wxgtk2name} -p /sbin/ldconfig +%postun -n %{wxgtk2name} -p /sbin/ldconfig + %post gl -p /sbin/ldconfig %postun gl -p /sbin/ldconfig +%post -n %{wxgtk2name}-gl -p /sbin/ldconfig +%postun -n %{wxgtk2name}-gl -p /sbin/ldconfig + %post media -p /sbin/ldconfig %postun media -p /sbin/ldconfig +%post -n %{wxgtk2name}-media -p /sbin/ldconfig +%postun -n %{wxgtk2name}-media -p /sbin/ldconfig + %if 0%{?fedora} > 25 %post webview -p /sbin/ldconfig %postun webview -p /sbin/ldconfig @@ -299,7 +431,7 @@ popd %post -n %{wxbasename} -p /sbin/ldconfig %postun -n %{wxbasename} -p /sbin/ldconfig -%post devel +%post -n %{wxbasename}-devel if [ -f %{_bindir}/wx-config ] && [ ! -h %{_bindir}/wx-config ] ; then rm %{_bindir}/wx-config fi @@ -308,58 +440,87 @@ fi %{_sbindir}/update-alternatives --install %{_bindir}/wxrc \ wxrc %{_libexecdir}/%{name}/wxrc 3 -%postun devel +%postun -n %{wxbasename}-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 +%files %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 +%{_libdir}/libwx_gtk3u_adv-*.so.* +%{_libdir}/libwx_gtk3u_aui-*.so.* +%{_libdir}/libwx_gtk3u_core-*.so.* +%{_libdir}/libwx_gtk3u_html-*.so.* +%{_libdir}/libwx_gtk3u_propgrid-*.so.* +%{_libdir}/libwx_gtk3u_qa-*.so.* +%{_libdir}/libwx_gtk3u_ribbon-*.so.* +%{_libdir}/libwx_gtk3u_richtext-*.so.* +%{_libdir}/libwx_gtk3u_stc-*.so.* %if 0%{?fedora} < 26 -%{_libdir}/libwx_gtk%{gtkver}u_webview-*.so.* -%endif +%{_libdir}/libwx_gtk3u_webview-*.so.* %endif -%{_libdir}/libwx_gtk%{gtkver}u_xrc-*.so.* +%{_libdir}/libwx_gtk3u_xrc-*.so.* -%files devel +%files -n %{wxgtk2name} +%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_gtk2u_adv-*.so.* +%{_libdir}/libwx_gtk2u_aui-*.so.* +%{_libdir}/libwx_gtk2u_core-*.so.* +%{_libdir}/libwx_gtk2u_html-*.so.* +%{_libdir}/libwx_gtk2u_propgrid-*.so.* +%{_libdir}/libwx_gtk2u_qa-*.so.* +%{_libdir}/libwx_gtk2u_ribbon-*.so.* +%{_libdir}/libwx_gtk2u_richtext-*.so.* +%{_libdir}/libwx_gtk2u_stc-*.so.* +%{_libdir}/libwx_gtk2u_xrc-*.so.* + +%files -n %{wxbasename}-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 +%{_libdir}/libwx_baseu*.so +%dir %{_libdir}/wx +%dir %{_libdir}/wx/config +%dir %{_libdir}/wx/include %{_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 devel +%{_libdir}/libwx_gtk3u_*.so +%{_libdir}/wx/config/gtk3-unicode-3.0 +%{_libdir}/wx/include/gtk3-unicode-3.0 + +%files -n %{wxgtk2name}-devel +%{_libdir}/libwx_gtk2u_*.so +%{_libdir}/wx/config/gtk2-unicode-3.0 +%{_libdir}/wx/include/gtk2-unicode-3.0 %files gl -%{_libdir}/libwx_gtk%{gtkver}u_gl-*.so.* +%{_libdir}/libwx_gtk3u_gl-*.so.* + +%files -n %{wxgtk2name}-gl +%{_libdir}/libwx_gtk2u_gl-*.so.* + +%files i18n -f wxstd3.lang %files media -%{_libdir}/libwx_gtk%{gtkver}u_media-*.so.* +%{_libdir}/libwx_gtk3u_media-*.so.* + +%files -n %{wxgtk2name}-media +%{_libdir}/libwx_gtk2u_media-*.so.* %if 0%{?fedora} > 25 %files webview -%{_libdir}/libwx_gtk%{gtkver}u_webview-*.so.* +%{_libdir}/libwx_gtk3u_webview-*.so.* %dir %{_libdir}/wx %{_libdir}/wx/3.0 %endif @@ -378,6 +539,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Tue Sep 05 2017 Scott Talbert - 3.0.3-6 +- Merge with compat-wxGTK3-gtk2 + * Wed Aug 30 2017 Scott Talbert - 3.0.3-5 - Add upstream patch for avoiding destruction of TLWs that were never created - Fixes assert during Filezilla startup (#1484955)