Blame wxGTK.spec

Scott Talbert 0aea9e
%global srcname wxWidgets
Scott Talbert 0aea9e
%global wxbasename wxBase
Scott Talbert 0aea9e
%global gtk3dir bld_gtk3
Scott Talbert 2ebf89
%global sover 5
Scott Talbert 0aea9e
d53e67
Name:           wxGTK
Scott Talbert 2ebf89
Version:        3.1.5
Fedora Release Engineering d4f643
Release:        4%{?dist}
Scott Talbert 0aea9e
Summary:        GTK port of the wxWidgets GUI library
d53e67
License:        wxWidgets
Scott Talbert 0aea9e
URL:            https://www.wxwidgets.org/
Scott Talbert 0aea9e
Scott Talbert 0aea9e
Source0:        https://github.com/%{srcname}/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}.tar.bz2
Scott Talbert 0aea9e
Source10:       wx-config
Scott Talbert 0aea9e
# https://bugzilla.redhat.com/show_bug.cgi?id=1225148
d53e67
# remove abort when ABI check fails
Scott Talbert 0aea9e
# Backport from wxGTK
Scott Talbert 0aea9e
Patch0:         %{name}-3.0.3-abicheck.patch
Scott Talbert 0aea9e
Patch1:         disable-tests-failing-mock.patch
Scott Talbert 2ebf89
Patch2:         catch1-sigstksz.patch
Scott Talbert 2ebf89
Patch3:         gcc11_1.patch
Scott Talbert 2ebf89
Patch4:         gcc11_2.patch
Scott Talbert 2ebf89
Patch5:         gcc11_3.patch
Scott Talbert e5d733
Patch6:         https://github.com/wxWidgets/wxWidgets/commit/d68c3709e49b967272b0794b0dd30e57e46326e8.patch
d53e67
Tom Stellard 4680fc
BuildRequires: make
d53e67
BuildRequires:  gcc-c++
Scott Talbert 0aea9e
BuildRequires:  gtk3-devel
Scott Talbert 0aea9e
BuildRequires:  webkit2gtk3-devel
Scott Talbert 0aea9e
BuildRequires:  zlib-devel
Scott Talbert 0aea9e
BuildRequires:  libpng-devel
Scott Talbert 0aea9e
BuildRequires:  libjpeg-devel
Scott Talbert 0aea9e
BuildRequires:  libtiff-devel
Scott Talbert 0aea9e
BuildRequires:  expat-devel
Scott Talbert 0aea9e
BuildRequires:  SDL2-devel
Scott Talbert 0aea9e
BuildRequires:  libGLU-devel
d53e67
BuildRequires:  libSM-devel
Scott Talbert 0aea9e
BuildRequires:  gstreamer1-plugins-base-devel
d53e67
BuildRequires:  GConf2-devel
Scott Talbert 0aea9e
BuildRequires:  gettext
Scott Talbert 0aea9e
BuildRequires:  cppunit-devel
Scott Talbert 0aea9e
BuildRequires:  libmspack-devel
Scott Talbert 0aea9e
BuildRequires:  doxygen
Scott Talbert 0aea9e
BuildRequires:  graphviz
Scott Talbert b91582
BuildRequires:  libsecret-devel
Scott Talbert 2ebf89
BuildRequires:  libcurl-devel
Scott Talbert b91582
# For Tests
Peter Hutterer 7c0389
BuildRequires:  xclock
Scott Talbert b91582
BuildRequires:  xorg-x11-server-Xvfb
Scott Talbert 2ebf89
BuildRequires:  python3-httpbin
d53e67
Scott Talbert 0aea9e
Provides:       %{srcname} = %{version}-%{release}
Scott Talbert 0aea9e
Provides:       bundled(scintilla) = 3.7.2
Scott Talbert 0aea9e
Requires:       %{wxbasename}%{?_isa} = %{version}-%{release}
Scott Talbert 0aea9e
Requires:       %{name}-i18n = %{version}-%{release}
d53e67
d53e67
%description
Scott Talbert 0aea9e
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
Scott Talbert 0aea9e
GUI library, offering classes for all common GUI controls as well as a
Scott Talbert 0aea9e
comprehensive set of helper classes for most common application tasks,
Scott Talbert 0aea9e
ranging from networking to HTML display and image manipulation.
Scott Talbert 0aea9e
Scott Talbert 0aea9e
Scott Talbert 0aea9e
%package -n     %{wxbasename}-devel
Scott Talbert 0aea9e
Summary:        Development files for the wxBase3 library
Scott Talbert 0aea9e
Requires:       %{wxbasename}%{?_isa} = %{version}-%{release}
Scott Talbert 0aea9e
Requires(post): /usr/sbin/update-alternatives
Scott Talbert 0aea9e
Requires(postun): /usr/sbin/update-alternatives
Scott Talbert 0aea9e
Scott Talbert 0aea9e
%description -n %{wxbasename}-devel
Scott Talbert 0aea9e
This package include files needed to link with the wxBase3 library.
Scott Talbert 0aea9e
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
d53e67
GUI library, offering classes for all common GUI controls as well as a
d53e67
comprehensive set of helper classes for most common application tasks,
d53e67
ranging from networking to HTML display and image manipulation.
d53e67
d53e67
d53e67
%package        devel
Scott Talbert 0aea9e
Summary:        Development files for the wxGTK library
Scott Talbert 0aea9e
Requires:       %{name}%{?_isa} = %{version}-%{release}
d53e67
Requires:       %{name}-gl = %{version}-%{release}
d53e67
Requires:       %{name}-media = %{version}-%{release}
Scott Talbert 0aea9e
Requires:       %{name}-webview = %{version}-%{release}
Scott Talbert 0aea9e
Requires:       %{wxbasename} = %{version}-%{release}
Scott Talbert 0aea9e
Requires:       %{wxbasename}-devel%{?_isa} = %{version}-%{release}
Scott Talbert 0aea9e
Requires:       gtk3-devel
Scott Talbert 0aea9e
Requires:       libGLU-devel
Scott Talbert 0aea9e
Provides:       %{srcname}-devel = %{version}-%{release}
d53e67
d53e67
%description devel
Scott Talbert 0aea9e
This package include files needed to link with the wxGTK library.
Scott Talbert 0aea9e
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
Scott Talbert 0aea9e
GUI library, offering classes for all common GUI controls as well as a
Scott Talbert 0aea9e
comprehensive set of helper classes for most common application tasks,
Scott Talbert 0aea9e
ranging from networking to HTML display and image manipulation.
d53e67
d53e67
d53e67
%package        gl
d53e67
Summary:        OpenGL add-on for the wxWidgets library
Scott Talbert 0aea9e
Requires:       %{name}%{?_isa} = %{version}-%{release}
d53e67
d53e67
%description gl
d53e67
OpenGL (a 3D graphics API) add-on for the wxWidgets library.
Scott Talbert 0aea9e
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
Scott Talbert 0aea9e
GUI library, offering classes for all common GUI controls as well as a
Scott Talbert 0aea9e
comprehensive set of helper classes for most common application tasks,
Scott Talbert 0aea9e
ranging from networking to HTML display and image manipulation.
Scott Talbert 0aea9e
Scott Talbert 0aea9e
Scott Talbert 0aea9e
%package        i18n
Scott Talbert 0aea9e
Summary:        i18n message catalogs for the wxWidgets library
Scott Talbert 0aea9e
BuildArch:      noarch
Scott Talbert 0aea9e
Scott Talbert 0aea9e
%description i18n
Scott Talbert 0aea9e
i18n message catalogs for the wxWidgets library.
Scott Talbert 0aea9e
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
Scott Talbert 0aea9e
GUI library, offering classes for all common GUI controls as well as a
Scott Talbert 0aea9e
comprehensive set of helper classes for most common application tasks,
Scott Talbert 0aea9e
ranging from networking to HTML display and image manipulation.
d53e67
d53e67
d53e67
%package        media
d53e67
Summary:        Multimedia add-on for the wxWidgets library
Scott Talbert 0aea9e
Requires:       %{name}%{?_isa} = %{version}-%{release}
d53e67
d53e67
%description media
d53e67
Multimedia add-on for the wxWidgets library.
Scott Talbert 0aea9e
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
Scott Talbert 0aea9e
GUI library, offering classes for all common GUI controls as well as a
Scott Talbert 0aea9e
comprehensive set of helper classes for most common application tasks,
Scott Talbert 0aea9e
ranging from networking to HTML display and image manipulation.
Scott Talbert 0aea9e
d53e67
Scott Talbert 0aea9e
%package        webview
Scott Talbert 0aea9e
Summary:        WebView add-on for the wxWidgets library
Scott Talbert 0aea9e
Requires:       %{name}%{?_isa} = %{version}-%{release}
d53e67
Scott Talbert 0aea9e
%description webview
Scott Talbert 0aea9e
WebView add-on for the wxWidgets library.
Scott Talbert 0aea9e
wxWidgets is the GTK port of the C++ cross-platform wxWidgets
Scott Talbert 0aea9e
GUI library, offering classes for all common GUI controls as well as a
Scott Talbert 0aea9e
comprehensive set of helper classes for most common application tasks,
Scott Talbert 0aea9e
ranging from networking to HTML display and image manipulation.
Scott Talbert 0aea9e
Scott Talbert 0aea9e
Scott Talbert 0aea9e
%package -n     %{wxbasename}
d53e67
Summary:        Non-GUI support classes from the wxWidgets library
d53e67
Scott Talbert 0aea9e
%description -n %{wxbasename}
d53e67
Every wxWidgets application must link against this library. It contains
d53e67
mandatory classes that any wxWidgets code depends on (like wxString) and
d53e67
portability classes that abstract differences between platforms. wxBase can
d53e67
be used to develop console mode applications -- it does not require any GUI
d53e67
libraries or the X Window System.
d53e67
d53e67
Scott Talbert 0aea9e
%package        docs
Scott Talbert 0aea9e
Summary:        Documentation for the wxGTK library
Scott Talbert 0aea9e
Requires:       %{name} = %{version}-%{release}
Scott Talbert 0aea9e
Provides:       %{srcname}-docs = %{version}-%{release}
Scott Talbert 0aea9e
BuildArch:      noarch
Scott Talbert 0aea9e
Scott Talbert 0aea9e
%description docs
Scott Talbert 0aea9e
This package provides documentation for the %{srcname} library.
Scott Talbert 0aea9e
Scott Talbert 0aea9e
d53e67
%prep
Scott Talbert 0aea9e
%autosetup -n %{srcname}-%{version} -p1
d53e67
Scott Talbert 0aea9e
# patch some installed files to avoid conflicts with 2.8.*
Scott Talbert 0aea9e
sed -i -e 's|aclocal)|aclocal/wxwin31.m4)|' Makefile.in
d53e67
d53e67
# fix plugin dir for 64-bit
Scott Talbert 0aea9e
sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure
d53e67
sed -i -e 's|/lib|/%{_lib}|' src/unix/stdpaths.cpp
d53e67
d53e67
d53e67
%build
Scott Talbert 0aea9e
%global _configure ../configure
d53e67
Scott Talbert 0aea9e
mkdir %{gtk3dir}
Scott Talbert 0aea9e
pushd %{gtk3dir}
d53e67
%configure \
Scott Talbert 0aea9e
  --with-gtk=3 \
d53e67
  --with-opengl \
d53e67
  --with-sdl \
Scott Talbert 0aea9e
  --with-libmspack \
d53e67
  --enable-intl \
d53e67
  --disable-rpath \
Scott Talbert 0aea9e
  --enable-ipv6
d53e67
Scott Talbert 0aea9e
%make_build
Scott Talbert 0aea9e
popd
d53e67
Scott Talbert 0aea9e
#Docs
Scott Talbert 0aea9e
WX_SKIP_DOXYGEN_VERSION_CHECK=1 docs/doxygen/regen.sh html
Scott Talbert 0aea9e
mv docs/doxygen/out/html .
d53e67
d53e67
%install
Scott Talbert 0aea9e
pushd %{gtk3dir}
Scott Talbert 0aea9e
%make_install
Scott Talbert 0aea9e
popd
d53e67
d53e67
# install our multilib-aware wrapper
Scott Talbert 0aea9e
##Remove installed
d53e67
rm %{buildroot}%{_bindir}/wx-config
Scott Talbert 0aea9e
##Install new and symlink
Scott Talbert 0aea9e
install -p -D -m 755 %{SOURCE10} %{buildroot}%{_libexecdir}/%{name}/wx-config
Scott Talbert 0aea9e
sed -i -e 's|=/usr|=%{_prefix}|' %{buildroot}%{_libexecdir}/%{name}/wx-config
Scott Talbert 0aea9e
ln -s ../..%{_libexecdir}/%{name}/wx-config %{buildroot}%{_bindir}/wx-config-3.1
d53e67
touch %{buildroot}%{_bindir}/wx-config
d53e67
d53e67
#Alternatives setup with wxrc
Scott Talbert 0aea9e
mv %{buildroot}%{_bindir}/wxrc* %{buildroot}%{_libexecdir}/%{name}
Scott Talbert 0aea9e
ln -s ../..%{_libexecdir}/%{name}/wxrc-3.1 %{buildroot}%{_bindir}/wxrc-3.1
d53e67
touch %{buildroot}%{_bindir}/wxrc
d53e67
Scott Talbert 0aea9e
# move bakefiles to avoid conflicts with 2.8.*
Scott Talbert 0aea9e
mkdir %{buildroot}%{_datadir}/bakefile/presets/wx31
Scott Talbert 0aea9e
mv %{buildroot}%{_datadir}/bakefile/presets/*.* %{buildroot}%{_datadir}/bakefile/presets/wx31
Scott Talbert 0aea9e
Scott Talbert 2ebf89
%find_lang wxstd-3.1
d53e67
d53e67
%check
Scott Talbert 0aea9e
pushd %{gtk3dir}/tests
Scott Talbert 0aea9e
make %{?_smp_mflags}
Scott Talbert 2ebf89
python3 -m httpbin.core &
Scott Talbert 2ebf89
LD_LIBRARY_PATH=%{buildroot}%{_libdir} TZ=UTC wxUSE_XVFB=1 wxLXC=1 WX_TEST_WEBREQUEST_URL="http://localhost:5000" xvfb-run -a ./test ~WebRequest::SSL::Ignore ~wxLog::Trace ~wxExecute::RedirectUTF8 ~wxDateTime-BST-bugs
Scott Talbert 2ebf89
LD_LIBRARY_PATH=%{buildroot}%{_libdir} wxUSE_XVFB=1 wxLXC=1 xvfb-run -a ./test_gui \
Scott Talbert b91582
  ~wxDVC::GetItemRect ~wxHtmlPrintout::Pagination ~wxExecute::RedirectUTF8 \
Scott Talbert 2ebf89
  ~WebView ~XRC::LoadURL
d53e67
popd
d53e67
Scott Talbert 0aea9e
%post -n %{wxbasename}-devel
d53e67
if [ -f %{_bindir}/wx-config ] && [ ! -h %{_bindir}/wx-config ] ; then
d53e67
  rm %{_bindir}/wx-config
d53e67
fi
Scott Talbert 0aea9e
/usr/sbin/update-alternatives --install %{_bindir}/wx-config \
Scott Talbert 0aea9e
  wx-config %{_libexecdir}/%{name}/wx-config 25
Scott Talbert 0aea9e
/usr/sbin/update-alternatives --install %{_bindir}/wxrc \
Scott Talbert 0aea9e
  wxrc %{_libexecdir}/%{name}/wxrc 25
d53e67
Scott Talbert 0aea9e
%postun -n %{wxbasename}-devel
d53e67
if [ $1 -eq 0 ] ; then
Scott Talbert 0aea9e
  /usr/sbin/update-alternatives --remove wx-config %{_libexecdir}/%{name}/wx-config
Scott Talbert 0aea9e
  /usr/sbin/update-alternatives --remove wxrc %{_libexecdir}/%{name}/wxrc
d53e67
fi
d53e67
Scott Talbert 0aea9e
%files
Scott Talbert 0aea9e
%doc docs/changes.txt docs/readme.txt
Scott Talbert 0aea9e
%license docs/gpl.txt docs/lgpl.txt docs/licence.txt docs/licendoc.txt
Scott Talbert 0aea9e
%license docs/preamble.txt
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_adv-*.so.%{sover}*
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_aui-*.so.%{sover}*
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_core-*.so.%{sover}*
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_html-*.so.%{sover}*
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_propgrid-*.so.%{sover}*
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_qa-*.so.%{sover}*
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_ribbon-*.so.%{sover}*
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_richtext-*.so.%{sover}*
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_stc-*.so.%{sover}*
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_xrc-*.so.%{sover}*
Scott Talbert 0aea9e
Scott Talbert 0aea9e
%files -n %{wxbasename}-devel
d53e67
%ghost %{_bindir}/wx-config
d53e67
%ghost %{_bindir}/wxrc
Scott Talbert 0aea9e
%{_bindir}/wxrc-3.1
Scott Talbert 0aea9e
%{_bindir}/wx-config-3.1
Scott Talbert 0aea9e
%{_includedir}/wx-3.1
Scott Talbert 0aea9e
%{_libdir}/libwx_baseu*.so
d53e67
%dir %{_libdir}/wx
d53e67
%dir %{_libdir}/wx/config
Scott Talbert 0aea9e
%dir %{_libdir}/wx/include
Scott Talbert 0aea9e
%{_datadir}/aclocal/wxwin31.m4
Scott Talbert 0aea9e
%{_datadir}/bakefile/presets/wx31
Scott Talbert 0aea9e
%{_libexecdir}/%{name}
Scott Talbert 0aea9e
Scott Talbert 0aea9e
%files devel
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_*.so
Scott Talbert 0aea9e
%{_libdir}/wx/config/gtk3-unicode-3.1
Scott Talbert 0aea9e
%{_libdir}/wx/include/gtk3-unicode-3.1
d53e67
d53e67
%files gl
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_gl-*.so.%{sover}*
Scott Talbert 0aea9e
Scott Talbert 2ebf89
%files i18n -f wxstd-3.1.lang
d53e67
d53e67
%files media
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_media-*.so.%{sover}*
Scott Talbert 0aea9e
Scott Talbert 0aea9e
%files webview
Scott Talbert 0aea9e
%{_libdir}/libwx_gtk3u_webview-*.so.%{sover}*
Scott Talbert 0aea9e
%dir %{_libdir}/wx
Scott Talbert 0aea9e
%{_libdir}/wx/%{version}
d53e67
Scott Talbert 0aea9e
%files -n %{wxbasename}
Scott Talbert 0aea9e
%doc docs/changes.txt docs/readme.txt
Scott Talbert 0aea9e
%license docs/gpl.txt docs/lgpl.txt docs/licence.txt docs/licendoc.txt
Scott Talbert 0aea9e
%license docs/preamble.txt
d53e67
%{_libdir}/libwx_baseu-*.so.*
Scott Talbert 0aea9e
%{_libdir}/libwx_baseu_net-*.so.%{sover}*
Scott Talbert 0aea9e
%{_libdir}/libwx_baseu_xml-*.so.%{sover}*
d53e67
Scott Talbert 0aea9e
%files docs
Scott Talbert 0aea9e
%doc html
d53e67
d53e67
%changelog
Fedora Release Engineering d4f643
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.5-4
Fedora Release Engineering d4f643
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Fedora Release Engineering d4f643
Scott Talbert e5d733
* Mon Jan 10 2022 Scott Talbert <swt@techie.net> - 3.1.5-3
Scott Talbert e5d733
- Fix wxGLCanvas::IsDisplaySupported() when using EGL
Scott Talbert e5d733
Fedora Release Engineering 43fffa
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.5-2
Fedora Release Engineering 43fffa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Fedora Release Engineering 43fffa
Scott Talbert 2ebf89
* Thu Apr 15 2021 Scott Talbert <swt@techie.net> - 3.1.5-1
Scott Talbert 2ebf89
- Update to new upstream release 3.1.5 (#1948935)
Scott Talbert 2ebf89
Scott Talbert b0dc30
* Thu Mar 04 2021 Scott Talbert <swt@techie.net> - 3.1.4-5
Scott Talbert b0dc30
- Fix FTBFS due to glibc non-const SIGSTKSZ
Scott Talbert b0dc30
Peter Hutterer 7c0389
* Wed Mar 03 2021 Peter Hutterer <peter.hutterer@redhat.com> 3.1.4-4
Peter Hutterer 7c0389
- Require only xclock, not all of xorg-x11-apps (#1934359)
Peter Hutterer 7c0389
Scott Talbert c6ba6a
* Sat Feb 06 2021 Scott Talbert <swt@techie.net> - 3.1.4-3
Scott Talbert c6ba6a
- Properly skip WebView tests to fix FTBFS (#1923643)
Scott Talbert c6ba6a
Fedora Release Engineering cab98f
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.4-2
Fedora Release Engineering cab98f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Fedora Release Engineering cab98f
Scott Talbert c6ba6a
* Sat Aug 08 2020 Scott Talbert <swt@techie.net> - 3.1.4-1
Scott Talbert b91582
- Update to new upstream release 3.1.4 (#1859715)
Scott Talbert b91582
Fedora Release Engineering 050965
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.3-3
Fedora Release Engineering 050965
- Second attempt - Rebuilt for
Fedora Release Engineering 050965
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Fedora Release Engineering 050965
Fedora Release Engineering 3b9449
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.3-2
Fedora Release Engineering 3b9449
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Fedora Release Engineering 3b9449
Scott Talbert 0aea9e
* Tue Mar 03 2020 Scott Talbert <swt@techie.net> - 3.1.3-1
Scott Talbert 0aea9e
- Initial packaging of wxWidgets 3.1.x (dev version) (#1714714)