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