SHA256
1
0
forked from pool/qcustomplot

11 Commits

Author SHA256 Message Date
ec19f06944 Accepting request 1324833 from science
OBS-URL: https://build.opensuse.org/request/show/1324833
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qcustomplot?expand=0&rev=7
2025-12-31 09:47:28 +00:00
9cf01b70f0 This fixes at least a good bunch of the qcustomplot consumers
OBS-URL: https://build.opensuse.org/package/show/science/qcustomplot?expand=0&rev=27
2025-12-30 16:01:30 +00:00
05ec1695b7 Accepting request 1324339 from science
- Build doc package only for a single flavour (qt6).
- Ensure srcrpm names are flavor specific.
- Fix qt6 flavor build for Leap 15.6 by explicitly requiring GCC 11 (for c++17 and filesystem support).
- Use multibuild to split package into Qt5 and Q6 flavours
- Add CMakeLists.txt for easier packaging (from Fedora)
- Drop not longer needed files
  * QCustomPlot-sharedlib.tar.gz
  * relwithdebug.patch

OBS-URL: https://build.opensuse.org/request/show/1324339
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qcustomplot?expand=0&rev=6
2025-12-24 12:17:09 +00:00
748bd6cf69 OBS-URL: https://build.opensuse.org/package/show/science/qcustomplot?expand=0&rev=25 2025-12-24 03:22:46 +00:00
a4a2ae5125 OBS-URL: https://build.opensuse.org/package/show/science/qcustomplot?expand=0&rev=24 2025-12-23 16:10:34 +00:00
4fec66a33f * Build doc package only for a single flavour (qt6).
* Ensure src rpm names are flavor specific.
* Fix qt6 flavor build for Leap 15.6 by explicitly requiring GCC 11 (for c++17 and filesystem support).

OBS-URL: https://build.opensuse.org/package/show/science/qcustomplot?expand=0&rev=23
2025-12-23 16:10:16 +00:00
fa0e24cd2b - Use multibuild to split package into Qt5 and Q6 flavours
- Add CMakeLists.txt for easier packaging (from Fedora)
- Drop not longer needed files
  * QCustomPlot-sharedlib.tar.gz
  * relwithdebug.patch

OBS-URL: https://build.opensuse.org/package/show/science/qcustomplot?expand=0&rev=22
2025-12-18 18:29:26 +00:00
92039937b6 Accepting request 1136848 from science
- Re-download QCustomPlot-sharedlib.tar.gz and QCustomPlot.tar.gz
  based on the fixed download URL.
- Rebase relwithdebug.patch to apply against the new tarball (CRLF
  line endings).
- Fix invalid download url.

OBS-URL: https://build.opensuse.org/request/show/1136848
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qcustomplot?expand=0&rev=5
2024-01-04 16:03:40 +00:00
647e66feca Accepting request 1070959 from science
OBS-URL: https://build.opensuse.org/request/show/1070959
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qcustomplot?expand=0&rev=4
2023-03-12 15:24:54 +00:00
768b536c26 Accepting request 1037946 from science
OBS-URL: https://build.opensuse.org/request/show/1037946
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qcustomplot?expand=0&rev=3
2022-11-25 12:12:09 +00:00
1b38ebf779 Accepting request 889825 from science
OBS-URL: https://build.opensuse.org/request/show/889825
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qcustomplot?expand=0&rev=2
2021-05-02 16:36:15 +00:00
6 changed files with 169 additions and 82 deletions

35
CMakeLists.txt Normal file
View File

@@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.5)
project(qcustomplot)
include(GNUInstallDirs)
set(LIB_VER "" CACHE STRING "Library version")
set(QT_VER "6" CACHE STRING "Target Qt version")
set(QCUSTOMPLOT_LIB_VERSION ${LIB_VER})
string(REPLACE "." ";" VERSION_LIST ${LIB_VER})
list(GET VERSION_LIST 0 QCUSTOMPLOT_SO_VERSION)
FIND_PACKAGE(Qt${QT_VER}Core REQUIRED)
FIND_PACKAGE(Qt${QT_VER}Gui REQUIRED)
FIND_PACKAGE(Qt${QT_VER}Widgets REQUIRED)
FIND_PACKAGE(Qt${QT_VER}PrintSupport REQUIRED)
SET(CMAKE_AUTOMOC ON)
# Library
add_library(qcustomplot SHARED qcustomplot.cpp qcustomplot.h)
set_target_properties(qcustomplot PROPERTIES VERSION ${QCUSTOMPLOT_LIB_VERSION} SOVERSION ${QCUSTOMPLOT_SO_VERSION})
if (${QT_VER} GREATER "4")
set_target_properties(qcustomplot PROPERTIES OUTPUT_NAME qcustomplot-qt${QT_VER})
endif()
target_link_libraries(qcustomplot Qt${QT_VER}::Core Qt${QT_VER}::Gui Qt${QT_VER}::Widgets Qt${QT_VER}::PrintSupport)
install(TARGETS qcustomplot
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
# Headers
install(FILES qcustomplot.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

Binary file not shown.

4
_multibuild Normal file
View File

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

View File

@@ -1,3 +1,28 @@
-------------------------------------------------------------------
Tue Dec 30 11:07:25 UTC 2025 - Dominique Leuenberger <dimstar@opensuse.org>
- Fix provides/obsoletes of -qt5-devel package: provide/obsolete
the former qcustomplot-devel symbol, which some packages rely on.
- Package qcustomplot.pc (legacy name) as part of
qcustomplot-qt5-devel.
-------------------------------------------------------------------
Fri Dec 19 18:16:40 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
- Build doc package only for a single flavour (qt6).
- Ensure srcrpm names are flavor specific.
- Fix qt6 flavor build for Leap 15.6 by explicitly requiring GCC
11 (for c++17 and filesystem support).
-------------------------------------------------------------------
Sun Dec 7 11:06:03 UTC 2025 - Martin Hauke <mardnh@gmx.de>
- Use multibuild to split package into Qt5 and Q6 flavours
- Add CMakeLists.txt for easier packaging (from Fedora)
- Drop not longer needed files
* QCustomPlot-sharedlib.tar.gz
* relwithdebug.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jan 4 14:43:01 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org> Thu Jan 4 14:43:01 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package qcustomplot # spec file for package qcustomplot
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors
# #
# 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,36 +16,63 @@
# #
Name: qcustomplot %global lib_ver 2.0.0
Version: 2.1.1
%define sover 2 %define sover 2
%global qcustomplot_flavor @BUILD_FLAVOR@%{nil}
%if "%{qcustomplot_flavor}" == ""
ExclusiveArch: do_not_build
%endif
%if "%{qcustomplot_flavor}" == "qt6"
%define qt6 1
%define qt_major 6
%define qt_descr Qt6
%if 0%{?suse_version} < 1600
# requires <filesystem> and c++17
%define gcc_ver 11
%endif
%endif
%if "%{qcustomplot_flavor}" == "qt5"
%define qt5 1
%define qt_major 5
%define qt_descr Qt5
%endif
%define pname qcustomplot
%if 0%{?qt_major}
%define libname libqcustomplot-qt%{qt_major}-%{sover}
%define psuffix -qt%{qt_major}
%endif
Name: %{pname}%{?psuffix}
Version: 2.1.1
Release: 0 Release: 0
Summary: Qt widget for plotting and data visualization Summary: %{qt_descr} widget for plotting and data visualization
License: GPL-3.0-or-later License: GPL-3.0-or-later
URL: https://www.qcustomplot.com/ URL: https://www.qcustomplot.com/
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Source0: https://www.qcustomplot.com/release/%{version}/QCustomPlot.tar.gz Source0: https://www.qcustomplot.com/release/%{version}/QCustomPlot.tar.gz
Source1: https://www.qcustomplot.com/release/%{version}/QCustomPlot-sharedlib.tar.gz Source1: CMakeLists.txt
# PATCH-FIX-OPENSUSE relwithdebug.diff -- build with debug symbols BuildRequires: cmake
Patch1: relwithdebug.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ >= 4.6.4 BuildRequires: gcc%{?gcc_ver}
BuildRequires: gdb BuildRequires: gcc%{?gcc_ver}-c++
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(%{qt_descr}Core)
BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(%{qt_descr}Gui)
BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(%{qt_descr}PrintSupport)
BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(%{qt_descr}Widgets)
%description %description
QCustomPlot is a Qt C++ widget for plotting and data visualization. QCustomPlot is a %{qt_descr} C++ widget for plotting and data visualization.
This plotting library focuses on making good looking, publication quality 2D This plotting library focuses on making good looking, publication quality 2D
plots, graphs and charts, as well as offering high performance for realtime plots, graphs and charts, as well as offering high performance for realtime
visualization applications. visualization applications.
%package -n lib%{name}%{sover} %package -n %{libname}
Summary: Qt widget for plotting and data visualization Summary: %{qt_descr} widget for plotting and data visualization
Group: System/Libraries Group: System/Libraries
%if 0%{?qt5}
Provides: %{name} = %{version} Provides: %{name} = %{version}
Provides: lib%{name} = %{version} Provides: lib%{name} = %{version}
Obsoletes: %{name} < %{version} Obsoletes: %{name} < %{version}
@@ -54,51 +81,61 @@ Obsoletes: %{name}-qt5 < %{version}
# Earlier misnamed packages # Earlier misnamed packages
Provides: lib%{name}-%{sover} = %{version} Provides: lib%{name}-%{sover} = %{version}
Obsoletes: lib%{name}-%{sover} < %{version} Obsoletes: lib%{name}-%{sover} < %{version}
%endif
%description -n lib%{name}%{sover} %description -n %{libname}
QCustomPlot is a Qt C++ widget for plotting and data visualization. QCustomPlot is a %{qt_descr} C++ widget for plotting and data visualization.
This plotting library focuses on making good looking, publication quality 2D This plotting library focuses on making good looking, publication quality 2D
plots, graphs and charts, as well as offering high performance for realtime plots, graphs and charts, as well as offering high performance for realtime
visualization applications. visualization applications.
%package devel %package devel
Summary: Development files for QCustomPlot Summary: Development files for QCustomPlot - %{qt_descr}
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: lib%{name}%{sover} = %{version} Requires: %{libname} = %{version}
%if 0%{?qt5}
Requires: pkgconfig(Qt5PrintSupport) Requires: pkgconfig(Qt5PrintSupport)
# Last used 2018 with version 2.0.0 # Last used 2025-12-07, when package was changed to multibuild
Provides: %{name}-qt5-devel = %{version} Provides: %{pname}-devel = %{version}
Obsoletes: %{name}-qt5-devel < %{version} Obsoletes: %{pname}-devel < %{version}
Conflicts: %{pname}-qt6-devel
%endif
%if 0%{?qt6}
Requires: pkgconfig(Qt6PrintSupport)
Conflicts: %{pname}-qt5-devel
%endif
%description devel %description devel
This package contains libraries and header files for This package contains libraries and header files for
developing applications that use QCustomPlot. developing applications that use QCustomPlot - %{qt_descr}.
%package doc %package -n %{pname}-doc
Summary: Documentation and examples for QCustomPlot Summary: Documentation and examples for QCustomPlot
Group: Documentation/Other Group: Documentation/Other
BuildArch: noarch BuildArch: noarch
%description doc %description -n %{pname}-doc
This package contains the documentation and examples for QCustomPlot. This package contains the documentation and examples for QCustomPlot.
%prep %prep
%setup -q -n %{name} -a 1 %{name}-sharedlib %autosetup -p1 -n %{pname}
%patch -P 1 -p1 cp %{SOURCE1} .
chmod -x GPL.txt
find ./examples/ -name "*.cpp" -o -name "*.h" | xargs sed -i 's/\r$//'
%build %build
mkdir %{name}-sharedlib/sharedlib-compilation/build %if 0%{?gcc_ver}
pushd %{name}-sharedlib/sharedlib-compilation/build export CC=gcc-%{gcc_ver}
export SOVERSION=%{version} export CXX=g++-%{gcc_ver}
%qmake5 ../sharedlib-compilation.pro %endif
%make_jobs %cmake \
popd -DQT_VER=%{qt_major} \
-DLIB_VER=%{lib_ver} \
%{nil}
%cmake_build
%install %install
pushd %{name}-sharedlib/sharedlib-compilation/build %cmake_install
install -Dm 755 -t %{buildroot}%{_libdir} libqcustomplot*.so*
popd
install -Dm 644 qcustomplot.h %{buildroot}%{_includedir}/qcustomplot.h install -Dm 644 qcustomplot.h %{buildroot}%{_includedir}/qcustomplot.h
# pkg-config files # pkg-config files
@@ -108,36 +145,49 @@ cat > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc <<EOF
libdir=%{_libdir} libdir=%{_libdir}
includedir=%{_includedir} includedir=%{_includedir}
Name: %{name} Name: %{pname}
Version: %{version} Version: %{version}
Description: %{summary} Description: %{summary}
Cflags: -I\${includedir} Cflags: -I\${includedir}
Libs: -L\${libdir} -lqcustomplot Libs: -L\${libdir} -lqcustomplot%{psuffix}
EOF EOF
install -Dm 0644 -t %{buildroot}%{_docdir}/%{name}/ changelog.txt documentation/qcustomplot.qch %if 0%{?qt5}
cp -r documentation/html/ %{buildroot}%{_docdir}/%{name}/ # Install the legacy file name for qcustomplot.pc for the qt5 case - be backwards compatible
cp -r examples %{buildroot}%{_docdir}/%{name}/ ln -s %{name}.pc %{buildroot}%{_libdir}/pkgconfig/%{pname}.pc
find %{buildroot}%{_docdir}/%{name}/ -type f -exec chmod 0644 \{\} + %endif
# Only install documentation for one flavor (qt6)
%if 0%{?qt6}
install -Dm 0644 -t %{buildroot}%{_docdir}/%{pname}/ changelog.txt documentation/qcustomplot.qch
cp -r documentation/html/ %{buildroot}%{_docdir}/%{pname}/
cp -r examples %{buildroot}%{_docdir}/%{pname}/
find %{buildroot}%{_docdir}/%{pname}/ -type f -exec chmod 0644 \{\} +
%endif
%fdupes %{buildroot}/%{_prefix} %fdupes %{buildroot}/%{_prefix}
%post -n lib%{name}%{sover} -p /sbin/ldconfig %ldconfig_scriptlets -n %{libname}
%postun -n lib%{name}%{sover} -p /sbin/ldconfig
%files -n lib%{name}%{sover} %files -n %{libname}
%license GPL.txt %license GPL.txt
%{_libdir}/libqcustomplot.so.* %{_libdir}/lib%{name}.so.%{sover}*
%files devel %files devel
%{_includedir}/qcustomplot.h %{_includedir}/qcustomplot.h
%{_libdir}/libqcustomplot.so %{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}.pc
%if 0%{?qt5}
%{_libdir}/pkgconfig/%{pname}.pc
%endif
%files doc %if 0%{?qt6}
%dir %{_docdir}/%{name}/ %files -n %{pname}-doc
%{_docdir}/%{name}/qcustomplot.qch %dir %{_docdir}/%{pname}/
%{_docdir}/%{name}/changelog.txt %{_docdir}/%{pname}/qcustomplot.qch
%{_docdir}/%{name}/html/ %{_docdir}/%{pname}/changelog.txt
%{_docdir}/%{name}/examples/ %{_docdir}/%{pname}/html/
%{_docdir}/%{pname}/examples/
%endif
%changelog %changelog

View File

@@ -1,24 +0,0 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2018-12-11 03:21:32.396946319 +0100
Put the debug symbols in the libraries so we can have proper
debuginfo packages rather than having a separate debug version
of the libraries.
---
qcustomplot-sharedlib/sharedlib-compilation/sharedlib-compilation.pro | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: qcustomplot/qcustomplot-sharedlib/sharedlib-compilation/sharedlib-compilation.pro
===================================================================
--- qcustomplot.orig/qcustomplot-sharedlib/sharedlib-compilation/sharedlib-compilation.pro
+++ qcustomplot/qcustomplot-sharedlib/sharedlib-compilation/sharedlib-compilation.pro
@@ -10,7 +10,7 @@ lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXX
DEFINES += QCUSTOMPLOT_COMPILE_LIBRARY
TEMPLATE = lib
-CONFIG += debug_and_release build_all
+CONFIG += release force_debug_info build_all
static {
CONFIG += static
} else {