1
0
forked from pool/wxWidgets-3_2

Accepting request 849726 from X11:wxWidgets

- Fix an rpmlint warning by moving libwx_base symlinks to their
  own -devel subpackage which is then required by
  (wxWidgets-devel, wxGTK3-devel).

OBS-URL: https://build.opensuse.org/request/show/849726
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/wxWidgets-3_2?expand=0&rev=14
This commit is contained in:
Dominique Leuenberger 2020-11-26 22:10:09 +00:00 committed by Git OBS Bridge
commit 0a4918a574
2 changed files with 56 additions and 32 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Nov 16 14:02:11 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Fix an rpmlint warning by moving libwx_base symlinks to their
own -devel subpackage which is then required by
(wxWidgets-devel, wxGTK3-devel).
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Oct 9 16:48:47 UTC 2020 - Jan Engelhardt <jengelh@inai.de> Fri Oct 9 16:48:47 UTC 2020 - Jan Engelhardt <jengelh@inai.de>

View File

@ -16,8 +16,8 @@
# #
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%nil
%if "%{flavor}" == "" %if "%flavor" == ""
# default flavor is GTK2 # default flavor is GTK2
Name: wxWidgets-3_2 Name: wxWidgets-3_2
%define pkgname wxWidgets-3_2 %define pkgname wxWidgets-3_2
@ -28,7 +28,7 @@ Name: wxWidgets-3_2
%bcond_with webview %bcond_with webview
%endif %endif
%if "%{flavor}" == "GTK3" %if "%flavor" == "GTK3"
Name: wxGTK3-3_2 Name: wxGTK3-3_2
%define pkgname wxGTK3-3_2 %define pkgname wxGTK3-3_2
%define variant suse %define variant suse
@ -39,7 +39,7 @@ Name: wxGTK3-3_2
%bcond_without webview %bcond_without webview
%endif %endif
%if "%{flavor}" == "GTK3-nostl" %if "%flavor" == "GTK3-nostl"
Name: wxWidgets-3_2-nostl Name: wxWidgets-3_2-nostl
%define pkgname wxWidgets-3_2-nostl %define pkgname wxWidgets-3_2-nostl
%define variant suse-nostl %define variant suse-nostl
@ -52,7 +52,7 @@ std::string), and is provided for old programs which fail to use e.g. \
wxString and instead rely on the wxChar pointer API. wxString and instead rely on the wxChar pointer API.
%endif %endif
%if "%{flavor}" == "Qt" %if "%flavor" == "Qt"
Name: wxQt-3_2 Name: wxQt-3_2
%define pkgname wxQt-3_2 %define pkgname wxQt-3_2
%define variant suse %define variant suse
@ -62,10 +62,9 @@ Name: wxQt-3_2
%endif %endif
%define base_name wxWidgets-3_2 %define base_name wxWidgets-3_2
%define tarball_name wxWidgets
# Use default debug level, enabling exceptions # Use default debug level, enabling exceptions
# Other valid values: yes/no/max # Other valid values: yes/no/max
%define wx_debug %{nil} %define wx_debug %nil
%define psonum 4_0_0 %define psonum 4_0_0
%define sonum 4.0.0 %define sonum 4.0.0
Version: 3.1.4 Version: 3.1.4
@ -76,7 +75,7 @@ Summary: C++ Library for Cross-Platform Development
License: LGPL-2.1-or-later WITH WxWindows-exception-3.1 License: LGPL-2.1-or-later WITH WxWindows-exception-3.1
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
URL: https://www.wxwidgets.org/ URL: https://www.wxwidgets.org/
Source: https://github.com/wxWidgets/wxWidgets/releases/download/v%{version}/wxWidgets-%{version}.tar.bz2#/%tarball_name-%version.tar.bz2 Source: https://github.com/wxWidgets/wxWidgets/releases/download/v%version/wxWidgets-%version.tar.bz2
Source2: README.SUSE Source2: README.SUSE
Source5: wxWidgets-3_2-rpmlintrc Source5: wxWidgets-3_2-rpmlintrc
# This script is not used during build, but it makes possible to # This script is not used during build, but it makes possible to
@ -100,17 +99,17 @@ BuildRequires: libnotify-devel
BuildRequires: libpng-devel BuildRequires: libpng-devel
BuildRequires: libtiff-devel BuildRequires: libtiff-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
%if "%{toolkit}" == "gtk2" %if "%toolkit" == "gtk2"
BuildRequires: gnome-vfs2-devel BuildRequires: gnome-vfs2-devel
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
%endif %endif
%if "%{toolkit}" == "gtk3" %if "%toolkit" == "gtk3"
BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(gtk+-3.0)
%if %{with webview} %if %{with webview}
BuildRequires: pkgconfig(webkit2gtk-4.0) BuildRequires: pkgconfig(webkit2gtk-4.0)
%endif %endif
%endif %endif
%if "%{toolkit}" == "qt" %if "%toolkit" == "qt"
BuildRequires: pkgconfig(Qt5Core) >= 5.2.1 BuildRequires: pkgconfig(Qt5Core) >= 5.2.1
BuildRequires: pkgconfig(Qt5Gui) >= 5.2.1 BuildRequires: pkgconfig(Qt5Gui) >= 5.2.1
BuildRequires: pkgconfig(Qt5OpenGL) >= 5.2.1 BuildRequires: pkgconfig(Qt5OpenGL) >= 5.2.1
@ -133,6 +132,20 @@ backends. Applications can be created for different GUIs (GTK+,
Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source
code. code.
%package -n libwx_base-%variant-devel
Summary: Development files for %name
Group: Development/Libraries/C and C++
Requires: libwx_baseu-%variant%psonum = %version
Requires: libwx_baseu_net-%variant%psonum = %version
Requires: libwx_baseu_xml-%variant%psonum = %version
Provides: libwx_base-devel
Conflicts: libwx_base-devel
%description -n libwx_base-%variant-devel
wxWidgets is a C++ library abstraction layer for a number of GUI
backends.
This package is a build artifact and need not be manually installed.
%package -n libwx_baseu-%variant%psonum %package -n libwx_baseu-%variant%psonum
Summary: wxWidgets base library Summary: wxWidgets base library
# Name up to openSUSE 11.3 and up to wxGTK-2.8: # Name up to openSUSE 11.3 and up to wxGTK-2.8:
@ -282,15 +295,15 @@ Group: System/Libraries
SDL based sound plugin for the wxWidgets cross-platform GUI. SDL based sound plugin for the wxWidgets cross-platform GUI.
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %name
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
%if "%{toolkit}" == "gtk2" %if "%toolkit" == "gtk2"
Requires: gtk2-devel Requires: gtk2-devel
%endif %endif
%if "%{toolkit}" == "gtk3" %if "%toolkit" == "gtk3"
Requires: pkgconfig(gtk+-3.0) Requires: pkgconfig(gtk+-3.0)
%endif %endif
%if "%{toolkit}" == "qt" %if "%toolkit" == "qt"
Requires: pkgconfig(Qt5OpenGL) >= 5.2.1 Requires: pkgconfig(Qt5OpenGL) >= 5.2.1
Requires: pkgconfig(Qt5Widgets) >= 5.2.1 Requires: pkgconfig(Qt5Widgets) >= 5.2.1
%endif %endif
@ -309,26 +322,24 @@ Requires: libwx_%{toolkit}u_stc-%variant%psonum = %version
Requires: libwx_%{toolkit}u_webview-%variant%psonum = %version Requires: libwx_%{toolkit}u_webview-%variant%psonum = %version
%endif %endif
Requires: libwx_%{toolkit}u_xrc-%variant%psonum = %version Requires: libwx_%{toolkit}u_xrc-%variant%psonum = %version
Requires: libwx_baseu-%variant%psonum = %version Requires: libwx_base-%variant-devel = %version
Requires: libwx_baseu_net-%variant%psonum = %version
Requires: libwx_baseu_xml-%variant%psonum = %version
Requires: pkgconfig(gl) Requires: pkgconfig(gl)
Requires: pkgconfig(glu) Requires: pkgconfig(glu)
Provides: wxWidgets-any-devel Provides: wxWidgets-any-devel
Conflicts: wxWidgets-any-devel Conflicts: wxWidgets-any-devel
%if "%{toolkit}" == "gtk2" %if "%toolkit" == "gtk2"
Provides: wxGTK2-devel = %version-%release Provides: wxGTK2-devel = %version-%release
Provides: wxWidgets-devel = %version-%release Provides: wxWidgets-devel = %version-%release
# Name up to openSUSE 11.3 and up to wxGTK-2.8.x: # Name up to openSUSE 11.3 and up to wxGTK-2.8.x:
Provides: wxGTK-devel = %version-%release Provides: wxGTK-devel = %version-%release
Obsoletes: wxGTK-devel < %version-%release Obsoletes: wxGTK-devel < %version-%release
%endif %endif
%if "%{toolkit}" == "gtk3" %if "%toolkit" == "gtk3"
%if "%{flavor}" != "GTK3-nostl" %if "%flavor" != "GTK3-nostl"
Provides: wxGTK3-devel = %version-%release Provides: wxGTK3-devel = %version-%release
%endif %endif
%endif %endif
%if "%{toolkit}" == "qt" %if "%toolkit" == "qt"
Provides: wxQt-devel = %version-%release Provides: wxQt-devel = %version-%release
%endif %endif
@ -338,14 +349,14 @@ backends. Applications can be created for different GUIs (GTK+,
Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source
code. code.
This package contains all files needed for developing with %{name}. This package contains all files needed for developing with %name.
%{?extra_description} %{?extra_description}
Note: wxWidgets variant devel packages are mutually exclusive. Please Note: wxWidgets variant devel packages are mutually exclusive. Please
read %_docdir/%name/README.SUSE to pick a correct variant. read %_docdir/%name/README.SUSE to pick a correct variant.
%prep %prep
%autosetup -n %tarball_name-%version -p1 %autosetup -n wxWidgets-%version -p1
cp %{S:2} . cp %{S:2} .
%build %build
@ -359,7 +370,7 @@ autoconf -f -i
%configure \ %configure \
--enable-vendor=%variant \ --enable-vendor=%variant \
%if "%{toolkit}" == "qt" %if "%toolkit" == "qt"
--with-qt \ --with-qt \
%else %else
--with-gtk=%gtk_version \ --with-gtk=%gtk_version \
@ -376,7 +387,7 @@ autoconf -f -i
--enable-optimise \ --enable-optimise \
%{wx_debug:--enable-debug=%{wx_debug}} \ %{wx_debug:--enable-debug=%{wx_debug}} \
--enable-repro-build \ --enable-repro-build \
%if "%{flavor}" == "GTK3-nostl" %if "%flavor" == "GTK3-nostl"
--disable-stl \ --disable-stl \
--disable-plugins --disable-plugins
%else %else
@ -384,17 +395,17 @@ autoconf -f -i
--enable-plugins --enable-plugins
%endif %endif
make %{?_smp_mflags} %make_build
%install %install
export VENDORTAG='-$variant' # only needed for non-MSW export VENDORTAG='-$variant' # only needed for non-MSW
make install DESTDIR="%buildroot" %make_install
%if !%base_packages %if !%base_packages
# Drop libraries already supplied by another packages # Drop libraries already supplied by another packages
rm -f "%buildroot/%_libdir"/libwx_baseu{,_net,_xml}-%variant.so.%{sonum}* \ rm -fv "%buildroot/%_libdir"/libwx_baseu*.so* \
"%buildroot/%_libdir/wx/%wx_micro"/sound_sdlu-*.so "%buildroot/%_libdir/wx/%wx_micro"/sound_sdlu-*.so
%endif %endif
rm -Rf %buildroot/%_datadir/locale rm -Rfv %buildroot/%_datadir/locale
# HACK: Fix wx-config symlink (bug introduced in 2.9.4). # 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 ln -sf $(echo %buildroot/%_libdir/wx/config/* | sed "s%%%buildroot%%%%") %buildroot/%_bindir/wx-config
@ -433,6 +444,9 @@ ln -sf $(echo %buildroot/%_libdir/wx/config/* | sed "s%%%buildroot%%%%") %buildr
%postun -n libwx_%{toolkit}u_xrc-%variant%psonum -p /sbin/ldconfig %postun -n libwx_%{toolkit}u_xrc-%variant%psonum -p /sbin/ldconfig
%if %base_packages %if %base_packages
%files -n libwx_base-%variant-devel
%_libdir/libwx_baseu*.so
%files -n libwx_baseu-%variant%psonum %files -n libwx_baseu-%variant%psonum
%_libdir/libwx_baseu-%variant.so.%{sonum}* %_libdir/libwx_baseu-%variant.so.%{sonum}*
@ -488,7 +502,7 @@ ln -sf $(echo %buildroot/%_libdir/wx/config/* | sed "s%%%buildroot%%%%") %buildr
%_libdir/libwx_%{toolkit}u_xrc-%variant.so.%{sonum}* %_libdir/libwx_%{toolkit}u_xrc-%variant.so.%{sonum}*
%if %base_packages %if %base_packages
%if "%{flavor}" != "GTK3-nostl" %if "%flavor" != "GTK3-nostl"
%files -n %{base_name}-plugin-sound_sdlu-3_2 %files -n %{base_name}-plugin-sound_sdlu-3_2
%dir %_libdir/wx %dir %_libdir/wx
%dir %_libdir/wx/%wx_micro %dir %_libdir/wx/%wx_micro
@ -506,6 +520,9 @@ ln -sf $(echo %buildroot/%_libdir/wx/config/* | sed "s%%%buildroot%%%%") %buildr
%_datadir/bakefile %_datadir/bakefile
%_includedir/wx-%wx_minor %_includedir/wx-%wx_minor
%_libdir/*.so %_libdir/*.so
%if %base_packages
%exclude %_libdir/libwx_baseu*
%endif
%dir %_libdir/wx %dir %_libdir/wx
%_libdir/wx/config %_libdir/wx/config
%_libdir/wx/include %_libdir/wx/include