diff --git a/.gitignore b/.gitignore index e6588cd..3279657 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /clementine-479f1d4.tar.gz /clementine-0be3143.tar.gz /clementine-1.4.0rc2.tar.gz +/clementine-1.4.0rc1-901-g7b678f26e.tar.gz diff --git a/0001-Fix-missing-QTSINGLECOREAPPLICATION_LIBRARIES.patch b/0001-Fix-missing-QTSINGLECOREAPPLICATION_LIBRARIES.patch new file mode 100644 index 0000000..32de55d --- /dev/null +++ b/0001-Fix-missing-QTSINGLECOREAPPLICATION_LIBRARIES.patch @@ -0,0 +1,59 @@ +From 84de80e9cb57ceca8a9d4225920307cca4729c46 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= + <30413512+eclipseo@users.noreply.github.com> +Date: Sun, 15 Oct 2023 10:52:28 +0200 +Subject: [PATCH] Fix missing QTSINGLECOREAPPLICATION_LIBRARIES + +In f3837f95db61a8d79c40c8da8467c7e502fc2156, QTSINGLECOREAPPLICATION_LIBRARIES was mistakenly removed, which prevents building with USE_SYSTEM_QTSINGLEAPPLICATION enabled. +--- + .github/workflows/all.yml | 3 +++ + CMakeLists.txt | 5 +++++ + 2 files changed, 8 insertions(+) + +diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml +index ac90d1f23..074657546 100644 +--- a/.github/workflows/all.yml ++++ b/.github/workflows/all.yml +@@ -232,6 +232,7 @@ jobs: + qt5-qtx11extras-devel + qt5-rpm-macros + qtsingleapplication-qt5-devel ++ qtsinglecoreapplication-qt5-devel + rpmdevtools + sha2-devel + sparsehash-devel +@@ -305,6 +306,7 @@ jobs: + qt5-qtx11extras-devel + qt5-rpm-macros + qtsingleapplication-qt5-devel ++ qtsinglecoreapplication-qt5-devel + rpmdevtools + sha2-devel + sparsehash-devel +@@ -378,6 +380,7 @@ jobs: + qt5-qtx11extras-devel + qt5-rpm-macros + qtsingleapplication-qt5-devel ++ qtsinglecoreapplication-qt5-devel + rpmdevtools + sha2-devel + sparsehash-devel +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b162c7f33..806d7ff8a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -354,6 +354,11 @@ if(USE_SYSTEM_QTSINGLEAPPLICATION) + add_library(qtsingleapplication INTERFACE) + target_link_libraries(qtsingleapplication INTERFACE QTSINGLEAPPLICATION_LIBRARIES) + target_include_directories(qtsingleapplication INTERFACE QTSINGLEAPPLICATION_INCLUDE_DIRS) ++ find_path(QTSINGLECOREAPPLICATION_INCLUDE_DIRS qtsinglecoreapplication.h PATH_SUFFIXES qt5/QtSolutions REQUIRED) ++ find_library(QTSINGLECOREAPPLICATION_LIBRARIES Qt5Solutions_SingleCoreApplication-2.6 REQUIRED) ++ add_library(qtsinglecoreapplication INTERFACE) ++ target_link_libraries(qtsinglecoreapplication INTERFACE QTSINGLECOREAPPLICATION_LIBRARIES) ++ target_include_directories(qtsinglecoreapplication INTERFACE QTSINGLECOREAPPLICATION_INCLUDE_DIRS) + else(USE_SYSTEM_QTSINGLEAPPLICATION) + add_subdirectory(3rdparty/qtsingleapplication) + set(QTSINGLEAPPLICATION_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication) +-- +2.41.0 + diff --git a/0001-Use-QtIoCompressor-from-Qt5.patch b/0001-Use-QtIoCompressor-from-Qt5.patch new file mode 100644 index 0000000..651c789 --- /dev/null +++ b/0001-Use-QtIoCompressor-from-Qt5.patch @@ -0,0 +1,27 @@ +From 823939555acf4460e962985276ef292d02cc3d46 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= +Date: Sun, 15 Oct 2023 13:05:24 +0200 +Subject: [PATCH] Use QtIoCompressor from Qt5 + +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 600dc6efe..5af6b2663 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -390,8 +390,8 @@ endif(USE_SYSTEM_QTSINGLEAPPLICATION) + + # QtIoCompressor isn't patched, so we can use a system version if it's + # available +-find_path(QTIOCOMPRESSOR_INCLUDE_DIRS qtiocompressor.h PATH_SUFFIXES QtSolutions) +-find_library(QTIOCOMPRESSOR_LIBRARIES QtSolutions_IOCompressor-2.3) ++find_path(QTIOCOMPRESSOR_INCLUDE_DIRS qtiocompressor.h PATH_SUFFIXES qt5/QtSolutions) ++find_library(QTIOCOMPRESSOR_LIBRARIES Qt5Solutions_IOCompressor-2.3) + if(NOT QTIOCOMPRESSOR_INCLUDE_DIRS OR NOT QTIOCOMPRESSOR_LIBRARIES) + add_subdirectory(3rdparty/qtiocompressor) + set(QTIOCOMPRESSOR_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtiocompressor) +-- +2.41.0 + diff --git a/clementine-qt5-libraries.patch b/clementine-qt5-libraries.patch deleted file mode 100644 index 3ba6564..0000000 --- a/clementine-qt5-libraries.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up Clementine-fb00835468295925a6945a286406a2eec6bdb67a/CMakeLists.txt.use_qt5 Clementine-fb00835468295925a6945a286406a2eec6bdb67a/CMakeLists.txt ---- Clementine-fb00835468295925a6945a286406a2eec6bdb67a/CMakeLists.txt.use_qt5 2018-10-05 11:56:49.000000000 +0200 -+++ Clementine-fb00835468295925a6945a286406a2eec6bdb67a/CMakeLists.txt 2018-10-22 22:03:51.464382146 +0200 -@@ -390,8 +390,8 @@ endif(USE_SYSTEM_QTSINGLEAPPLICATION) - - # QtIoCompressor isn't patched, so we can use a system version if it's - # available --find_path(QTIOCOMPRESSOR_INCLUDE_DIRS qtiocompressor.h PATH_SUFFIXES QtSolutions) --find_library(QTIOCOMPRESSOR_LIBRARIES QtSolutions_IOCompressor-2.3) -+find_path(QTIOCOMPRESSOR_INCLUDE_DIRS qtiocompressor.h PATH_SUFFIXES qt5/QtSolutions) -+find_library(QTIOCOMPRESSOR_LIBRARIES Qt5Solutions_IOCompressor-2.3) - if(NOT QTIOCOMPRESSOR_INCLUDE_DIRS OR NOT QTIOCOMPRESSOR_LIBRARIES) - add_subdirectory(3rdparty/qtiocompressor) - set(QTIOCOMPRESSOR_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtiocompressor) diff --git a/clementine.spec b/clementine.spec index c688a89..4380cc4 100644 --- a/clementine.spec +++ b/clementine.spec @@ -1,25 +1,51 @@ -%define version_no_tilde() %{lua: - ver = rpm.expand('%version') - ver = ver:gsub('~', '') - print(ver) -} +%global tag 1.4.0rc1-901-g7b678f26e Name: clementine Version: 1.4.0~rc2 Release: %autorelease Summary: A music player and library organizer -# 3rdparty/taglib, src/widgets/fancytabwidget and src/widgets/stylehelper: LGPLv2 -# 3rdparty/utf8-cpp: Boost -License: GPLv3+ and GPLv2+ and Boost and LGPLv2 +# Apache-2.0: +# - ext/libclementine-common/core/latch.cpp +# - ext/libclementine-common/core/latch.h +# - ext/libclementine-remote/remotecontrolmessages.proto +# - ext/libclementine-common/core/logging.cpp +# - ext/libclementine-common/core/logging.h +# - ext/libclementine-common/core/messagehandler.cpp +# - ext/libclementine-common/core/messagehandler.h +# - ext/libclementine-common/core/override.h +# - ext/libclementine-common/core/timeconstants.h +# BSL-1.0: 3rdparty/utf8-cpp +# GPL-2.0-or-later: +# - src/engines/gstengine.cpp +# - src/engines/gstengine.h +# - src/widgets/sliderwidget.cpp +# - src/widgets/sliderwidget.h +# LGPL-2.0-or-later: +# - gst/moodbar/gstfastspectrum.cpp +# - gst/moodbar/gstfastspectrum.h +# LGPL-2.1-only: +# - 3rdparty/taglib +# - src/widgets/stylehelper: +# LGPL-2.1-only WITH Qt-LGPL-exception-1.1 OR GPL-3.0-only: +# - 3rdparty/qsqlite/clementinesqlcachedresult.cpp +# - 3rdparty/qsqlite/clementinesqlcachedresult.h +# - 3rdparty/qsqlite/qsql_sqlite.cpp +# - 3rdparty/qsqlite/qsql_sqlite.h +# LGPL-2.1-only WITH Qt-LGPL-exception-1.1 OR LGPL-3.0-only WITH Qt-LGPL-exception-1.1: +# - 3rdparty/qsqlite/smain.cpp +# - 3rdparty/qsqlite/smain.h +# MIT: 3rdparty/qocoa +License: GPL-3.0-or-later AND GPL-2.0-or-later AND BSL-1.0 AND LGPL-2.0-or-later AND LGPL-2.1-only AND Apache-2.0 AND (LGPL-2.1-only WITH Qt-LGPL-exception-1.1 OR GPL-3.0-only) AND (LGPL-2.1-only WITH Qt-LGPL-exception-1.1 OR LGPL-3.0-only WITH Qt-LGPL-exception-1.1) AND MIT URL: https://www.clementine-player.org/ -Source0: https://github.com/clementine-player/Clementine/archive/%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz +VCS: https://github.com/clementine-player/Clementine +Source: %vcs/archive/%{tag}/%{name}-%{tag}.tar.gz # Use qt5 libraries (qtiocompressor) -Patch11: clementine-qt5-libraries.patch +Patch: 0001-Use-QtIoCompressor-from-Qt5.patch +# Fix bug https://github.com/clementine-player/Clementine/pull/7301 +Patch: 0001-Fix-missing-QTSINGLECOREAPPLICATION_LIBRARIES.patch -BuildConflicts: pkgconfig(gmock) >= 1.6 -BuildConflicts: pkgconfig(gtest) BuildRequires: boost-devel BuildRequires: cmake BuildRequires: desktop-file-utils @@ -27,14 +53,27 @@ BuildRequires: gcc-c++ BuildRequires: gettext BuildRequires: libappstream-glib BuildRequires: liblastfm-qt5-devel +BuildRequires: pkgconfig(Qt5Concurrent) +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5DBus) +BuildRequires: pkgconfig(Qt5Gui) +BuildRequires: pkgconfig(Qt5Network) +BuildRequires: pkgconfig(Qt5OpenGL) +BuildRequires: pkgconfig(Qt5Sql) +BuildRequires: pkgconfig(Qt5Test) +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5X11Extras) +BuildRequires: pkgconfig(Qt5Xml) +BuildRequires: pkgconfig(QxtCore-qt5) BuildRequires: pkgconfig(alsa) -BuildRequires: pkgconfig(cryptopp) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(fftw3) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(glu) +BuildRequires: pkgconfig(gmock) BuildRequires: pkgconfig(gstreamer-1.0) BuildRequires: pkgconfig(gstreamer-app-1.0) BuildRequires: pkgconfig(gstreamer-audio-1.0) @@ -43,6 +82,7 @@ BuildRequires: pkgconfig(gstreamer-tag-1.0) BuildRequires: pkgconfig(gthread-2.0) BuildRequires: pkgconfig(libcdio) BuildRequires: pkgconfig(libchromaprint) +BuildRequires: (pkgconfig(libcryptopp) or pkgconfig(cryptopp)) BuildRequires: pkgconfig(libmtp) BuildRequires: pkgconfig(libmygpo-qt5) BuildRequires: pkgconfig(libnotify) @@ -50,26 +90,16 @@ BuildRequires: pkgconfig(libplist-2.0) BuildRequires: pkgconfig(libprojectM) >= 2.0.1-7 BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libsparsehash) +BuildRequires: pkgconfig(libudf) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(protobuf) -BuildRequires: pkgconfig(Qt5Concurrent) -BuildRequires: pkgconfig(Qt5Core) -BuildRequires: pkgconfig(Qt5DBus) -BuildRequires: pkgconfig(Qt5Gui) -BuildRequires: pkgconfig(Qt5Network) -BuildRequires: pkgconfig(Qt5OpenGL) -BuildRequires: pkgconfig(Qt5Sql) -BuildRequires: pkgconfig(Qt5Widgets) -BuildRequires: pkgconfig(Qt5X11Extras) -BuildRequires: pkgconfig(Qt5Xml) -BuildRequires: pkgconfig(QxtCore-qt5) BuildRequires: pkgconfig(sqlite3) >= 3.7 BuildRequires: pkgconfig(taglib) >= 1.11 BuildRequires: pkgconfig(udisks) BuildRequires: qt5-linguist BuildRequires: qtiocompressor-devel BuildRequires: qtsingleapplication-qt5-devel >= 2.6.1-2 -BuildRequires: qtsinglecoreapplication-qt5-devel +BuildRequires: qtsinglecoreapplication-qt5-devel >= 2.6.1-2 BuildRequires: sha2-devel %ifnarch s390 s390x BuildRequires: pkgconfig(libgpod-1.0) @@ -80,39 +110,50 @@ Requires: gstreamer1-plugins-good Requires: hicolor-icon-theme Requires: qtiocompressor >= 2.3.1-17 +Provides: bundled(qocoa) +Provides: bundled(qsqlite) Provides: bundled(utf8-cpp) %description -Clementine is a multi-platform music player. It is inspired by Amarok 1.4, -focusing on a fast and easy-to-use interface for searching and playing your -music. +Clementine is a modern music player and library organiser. +It is inspired by Amarok 1.4, focusing on a fast and easy-to-use interface for +searching and playing your music. + +Features include: + * Search and play your local music library + * Listen to internet radio from Last.fm, SomaFM, IntergalacticFM, Magnatune, + Jamendo and Icecast + * Create smart playlists and dynamic playlists + * Tabbed playlists, import and export M3U, XSPF, PLS and ASX + * Visualisations from projectM + * Lyrics and artist biographies and photos + * Transcode music into MP3, Ogg Vorbis, Ogg Speex, FLAC or AAC + * Edit tags on MP3 and OGG files, organise your music + * Download missing album cover art from Last.fm + * Cross-platform - works on Windows, Mac OS X and Linux + * Native desktop notifications on Linux (libnotify) and Mac OS X (Growl) + * Remote control using a Wii Remote, MPRIS or the command-line + * Copy music to your iPod, iPhone, MTP or mass-storage USB player + * Queue manager %prep -%autosetup -p1 -n Clementine-%{version_no_tilde} +%autosetup -p1 -n Clementine-%{tag} # Remove most 3rdparty libraries -# Unbundle taglib next release: -# https://github.com/taglib/taglib/issues/837#issuecomment-428389347 -mv 3rdparty/{gmock,qocoa,qsqlite,utf8-cpp}/ . -rm -fr 3rdparty/* -mv {gmock,qocoa,qsqlite,utf8-cpp}/ 3rdparty/ -# Not needed and fails build -sed -i "/add_dependencies(clementine_lib qtsingleapplication)/d" src/CMakeLists.txt -# Use system-wide qtiocompressor -sed -i 's|#include "3rdparty/qtiocompressor/qtiocompressor.h"|#include "qtiocompressor.h"|' src/internet/spotifywebapi/spotifywebapiservice.cpp -# Fix for GCC 12, to send upstream when root cause is determined -sed -i 's|local_server_name_ = qApp->applicationName().toLower();|local_server_name_ = QString(qApp->applicationName()).toLower();|' ext/libclementine-common/core/workerpool.h +mv 3rdparty/{qocoa,qsqlite,utf8-cpp}/ . +rm -rfv 3rdparty/* +mv {qocoa,qsqlite,utf8-cpp}/ 3rdparty/ %build -# QT applications need to avoid local binding and copy relocations. Forcing them to build with -# -fPIC solves that problem -%global optflags %{optflags} -fPIC -%{cmake} \ +%cmake \ -DBUILD_WERROR:BOOL=OFF \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DUSE_SYSTEM_QTSINGLEAPPLICATION=1 \ - -DUSE_SYSTEM_PROJECTM=1 \ - -DUSE_SYSTEM_QXT=1 + -DCMAKE_CXX_STANDARD:INT=17 \ + -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \ + -DFORCE_GIT_REVISION:STRING=%{tag} \ + -DUSE_SYSTEM_PROJECTM:BOOL=ON \ + -DUSE_SYSTEM_QTSINGLEAPPLICATION:BOOL=ON \ + -DUSE_SYSTEM_QXT:BOOL=ON %cmake_build %install @@ -124,13 +165,13 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.clementine %files %license COPYING -%doc Changelog +%doc Changelog README.md %{_bindir}/clementine %{_bindir}/clementine-tagreader -%{_metainfodir}/org.clementine_player.Clementine.appdata.xml %{_datadir}/applications/org.clementine_player.Clementine.desktop %{_datadir}/icons/hicolor/*/apps/org.clementine_player.Clementine.* %{_datadir}/kservices5/clementine-*.protocol +%{_metainfodir}/org.clementine_player.Clementine.appdata.xml %changelog %autochangelog diff --git a/sources b/sources index ad52914..68bf13e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (clementine-1.4.0rc2.tar.gz) = 403093386efabd52e649c0e379abbf4873c4b2f8d0af72cda2b7e0255f90c60259f961045e7b51d0e5bf35425d678ff6b018c9191845ebbd156d9216d8bd7722 +SHA512 (clementine-1.4.0rc1-901-g7b678f26e.tar.gz) = 756058fa540a1510d57ada29dd4cc3be880c548580b16c03586c690bc4e2d14b2ecdcd1e01eb4a6cdfebee5c47fd024a47f986cebeb7e94cb2aff960a56f6c8e