[packages/qwt] - updated to 6.1.3 (note: new soname) - updated install patch - added qt5 patch (rename library when

qboosh qboosh at pld-linux.org
Fri Feb 1 21:27:09 CET 2019


commit 84d24838ad3a9616da9704cec50861bd84e307df
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Feb 1 21:32:21 2019 +0100

    - updated to 6.1.3 (note: new soname)
    - updated install patch
    - added qt5 patch (rename library when building with qt5); package both qt4 and qt5 variants

 qwt-install.patch | 112 ++++++++++++++++++++++-----
 qwt-qt5.patch     |  26 +++++++
 qwt.spec          | 226 ++++++++++++++++++++++++++++++++++++++++++------------
 3 files changed, 297 insertions(+), 67 deletions(-)
---
diff --git a/qwt.spec b/qwt.spec
index 6f10752..d33eaf4 100644
--- a/qwt.spec
+++ b/qwt.spec
@@ -1,22 +1,42 @@
-Summary:	2D plotting widget extension to the Qt GUI
-Summary(pl.UTF-8):	Rozszerzenie wykresów 2D dla GUI Qt
+#
+# Conditional build:
+%bcond_without	qt4	# Qt4 build
+%bcond_without	qt5	# Qt5 build
+
+Summary:	2D plotting widget extension to the Qt4 GUI
+Summary(pl.UTF-8):	Rozszerzenie wykresów 2D dla GUI Qt4
 Name:		qwt
-Version:	5.2.3
-Release:	3
+Version:	6.1.3
+Release:	1
 License:	Qwt v1.0
-Group:		Libraries
+Group:		X11/Libraries
 Source0:	http://downloads.sourceforge.net/qwt/%{name}-%{version}.tar.bz2
-# Source0-md5:	7d37a11d02bc7d095d0ca6427ec97b8d
+# Source0-md5:	19d1f5fa5e22054d22ee3accc37c54ba
 Patch0:		%{name}-install.patch
+Patch1:		%{name}-qt5.patch
 URL:		http://qwt.sourceforge.net/
+%if %{with qt4}
 BuildRequires:	QtCore-devel >= 4.5
 BuildRequires:	QtDesigner-devel >= 4.5
 BuildRequires:	QtGui-devel >= 4.5
+BuildRequires:	QtOpenGL-devel >= 4.5
 BuildRequires:	QtScript-devel >= 4.5
 BuildRequires:	QtSvg-devel >= 4.5
 BuildRequires:	QtXml-devel >= 4.5
 BuildRequires:	qt4-build >= 4.5
 BuildRequires:	qt4-qmake >= 4.5
+%endif
+%if %{with qt5}
+BuildRequires:	Qt5Core-devel >= 5
+BuildRequires:	Qt5Designer-devel >= 5
+BuildRequires:	Qt5Gui-devel >= 5
+BuildRequires:	Qt5OpenGL-devel >= 5
+BuildRequires:	Qt5Script-devel >= 5
+BuildRequires:	Qt5Svg-devel >= 5
+BuildRequires:	Qt5Xml-devel >= 5
+BuildRequires:	qt5-build >= 5
+BuildRequires:	qt5-qmake >= 5
+%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -32,34 +52,26 @@ technicznych i naukowych. Zawiera widget do rysowania wykresów 2D,
 różne rodzaje suwaków i wiele więcej.
 
 %package devel
-Summary:	Header files for Qwt library
-Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki Qwt
-Group:		Development/Libraries
+Summary:	Header files for Qt4 Qwt library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki Qwt dla Qt4
+Group:		X11/Development/Libraries
 Requires:	%{name} = %{version}-%{release}
 Requires:	QtCore-devel >= 4.5
 Requires:	QtGui-devel >= 4.5
+Requires:	QtOpenGL-devel >= 4.5
+Requires:	QtSvg-devel >= 4.5
+Requires:	QtXml-devel >= 4.5
 
 %description devel
-Header files for Qwt library.
+Header files for Qt4 Qwt library.
 
 %description devel -l pl.UTF-8
-Pliki nagłówkowe biblioteki Qwt.
-
-%package apidocs
-Summary:	API documentation for Qwt library
-Summary(pl.UTF-8):	Dokumentacja API biblioteki Qwt
-Group:		Documentation
-
-%description apidocs
-API documentation for Qwt library.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API biblioteki Qwt.
+Pliki nagłówkowe biblioteki Qwt dla Qt4.
 
 %package -n QtDesigner-plugin-qwt
 Summary:	qwt plugin for Qt Designer
 Summary(pl.UTF-8):	Wtyczka qwt dla Qt Designera
-Group:		Development/Libraries
+Group:		X11/Libraries
 Requires:	%{name} = %{version}-%{release}
 Requires:	QtDesigner >= 4.5
 Obsoletes:	qt4-plugin-qwt
@@ -70,35 +82,120 @@ qwt plugin for Qt Designer.
 %description -n QtDesigner-plugin-qwt -l pl.UTF-8
 Wtyczka qwt dla Qt Designera.
 
+%package -n qwt5
+Summary:	2D plotting widget extension to the Qt5 GUI
+Summary(pl.UTF-8):	Rozszerzenie wykresów 2D dla GUI Qt5
+Group:		X11/Libraries
+
+%description -n qwt5
+Qwt is an extension to the Qt GUI library from Troll Tech AS. The Qwt
+library contains widgets and components which are primarily useful for
+technical and scientifical purposes. It includes a 2-D plotting
+widget, different kinds of sliders, and much more.
+
+%description -n qwt5 -l pl.UTF-8
+Qwt jest rozszerzeniem do biblioteki Qt z Troll Tech AS. Biblioteka
+Qwt zawiera widgety i komponenty użyteczne głównie do celów
+technicznych i naukowych. Zawiera widget do rysowania wykresów 2D,
+różne rodzaje suwaków i wiele więcej.
+
+%package -n qwt5-devel
+Summary:	Header files for Qt5 Qwt library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki Qwt dla Qt5
+Group:		X11/Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	Qt5Core-devel >= 5
+Requires:	Qt5Gui-devel >= 5
+Requires:	Qt5OpenGL-devel >= 5
+Requires:	Qt5Svg-devel >= 5
+Requires:	Qt5Widgets-devel >= 5
+Requires:	Qt5Xml-devel >= 5
+
+%description -n qwt5-devel
+Header files for Qt5 Qwt library.
+
+%description -n qwt5-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki Qwt dla Qt5.
+
+%package -n Qt5Designer-plugin-qwt
+Summary:	qwt plugin for Qt5 Designer
+Summary(pl.UTF-8):	Wtyczka qwt dla Qt5 Designera
+Group:		X11/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	Qt5Designer >= 5
+
+%description -n Qt5Designer-plugin-qwt
+qwt plugin for Qt5 Designer.
+
+%description -n Qt5Designer-plugin-qwt -l pl.UTF-8
+Wtyczka qwt dla Qt5 Designera.
+
+%package apidocs
+Summary:	API documentation for Qwt library
+Summary(pl.UTF-8):	Dokumentacja API biblioteki Qwt
+Group:		Documentation
+
+%description apidocs
+API documentation for Qwt library with examples.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki Qwt wraz z przykładami.
+
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
-qmake-qt4 qwt.pro \
-	INSTALLBASE=%{_prefix} \
-	DOCDIR=%{_docdir} \
-	LIBDIR=%{_libdir} \
-	INCDIR=%{_includedir}/qwt \
+%if %{with qt4}
+install -d build-qt4
+cd build-qt4
+qmake-qt4 ../qwt.pro \
 	QMAKE_CXX="%{__cxx}" \
 	QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
 	QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
 
 %{__make} -j1
+cd ..
+%endif
+
+%if %{with qt5}
+install -d build-qt5
+cd build-qt5
+qmake-qt5 ../qwt.pro \
+	QMAKE_CXX="%{__cxx}" \
+	QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
+	QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
+
+%{__make} -j1
+cd ..
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_mandir}
 
-%{__make} install \
+%if %{with qt4}
+%{__make} -C build-qt4 install \
 	INSTALL_ROOT=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT%{_mandir}
-%{__mv} $RPM_BUILD_ROOT%{_docdir}/man/man3 $RPM_BUILD_ROOT%{_mandir}
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/qt4-doc/html/man/man3 $RPM_BUILD_ROOT%{_mandir}
+%endif
+
+%if %{with qt5}
+%{__make} -C build-qt5 install \
+	INSTALL_ROOT=$RPM_BUILD_ROOT
+
+%if %{without qt4}
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/qt5-doc/html/man/man3 $RPM_BUILD_ROOT%{_mandir}
+%endif
+%endif
+
 # packaged as %doc
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/qt?-doc/html
 
 # pointless link
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libqwt.so.?.?
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libqwt*.so.?.?
 
 install -d $RPM_BUILD_ROOT%{_examplesdir}
 cp -pr examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
@@ -109,31 +206,66 @@ rm -rf $RPM_BUILD_ROOT
 %post	-p /sbin/ldconfig
 %postun	-p /sbin/ldconfig
 
+%if %{with qt4}
 %files
 %defattr(644,root,root,755)
-%doc CHANGES COPYING README
+%doc CHANGES-6.1 COPYING README
 %attr(755,root,root) %{_libdir}/libqwt.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libqwt.so.5
+%attr(755,root,root) %ghost %{_libdir}/libqwt.so.6
+%attr(755,root,root) %{_libdir}/libqwtmathml.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libqwtmathml.so.6
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libqwt.so
-%{_includedir}/qwt
+%attr(755,root,root) %{_libdir}/libqwtmathml.so
+%{_includedir}/qt4/qwt
+%{_pkgconfigdir}/qwt.pc
+%{_pkgconfigdir}/qwtmathml.pc
+%{_datadir}/qt4/mkspecs/features/qwt*.pri
+%{_datadir}/qt4/mkspecs/features/qwt.prf
+%{_datadir}/qt4/mkspecs/features/qwtmathml.prf
+
+%files -n QtDesigner-plugin-qwt
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/qt4/plugins/designer/libqwt_designer_plugin.so
+%endif
+
+%if %{with qt5}
+%files -n qwt5
+%defattr(644,root,root,755)
+%doc CHANGES-6.1 COPYING README
+%attr(755,root,root) %{_libdir}/libqwt5.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libqwt5.so.6
+%attr(755,root,root) %{_libdir}/libqwtmathml5.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libqwtmathml5.so.6
+
+%files -n qwt5-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libqwt5.so
+%attr(755,root,root) %{_libdir}/libqwtmathml5.so
+%{_includedir}/qt5/qwt
+%{_pkgconfigdir}/Qt5Qwt6.pc
+%{_pkgconfigdir}/qwtmathml5.pc
+%{_libdir}/qt5/mkspecs/features/qwt*.pri
+%{_libdir}/qt5/mkspecs/features/qwt.prf
+%{_libdir}/qt5/mkspecs/features/qwtmathml.prf
+
+%files -n Qt5Designer-plugin-qwt
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/qt5/plugins/designer/libqwt_designer_plugin.so
+%endif
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/html/*.css doc/html/*.html doc/html/*.png examples
 %{_mandir}/man3/Qwt*.3*
+%{_mandir}/man3/barchartscreenshots.3*
 %{_mandir}/man3/controlscreenshots.3*
 %{_mandir}/man3/curvescreenshots.3*
-%{_mandir}/man3/deprecated.3*
-%{_mandir}/man3/histogramscreenshots.3
+%{_mandir}/man3/otherscreenshots.3*
+%{_mandir}/man3/qwtchangelog.3*
 %{_mandir}/man3/qwtinstall.3*
 %{_mandir}/man3/qwtlicense.3*
-%{_mandir}/man3/scatterscreenshots.3
 %{_mandir}/man3/spectrogramscreenshots.3*
 %{_examplesdir}/%{name}-%{version}
-
-%files apidocs
-%defattr(644,root,root,755)
-%doc doc/html/*.css doc/html/*.html doc/html/*.png examples
-
-%files -n QtDesigner-plugin-qwt
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/qt4/plugins/designer/libqwt_designer_plugin.so
diff --git a/qwt-install.patch b/qwt-install.patch
index 54f92f8..9803706 100644
--- a/qwt-install.patch
+++ b/qwt-install.patch
@@ -1,29 +1,101 @@
---- qwt-5.2.3/qwtconfig.pri.orig	2012-11-20 18:48:07.421235447 +0100
-+++ qwt-5.2.3/qwtconfig.pri	2018-12-29 09:04:18.530475791 +0100
-@@ -8,16 +8,22 @@
- VERSION      = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
+--- qwt-6.1.3/qwtbuild.pri.orig	2016-06-13 09:14:23.029601054 +0200
++++ qwt-6.1.3/qwtbuild.pri	2019-01-06 10:06:28.695874261 +0100
+@@ -14,7 +14,6 @@
+ CONFIG           += qt     
+ CONFIG           += warn_on
+ CONFIG           += no_keywords
+-CONFIG           += silent
+ 
+ ######################################################################
+ # release/debug mode
+--- qwt-6.1.3/qwtconfig.pri.orig	2019-01-03 19:56:12.828429841 +0100
++++ qwt-6.1.3/qwtconfig.pri	2019-01-06 10:06:13.685874433 +0100
+@@ -19,18 +19,18 @@
+ QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
  
  unix {
--    INSTALLBASE    = /usr/local/qwt-$$VERSION
-+    INSTALLBASE    ?= /usr/local/qwt-$$VERSION
-+    LIBDIR         ?= $$INSTALLBASE/lib
-+    INCDIR         ?= $$INSTALLBASE/include
-+    DOCDIR         ?= $$INSTALLBASE/doc
+-    QWT_INSTALL_PREFIX    = /usr/local/qwt-$$QWT_VERSION
++    # QWT_INSTALL_PREFIX   ?= /usr/local/qwt-$$QWT_VERSION
+     # QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-qt-$$QT_VERSION
  }
  
  win32 {
-     INSTALLBASE    = C:/Qwt-$$VERSION
-+    LIBDIR         = $$INSTALLBASE/lib
-+    INCDIR         = $$INSTALLBASE/include
-+    DOCDIR         = $$INSTALLBASE/doc
+-    QWT_INSTALL_PREFIX    = C:/Qwt-$$QWT_VERSION
++    # QWT_INSTALL_PREFIX   ?= C:/Qwt-$$QWT_VERSION
+     # QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION-qt-$$QT_VERSION
  }
  
--target.path    = $$INSTALLBASE/lib
--headers.path   = $$INSTALLBASE/include
--doc.path       = $$INSTALLBASE/doc
-+target.path    = $$LIBDIR
-+headers.path   = $$INCDIR
-+doc.path       = $$DOCDIR
+-QWT_INSTALL_DOCS      = $${QWT_INSTALL_PREFIX}/doc
+-QWT_INSTALL_HEADERS   = $${QWT_INSTALL_PREFIX}/include
+-QWT_INSTALL_LIBS      = $${QWT_INSTALL_PREFIX}/lib
++QWT_INSTALL_DOCS      = $$[QT_INSTALL_DOCS]/html
++QWT_INSTALL_HEADERS   = $$[QT_INSTALL_HEADERS]/qwt
++QWT_INSTALL_LIBS      = $$[QT_INSTALL_LIBS]
+ 
+ ######################################################################
+ # Designer plugin
+@@ -42,14 +42,14 @@
+ # runtime environment of designer/creator.
+ ######################################################################
+ 
+-QWT_INSTALL_PLUGINS   = $${QWT_INSTALL_PREFIX}/plugins/designer
++#QWT_INSTALL_PLUGINS   = $${QWT_INSTALL_PREFIX}/plugins/designer
+ 
+ # linux distributors often organize the Qt installation
+ # their way and QT_INSTALL_PREFIX doesn't offer a good
+ # path. Also QT_INSTALL_PREFIX is only one of the default
+ # search paths of the designer - not the Qt creator
+ 
+-#QWT_INSTALL_PLUGINS   = $$[QT_INSTALL_PREFIX]/plugins/designer
++QWT_INSTALL_PLUGINS   = $$[QT_INSTALL_PLUGINS]/designer
+ 
+ ######################################################################
+ # Features
+@@ -63,8 +63,8 @@
+ # with every Qt upgrade. 
+ ######################################################################
+ 
+-QWT_INSTALL_FEATURES  = $${QWT_INSTALL_PREFIX}/features
+-# QWT_INSTALL_FEATURES  = $$[QT_INSTALL_PREFIX]/features
++#QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/features
++QWT_INSTALL_FEATURES  = $$[QMAKE_MKSPECS]/features
  
  ######################################################################
- # qmake internal options
+ # Build the static/shared libraries.
+@@ -110,7 +110,7 @@
+ # to your qmake project file.
+ ######################################################################
+ 
+-#QWT_CONFIG     += QwtMathML
++QWT_CONFIG     += QwtMathML
+ 
+ ######################################################################
+ # If you want to build the Qwt designer plugin, 
+@@ -171,5 +171,5 @@
+ 
+ unix {
+ 
+-    #QWT_CONFIG     += QwtPkgConfig
++    QWT_CONFIG     += QwtPkgConfig
+ }
+--- qwt-6.1.3/designer/designer.pro.orig	2016-06-13 09:14:23.019600853 +0200
++++ qwt-6.1.3/designer/designer.pro	2019-01-06 10:06:56.922540605 +0100
+@@ -83,7 +83,6 @@
+         # compile the path for finding the Qwt library
+         # into the plugin. Not supported on Windows !
+ 
+-        QMAKE_RPATHDIR *= $${QWT_INSTALL_LIBS}
+         qwtAddLibrary($${QWT_OUT_ROOT}/lib, qwt)
+ 
+         contains(QWT_CONFIG, QwtDll) {
+--- qwt-6.1.3/textengines/mathml/mathml.pro.orig	2016-06-13 09:14:22.990600268 +0200
++++ qwt-6.1.3/textengines/mathml/mathml.pro	2019-01-06 10:06:04.815874533 +0100
+@@ -61,6 +61,8 @@
+     QMAKE_PKGCONFIG_LIBDIR = $${QWT_INSTALL_LIBS}
+     QMAKE_PKGCONFIG_INCDIR = $${QWT_INSTALL_HEADERS}
+ 
++    QMAKE_PKGCONFIG_DESTDIR = pkgconfig
++
+     # QMAKE_PKGCONFIG_DESTDIR is buggy, in combination
+     # with including pri files: better don't use it
+ 
diff --git a/qwt-qt5.patch b/qwt-qt5.patch
new file mode 100644
index 0000000..f5bded9
--- /dev/null
+++ b/qwt-qt5.patch
@@ -0,0 +1,26 @@
+--- qwt-6.1.3/qwtfunctions.pri.orig	2016-06-13 09:14:23.025600974 +0200
++++ qwt-6.1.3/qwtfunctions.pri	2019-01-06 10:10:07.662538429 +0100
+@@ -12,7 +12,11 @@
+ defineReplace(qwtLibraryTarget) {
+ 
+     unset(LIBRARY_NAME)
++    greaterThan(QT_MAJOR_VERSION, 4) {
++    LIBRARY_NAME = $${1}$${QT_MAJOR_VERSION}
++    } else {
+     LIBRARY_NAME = $$1
++    }
+ 
+     mac:contains(QWT_CONFIG, QwtFramework) {
+ 
+@@ -36,7 +40,11 @@
+ defineTest(qwtAddLibrary) {
+ 
+     LIB_PATH = $$1
++    greaterThan(QT_MAJOR_VERSION, 4) {
++    LIB_NAME = $${2}$${QT_MAJOR_VERSION}
++    } else {
+     LIB_NAME = $$2
++    }
+ 
+     mac:contains(QWT_CONFIG, QwtFramework) {
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qwt.git/commitdiff/84d24838ad3a9616da9704cec50861bd84e307df



More information about the pld-cvs-commit mailing list