forked from pool/qcustomplot
Compare commits
11 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| ec19f06944 | |||
| 9cf01b70f0 | |||
| 05ec1695b7 | |||
| 748bd6cf69 | |||
| a4a2ae5125 | |||
| 4fec66a33f | |||
| fa0e24cd2b | |||
| 92039937b6 | |||
| 647e66feca | |||
| 768b536c26 | |||
| 1b38ebf779 |
35
CMakeLists.txt
Normal file
35
CMakeLists.txt
Normal 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}
|
||||||
|
)
|
||||||
BIN
QCustomPlot-sharedlib.tar.gz
LFS
BIN
QCustomPlot-sharedlib.tar.gz
LFS
Binary file not shown.
4
_multibuild
Normal file
4
_multibuild
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>qt5</package>
|
||||||
|
<package>qt6</package>
|
||||||
|
</multibuild>
|
||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
160
qcustomplot.spec
160
qcustomplot.spec
@@ -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
|
||||||
|
|||||||
@@ -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 {
|
|
||||||
Reference in New Issue
Block a user