SHA256
1
0
forked from pool/qwt6

Accepting request 1083518 from home:alois:branches:devel:libraries:c_c++

- Fixes boo#1210931 
- Add qwt6-rpmlintrc
- Add _multibuild to support Qt6
- qwt-6.2.0-qt6-pkgconfig.patch

OBS-URL: https://build.opensuse.org/request/show/1083518
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/qwt6?expand=0&rev=17
This commit is contained in:
Luigi Baldoni 2023-04-28 11:33:55 +00:00 committed by Git OBS Bridge
parent c97bd78f14
commit de5ebc1d63
5 changed files with 175 additions and 28 deletions

4
_multibuild Normal file
View File

@ -0,0 +1,4 @@
<multibuild>
<flavor>qt5</flavor>
<flavor>qt6</flavor>
</multibuild>

View File

@ -0,0 +1,41 @@
Index: qwt-6.2.0/src/src.pro
===================================================================
--- qwt-6.2.0.orig/src/src.pro
+++ qwt-6.2.0/src/src.pro
@@ -82,14 +82,31 @@ contains(QWT_CONFIG, QwtPkgConfig) {
greaterThan(QT_MAJOR_VERSION, 4) {
QMAKE_PKGCONFIG_FILE = Qt$${QT_MAJOR_VERSION}$${QMAKE_PKGCONFIG_NAME}
- QMAKE_PKGCONFIG_REQUIRES = Qt5Widgets Qt5Concurrent Qt5PrintSupport
- contains(QWT_CONFIG, QwtSvg) {
- QMAKE_PKGCONFIG_REQUIRES += Qt5Svg
+ isEqual(QT_MAJOR_VERSION, 5) {
+
+ QMAKE_PKGCONFIG_REQUIRES = Qt5Widgets Qt5Concurrent Qt5PrintSupport
+
+ contains(QWT_CONFIG, QwtSvg) {
+ QMAKE_PKGCONFIG_REQUIRES += Qt5Svg
+ }
+
+ contains(QWT_CONFIG, QwtOpenGL) {
+ QMAKE_PKGCONFIG_REQUIRES += Qt5OpenGL
+ }
}
- contains(QWT_CONFIG, QwtOpenGL) {
- QMAKE_PKGCONFIG_REQUIRES += Qt5OpenGL
+ isEqual(QT_MAJOR_VERSION, 6) {
+
+ QMAKE_PKGCONFIG_REQUIRES = Qt6Widgets Qt6Concurrent Qt6PrintSupport
+
+ contains(QWT_CONFIG, QwtSvg) {
+ QMAKE_PKGCONFIG_REQUIRES += Qt6Svg
+ }
+
+ contains(QWT_CONFIG, QwtOpenGL) {
+ QMAKE_PKGCONFIG_REQUIRES += Qt6OpenGL
+ }
}
QMAKE_DISTCLEAN += $${DESTDIR}/$${QMAKE_PKGCONFIG_DESTDIR}/$${QMAKE_PKGCONFIG_FILE}.pc

3
qwt6-rpmlintrc Normal file
View File

@ -0,0 +1,3 @@
# Silence complaint on Leap
addFilter("shlib-policy-name-error")

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Apr 28 11:07:33 UTC 2023 - Luigi Baldoni <aloisio@gmx.com>
- Fixes boo#1210931
- Add qwt6-rpmlintrc
-------------------------------------------------------------------
Thu Aug 25 13:56:16 UTC 2022 - Luigi Baldoni <aloisio@gmx.com>
- Add _multibuild to support Qt6
- qwt-6.2.0-qt6-pkgconfig.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 27 08:07:52 UTC 2021 - Dmitriy Perlow <dap.darkness@gmail.com> Tue Jul 27 08:07:52 UTC 2021 - Dmitriy Perlow <dap.darkness@gmail.com>

143
qwt6.spec
View File

@ -1,7 +1,7 @@
# #
# spec file for package qwt6 # spec file for package qwt6
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2023 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,8 +16,24 @@
# #
%global qwt6_flavor @BUILD_FLAVOR@%{nil}
%if "%{qwt6_flavor}" == ""
ExclusiveArch: do_not_build
%endif
%if "%{qwt6_flavor}" == "qt6"
%define qt6 1
%define pkg_suffix -qt6
%define qt_descr Qt6
%endif
%if "%{qwt6_flavor}" == "qt5"
%define qt5 1
%define pkg_suffix -qt5
%define qt_descr Qt5
%endif
%define sover 6_2 %define sover 6_2
Name: qwt6 %define mver 6
Name: qwt6%{?pkg_suffix}
Version: 6.2.0 Version: 6.2.0
Release: 0 Release: 0
Summary: Qt5 Widgets for Technical Applications Summary: Qt5 Widgets for Technical Applications
@ -25,94 +41,110 @@ License: SUSE-QWT-1.0
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
URL: https://qwt.sourceforge.io URL: https://qwt.sourceforge.io
Source: https://sourceforge.net/projects/qwt/files/qwt/%{version}/qwt-%{version}.tar.bz2 Source: https://sourceforge.net/projects/qwt/files/qwt/%{version}/qwt-%{version}.tar.bz2
Source99: qwt6-rpmlintrc
# PATCH-FIX-OPENSUSE to prevent 'ERROR: RPATH "/usr/local/qwt-6.1.0/lib" on # PATCH-FIX-OPENSUSE to prevent 'ERROR: RPATH "/usr/local/qwt-6.1.0/lib" on
# /usr/lib(64)/qt(4,5)/plugins/designer/libqwt_designer_plugin.so is not allowed'. # /usr/lib(64)/qt(4,5)/plugins/designer/libqwt_designer_plugin.so is not allowed'.
Patch0: qwt-6.1.3-rpath.patch Patch0: qwt-6.1.3-rpath.patch
# PATCH-FIX-OPENSUSE mkspecs.patch -- Use established settings for the .pc files # PATCH-FIX-OPENSUSE mkspecs.patch -- Use established settings for the .pc files
Patch2: qwt-6.1.4-mkspecs.patch Patch2: qwt-6.1.4-mkspecs.patch
# PATCH-FIX-OPENSUSE qwt-6.2.0-qt6-pkgconfig.patch -- require correct libraries in Qt6 pkgconfig
Patch3: qwt-6.2.0-qt6-pkgconfig.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: freetype2-devel BuildRequires: freetype2-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig BuildRequires: pkgconfig
%if 0%{?qt5}
BuildRequires: pkgconfig(Qt5Concurrent) BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Designer) BuildRequires: pkgconfig(Qt5Designer)
BuildRequires: pkgconfig(Qt5OpenGL) BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Svg)
%endif
%if 0%{?qt6}
BuildRequires: pkgconfig(Qt6Concurrent)
BuildRequires: pkgconfig(Qt6Designer)
BuildRequires: pkgconfig(Qt6OpenGL)
BuildRequires: pkgconfig(Qt6PrintSupport)
BuildRequires: pkgconfig(Qt6Svg)
%endif
BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libpng)
%description %description
The Qwt(Qt5) library contains GUI Components and utility classes which are The Qwt(%{qt_descr}) library contains GUI Components and utility classes which are
primarily useful for programs with a technical background. Beside a 2D primarily useful for programs with a technical background. Beside a 2D
plot widget it provides scales, sliders, dials, compasses, thermometers, plot widget it provides scales, sliders, dials, compasses, thermometers,
wheels and knobs to control or display values, arrays, or ranges of type wheels and knobs to control or display values, arrays, or ranges of type
double. double.
%package -n libqwt%{sover} %package -n libqwt%{mver}-%{qwt6_flavor}-%{sover}
Summary: Shared library for Qt5 Widgets for Technical Applications Summary: Shared library for %{qt_descr} Widgets for Technical Applications
Group: System/Libraries Group: System/Libraries
Provides: lib%{name}-qt5-%{sover} = %{version}
Obsoletes: lib%{name}-qt5-%{sover} < %{version}
%description -n libqwt%{sover} %description -n libqwt%{mver}-%{qwt6_flavor}-%{sover}
This package contains the shared library to run Technical Applications This package contains the shared library to run Technical Applications
developed with/for Qwt(Qt5). developed with/for Qwt(Qt5).
%package devel %package devel
Summary: Include headers and Qt Designer plugin for Qwt(Qt5) Summary: Include headers and Qt Designer plugin for Qwt(Qt5)
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: libqwt%{sover} = %{version} Requires: libqwt%{mver}-%{qwt6_flavor}-%{sover} = %{version}
Requires: freetype2-devel Requires: freetype2-devel
Requires: gcc-c++ Requires: gcc-c++
%if 0%{?qt5}
Requires: pkgconfig(Qt5Concurrent) Requires: pkgconfig(Qt5Concurrent)
Requires: pkgconfig(Qt5OpenGL) Requires: pkgconfig(Qt5OpenGL)
Requires: pkgconfig(Qt5PrintSupport) Requires: pkgconfig(Qt5PrintSupport)
Requires: pkgconfig(Qt5Svg) Requires: pkgconfig(Qt5Svg)
Requires: pkgconfig(Qt5Widgets) Requires: pkgconfig(Qt5Widgets)
%endif
%if 0%{?qt6}
Requires: pkgconfig(Qt6Concurrent)
Requires: pkgconfig(Qt6OpenGL)
Requires: pkgconfig(Qt6PrintSupport)
Requires: pkgconfig(Qt6Svg)
Requires: pkgconfig(Qt6Widgets)
%endif
Requires: pkgconfig(libpng) Requires: pkgconfig(libpng)
Recommends: %{name}-designer Recommends: %{name}-designer
Recommends: %{name}-devel-doc Recommends: %{name}-devel-doc
Recommends: %{name}-examples Recommends: %{name}-examples
%if 0%{?qt5}
Conflicts: otherproviders(qwt-qt5-devel) Conflicts: otherproviders(qwt-qt5-devel)
Conflicts: qwt-devel Conflicts: qwt-devel
Provides: qwt-qt5-devel = %{version} Provides: qwt-qt5-devel = %{version}
Obsoletes: qwt6-qt5-devel < %{version} %endif
Provides: qwt6-qt5-devel = %{version}
%description devel %description devel
This package contains the header files of Qwt and its Qt designer plugin This package contains the header files of Qwt and its Qt designer plugin
in order to create Qt applications using the Qwt(Qt5) widgets. in order to create Qt applications using the Qwt(Qt5) widgets.
%package examples %package examples
Summary: Example programs using Qwt(Qt5) Summary: Example programs using Qwt(%{qt_descr})
License: SUSE-QWT-1.0 or BSD-3-Clause License: SUSE-QWT-1.0 or BSD-3-Clause
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version} Requires: %{name}-devel = %{version}
Provides: %{name}-qt5-examples = %{version}
Obsoletes: %{name}-qt5-examples < %{version}
%description examples %description examples
This package contains example programs demonstrating the Qwt(Qt5) widgets. This package contains example programs demonstrating the Qwt(%{qt_descr}) widgets.
%package designer %package designer
Summary: Plugin for the Qt5 Interface designer Summary: Plugin for the %{qt_descr} Interface designer
Group: Development/Tools/GUI Builders Group: Development/Tools/GUI Builders
Requires: %{name}-devel = %{version} Requires: %{name}-devel = %{version}
%if 0%{?qt5}
Conflicts: otherproviders(qwt-qt5-designer) Conflicts: otherproviders(qwt-qt5-designer)
Provides: qwt-qt5-designer = %{version} Provides: qwt-qt5-designer = %{version}
Provides: %{name}-qt5-designer = %{version} %endif
Obsoletes: %{name}-qt5-designer < %{version}
%description designer %description designer
The %{name}-designer package contains the plugin for the Qt5 User Interface The %{name}-designer package contains the plugin for the Qt5 User Interface
designer tool. designer tool.
%package devel-doc %package devel-doc
Summary: Development documentation for Qwt(Qt5) Summary: Development documentation for Qwt(%{qt_descr})
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version} Requires: %{name}-devel = %{version}
Provides: %{name}-qt5-devel-doc = %{version} BuildArch: noarch
Obsoletes: %{name}-qt5-devel-doc < %{version}
%description devel-doc %description devel-doc
This package contains the development documentation of the Qwt(Qt5) widgets This package contains the development documentation of the Qwt(Qt5) widgets
@ -124,57 +156,112 @@ as is it created by doxygen.
%build %build
mkdir build mkdir build
pushd build pushd build
%if 0%{?qt5}
%qmake5 .. %qmake5 ..
%endif
%if 0%{?qt6}
%qmake6 ..
%endif
%make_jobs %make_jobs
popd popd
%install %install
pushd build pushd build
%if 0%{?qt5}
%qmake5_install %qmake5_install
%endif
%if 0%{?qt6}
%qmake6_install
%endif
popd popd
# nothing references this # nothing references this
%if 0%{?qt5}
rm -f "%{buildroot}/%{_libqt5_libdir}/libqwt.so.6" rm -f "%{buildroot}/%{_libqt5_libdir}/libqwt.so.6"
%endif
%if 0%{?qt6}
rm -f "%{buildroot}/%{_qt6_libdir}/libqwt.so.6"
%endif
# Qwt base examples # Qwt base examples
%if 0%{?qt5}
mkdir -p %{buildroot}%{%_libqt5_docdir}/qwt6 mkdir -p %{buildroot}%{%_libqt5_docdir}/qwt6
mkdir -p %{buildroot}%{_libqt5_examplesdir}/qwt6 mkdir -p %{buildroot}%{_libqt5_examplesdir}/qwt6
cp -r examples %{buildroot}%{_libqt5_docdir}/qwt6/examples cp -r examples %{buildroot}%{_libqt5_docdir}/qwt6/examples
cp -r build/examples/bin %{buildroot}%{_libqt5_examplesdir}/qwt6 cp -r build/examples/bin %{buildroot}%{_libqt5_examplesdir}/qwt6
%endif
%if 0%{?qt6}
mkdir -p %{buildroot}%{%_qt6_docdir}/qwt6
mkdir -p %{buildroot}%{_qt6_examplesdir}/qwt6
cp -r examples %{buildroot}%{_qt6_docdir}/qwt6/examples
cp -r build/examples/bin %{buildroot}%{_qt6_examplesdir}/qwt6
%endif
mkdir -p %{buildroot}%{_mandir} mkdir -p %{buildroot}%{_mandir}
%if 0%{?qt5}
mv %{buildroot}%{_libqt5_docdir}/qwt6/man/man3 \ mv %{buildroot}%{_libqt5_docdir}/qwt6/man/man3 \
%{buildroot}%{_mandir}/ %{buildroot}%{_mandir}/
%endif
%if 0%{?qt6}
mv %{buildroot}%{_qt6_docdir}/qwt6/man/man3 \
%{buildroot}%{_mandir}/
%endif
%fdupes %{buildroot}%{_prefix} %fdupes %{buildroot}%{_prefix}
%post -n libqwt%{sover} -p /sbin/ldconfig %post -n libqwt%{mver}-%{qwt6_flavor}-%{sover} -p /sbin/ldconfig
%postun -n libqwt%{sover} -p /sbin/ldconfig %postun -n libqwt%{mver}-%{qwt6_flavor}-%{sover} -p /sbin/ldconfig
%files -n libqwt%{sover} %files -n libqwt%{mver}-%{qwt6_flavor}-%{sover}
%if 0%{?sle_version} != 120200
%license COPYING %license COPYING
%else %if 0%{?qt5}
%doc COPYING
%endif
%{_libqt5_libdir}/libqwt.so.6.2* %{_libqt5_libdir}/libqwt.so.6.2*
%endif
%if 0%{?qt6}
%{_qt6_libdir}/libqwt.so.6.2*
%endif
%files designer %files designer
%if 0%{?qt5}
%dir %{_libqt5_plugindir}/designer/ %dir %{_libqt5_plugindir}/designer/
%{_libqt5_plugindir}/designer/*.so %{_libqt5_plugindir}/designer/*.so
%endif
%if 0%{?qt6}
%dir %{_qt6_pluginsdir}/designer/
%{_qt6_pluginsdir}/designer/*.so
%endif
%files devel %files devel
%doc README %doc README
%if 0%{?qt5}
%{_libqt5_libdir}/libqwt.so %{_libqt5_libdir}/libqwt.so
%{_libqt5_libdir}/pkgconfig/Qt5Qwt6.pc %{_libqt5_libdir}/pkgconfig/Qt5Qwt6.pc
%{_libqt5_archdatadir}/mkspecs/features/ %{_libqt5_archdatadir}/mkspecs/features/
%dir %{_libqt5_includedir}/qwt6 %dir %{_libqt5_includedir}/qwt6
%{_libqt5_includedir}/qwt6/* %{_libqt5_includedir}/qwt6/*
%endif
%if 0%{?qt6}
%{_qt6_libdir}/libqwt.so
%{_qt6_libdir}/pkgconfig/%{qt_descr}Qwt6.pc
%{_qt6_archdatadir}/mkspecs/features/
%dir %{_qt6_includedir}/qwt6
%{_qt6_includedir}/qwt6/*
%endif
%{_mandir}/man?/*.3%{ext_info} %{_mandir}/man?/*.3%{ext_info}
%files examples %files examples
%if 0%{?qt5}
%{_libqt5_examplesdir}/ %{_libqt5_examplesdir}/
%endif
%if 0%{?qt6}
%{_qt6_examplesdir}/
%endif
%files devel-doc %files devel-doc
%if 0%{?qt5}
%doc %{_libqt5_docdir}/ %doc %{_libqt5_docdir}/
%endif
%if 0%{?qt6}
%doc %{_qt6_docdir}/
%endif
%changelog %changelog