Blame wxGTK.spec

Scott Talbert 0aea9e
%global srcname wxWidgets
Scott Talbert 0aea9e
%global wxbasename wxBase
Scott Talbert 0aea9e
%global gtk3dir bld_gtk3
Scott Talbert 0aea9e
%global sover 3
Scott Talbert 0aea9e
d53e67
Name:           wxGTK
Scott Talbert 0aea9e
Version:        3.1.3
Scott Talbert 0aea9e
Release:        1%{?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 0aea9e
Patch2:         update-license-text.patch
d53e67
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
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
Scott Talbert 0aea9e
sed -i -e 's|wxstd.mo|wxstd31.mo|' Makefile.in
Scott Talbert 0aea9e
sed -i -e 's|wxmsw.mo|wxmsw31.mo|' 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 0aea9e
%find_lang wxstd31
Scott Talbert 0aea9e
%find_lang wxmsw31
Scott Talbert 0aea9e
cat wxmsw31.lang >> wxstd31.lang
d53e67
d53e67
%check
Scott Talbert 0aea9e
pushd %{gtk3dir}/tests
Scott Talbert 0aea9e
make %{?_smp_mflags}
Scott Talbert 0aea9e
LD_LIBRARY_PATH=%{buildroot}%{_libdir} TZ=UTC ./test
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 0aea9e
%files i18n -f wxstd31.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
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)