diff --git a/qwt-6.2.0-qt6-libsuffix.patch b/qwt-6.2.0-qt6-libsuffix.patch new file mode 100644 index 0000000..44c0945 --- /dev/null +++ b/qwt-6.2.0-qt6-libsuffix.patch @@ -0,0 +1,44 @@ +diff -rupN --no-dereference qwt-6.2.0/qwtfunctions.pri qwt-6.2.0-new/qwtfunctions.pri +--- qwt-6.2.0/qwtfunctions.pri 2021-07-18 13:19:33.644367625 +0200 ++++ qwt-6.2.0-new/qwtfunctions.pri 2022-11-29 15:38:14.943070118 +0100 +@@ -12,7 +12,12 @@ + defineReplace(qwtLibraryTarget) { + + unset(LIBRARY_NAME) ++ ++ greaterThan(QT_MAJOR_VERSION, 4) { ++ LIBRARY_NAME = $${1}-qt$${QT_MAJOR_VERSION} ++ } else { + LIBRARY_NAME = $$1 ++ } + + mac:contains(QWT_CONFIG, QwtFramework) { + +@@ -36,7 +41,11 @@ defineReplace(qwtLibraryTarget) { + defineTest(qwtAddLibrary) { + + LIB_PATH = $$1 ++ greaterThan(QT_MAJOR_VERSION, 4) { ++ LIB_NAME = $${2}-qt$${QT_MAJOR_VERSION} ++ } else { + LIB_NAME = $$2 ++ } + + mac:contains(QWT_CONFIG, QwtFramework) { + +diff -rupN qwt-6.2.0/src/src.pro qwt-6.2.0-new/src/src.pro +--- qwt-6.2.0/src/src.pro 2022-11-29 15:38:15.365070601 +0100 ++++ qwt-6.2.0-new/src/src.pro 2022-11-29 15:45:42.295600411 +0100 +@@ -31,7 +31,11 @@ contains(QWT_CONFIG, QwtDll) { + + # we increase the SONAME for every minor number + +- QWT_SONAME=libqwt.so.$${VER_MAJ}.$${VER_MIN} ++ greaterThan(QT_MAJOR_VERSION, 4) { ++ QWT_SONAME=libqwt-qt$${QT_MAJOR_VERSION}.so.$${VER_MAJ}.$${VER_MIN} ++ } else { ++ QWT_SONAME=libqwt.so.$${VER_MAJ}.$${VER_MIN} ++ } + QMAKE_LFLAGS *= $${QMAKE_LFLAGS_SONAME}$${QWT_SONAME} + QMAKE_LFLAGS_SONAME= + } diff --git a/qwt-6.2.0-qt6-pkgconfig.patch b/qwt-6.2.0-qt6-pkgconfig.patch index 119a053..0d943ff 100644 --- a/qwt-6.2.0-qt6-pkgconfig.patch +++ b/qwt-6.2.0-qt6-pkgconfig.patch @@ -1,41 +1,12 @@ -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) { +diff -rupN --no-dereference qwt-6.2.0/src/src.pro qwt-6.2.0-new/src/src.pro +--- qwt-6.2.0/src/src.pro 2021-07-18 13:19:33.628367286 +0200 ++++ qwt-6.2.0-new/src/src.pro 2022-11-29 15:38:15.226070441 +0100 +@@ -82,7 +82,7 @@ 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 ++ QMAKE_PKGCONFIG_REQUIRES = Qt$${QT_MAJOR_VERSION}Widgets Qt$${QT_MAJOR_VERSION}Concurrent Qt$${QT_MAJOR_VERSION}PrintSupport -- 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 + contains(QWT_CONFIG, QwtSvg) { + QMAKE_PKGCONFIG_REQUIRES += Qt5Svg diff --git a/qwt6.changes b/qwt6.changes index d8a44e2..762f8b5 100644 --- a/qwt6.changes +++ b/qwt6.changes @@ -2,13 +2,12 @@ Fri Apr 28 11:07:33 UTC 2023 - Luigi Baldoni - Fixes boo#1210931 -- Add qwt6-rpmlintrc - -------------------------------------------------------------------- -Thu Aug 25 13:56:16 UTC 2022 - Luigi Baldoni - - Add _multibuild to support Qt6 -- qwt-6.2.0-qt6-pkgconfig.patch +- Add qwt-6.2.0-qt6-pkgconfig.patch and + qwt-6.2.0-qt6-libsuffix.patch (courtesy of Fedora) + and qwt6-rpmlintrc +- Man pages are now installed in the flavored doc dir as per + upstream default ------------------------------------------------------------------- Tue Jul 27 08:07:52 UTC 2021 - Dmitriy Perlow diff --git a/qwt6.spec b/qwt6.spec index ffe2eda..017dee0 100644 --- a/qwt6.spec +++ b/qwt6.spec @@ -36,7 +36,7 @@ ExclusiveArch: do_not_build Name: qwt6%{?pkg_suffix} Version: 6.2.0 Release: 0 -Summary: Qt5 Widgets for Technical Applications +Summary: %{qt_descr} Widgets for Technical Applications License: SUSE-QWT-1.0 Group: Development/Libraries/C and C++ URL: https://qwt.sourceforge.io @@ -49,6 +49,9 @@ Patch0: qwt-6.1.3-rpath.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 +# +# PATCH-FIX-OPENSUSE qwt-6.2.0-qt6-libsuffix.patch -- change SONAMEs to avoid conflicts +Patch4: qwt-6.2.0-qt6-libsuffix.patch BuildRequires: fdupes BuildRequires: freetype2-devel BuildRequires: gcc-c++ @@ -116,7 +119,7 @@ Provides: qwt-qt5-devel = %{version} %description devel 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(%{qt_descr}) widgets. %package examples Summary: Example programs using Qwt(%{qt_descr}) @@ -147,7 +150,7 @@ Requires: %{name}-devel = %{version} BuildArch: noarch %description devel-doc -This package contains the development documentation of the Qwt(Qt5) widgets +This package contains the development documentation of the Qwt(%{qt_descr}) widgets as is it created by doxygen. %prep @@ -176,10 +179,10 @@ pushd build popd # nothing references this %if 0%{?qt5} -rm -f "%{buildroot}/%{_libqt5_libdir}/libqwt.so.6" +rm -f "%{buildroot}/%{_libqt5_libdir}/libqwt-%{qwt6_flavor}.so.6" %endif %if 0%{?qt6} -rm -f "%{buildroot}/%{_qt6_libdir}/libqwt.so.6" +rm -f "%{buildroot}/%{_qt6_libdir}/libqwt-%{qwt6_flavor}.so.6" %endif # Qwt base examples @@ -196,16 +199,6 @@ cp -r examples %{buildroot}%{_qt6_docdir}/qwt6/examples cp -r build/examples/bin %{buildroot}%{_qt6_examplesdir}/qwt6 %endif -mkdir -p %{buildroot}%{_mandir} -%if 0%{?qt5} -mv %{buildroot}%{_libqt5_docdir}/qwt6/man/man3 \ - %{buildroot}%{_mandir}/ -%endif -%if 0%{?qt6} -mv %{buildroot}%{_qt6_docdir}/qwt6/man/man3 \ - %{buildroot}%{_mandir}/ -%endif - %fdupes %{buildroot}%{_prefix} %post -n libqwt%{mver}-%{qwt6_flavor}-%{sover} -p /sbin/ldconfig @@ -214,10 +207,10 @@ mv %{buildroot}%{_qt6_docdir}/qwt6/man/man3 \ %files -n libqwt%{mver}-%{qwt6_flavor}-%{sover} %license COPYING %if 0%{?qt5} -%{_libqt5_libdir}/libqwt.so.6.2* +%{_libqt5_libdir}/libqwt-%{qwt6_flavor}.so.6.2* %endif %if 0%{?qt6} -%{_qt6_libdir}/libqwt.so.6.2* +%{_qt6_libdir}/libqwt-%{qwt6_flavor}.so.6.2* %endif %files designer @@ -233,20 +226,19 @@ mv %{buildroot}%{_qt6_docdir}/qwt6/man/man3 \ %files devel %doc README %if 0%{?qt5} -%{_libqt5_libdir}/libqwt.so +%{_libqt5_libdir}/libqwt-%{qwt6_flavor}.so %{_libqt5_libdir}/pkgconfig/Qt5Qwt6.pc %{_libqt5_archdatadir}/mkspecs/features/ %dir %{_libqt5_includedir}/qwt6 %{_libqt5_includedir}/qwt6/* %endif %if 0%{?qt6} -%{_qt6_libdir}/libqwt.so +%{_qt6_libdir}/libqwt-%{qwt6_flavor}.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} %files examples %if 0%{?qt5}