From f2ede991c51d6511552991e0613e56d79ec6df33f424549b1576557cc011444a Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Tue, 30 Apr 2019 12:40:07 +0000 Subject: [PATCH 1/2] Accepting request 698902 from home:cgiboudeaux:noqt4 Switch to a Qt5 snapshot OBS-URL: https://build.opensuse.org/request/show/698902 OBS-URL: https://build.opensuse.org/package/show/science/qwtplot3d?expand=0&rev=8 --- _service | 15 ++++ _servicedata | 6 ++ build_a_shared_lib.patch | 31 ++++++++ glu_include.patch | 14 ---- qwtplot3d-0.2.7+git20190410.a6d0890d.tar.xz | 3 + qwtplot3d-0.2.7.tar.bz2 | 3 - qwtplot3d-gcc43.patch | 10 --- qwtplot3d.changes | 9 +++ qwtplot3d.spec | 83 +++++++++------------ 9 files changed, 99 insertions(+), 75 deletions(-) create mode 100644 _service create mode 100644 _servicedata create mode 100644 build_a_shared_lib.patch delete mode 100644 glu_include.patch create mode 100644 qwtplot3d-0.2.7+git20190410.a6d0890d.tar.xz delete mode 100644 qwtplot3d-0.2.7.tar.bz2 delete mode 100644 qwtplot3d-gcc43.patch diff --git a/_service b/_service new file mode 100644 index 0000000..beaf593 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + enable + 0.2.7+git%cd.%h + https://github.com/copasi/copasi-dependencies + src/qwtplot3d-qt4 + git + qwtplot3d + + + *.tar + xz + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..9d2f4e0 --- /dev/null +++ b/_servicedata @@ -0,0 +1,6 @@ + + + https://github.com/copasi/copasi-dependencies + 527adc603a454aefbfd87ecb998f56ed3b6359ab + + diff --git a/build_a_shared_lib.patch b/build_a_shared_lib.patch new file mode 100644 index 0000000..16fb7e2 --- /dev/null +++ b/build_a_shared_lib.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 312690d..334bf30 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -171,16 +171,22 @@ endif() + set(SOURCES ${SOURCES} ${MOC_FILES}) + + +-add_library(qwtplot3d STATIC ${SOURCES} ${HEADERS}) +-QT_BIND_TO_TARGET(qwtplot3d) ++add_library(qwtplot3d-qt5 SHARED ${SOURCES} ${HEADERS}) ++QT_BIND_TO_TARGET(qwtplot3d-qt5) ++ ++target_link_libraries(qwtplot3d-qt5 GL GLU) + + if (ZLIB_FOUND) +-target_link_libraries(qwtplot3d ${ZLIB_LIBRARIES}) ++target_link_libraries(qwtplot3d-qt5 ${ZLIB_LIBRARIES}) + endif(ZLIB_FOUND) + ++set_target_properties(qwtplot3d-qt5 PROPERTIES ++ VERSION 0.2.7 ++ SOVERSION 0 ++) + + install(FILES ${HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") +-INSTALL(TARGETS qwtplot3d ++INSTALL(TARGETS qwtplot3d-qt5 + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") diff --git a/glu_include.patch b/glu_include.patch deleted file mode 100644 index 6aafced..0000000 --- a/glu_include.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- include/qwt3d_openglhelper.h 2005-07-19 17:40:28.000000000 +0200 -+++ include/qwt3d_openglhelper.h.qt480 2012-03-26 19:42:02.000000000 +0200 -@@ -4,8 +4,11 @@ - #include "qglobal.h" - #if QT_VERSION < 0x040000 - #include -+#elif QT_VERSION < 0x040800 -+#include - #else - #include -+#include - #endif - - namespace Qwt3D diff --git a/qwtplot3d-0.2.7+git20190410.a6d0890d.tar.xz b/qwtplot3d-0.2.7+git20190410.a6d0890d.tar.xz new file mode 100644 index 0000000..20f8aa1 --- /dev/null +++ b/qwtplot3d-0.2.7+git20190410.a6d0890d.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:783c3efa62a69ecbf6d2a395e4f274882bcaa6b5d2020b04eec9494d2e3bab42 +size 171192 diff --git a/qwtplot3d-0.2.7.tar.bz2 b/qwtplot3d-0.2.7.tar.bz2 deleted file mode 100644 index 6d78857..0000000 --- a/qwtplot3d-0.2.7.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a02416c73860486879e7ba73dd4231c8abc78af284b96272c812e35fa32c8334 -size 158156 diff --git a/qwtplot3d-gcc43.patch b/qwtplot3d-gcc43.patch deleted file mode 100644 index b906ba1..0000000 --- a/qwtplot3d-gcc43.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -Nur qwtplot3d-orig/src/qwt3d_function.cpp qwtplot3d/src/qwt3d_function.cpp ---- qwtplot3d-orig/src/qwt3d_function.cpp 2010-02-07 13:47:48.807034954 +0100 -+++ qwtplot3d/src/qwt3d_function.cpp 2010-02-07 13:52:58.035284843 +0100 -@@ -1,5 +1,6 @@ - #include "qwt3d_surfaceplot.h" - #include "qwt3d_function.h" -+#include - - using namespace Qwt3D; - diff --git a/qwtplot3d.changes b/qwtplot3d.changes index f72d78b..d3e0b7c 100644 --- a/qwtplot3d.changes +++ b/qwtplot3d.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sat Apr 27 12:59:02 UTC 2019 - christophe@krop.fr + +- Update to version 0.2.7+git20190410.a6d0890d + Switch to a git snapshot. This version supports Qt5 which is + required to build scidavis 1.25. +- Drop glu_include.patch +- Drop qwtplot3d-gcc43.patch + ------------------------------------------------------------------- Thu Aug 17 22:01:14 UTC 2017 - jengelh@inai.de diff --git a/qwtplot3d.spec b/qwtplot3d.spec index a558d28..b7439b9 100644 --- a/qwtplot3d.spec +++ b/qwtplot3d.spec @@ -1,7 +1,7 @@ # # spec file for package qwtplot3d # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -12,41 +12,41 @@ # 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/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%define soname 0 +%define soname 0 Name: qwtplot3d -Version: 0.2.7 +Version: 0.2.7+git20190410.a6d0890d Release: 0 Summary: A feature-rich Qt/OpenGL-based C++ programming library License: Zlib Group: Development/Libraries/C and C++ -Url: http://qwtplot3d.sourceforge.net/ -Source: qwtplot3d-%{version}.tar.bz2 -# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines -Patch0: qwtplot3d-gcc43.patch -# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines -Patch1: glu_include.patch +URL: https://github.com/copasi/copasi-dependencies/tree/master/src/qwtplot3d-qt4 +Source: %{name}-%{version}.tar.xz +# PATCH-FIX-OPENSUSE +Patch0: build_a_shared_lib.patch BuildRequires: Mesa-devel -BuildRequires: dos2unix -%if 0%{?suse_version} > 1220 -BuildRequires: glu-devel -%endif -BuildRequires: qt-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: cmake +BuildRequires: pkgconfig +BuildRequires: cmake(Qt5Core) +BuildRequires: cmake(Qt5Gui) +BuildRequires: cmake(Qt5OpenGL) +BuildRequires: cmake(Qt5Xml) +BuildRequires: pkgconfig(glu) +BuildRequires: pkgconfig(zlib) %description QwtPlot3D is not a program, but a feature-rich Qt/OpenGL-based C++ programming library. It provides essentially a bunch of 3D widgets for programmers. -%package -n lib%{name}%{soname} +%package -n libqwtplot3d-qt5-%{soname} Summary: Shared library containing the QwtPlot3D Widget set Group: System/Libraries -%description -n lib%{name}%{soname} +%description -n libqwtplot3d-qt5-%{soname} QwtPlot3D is not a program, but a feature-rich Qt/OpenGL-based C++ programming library. It provides essentially a bunch of 3D widgets for programmers. @@ -54,50 +54,37 @@ for programmers. %package devel Summary: Development tools for programs which uses QwtPlot3D Widget set Group: Development/Libraries/C and C++ -Requires: lib%{name}%{soname} = %{version} -Requires: qt-devel +Requires: libqwtplot3d-qt5-%{soname} = %{version} %description devel QwtPlot3D is a feature-rich Qt/OpenGL-based C++ programming library. It provides essentially a bunch of 3D widgets for programmers. %prep -%setup -q -n qwtplot3d +%setup -q %patch0 -p1 -%patch1 -p0 -dos2unix COPYING -find examples -type f -exec dos2unix {} + %build -qmake qwtplot3d.pro -o Makefile -make %{?_smp_mflags} +%cmake -DSELECT_QT=Qt5 \ + -DWITH_ZLIB=ON \ + -DCMAKE_INSTALL_INCLUDEDIR=%{_libqt5_includedir}/%{name} + +%make_jobs %install -mkdir -p %{buildroot}%{_includedir}/qwtplot3d -mkdir -p %{buildroot}%{_libdir} -for n in include/*.h ; do - install -m 644 $n %{buildroot}%{_includedir}/qwtplot3d -done -# install, preserving links -chmod 644 lib/libqwtplot3d.so* -for n in lib/libqwtplot3d.so* ; do - cp -d $n %{buildroot}%{_libdir} -done +%cmake_install -%post -n lib%{name}%{soname} -p /sbin/ldconfig +%post -n libqwtplot3d-qt5-%{soname} -p /sbin/ldconfig +%postun -n libqwtplot3d-qt5-%{soname} -p /sbin/ldconfig -%postun -n lib%{name}%{soname} -p /sbin/ldconfig - -%files -n lib%{name}%{soname} -%defattr(-,root,root) -%doc COPYING -%{_libdir}/lib%{name}.so.* +%files -n libqwtplot3d-qt5-%{soname} +%license COPYING +%{_libdir}/libqwtplot3d-qt5.so.* %files devel -%defattr(-,root,root) -%doc COPYING examples -%{_libdir}/lib%{name}.so -%dir %{_includedir}/qwtplot3d -%{_includedir}/qwtplot3d/qwt3d*.h +%license COPYING +%doc examples +%{_libdir}/libqwtplot3d-qt5.so +%{_libqt5_includedir}/qwtplot3d/ %changelog From d9d2fe9731f58f2a6cc38cb4b797423b1fbd5181b1d29bcb77ed0e1ff363dee5 Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Tue, 30 Apr 2019 12:58:02 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/science/qwtplot3d?expand=0&rev=9 --- qwtplot3d.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/qwtplot3d.changes b/qwtplot3d.changes index d3e0b7c..9cf5980 100644 --- a/qwtplot3d.changes +++ b/qwtplot3d.changes @@ -6,6 +6,7 @@ Sat Apr 27 12:59:02 UTC 2019 - christophe@krop.fr required to build scidavis 1.25. - Drop glu_include.patch - Drop qwtplot3d-gcc43.patch +- Add build_a_shared_lib.patch to build shared library. ------------------------------------------------------------------- Thu Aug 17 22:01:14 UTC 2017 - jengelh@inai.de