1
0
wxWidgets-3_2/wxWidgets-3_2.spec

434 lines
14 KiB
RPMSpec
Raw Normal View History

#
# spec file for package wxWidgets-3_2
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: wxWidgets-3_2
%define base_name wxWidgets
%define tarball_name wxWidgets
%define variant suse
%define soname 2
Version: 3.1.0
Release: 0
%define wx_minor 3.1
%define wx_micro 3.1.0
# lang packages are exactly equal for all variants. Build it only once:
%if "%name" == "%base_name"
%define BUILD_LANG 1
%else
%define BUILD_LANG 0
%endif
# build non-UI toolkit related packages
%define base_packages 1
Summary: C++ Library for Cross-Platform Development
License: GPL-2.0+
Group: Development/Libraries/C and C++
Url: http://www.wxwidgets.org/
Source: https://github.com/wxWidgets/wxWidgets/releases/download/v%version/%tarball_name-%version.tar.bz2
Source2: README.SUSE
Source5: rpmlintrc
# This script is not used during build, but it makes possible to
# identify and backport wxPython fixes to wxWidgets.
Source6: wxpython-mkdiff.sh
Source50: baselibs.conf
Patch1: soversion.diff
Patch2: wxqt-compile.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: SDL-devel
BuildRequires: autoconf
BuildRequires: cppunit-devel
BuildRequires: gcc-c++
BuildRequires: gnome-vfs2-devel
BuildRequires: gstreamer-devel
BuildRequires: gstreamer-plugins-base-devel
BuildRequires: gtk2-devel
%define gtk_version 2
%define toolkit gtk%{gtk_version}
%if 0%{?suse_version} >= 1220
BuildRequires: libSM-devel
%else
%if 0%{?sles_version} >= 11
BuildRequires: xorg-x11-libSM-devel
%endif
%endif
BuildRequires: libexpat-devel
BuildRequires: libjpeg-devel
BuildRequires: libmspack-devel
BuildRequires: libnotify-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: zlib-devel
BuildRequires: pkgconfig(glu)
%description
wxWidgets is a free C++ library for cross-platform GUI.
With wxWidgets, you can create applications for different GUIs (GTK+,
Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source code.
%if %{base_packages}
%package -n libwx_baseu-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
# Name up to openSUSE 11.3 and up to wxGTK-2.8:
Obsoletes: wxGTK <= %version.0
# Third party base package name:
Obsoletes: wxWidgets < %version
# wxWidgets-lang requires wxWidgets. Provide them to fix dependencies:
Provides: wxWidgets = %version
Recommends: %base_name-lang >= %version
%description -n libwx_baseu-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_baseu_net-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_baseu_net-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_baseu_xml-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_baseu_xml-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%endif
%package -n libwx_%{toolkit}u_adv-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_adv-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_%{toolkit}u_aui-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_aui-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_%{toolkit}u_core-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_core-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_%{toolkit}u_gl-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_gl-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_%{toolkit}u_html-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_html-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_%{toolkit}u_media-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_media-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_%{toolkit}u_propgrid-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_propgrid-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_%{toolkit}u_qa-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_qa-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_%{toolkit}u_ribbon-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_ribbon-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_%{toolkit}u_richtext-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_richtext-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_%{toolkit}u_stc-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_stc-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%package -n libwx_%{toolkit}u_xrc-%{variant}%{soname}
Summary: wxWidgets Library
Group: System/Libraries
%description -n libwx_%{toolkit}u_xrc-%{variant}%{soname}
Library for the wxWidgets cross-platform GUI.
%if %{base_packages}
%package plugin-sound_sdlu-3_2
Summary: wxWidgets SDL Plugin
Group: System/Libraries
%description plugin-sound_sdlu-3_2
SDL Plugin for the wxWidgets cross-platform GUI.
%endif
%package devel
Summary: Everything needed for development with wxWidgets
Group: Development/Libraries/C and C++
Requires: gtk%gtk_version-devel
Requires: libwx_baseu-%{variant}%{soname} = %version
Requires: libwx_baseu_net-%{variant}%{soname} = %version
Requires: libwx_baseu_xml-%{variant}%{soname} = %version
Requires: libwx_%{toolkit}u_adv-%{variant}%{soname} = %version
Requires: libwx_%{toolkit}u_aui-%{variant}%{soname} = %version
Requires: libwx_%{toolkit}u_core-%{variant}%{soname} = %version
Requires: libwx_%{toolkit}u_gl-%{variant}%{soname} = %version
Requires: libwx_%{toolkit}u_html-%{variant}%{soname} = %version
Requires: libwx_%{toolkit}u_media-%{variant}%{soname} = %version
Requires: libwx_%{toolkit}u_propgrid-%{variant}%{soname} = %version
Requires: libwx_%{toolkit}u_qa-%{variant}%{soname} = %version
Requires: libwx_%{toolkit}u_ribbon-%{variant}%{soname} = %version
Requires: libwx_%{toolkit}u_richtext-%{variant}%{soname} = %version
Requires: libwx_%{toolkit}u_stc-%{variant}%{soname} = %version
Requires: pkgconfig(gl)
Requires: libwx_%{toolkit}u_xrc-%{variant}%{soname} = %version
Requires: pkgconfig(glu)
Provides: wxWidgets-devel = %version-%release
Provides: wxGTK2-devel = %version-%release
Conflicts: otherproviders(wxWidgets-devel)
Conflicts: wxWidgets-experimental-devel
# Name up to openSUSE 11.3 and up to wxGTK-2.8.x:
Provides: wxGTK-devel = %version-%release
Obsoletes: wxGTK-devel <= %version-%release
%description devel
wxWidgets is a free C++ library for cross-platform GUI development.
With wxWidgets, you can create applications for different GUIs (GTK+,
Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source code.
This package contains all files needed for developing with wxGTK%gtk_version.
Note: wxWidgets variant devel packages are mutually exclusive. Please
read %_docdir/%name/README.SUSE to pick a correct variant.
%if %BUILD_LANG
%lang_package -n %base_name
%endif
%prep
echo "=== RPM build flags: WX_DEBUG=0%{?WX_DEBUG}"
%setup -q -n %tarball_name-%version
%patch -P 1 -P 2 -p1
cp %{S:2} .
%build
autoconf -f -i
# With 2.9.1:
# --enable-objc_uniquifying is relevant only for Cocoa
# --enable-accessibility is currently supported only in msw
# --enable-extended_rtti does not compile
%configure\
--enable-vendor=%{variant} \
--with-gtk=%gtk_version\
--disable-static\
--enable-unicode\
--with-opengl\
--with-libmspack\
--with-sdl\
--with-gnomevfs\
--enable-ipv6\
--enable-mediactrl\
--enable-optimise\
%if 0%{?WX_DEBUG}
--enable-debug\
%else
--disable-debug\
%endif
--enable-stl\
--enable-plugins
make %{?_smp_mflags}
%if %BUILD_LANG
cd locale
make allmo
cd ..
%endif
%clean
:
%install
export VENDORTAG='-${variant}' # only needed for non-MSW
make install DESTDIR="%buildroot"
%if %{base_packages}==0
# Drop libraries already supplied by another packages
rm -f "%buildroot/%_libdir"/libwx_baseu{,_net,_xml}-%{variant}.so.%{soname}* \
"%buildroot/%_libdir/wx/%wx_micro"/sound_sdlu-*.so
%endif
%if %BUILD_LANG
# Locales for MS Windows:
rm -Rf %buildroot/%_datadir/locale/*/LC_MESSAGES/wxmsw.mo
%find_lang wxstd
%else
rm -Rf %buildroot/%_datadir/locale
%endif
# HACK: Fix wx-config symlink (bug introduced in 2.9.4).
ln -sf $(echo %buildroot/%_libdir/wx/config/* | sed "s%%%buildroot%%%%") %buildroot/%_bindir/wx-config
%if %{base_packages}
%post -n libwx_baseu-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_baseu-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_baseu_net-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_baseu_net-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_baseu_xml-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_baseu_xml-%{variant}%{soname} -p /sbin/ldconfig
%endif
%post -n libwx_%{toolkit}u_adv-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_adv-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_%{toolkit}u_aui-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_aui-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_%{toolkit}u_core-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_core-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_%{toolkit}u_gl-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_gl-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_%{toolkit}u_html-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_html-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_%{toolkit}u_media-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_media-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_%{toolkit}u_propgrid-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_propgrid-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_%{toolkit}u_qa-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_qa-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_%{toolkit}u_ribbon-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_ribbon-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_%{toolkit}u_richtext-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_richtext-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_%{toolkit}u_stc-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_stc-%{variant}%{soname} -p /sbin/ldconfig
%post -n libwx_%{toolkit}u_xrc-%{variant}%{soname} -p /sbin/ldconfig
%postun -n libwx_%{toolkit}u_xrc-%{variant}%{soname} -p /sbin/ldconfig
%if %BUILD_LANG
%files lang -f wxstd.lang
%endif
%if %{base_packages}
%files -n libwx_baseu-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_baseu-%{variant}.so.%{soname}*
%files -n libwx_baseu_net-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_baseu_net-%{variant}.so.%{soname}*
%files -n libwx_baseu_xml-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_baseu_xml-%{variant}.so.%{soname}*
%endif
%files -n libwx_%{toolkit}u_adv-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_adv-%{variant}.so.%{soname}*
%files -n libwx_%{toolkit}u_aui-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_aui-%{variant}.so.%{soname}*
%files -n libwx_%{toolkit}u_core-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_core-%{variant}.so.%{soname}*
%files -n libwx_%{toolkit}u_gl-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_gl-%{variant}.so.%{soname}*
%files -n libwx_%{toolkit}u_html-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_html-%{variant}.so.%{soname}*
%files -n libwx_%{toolkit}u_media-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_media-%{variant}.so.%{soname}*
%files -n libwx_%{toolkit}u_propgrid-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_propgrid-%{variant}.so.%{soname}*
%files -n libwx_%{toolkit}u_qa-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_qa-%{variant}.so.%{soname}*
%files -n libwx_%{toolkit}u_ribbon-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_ribbon-%{variant}.so.%{soname}*
%files -n libwx_%{toolkit}u_richtext-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_richtext-%{variant}.so.%{soname}*
%files -n libwx_%{toolkit}u_stc-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_stc-%{variant}.so.%{soname}*
%files -n libwx_%{toolkit}u_xrc-%{variant}%{soname}
%defattr (-,root,root)
%_libdir/libwx_%{toolkit}u_xrc-%{variant}.so.%{soname}*
%if %{base_packages}
%files plugin-sound_sdlu-3_2
%defattr (-,root,root)
%dir %_libdir/wx
%dir %_libdir/wx/%wx_micro
%_libdir/wx/%wx_micro/sound_sdlu-%wx_micro.so
%endif
%files devel
%defattr (-,root,root)
# Complete documentation is available in the docs packages.
%doc docs/*.txt README.SUSE
%_bindir/wxrc
%_bindir/wxrc-%wx_minor
%_bindir/*-config*
%_datadir/aclocal
%_datadir/bakefile
%_includedir/wx-%wx_minor
%_libdir/*.so
%dir %_libdir/wx
%_libdir/wx/config
%_libdir/wx/include
%changelog