Compare commits
5 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 4ef6b50c7f | |||
| 06c0f86b33 | |||
| 4dfb8165e3 | |||
| e17a67a2d4 | |||
| 3df36f5bc1 |
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7a0c51645abe27d1cbc1d52202c7b61346f42c2bff291b0fe9301b1d4598a69c
|
||||
size 9076251
|
||||
3
clementine-1.4.1-50-ge281c4508.tar.gz
Normal file
3
clementine-1.4.1-50-ge281c4508.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bfd1876d181546489b368640685434b2c0442fd6843bda3cb579530a4b758bc1
|
||||
size 7600646
|
||||
193
clementine-cmake-pr7402.patch
Normal file
193
clementine-cmake-pr7402.patch
Normal file
@@ -0,0 +1,193 @@
|
||||
From ec4eba532d6e4c3385180963ad0ae186e248d478 Mon Sep 17 00:00:00 2001
|
||||
From: Shen Long <gitlab@sl.nospam.tangomaris.de>
|
||||
Date: Mon, 7 Jul 2025 17:25:24 +0200
|
||||
Subject: [PATCH] Bump CMake minimum versions to >3.30
|
||||
|
||||
It helps working with CMake >4.0 and also is working on CMake 3.31.7.
|
||||
---
|
||||
3rdparty/libmygpo-qt5/CMakeLists.txt | 2 +-
|
||||
3rdparty/libprojectm/CMakeLists.txt | 10 +---------
|
||||
.../libprojectm/MilkdropPresetFactory/CMakeLists.txt | 2 +-
|
||||
3rdparty/libprojectm/Renderer/CMakeLists.txt | 2 +-
|
||||
3rdparty/qsqlite/CMakeLists.txt | 2 +-
|
||||
3rdparty/qtiocompressor/CMakeLists.txt | 2 +-
|
||||
3rdparty/qtsingleapplication/CMakeLists.txt | 2 +-
|
||||
3rdparty/qxt/CMakeLists.txt | 2 +-
|
||||
3rdparty/taglib/CMakeLists.txt | 2 +-
|
||||
3rdparty/utf8-cpp/CMakeLists.txt | 2 +-
|
||||
CMakeLists.txt | 4 +---
|
||||
cmake/ParseArguments.cmake | 2 +-
|
||||
cmake/Translations.cmake | 2 +-
|
||||
gst/moodbar/CMakeLists.txt | 2 +-
|
||||
tests/CMakeLists.txt | 2 +-
|
||||
15 files changed, 15 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/3rdparty/libmygpo-qt5/CMakeLists.txt b/3rdparty/libmygpo-qt5/CMakeLists.txt
|
||||
index a789728706..995cc77a85 100644
|
||||
--- a/3rdparty/libmygpo-qt5/CMakeLists.txt
|
||||
+++ b/3rdparty/libmygpo-qt5/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required( VERSION 3.0.0 FATAL_ERROR )
|
||||
+cmake_minimum_required( VERSION 3.10.0 FATAL_ERROR )
|
||||
|
||||
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII" )
|
||||
diff --git a/3rdparty/libprojectm/CMakeLists.txt b/3rdparty/libprojectm/CMakeLists.txt
|
||||
index a70f8a2b2e..275329c78d 100644
|
||||
--- a/3rdparty/libprojectm/CMakeLists.txt
|
||||
+++ b/3rdparty/libprojectm/CMakeLists.txt
|
||||
@@ -1,17 +1,9 @@
|
||||
PROJECT(projectM)
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The projectM core library.")
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
-cmake_policy(SET CMP0005 OLD)
|
||||
-
|
||||
-# This policy was only added in cmake 2.8.4
|
||||
-if (CMAKE_VERSION VERSION_GREATER "2.8.3")
|
||||
- cmake_policy(SET CMP0017 OLD)
|
||||
-endif (CMAKE_VERSION VERSION_GREATER "2.8.3")
|
||||
-
|
||||
-
|
||||
set(USE_DEVIL OFF)
|
||||
set(USE_FBO ON)
|
||||
set(USE_FTGL OFF)
|
||||
diff --git a/3rdparty/libprojectm/MilkdropPresetFactory/CMakeLists.txt b/3rdparty/libprojectm/MilkdropPresetFactory/CMakeLists.txt
|
||||
index 824d51faed..59f135aeee 100644
|
||||
--- a/3rdparty/libprojectm/MilkdropPresetFactory/CMakeLists.txt
|
||||
+++ b/3rdparty/libprojectm/MilkdropPresetFactory/CMakeLists.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
PROJECT(MilkdropPresetFactory)
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
diff --git a/3rdparty/libprojectm/Renderer/CMakeLists.txt b/3rdparty/libprojectm/Renderer/CMakeLists.txt
|
||||
index 40bfe2c20d..b5f7ea0967 100644
|
||||
--- a/3rdparty/libprojectm/Renderer/CMakeLists.txt
|
||||
+++ b/3rdparty/libprojectm/Renderer/CMakeLists.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
PROJECT(Renderer)
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
diff --git a/3rdparty/qsqlite/CMakeLists.txt b/3rdparty/qsqlite/CMakeLists.txt
|
||||
index 0f1fba525c..f790710a59 100644
|
||||
--- a/3rdparty/qsqlite/CMakeLists.txt
|
||||
+++ b/3rdparty/qsqlite/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
|
||||
add_definitions(-DQT_STATICPLUGIN)
|
||||
|
||||
diff --git a/3rdparty/qtiocompressor/CMakeLists.txt b/3rdparty/qtiocompressor/CMakeLists.txt
|
||||
index 98d6445f85..2b434da7e7 100644
|
||||
--- a/3rdparty/qtiocompressor/CMakeLists.txt
|
||||
+++ b/3rdparty/qtiocompressor/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
|
||||
set(IOCOMPRESSOR-SOURCES
|
||||
qtiocompressor.cpp
|
||||
diff --git a/3rdparty/qtsingleapplication/CMakeLists.txt b/3rdparty/qtsingleapplication/CMakeLists.txt
|
||||
index c405256f9a..c9ee4afe6c 100644
|
||||
--- a/3rdparty/qtsingleapplication/CMakeLists.txt
|
||||
+++ b/3rdparty/qtsingleapplication/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
|
||||
set(SINGLEAPP-SOURCES
|
||||
qtlocalpeer.cpp
|
||||
diff --git a/3rdparty/qxt/CMakeLists.txt b/3rdparty/qxt/CMakeLists.txt
|
||||
index b3348c4b86..7d60902379 100644
|
||||
--- a/3rdparty/qxt/CMakeLists.txt
|
||||
+++ b/3rdparty/qxt/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
set(QXT-SOURCES
|
||||
diff --git a/3rdparty/taglib/CMakeLists.txt b/3rdparty/taglib/CMakeLists.txt
|
||||
index 39ffb95340..1d74b6135c 100644
|
||||
--- a/3rdparty/taglib/CMakeLists.txt
|
||||
+++ b/3rdparty/taglib/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-delete-non-virtual-dtor")
|
||||
|
||||
diff --git a/3rdparty/utf8-cpp/CMakeLists.txt b/3rdparty/utf8-cpp/CMakeLists.txt
|
||||
index 14e7fcdc2a..f3ea1ae9a7 100644
|
||||
--- a/3rdparty/utf8-cpp/CMakeLists.txt
|
||||
+++ b/3rdparty/utf8-cpp/CMakeLists.txt
|
||||
@@ -1,2 +1,2 @@
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 48b55f4c55..f9076d9b49 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,8 +1,6 @@
|
||||
-cmake_minimum_required(VERSION 3.13.0)
|
||||
+cmake_minimum_required(VERSION 3.30.0)
|
||||
project(clementine)
|
||||
|
||||
-cmake_policy(SET CMP0053 OLD)
|
||||
-
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(FindPkgConfig)
|
||||
include(cmake/C++11Compat.cmake)
|
||||
diff --git a/cmake/ParseArguments.cmake b/cmake/ParseArguments.cmake
|
||||
index fd5f9987ec..19ca67ab1c 100644
|
||||
--- a/cmake/ParseArguments.cmake
|
||||
+++ b/cmake/ParseArguments.cmake
|
||||
@@ -1,6 +1,6 @@
|
||||
# From http://www.cmake.org/Wiki/CMakeMacroParseArguments
|
||||
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
|
||||
MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
|
||||
SET(DEFAULT_ARGS)
|
||||
diff --git a/cmake/Translations.cmake b/cmake/Translations.cmake
|
||||
index a16bcc3901..fbee765107 100644
|
||||
--- a/cmake/Translations.cmake
|
||||
+++ b/cmake/Translations.cmake
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
|
||||
set (XGETTEXT_OPTIONS --qt --keyword=tr:1,2c --keyword=tr --flag=tr:1:pass-c-format --flag=tr:1:pass-qt-format
|
||||
--keyword=trUtf8 --flag=tr:1:pass-c-format --flag=tr:1:pass-qt-format
|
||||
diff --git a/gst/moodbar/CMakeLists.txt b/gst/moodbar/CMakeLists.txt
|
||||
index 0bb87e8844..dfe9bc9830 100644
|
||||
--- a/gst/moodbar/CMakeLists.txt
|
||||
+++ b/gst/moodbar/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall")
|
||||
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
||||
index 81031b072e..b7ada3ae79 100644
|
||||
--- a/tests/CMakeLists.txt
|
||||
+++ b/tests/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.10.0)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -Wno-c++11-narrowing")
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
From 0c8b39290190bb809f4605c56b222c1168775a33 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Kvinge <jonas@jkvinge.net>
|
||||
Date: Sun, 17 Mar 2024 15:00:14 +0100
|
||||
Subject: [PATCH 1/3] Use C++17
|
||||
|
||||
Signed-off-by: Jonas Kvinge <jonas@jkvinge.net>
|
||||
---
|
||||
3rdparty/libprojectm/CMakeLists.txt | 2 --
|
||||
3rdparty/qtsingleapplication/CMakeLists.txt | 1 -
|
||||
CMakeLists.txt | 3 +++
|
||||
ext/clementine-tagreader/CMakeLists.txt | 2 --
|
||||
ext/libclementine-common/CMakeLists.txt | 2 --
|
||||
ext/libclementine-remote/CMakeLists.txt | 2 --
|
||||
ext/libclementine-tagreader/CMakeLists.txt | 2 --
|
||||
gst/moodbar/CMakeLists.txt | 2 +-
|
||||
8 files changed, 4 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/3rdparty/libprojectm/CMakeLists.txt b/3rdparty/libprojectm/CMakeLists.txt
|
||||
index ce58344..a70f8a2 100644
|
||||
--- a/3rdparty/libprojectm/CMakeLists.txt
|
||||
+++ b/3rdparty/libprojectm/CMakeLists.txt
|
||||
@@ -24,8 +24,6 @@ set(BUILD_PROJECTM_STATIC ON)
|
||||
set(DISABLE_NATIVE_PRESETS ON)
|
||||
set(DISABLE_MILKDROP_PRESETS OFF)
|
||||
|
||||
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
-
|
||||
pkg_check_modules(GLEW glew)
|
||||
|
||||
if(DISABLE_NATIVE_PRESETS)
|
||||
diff --git a/3rdparty/qtsingleapplication/CMakeLists.txt b/3rdparty/qtsingleapplication/CMakeLists.txt
|
||||
index 7825ab9..c405256 100644
|
||||
--- a/3rdparty/qtsingleapplication/CMakeLists.txt
|
||||
+++ b/3rdparty/qtsingleapplication/CMakeLists.txt
|
||||
@@ -1,5 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.0.0)
|
||||
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
|
||||
|
||||
set(SINGLEAPP-SOURCES
|
||||
qtlocalpeer.cpp
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b2d7027..759d673 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -15,6 +15,9 @@ include(cmake/Format.cmake)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
||||
|
||||
+set(CMAKE_CXX_STANDARD 17)
|
||||
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
+
|
||||
if (CMAKE_CXX_COMPILER MATCHES ".*clang")
|
||||
set(CMAKE_COMPILER_IS_CLANGXX 1)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-uninitialized")
|
||||
diff --git a/ext/clementine-tagreader/CMakeLists.txt b/ext/clementine-tagreader/CMakeLists.txt
|
||||
index 998f9fe..16e6bb0 100644
|
||||
--- a/ext/clementine-tagreader/CMakeLists.txt
|
||||
+++ b/ext/clementine-tagreader/CMakeLists.txt
|
||||
@@ -5,8 +5,6 @@ include_directories(${CMAKE_SOURCE_DIR}/ext/libclementine-common)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/ext/libclementine-tagreader)
|
||||
include_directories(${CMAKE_BINARY_DIR}/ext/libclementine-tagreader)
|
||||
|
||||
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
-
|
||||
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
|
||||
|
||||
set(SOURCES
|
||||
diff --git a/ext/libclementine-common/CMakeLists.txt b/ext/libclementine-common/CMakeLists.txt
|
||||
index ad35a51..5aff49a 100644
|
||||
--- a/ext/libclementine-common/CMakeLists.txt
|
||||
+++ b/ext/libclementine-common/CMakeLists.txt
|
||||
@@ -2,8 +2,6 @@ include_directories(${PROTOBUF_INCLUDE_DIRS})
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
|
||||
-
|
||||
set(SOURCES
|
||||
core/closure.cpp
|
||||
core/latch.cpp
|
||||
diff --git a/ext/libclementine-remote/CMakeLists.txt b/ext/libclementine-remote/CMakeLists.txt
|
||||
index 70761b4..5f860fb 100644
|
||||
--- a/ext/libclementine-remote/CMakeLists.txt
|
||||
+++ b/ext/libclementine-remote/CMakeLists.txt
|
||||
@@ -1,7 +1,5 @@
|
||||
include_directories(${PROTOBUF_INCLUDE_DIRS})
|
||||
|
||||
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
|
||||
-
|
||||
set(MESSAGES
|
||||
remotecontrolmessages.proto
|
||||
)
|
||||
diff --git a/ext/libclementine-tagreader/CMakeLists.txt b/ext/libclementine-tagreader/CMakeLists.txt
|
||||
index d7ae9f6..c51dbaf 100644
|
||||
--- a/ext/libclementine-tagreader/CMakeLists.txt
|
||||
+++ b/ext/libclementine-tagreader/CMakeLists.txt
|
||||
@@ -3,8 +3,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
include_directories(${CMAKE_SOURCE_DIR}/ext/libclementine-common)
|
||||
|
||||
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
|
||||
-
|
||||
set(MESSAGES
|
||||
tagreadermessages.proto
|
||||
)
|
||||
diff --git a/gst/moodbar/CMakeLists.txt b/gst/moodbar/CMakeLists.txt
|
||||
index 636ef9f..0bb87e8 100644
|
||||
--- a/gst/moodbar/CMakeLists.txt
|
||||
+++ b/gst/moodbar/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.0.0)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall --std=c++0x")
|
||||
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall")
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
From d23f4a3f4111a4b213a32b2aea81af7f09582ed9 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Kvinge <jonas@jkvinge.net>
|
||||
Date: Sun, 17 Mar 2024 15:06:38 +0100
|
||||
Subject: [PATCH 2/3] Fix build with protobuf 22 and higher
|
||||
|
||||
We need to use `find_package(Protobuf CONFIG)` to use the CMake files provided by Protobuf instead of CMake, for more information see:
|
||||
|
||||
https://gitlab.kitware.com/cmake/cmake/-/issues/25079
|
||||
|
||||
Adapt to protobuf_generate
|
||||
|
||||
Signed-off-by: Jonas Kvinge <jonas@jkvinge.net>
|
||||
---
|
||||
CMakeLists.txt | 5 ++++-
|
||||
ext/libclementine-remote/CMakeLists.txt | 18 +++++++++++-------
|
||||
ext/libclementine-spotifyblob/CMakeLists.txt | 10 +++-------
|
||||
ext/libclementine-tagreader/CMakeLists.txt | 20 ++++++++++++--------
|
||||
4 files changed, 30 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 759d673..20e5a71 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -49,7 +49,10 @@ endif(OPENGL_FOUND)
|
||||
find_package(Boost REQUIRED)
|
||||
find_package(Gettext REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
-find_package(Protobuf REQUIRED)
|
||||
+find_package(Protobuf CONFIG)
|
||||
+if(NOT Protobuf_FOUND)
|
||||
+ find_package(Protobuf REQUIRED)
|
||||
+endif()
|
||||
find_package(FFTW3)
|
||||
find_package(ALSA)
|
||||
if (NOT APPLE)
|
||||
diff --git a/ext/libclementine-remote/CMakeLists.txt b/ext/libclementine-remote/CMakeLists.txt
|
||||
index 5f860fb..5c926c9 100644
|
||||
--- a/ext/libclementine-remote/CMakeLists.txt
|
||||
+++ b/ext/libclementine-remote/CMakeLists.txt
|
||||
@@ -1,17 +1,21 @@
|
||||
-include_directories(${PROTOBUF_INCLUDE_DIRS})
|
||||
+# Workaround a bug in protobuf-generate.cmake (https://github.com/protocolbuffers/protobuf/issues/12450)
|
||||
+if(NOT protobuf_PROTOC_EXE)
|
||||
+ set(protobuf_PROTOC_EXE "protobuf::protoc")
|
||||
+endif()
|
||||
|
||||
-set(MESSAGES
|
||||
- remotecontrolmessages.proto
|
||||
-)
|
||||
+if(NOT Protobuf_LIBRARIES)
|
||||
+ set(Protobuf_LIBRARIES protobuf::libprotobuf)
|
||||
+endif()
|
||||
|
||||
-protobuf_generate_cpp(PROTO_SOURCES PROTO_HEADERS ${MESSAGES})
|
||||
+include_directories(${PROTOBUF_INCLUDE_DIRS})
|
||||
|
||||
add_library(libclementine-remote STATIC
|
||||
- ${PROTO_SOURCES}
|
||||
+ remotecontrolmessages.proto
|
||||
)
|
||||
|
||||
target_link_libraries(libclementine-remote
|
||||
- ${PROTOBUF_LIBRARY}
|
||||
+ ${Protobuf_LIBRARIES}
|
||||
libclementine-common
|
||||
)
|
||||
|
||||
+protobuf_generate(TARGET libclementine-remote)
|
||||
diff --git a/ext/libclementine-spotifyblob/CMakeLists.txt b/ext/libclementine-spotifyblob/CMakeLists.txt
|
||||
index 7a73b14..bf587ff 100644
|
||||
--- a/ext/libclementine-spotifyblob/CMakeLists.txt
|
||||
+++ b/ext/libclementine-spotifyblob/CMakeLists.txt
|
||||
@@ -3,16 +3,12 @@ include_directories(${PROTOBUF_INCLUDE_DIRS})
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blobversion.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/blobversion.h)
|
||||
|
||||
-set(MESSAGES
|
||||
- spotifymessages.proto
|
||||
-)
|
||||
-
|
||||
-protobuf_generate_cpp(PROTO_SOURCES PROTO_HEADERS ${MESSAGES})
|
||||
-
|
||||
add_library(clementine-spotifyblob-messages STATIC
|
||||
- ${PROTO_SOURCES}
|
||||
+ spotifymessages.proto
|
||||
)
|
||||
|
||||
target_link_libraries(clementine-spotifyblob-messages
|
||||
libclementine-common
|
||||
)
|
||||
+
|
||||
+protobuf_generate(TARGET clementine-spotifyblob-messages)
|
||||
diff --git a/ext/libclementine-tagreader/CMakeLists.txt b/ext/libclementine-tagreader/CMakeLists.txt
|
||||
index c51dbaf..4c24bc0 100644
|
||||
--- a/ext/libclementine-tagreader/CMakeLists.txt
|
||||
+++ b/ext/libclementine-tagreader/CMakeLists.txt
|
||||
@@ -1,16 +1,22 @@
|
||||
+# Workaround a bug in protobuf-generate.cmake (https://github.com/protocolbuffers/protobuf/issues/12450)
|
||||
+if(NOT protobuf_PROTOC_EXE)
|
||||
+ set(protobuf_PROTOC_EXE "protobuf::protoc")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT Protobuf_LIBRARIES)
|
||||
+ set(Protobuf_LIBRARIES protobuf::libprotobuf)
|
||||
+endif()
|
||||
+
|
||||
include_directories(${PROTOBUF_INCLUDE_DIRS})
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
include_directories(${CMAKE_SOURCE_DIR}/ext/libclementine-common)
|
||||
|
||||
-set(MESSAGES
|
||||
- tagreadermessages.proto
|
||||
-)
|
||||
-
|
||||
set(SOURCES
|
||||
fmpsparser.cpp
|
||||
tagreader.cpp
|
||||
gmereader.cpp
|
||||
+ tagreadermessages.proto
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
@@ -26,16 +32,14 @@ optional_source(HAVE_GOOGLE_DRIVE
|
||||
|
||||
qt5_wrap_cpp(MOC ${HEADERS})
|
||||
|
||||
-protobuf_generate_cpp(PROTO_SOURCES PROTO_HEADERS ${MESSAGES})
|
||||
-
|
||||
add_library(libclementine-tagreader STATIC
|
||||
- ${PROTO_SOURCES}
|
||||
${SOURCES}
|
||||
${MOC}
|
||||
)
|
||||
|
||||
target_link_libraries(libclementine-tagreader
|
||||
- ${PROTOBUF_LIBRARY}
|
||||
+ ${Protobuf_LIBRARIES}
|
||||
libclementine-common
|
||||
)
|
||||
|
||||
+protobuf_generate(TARGET libclementine-tagreader)
|
||||
--
|
||||
2.44.0
|
||||
|
||||
@@ -1,406 +0,0 @@
|
||||
From 4d29a0959bc30e55fa682d19c9e832227b68ad98 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Kvinge <jonas@jkvinge.net>
|
||||
Date: Sun, 17 Mar 2024 15:32:40 +0100
|
||||
Subject: [PATCH 3/3] Fix build with TagLib 2
|
||||
|
||||
Signed-off-by: Jonas Kvinge <jonas@jkvinge.net>
|
||||
---
|
||||
CMakeLists.txt | 43 ++-----------------
|
||||
ext/libclementine-tagreader/cloudstream.cpp | 46 ++++++++++++++++++++-
|
||||
ext/libclementine-tagreader/cloudstream.h | 44 +++++++++++++++-----
|
||||
ext/libclementine-tagreader/tagreader.cpp | 34 ++++++++-------
|
||||
include/clementine-config.h.in | 2 +-
|
||||
5 files changed, 102 insertions(+), 67 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 20e5a71..f063d3e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -82,7 +82,10 @@ pkg_check_modules(LIBMYGPO_QT5 libmygpo-qt5>=1.0.9)
|
||||
pkg_check_modules(LIBPULSE libpulse)
|
||||
pkg_check_modules(LIBXML libxml-2.0)
|
||||
pkg_check_modules(LIBSPOTIFY libspotify>=12.1.45)
|
||||
-pkg_check_modules(TAGLIB taglib)
|
||||
+pkg_check_modules(TAGLIB REQUIRED taglib>=1.11.1)
|
||||
+if (TAGLIB_VERSION VERSION_GREATER_EQUAL 2.0)
|
||||
+ set(HAVE_TAGLIB2 ON)
|
||||
+endif()
|
||||
|
||||
if (WIN32)
|
||||
find_package(ZLIB REQUIRED)
|
||||
@@ -129,44 +132,6 @@ if (Qt5LinguistTools_FOUND)
|
||||
set(QT_LCONVERT_EXECUTABLE Qt5::lconvert)
|
||||
endif()
|
||||
|
||||
-
|
||||
-# Only use system taglib if it's greater than 1.11.1
|
||||
-# There is a bug in version 1.11.1 corrupting Ogg files, see: https://github.com/taglib/taglib/issues/864
|
||||
-# If you decide to use the systems taglib, make sure it has been patched with the following commit:
|
||||
-# https://github.com/taglib/taglib/commit/9336c82da3a04552168f208cd7a5fa4646701ea4
|
||||
-# The current taglib in 3rdparty also has the following features used by Clementine:
|
||||
-# - Audio file detection by content.
|
||||
-#
|
||||
-if (TAGLIB_VERSION VERSION_GREATER 1.11.1)
|
||||
- option(USE_SYSTEM_TAGLIB "Use system taglib" ON)
|
||||
-else()
|
||||
- option(USE_SYSTEM_TAGLIB "Use system taglib" OFF)
|
||||
-endif()
|
||||
-
|
||||
-if (TAGLIB_FOUND AND USE_SYSTEM_TAGLIB)
|
||||
- if (TAGLIB_VERSION VERSION_GREATER 1.11.1)
|
||||
- message(STATUS "Using system taglib library")
|
||||
- else()
|
||||
- message(WARNING "Using system taglib library. Version 1.11.1 or less has a bug corrupting Ogg files, make sure your systems version has been patched!")
|
||||
- endif()
|
||||
- set(CMAKE_REQUIRED_INCLUDES "${TAGLIB_INCLUDE_DIRS}")
|
||||
- set(CMAKE_REQUIRED_LIBRARIES "${TAGLIB_LIBRARIES}")
|
||||
- check_cxx_source_compiles("#include <opusfile.h>
|
||||
- int main() { char *s; TagLib::Ogg::Opus::File opusfile(s); return 0;}" TAGLIB_HAS_OPUS)
|
||||
- set(CMAKE_REQUIRED_INCLUDES)
|
||||
- set(CMAKE_REQUIRED_LIBRARIES)
|
||||
-else()
|
||||
- message(STATUS "Using builtin taglib library")
|
||||
- set(TAGLIB_VERSION 1.11.1)
|
||||
- set(TAGLIB_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/3rdparty/taglib/headers/taglib/;${CMAKE_BINARY_DIR}/3rdparty/taglib/headers/")
|
||||
- set(TAGLIB_LIBRARY_DIRS "")
|
||||
- set(TAGLIB_LIBRARIES tag)
|
||||
- set(TAGLIB_HAS_OPUS ON)
|
||||
- add_subdirectory(3rdparty/utf8-cpp)
|
||||
- add_subdirectory(3rdparty/taglib)
|
||||
- add_definitions(-DTAGLIB_STATIC)
|
||||
-endif()
|
||||
-
|
||||
if(LASTFM5_INCLUDE_DIRS AND LASTFM51_INCLUDE_DIRS)
|
||||
set(HAVE_LIBLASTFM1 ON)
|
||||
endif()
|
||||
diff --git a/ext/libclementine-tagreader/cloudstream.cpp b/ext/libclementine-tagreader/cloudstream.cpp
|
||||
index 60786fa..3e568f8 100644
|
||||
--- a/ext/libclementine-tagreader/cloudstream.cpp
|
||||
+++ b/ext/libclementine-tagreader/cloudstream.cpp
|
||||
@@ -15,6 +15,8 @@
|
||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
+#include "clementine-config.h"
|
||||
+
|
||||
#include "cloudstream.h"
|
||||
|
||||
#include <taglib/id3v2framefactory.h>
|
||||
@@ -32,8 +34,14 @@ static const int kTaglibPrefixCacheBytes = 64 * 1024; // Should be enough.
|
||||
static const int kTaglibSuffixCacheBytes = 8 * 1024;
|
||||
} // namespace
|
||||
|
||||
-CloudStream::CloudStream(const QUrl& url, const QString& filename,
|
||||
- const long length, const QString& auth)
|
||||
+CloudStream::CloudStream(const QUrl& url,
|
||||
+ const QString& filename,
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+ const size_t length,
|
||||
+#else
|
||||
+ const long length,
|
||||
+#endif
|
||||
+ const QString& auth)
|
||||
: url_(url),
|
||||
filename_(filename),
|
||||
encoded_filename_(filename_.toUtf8()),
|
||||
@@ -91,7 +99,11 @@ void CloudStream::Precache() {
|
||||
clear();
|
||||
}
|
||||
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+TagLib::ByteVector CloudStream::readBlock(size_t length) {
|
||||
+#else
|
||||
TagLib::ByteVector CloudStream::readBlock(ulong length) {
|
||||
+#endif
|
||||
const uint start = cursor_;
|
||||
const uint end = qMin(cursor_ + length - 1, length_ - 1);
|
||||
|
||||
@@ -144,11 +156,19 @@ void CloudStream::writeBlock(const TagLib::ByteVector&) {
|
||||
qLog(Debug) << Q_FUNC_INFO << "not implemented";
|
||||
}
|
||||
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+void CloudStream::insert(const TagLib::ByteVector&, TagLib::offset_t, size_t) {
|
||||
+#else
|
||||
void CloudStream::insert(const TagLib::ByteVector&, ulong, ulong) {
|
||||
+#endif
|
||||
qLog(Debug) << Q_FUNC_INFO << "not implemented";
|
||||
}
|
||||
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+void CloudStream::removeBlock(TagLib::offset_t, size_t) {
|
||||
+#else
|
||||
void CloudStream::removeBlock(ulong, ulong) {
|
||||
+#endif
|
||||
qLog(Debug) << Q_FUNC_INFO << "not implemented";
|
||||
}
|
||||
|
||||
@@ -159,14 +179,22 @@ bool CloudStream::readOnly() const {
|
||||
|
||||
bool CloudStream::isOpen() const { return true; }
|
||||
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+void CloudStream::seek(TagLib::offset_t offset, TagLib::IOStream::Position p) {
|
||||
+#else
|
||||
void CloudStream::seek(long offset, TagLib::IOStream::Position p) {
|
||||
+#endif
|
||||
switch (p) {
|
||||
case TagLib::IOStream::Beginning:
|
||||
cursor_ = offset;
|
||||
break;
|
||||
|
||||
case TagLib::IOStream::Current:
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+ cursor_ = qMin(static_cast<size_t>(cursor_ + offset), length_);
|
||||
+#else
|
||||
cursor_ = qMin(ulong(cursor_ + offset), length_);
|
||||
+#endif
|
||||
break;
|
||||
|
||||
case TagLib::IOStream::End:
|
||||
@@ -178,11 +206,25 @@ void CloudStream::seek(long offset, TagLib::IOStream::Position p) {
|
||||
|
||||
void CloudStream::clear() { cursor_ = 0; }
|
||||
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+
|
||||
+TagLib::offset_t CloudStream::tell() const { return cursor_; }
|
||||
+
|
||||
+TagLib::offset_t CloudStream::length() { return length_; }
|
||||
+
|
||||
+#else
|
||||
+
|
||||
long CloudStream::tell() const { return cursor_; }
|
||||
|
||||
long CloudStream::length() { return length_; }
|
||||
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+void CloudStream::truncate(TagLib::offset_t) {
|
||||
+#else
|
||||
void CloudStream::truncate(long) {
|
||||
+#endif
|
||||
qLog(Debug) << Q_FUNC_INFO << "not implemented";
|
||||
}
|
||||
|
||||
diff --git a/ext/libclementine-tagreader/cloudstream.h b/ext/libclementine-tagreader/cloudstream.h
|
||||
index 7002b3a..24e31c2 100644
|
||||
--- a/ext/libclementine-tagreader/cloudstream.h
|
||||
+++ b/ext/libclementine-tagreader/cloudstream.h
|
||||
@@ -18,6 +18,8 @@
|
||||
#ifndef GOOGLEDRIVESTREAM_H
|
||||
#define GOOGLEDRIVESTREAM_H
|
||||
|
||||
+#include "clementine-config.h"
|
||||
+
|
||||
#include <QList>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QObject>
|
||||
@@ -30,22 +32,38 @@
|
||||
class CloudStream : public QObject, public TagLib::IOStream {
|
||||
Q_OBJECT
|
||||
public:
|
||||
- CloudStream(const QUrl& url, const QString& filename, const long length,
|
||||
+ CloudStream(const QUrl& url,
|
||||
+ const QString& filename,
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+ const size_t length,
|
||||
+#else
|
||||
+ const long length,
|
||||
+#endif
|
||||
const QString& auth);
|
||||
|
||||
// Taglib::IOStream
|
||||
virtual TagLib::FileName name() const;
|
||||
- virtual TagLib::ByteVector readBlock(ulong length);
|
||||
- virtual void writeBlock(const TagLib::ByteVector&);
|
||||
- virtual void insert(const TagLib::ByteVector&, ulong, ulong);
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+ virtual TagLib::ByteVector readBlock(size_t length) override;
|
||||
+ virtual void insert(const TagLib::ByteVector&, TagLib::offset_t, size_t) override;
|
||||
+ virtual void removeBlock(TagLib::offset_t, size_t) override;
|
||||
+ virtual void seek(TagLib::offset_t offset, TagLib::IOStream::Position p) override;
|
||||
+ virtual void truncate(TagLib::offset_t) override;
|
||||
+ virtual TagLib::offset_t tell() const override;
|
||||
+ virtual TagLib::offset_t length() override;
|
||||
+#else
|
||||
+ virtual TagLib::ByteVector readBlock(ulong length) override;
|
||||
+ virtual void insert(const TagLib::ByteVector&, ulong, ulong) override;
|
||||
virtual void removeBlock(ulong, ulong);
|
||||
- virtual bool readOnly() const;
|
||||
- virtual bool isOpen() const;
|
||||
- virtual void seek(long offset, TagLib::IOStream::Position p);
|
||||
- virtual void clear();
|
||||
- virtual long tell() const;
|
||||
- virtual long length();
|
||||
- virtual void truncate(long);
|
||||
+ virtual void seek(long offset, TagLib::IOStream::Position p) override;
|
||||
+ virtual void truncate(long) override;
|
||||
+ virtual long tell() const override;
|
||||
+ virtual long length() override;
|
||||
+#endif
|
||||
+ virtual void writeBlock(const TagLib::ByteVector&) override;
|
||||
+ virtual bool readOnly() const override;
|
||||
+ virtual bool isOpen() const override;
|
||||
+ virtual void clear() override;
|
||||
|
||||
google::sparsetable<char>::size_type cached_bytes() const {
|
||||
return cache_.num_nonempty();
|
||||
@@ -68,7 +86,11 @@ class CloudStream : public QObject, public TagLib::IOStream {
|
||||
const QUrl url_;
|
||||
const QString filename_;
|
||||
const QByteArray encoded_filename_;
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+ const size_t length_;
|
||||
+#else
|
||||
const ulong length_;
|
||||
+#endif
|
||||
const QString auth_;
|
||||
|
||||
int cursor_;
|
||||
diff --git a/ext/libclementine-tagreader/tagreader.cpp b/ext/libclementine-tagreader/tagreader.cpp
|
||||
index e6fc559..c4e861b 100644
|
||||
--- a/ext/libclementine-tagreader/tagreader.cpp
|
||||
+++ b/ext/libclementine-tagreader/tagreader.cpp
|
||||
@@ -38,9 +38,7 @@
|
||||
#include <QUrl>
|
||||
#include <QVector>
|
||||
#include <memory>
|
||||
-#ifdef TAGLIB_HAS_OPUS
|
||||
#include <opusfile.h>
|
||||
-#endif
|
||||
#include <apetag.h>
|
||||
#include <oggflacfile.h>
|
||||
#include <popularimeterframe.h>
|
||||
@@ -198,7 +196,7 @@ void TagReader::ReadFile(const QString& filename,
|
||||
// Find album artists
|
||||
TagLib::APE::ItemListMap::ConstIterator it = items.find("ALBUM ARTIST");
|
||||
if (it != items.end()) {
|
||||
- TagLib::StringList album_artists = it->second.toStringList();
|
||||
+ TagLib::StringList album_artists = it->second.values();
|
||||
if (!album_artists.isEmpty()) {
|
||||
Decode(album_artists.front(), nullptr, song->mutable_albumartist());
|
||||
}
|
||||
@@ -243,22 +241,22 @@ void TagReader::ReadFile(const QString& filename,
|
||||
}
|
||||
|
||||
if (items.contains("BPM")) {
|
||||
- Decode(items["BPM"].toStringList().toString(", "), nullptr,
|
||||
+ Decode(items["BPM"].values().toString(", "), nullptr,
|
||||
song->mutable_performer());
|
||||
}
|
||||
|
||||
if (items.contains("PERFORMER")) {
|
||||
- Decode(items["PERFORMER"].toStringList().toString(", "), nullptr,
|
||||
+ Decode(items["PERFORMER"].values().toString(", "), nullptr,
|
||||
song->mutable_performer());
|
||||
}
|
||||
|
||||
if (items.contains("COMPOSER")) {
|
||||
- Decode(items["COMPOSER"].toStringList().toString(", "), nullptr,
|
||||
+ Decode(items["COMPOSER"].values().toString(", "), nullptr,
|
||||
song->mutable_composer());
|
||||
}
|
||||
|
||||
if (items.contains("GROUPING")) {
|
||||
- Decode(items["GROUPING"].toStringList().toString(" "), nullptr,
|
||||
+ Decode(items["GROUPING"].values().toString(" "), nullptr,
|
||||
song->mutable_grouping());
|
||||
}
|
||||
|
||||
@@ -565,8 +563,8 @@ void TagReader::ReadFile(const QString& filename,
|
||||
if (fileref->audioProperties()) {
|
||||
song->set_bitrate(fileref->audioProperties()->bitrate());
|
||||
song->set_samplerate(fileref->audioProperties()->sampleRate());
|
||||
- song->set_length_nanosec(fileref->audioProperties()->length() *
|
||||
- kNsecPerSec);
|
||||
+ song->set_length_nanosec(fileref->audioProperties()->lengthInMilliseconds() *
|
||||
+ kNsecPerMsec);
|
||||
}
|
||||
|
||||
// Get the filetype if we can
|
||||
@@ -789,10 +787,8 @@ cpb::tagreader::SongMetadata_Type TagReader::GuessFileType(
|
||||
return cpb::tagreader::SongMetadata_Type_OGGSPEEX;
|
||||
if (dynamic_cast<TagLib::Ogg::Vorbis::File*>(fileref->file()))
|
||||
return cpb::tagreader::SongMetadata_Type_OGGVORBIS;
|
||||
-#ifdef TAGLIB_HAS_OPUS
|
||||
if (dynamic_cast<TagLib::Ogg::Opus::File*>(fileref->file()))
|
||||
return cpb::tagreader::SongMetadata_Type_OGGOPUS;
|
||||
-#endif
|
||||
if (dynamic_cast<TagLib::RIFF::AIFF::File*>(fileref->file()))
|
||||
return cpb::tagreader::SongMetadata_Type_AIFF;
|
||||
if (dynamic_cast<TagLib::RIFF::WAV::File*>(fileref->file()))
|
||||
@@ -1376,31 +1372,41 @@ bool TagReader::ReadCloudFile(const QUrl& download_url, const QString& title,
|
||||
std::unique_ptr<TagLib::File> tag;
|
||||
if (mime_type == "audio/mpeg" &&
|
||||
title.endsWith(".mp3", Qt::CaseInsensitive)) {
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+ tag.reset(new TagLib::MPEG::File(stream.get(), true,
|
||||
+ TagLib::AudioProperties::Accurate,
|
||||
+ TagLib::ID3v2::FrameFactory::instance()));
|
||||
+#else
|
||||
tag.reset(new TagLib::MPEG::File(stream.get(),
|
||||
TagLib::ID3v2::FrameFactory::instance(),
|
||||
TagLib::AudioProperties::Accurate));
|
||||
+#endif
|
||||
} else if (mime_type == "audio/mp4" ||
|
||||
(mime_type == "audio/mpeg" &&
|
||||
title.endsWith(".m4a", Qt::CaseInsensitive))) {
|
||||
tag.reset(new TagLib::MP4::File(stream.get(), true,
|
||||
TagLib::AudioProperties::Accurate));
|
||||
}
|
||||
-#ifdef TAGLIB_HAS_OPUS
|
||||
else if ((mime_type == "application/opus" || mime_type == "audio/opus" ||
|
||||
mime_type == "application/ogg" || mime_type == "audio/ogg") &&
|
||||
title.endsWith(".opus", Qt::CaseInsensitive)) {
|
||||
tag.reset(new TagLib::Ogg::Opus::File(stream.get(), true,
|
||||
TagLib::AudioProperties::Accurate));
|
||||
}
|
||||
-#endif
|
||||
else if (mime_type == "application/ogg" || mime_type == "audio/ogg") {
|
||||
tag.reset(new TagLib::Ogg::Vorbis::File(stream.get(), true,
|
||||
TagLib::AudioProperties::Accurate));
|
||||
} else if (mime_type == "application/x-flac" || mime_type == "audio/flac" ||
|
||||
mime_type == "audio/x-flac") {
|
||||
+#ifdef HAVE_TAGLIB2
|
||||
+ tag.reset(new TagLib::FLAC::File(stream.get(), true,
|
||||
+ TagLib::AudioProperties::Accurate,
|
||||
+ TagLib::ID3v2::FrameFactory::instance()));
|
||||
+#else
|
||||
tag.reset(new TagLib::FLAC::File(stream.get(),
|
||||
TagLib::ID3v2::FrameFactory::instance(),
|
||||
true, TagLib::AudioProperties::Accurate));
|
||||
+#endif
|
||||
} else if (mime_type == "audio/x-ms-wma") {
|
||||
tag.reset(new TagLib::ASF::File(stream.get(), true,
|
||||
TagLib::AudioProperties::Accurate));
|
||||
@@ -1431,7 +1437,7 @@ bool TagReader::ReadCloudFile(const QUrl& download_url, const QString& title,
|
||||
song->set_type(cpb::tagreader::SongMetadata_Type_STREAM);
|
||||
|
||||
if (tag->audioProperties()) {
|
||||
- song->set_length_nanosec(tag->audioProperties()->length() * kNsecPerSec);
|
||||
+ song->set_length_nanosec(tag->audioProperties()->lengthInMilliseconds() * kNsecPerMsec);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
diff --git a/include/clementine-config.h.in b/include/clementine-config.h.in
|
||||
index eb6dbfc..8fa8772 100644
|
||||
--- a/include/clementine-config.h.in
|
||||
+++ b/include/clementine-config.h.in
|
||||
@@ -48,11 +48,11 @@
|
||||
#cmakedefine HAVE_OPENGL
|
||||
#cmakedefine HAVE_TRANSLATIONS
|
||||
#cmakedefine HAVE_SPOTIFY
|
||||
-#cmakedefine TAGLIB_HAS_OPUS
|
||||
#cmakedefine USE_INSTALL_PREFIX
|
||||
#cmakedefine USE_SYSTEM_PROJECTM
|
||||
#cmakedefine USE_SYSTEM_SHA2
|
||||
#cmakedefine USE_BUNDLE
|
||||
+#cmakedefine HAVE_TAGLIB2
|
||||
|
||||
#define USE_BUNDLE_DIR "${USE_BUNDLE_DIR}"
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 22 21:16:08 CET 2025 - Stanislav Brabec <sbrabec@suse.com>
|
||||
|
||||
- Remove unused BuildRequires: update-desktop-files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 23 22:48:25 UTC 2025 - Tristan Miller <psychonaut@nothingisreal.com>
|
||||
|
||||
- Update to rolling release version tagged 1.4.1-50-ge281c4508
|
||||
- Remove clementine-protobuf.patch and clementine-cpp17.patch; similar
|
||||
revisions now upstream per
|
||||
https://github.com/clementine-player/Clementine/pull/7372
|
||||
- Remove clementine-taglib2.patch; similar revisions now upstream per
|
||||
https://github.com/clementine-player/Clementine/pull/7374
|
||||
- Add clementine-cmake-pr7402.patch from
|
||||
https://github.com/clementine-player/Clementine/pull/7402 to fix
|
||||
CMake compatibility issues
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 15 12:29:09 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
- Drop BuildRequires: pkgconfig(glew) as it is not used for build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 17 14:13:29 UTC 2024 - Jonas Kvinge <jonaski@opensuse.org>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package clementine
|
||||
#
|
||||
# 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,8 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%define rev bbda59a5f347a75bbecde0b1928e03942e367850
|
||||
|
||||
%bcond_without git
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
@@ -27,9 +25,10 @@
|
||||
%endif
|
||||
%bcond_without qt5
|
||||
%define gname Clementine
|
||||
%define tag 1.4.1-50-ge281c4508
|
||||
|
||||
Name: clementine
|
||||
Version: 1.4.0~rc2
|
||||
Version: 1.4.1~50~ge281c4508
|
||||
Release: 0
|
||||
Summary: A music player inspired by Amarok 1.4
|
||||
License: GPL-3.0-or-later
|
||||
@@ -38,7 +37,7 @@ URL: https://clementine-player.org/
|
||||
%if %{without git}
|
||||
#Source: https://github.com/clementine-player/%%{gname}/archive/%%{version}.tar.gz#/%%{name}-%%{version}.tar.gz
|
||||
%else
|
||||
Source0: https://github.com/clementine-player/Clementine/archive/%{rev}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source0: https://github.com/clementine-player/Clementine/archive/%{tag}/%{name}-%{tag}.tar.gz
|
||||
%endif
|
||||
# PATCH-FEATURE-UPSTREAM uudisks2-support-for-devicemanager.patch
|
||||
Patch1: clementine-udisks-headers.patch
|
||||
@@ -46,12 +45,8 @@ Patch1: clementine-udisks-headers.patch
|
||||
Patch2: clementine-moodbar-fpic.patch
|
||||
# PATCH-FEATURE-OPENSUSE
|
||||
Patch6: use_system_qxtglobalshortcut.patch
|
||||
# Use C++17
|
||||
Patch3: clementine-cpp17.patch
|
||||
# Fix build with protobuf 22 and higher
|
||||
Patch4: clementine-protobuf.patch
|
||||
# Fix build with TagLib 2
|
||||
Patch5: clementine-taglib2.patch
|
||||
# Fix CMake compatibility issues
|
||||
Patch7: clementine-cmake-pr7402.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: freeglut-devel
|
||||
@@ -60,7 +55,6 @@ BuildRequires: gettext-tools
|
||||
BuildRequires: help2man
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: libboost_headers-devel
|
||||
BuildRequires: update-desktop-files
|
||||
%if %{with qt5}
|
||||
#BuildRequires: pkgconfig(qca2-qt5)
|
||||
BuildRequires: libQt5Gui-private-headers-devel
|
||||
@@ -92,7 +86,6 @@ BuildRequires: pkgconfig(alsa)
|
||||
BuildRequires: pkgconfig(cryptopp)
|
||||
BuildRequires: pkgconfig(fftw3)
|
||||
BuildRequires: pkgconfig(gio-2.0)
|
||||
BuildRequires: pkgconfig(glew)
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
BuildRequires: pkgconfig(gstreamer-1.0)
|
||||
BuildRequires: pkgconfig(gstreamer-app-1.0)
|
||||
@@ -146,7 +139,7 @@ Features:
|
||||
%if %{without git}
|
||||
%setup -q -n %{gname}-%{version}
|
||||
%else
|
||||
%setup -q -n %{gname}-%{rev}
|
||||
%setup -q -n %{gname}-%{tag}
|
||||
%endif
|
||||
%autopatch -p1
|
||||
|
||||
@@ -166,12 +159,13 @@ export CXXFLAGS="$CFLAGS"
|
||||
-DUSE_SYSTEM_PROJECTM=ON \
|
||||
-DBUNDLE_PROJECTM_PRESETS=OFF \
|
||||
%if %{with qt5}
|
||||
-DUSE_SYSTEM_QXT=ON \
|
||||
-DUSE_SYSTEM_QXT=ON \
|
||||
%else
|
||||
-DUSE_SYSTEM_QXT=ON \
|
||||
%endif
|
||||
-DENABLE_MOODBAR=ON \
|
||||
-DENABLE_DBUS=ON
|
||||
-DENABLE_DBUS=ON \
|
||||
-DFORCE_GIT_REVISION:STRING=%{tag}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
|
||||
Reference in New Issue
Block a user