Update Clementine to 1.2.1, some features:

* Support for indexing and playing music from Box, Dropbox, Skydrive,
    and Ubuntu One.
  * Support for Subsonic.
  * Remote control support for Android.
  * Playlist tab at the sidebar. Starred playlists are saved in here
    when their tabs are closed.
  * Opus support.
  * POPM and FMPS tags support.
  * Option to resume playback on startup.
  * ... and many others.
This commit is contained in:
zhuk 2013-12-12 11:13:39 +00:00
parent db82f29b2f
commit c5d0857c16
11 changed files with 168 additions and 94 deletions

View File

@ -1,11 +1,10 @@
# $OpenBSD: Makefile,v 1.8 2013/08/07 21:31:13 naddy Exp $
# $OpenBSD: Makefile,v 1.9 2013/12/12 11:13:39 zhuk Exp $
SHARED_ONLY = Yes
COMMENT = Qt4-based featureful music player
DISTNAME = clementine-1.1.1
REVISION = 3
DISTNAME = clementine-1.2.1
CATEGORIES = audio x11
HOMEPAGE = http://clementine-player.org/
@ -16,20 +15,22 @@ MASTER_SITES = https://clementine-player.googlecode.com/files/
# GPLv2/LGPLv2/GFDL
PERMIT_PACKAGE_CDROM = Yes
WANTLIB = c m pthread stdc++ z
WANTLIB = c m pthread z
WANTLIB += GL GLU GLEW ICE SM X11 Xext
WANTLIB += lib/qt4/QtDBus lib/qt4/QtGui lib/qt4/QtNetwork
WANTLIB += lib/qt4/QtOpenGL lib/qt4/QtSql lib/qt4/QtWebKit
WANTLIB += lib/qt4/QtXml lib/qt4/QtXmlPatterns
WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
WANTLIB += gstapp-0.10 gstbase-0.10 gstcdda-0.10 gstreamer-0.10
WANTLIB += gsttag-0.10
WANTLIB += cdio chromaprint execinfo fftw3 lastfm mtp protobuf-lite qca2
WANTLIB += qjson tag>=5.0 usb-1.0 xml2
WANTLIB += cdio chromaprint gpod execinfo fftw3 lastfm mtp mygpo-qt
WANTLIB += protobuf qca2 qjson tag>=5.0 usb-1.0 xml2
# those are dlopen'ed
WANTLIB += plist
MODULES = devel/cmake devel/gettext x11/qt4
MODULES = gcc4 devel/cmake devel/gettext x11/qt4
MODGCC4_LANGS = c c++
MODGCC4_ARCHS = ${GCC4_ARCHS}
BUILD_DEPENDS = devel/boost \
devel/cmake>=2.8.10.2p3 \
@ -40,10 +41,11 @@ RUN_DEPENDS = devel/desktop-file-utils \
x11/gtk+2,-guic
LIB_DEPENDS = audio/chromaprint \
audio/taglib>=1.4 \
audio/libcdio \
devel/libexecinfo \
audio/libgpod \
audio/liblastfm \
audio/taglib>=1.4 \
devel/libexecinfo \
devel/libmtp \
devel/libplist \
devel/libusb1 \
@ -53,17 +55,22 @@ LIB_DEPENDS = audio/chromaprint \
math/fftw3 \
multimedia/gstreamer-0.10/core \
multimedia/gstreamer-0.10/plugins-base \
net/libmygpo-qt \
security/qca2
# Requires audio/libgpod update, disable to avoid picking by accident
CONFIGURE_ARGS = -DENABLE_LIBGPOD:Bool=No \
-DENABLE_IMOBILEDEVICE:Bool=No
# Crash reporting
CONFIGURE_ARGS += -DENABLE_BREAKPAD:Bool=No
TEST_DEPENDS = ${MODPY_BUILD_DEPENDS}
# Unported stuff
CONFIGURE_ARGS += -DENABLE_SOUNDMENU:Bool=No
CONFIGURE_ARGS = -DENABLE_SOUNDMENU:Bool=Off \
-DENABLE_SPOTIFY_BLOB:Bool=Off
# It's advised by Google to use bundled GTest and GMock
CONFIGURE_ARGS += -DFORCE_BUNDLED_GMOCK=Yes
# Use system SQLite
CONFIGURE_ARGS += -DSTATIC_SQLITE:Bool=No \
-DI_HATE_MY_USERS:Bool=Yes \
-DMY_USERS_WILL_SUFFER_BECAUSE_OF_ME:Bool=Yes
# XXX Builds tend to sometimes omit projectM presets when this option
# is missing. To be investigated.

View File

@ -1,2 +1,2 @@
SHA256 (clementine-1.1.1.tar.gz) = qU371HMhVf8dTyS7eS2eTe9b9KQt1meGOMBAAhem/ak=
SIZE (clementine-1.1.1.tar.gz) = 8557109
SHA256 (clementine-1.2.1.tar.gz) = 21Vui/Iw4lNWNvVzamL/4kzhVEgfsFEj6DlatKpkZU4=
SIZE (clementine-1.2.1.tar.gz) = 9274351

View File

@ -1,6 +1,6 @@
#cmakedefine01 HAVE_BACKTRACE
#cmakedefine01 Backtrace_FOUND
#if HAVE_BACKTRACE
#include <${BACKTRACE_INCLUDES}>
#if Backtrace_FOUND
#include <${Backtrace_HEADER}>
#endif

View File

@ -0,0 +1,61 @@
$OpenBSD: patch-CMakeLists_txt,v 1.1 2013/12/12 11:13:39 zhuk Exp $
1. Force using bundled GTest and GMock, as it's better this way.
2. Make Clementine use system SHA-2 implementation.
--- CMakeLists.txt.orig Tue Nov 26 01:16:24 2013
+++ CMakeLists.txt Thu Dec 12 12:40:20 2013
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.6)
cmake_policy(SET CMP0011 OLD)
include(CheckCXXCompilerFlag)
+include(CheckFunctionExists)
include(FindPkgConfig)
include(cmake/Summary.cmake)
include(cmake/Version.cmake)
@@ -380,11 +381,12 @@ if(NOT ECHONEST_INCLUDE_DIRS OR NOT ECHONEST_LIBRARIES
set(ECHONEST_LIBRARIES echonest)
endif(NOT ECHONEST_INCLUDE_DIRS OR NOT ECHONEST_LIBRARIES)
-# Use system gmock if it's available
+# Use system gmock if it's available and desired thing to do
+option(FORCE_BUNDLED_GMOCK OFF)
# We need to look for both gmock and gtest
find_path(GMOCK_INCLUDE_DIRS gmock/gmock.h)
find_library(GMOCK_LIBRARIES gmock)
-if(GMOCK_INCLUDE_DIRS)
+if(NOT FORCE_BUNDLED_GMOCK AND GMOCK_INCLUDE_DIRS)
find_path(GTEST_INCLUDE_DIRS gtest/gtest.h)
find_library(GTEST_LIBRARIES gtest)
if(GTEST_INCLUDE_DIRS)
@@ -395,12 +397,29 @@ endif(GMOCK_INCLUDE_DIRS)
# Use system sha2 if it's available
find_path(SHA2_INCLUDE_DIRS sha2.h)
-find_library(SHA2_LIBRARIES sha2)
-if(NOT SHA2_INCLUDE_DIRS OR NOT SHA2_LIBRARIES)
+find_library(SHA2_LIBRARY sha2)
+if (SHA2_LIBRARY)
+ set(SHA2_LIBRARIES ${SHA2_LIBRARY})
+else (SHA2_LIBRARY)
+ # some OSes have it in libc
+ set(SHA2_LIBRARIES c)
+endif (SHA2_LIBRARY)
+set(CMAKE_REQUIRED_FLAGS)
+set(CMAKE_REQUIRED_INCLUDES ${SHA2_INCLUDE_DIRS})
+set(CMAKE_REQUIRED_DEFINITIONS)
+set(CMAKE_REQUIRED_LIBRARIES ${SHA2_LIBRARIES})
+check_function_exists(SHA256_Update HAVE_SHA2_UNDERSCORED)
+check_function_exists(SHA256Update HAVE_SHA2_NO_UNDERSCORE)
+if (HAVE_SHA2_UNDERSCORED OR HAVE_SHA2_NO_UNDERSCORE)
+ set(HAVE_SHA2 1)
+endif (HAVE_SHA2_UNDERSCORED OR HAVE_SHA2_NO_UNDERSCORE)
+
+if(NOT SHA2_INCLUDE_DIRS AND NOT HAVE_SHA2)
add_subdirectory(3rdparty/sha2)
set(SHA2_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/sha2)
set(SHA2_LIBRARIES sha2)
-endif(NOT SHA2_INCLUDE_DIRS OR NOT SHA2_LIBRARIES)
+ set(HAVE_SHA2_UNDERSCORED 1)
+endif(NOT SHA2_INCLUDE_DIRS AND NOT HAVE_SHA2)
# Use our 3rdparty chromaprint if a system one wasn't found
if(NOT CHROMAPRINT_FOUND)

View File

@ -1,14 +1,15 @@
$OpenBSD: patch-ext_libclementine-common_CMakeLists_txt,v 1.3 2013/03/21 16:05:00 zhuk Exp $
--- ext/libclementine-common/CMakeLists.txt.orig Sun Nov 18 12:51:26 2012
+++ ext/libclementine-common/CMakeLists.txt Thu Mar 21 19:34:21 2013
@@ -41,3 +41,10 @@ target_link_libraries(libclementine-common
chardet
$OpenBSD: patch-ext_libclementine-common_CMakeLists_txt,v 1.4 2013/12/12 11:13:39 zhuk Exp $
--- ext/libclementine-common/CMakeLists.txt.orig Sun Oct 20 05:37:02 2013
+++ ext/libclementine-common/CMakeLists.txt Sun Oct 20 05:38:11 2013
@@ -33,3 +33,11 @@ target_link_libraries(libclementine-common
${TAGLIB_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
+
+find_package(Backtrace)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+if(BACKTRACE_FOUND)
+ include_directories(${BACKTRACE_INCLUDE_DIRS})
+ target_link_libraries(libclementine-common ${BACKTRACE_LIBRARIES})
+endif(BACKTRACE_FOUND)
+if(Backtrace_FOUND)
+ include_directories(${Backtrace_INCLUDE_DIRS})
+ target_link_libraries(libclementine-common ${Backtrace_LIBRARIES})
+endif(Backtrace_FOUND)

View File

@ -1,8 +1,13 @@
$OpenBSD: patch-ext_libclementine-common_core_logging_cpp,v 1.3 2013/03/21 16:05:00 zhuk Exp $
backtrace() is probably present on GNU and Solaris only.
--- ext/libclementine-common/core/logging.cpp.orig Thu Oct 11 15:16:39 2012
+++ ext/libclementine-common/core/logging.cpp Thu Feb 7 17:55:23 2013
@@ -21,9 +21,6 @@
$OpenBSD: patch-ext_libclementine-common_core_logging_cpp,v 1.4 2013/12/12 11:13:39 zhuk Exp $
Use shiny CMake FindBacktrace module.
--- ext/libclementine-common/core/logging.cpp.orig Sun Oct 13 04:27:04 2013
+++ ext/libclementine-common/core/logging.cpp Sun Oct 20 05:28:07 2013
@@ -18,12 +18,11 @@
// it is used by the Spotify blob which links against libspotify and is not GPL
// compatible.
+#include <config.h>
+
#include <QtGlobal>
#include <cxxabi.h>
@ -12,29 +17,21 @@ backtrace() is probably present on GNU and Solaris only.
#include <QCoreApplication>
#include <QDateTime>
@@ -31,6 +28,7 @@
#include <glib.h>
+#include "config.h"
#include "logging.h"
@@ -224,7 +222,7 @@ QString DemangleSymbol(const QString& symbol) {
@@ -230,7 +229,7 @@ QString DemangleSymbol(const QString& symbol) {
}
void DumpStackTrace() {
-#ifdef Q_OS_UNIX
+#if HAVE_BACKTRACE
+#if Backtrace_FOUND
void* callstack[128];
int callstack_size = backtrace(reinterpret_cast<void**>(&callstack), sizeof(callstack));
char** symbols = backtrace_symbols(reinterpret_cast<void**>(&callstack), callstack_size);
@@ -234,7 +232,7 @@ void DumpStackTrace() {
@@ -240,7 +239,7 @@ void DumpStackTrace() {
}
free(symbols);
#else
- qLog(Debug) << "FIXME: Implement printing stack traces on this platform";
+ qLog(Debug) << "FIXME: Implement printing stack traces on this platform or provide separate execinfo library";
+ qLog(Debug) << "FIXME: Implement printing stack traces on this platform, or port backtrace library";
#endif
}

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-src_config_h_in,v 1.1 2013/12/12 11:13:39 zhuk Exp $
Make Clementine use system SHA-2 implementation.
--- src/config.h.in.orig Tue Oct 29 20:57:42 2013
+++ src/config.h.in Tue Oct 29 21:12:14 2013
@@ -49,5 +49,6 @@
#cmakedefine USE_SYSTEM_PROJECTM
#cmakedefine USE_STD_UNORDERED_MAP
#cmakedefine HAVE_LAMBDAS
+#cmakedefine HAVE_SHA2_UNDERSCORED
#endif // CONFIG_H_IN

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_core_songloader_cpp,v 1.1 2013/12/12 11:13:39 zhuk Exp $
--- src/core/songloader.cpp.orig Sun Oct 20 18:59:00 2013
+++ src/core/songloader.cpp Sun Oct 20 19:08:05 2013
@@ -88,7 +88,7 @@ SongLoader::Result SongLoader::Load(const QUrl& url) {
url_ = url;
if (url_.scheme() == "file") {
- return LoadLocal(url_.toLocalFile());
+ return LoadLocal(url_.toEncoded(QUrl::RemoveScheme|QUrl::RemoveAuthority));
}
if (sRawUriSchemes.contains(url_.scheme())) {

View File

@ -1,9 +1,11 @@
$OpenBSD: patch-src_core_utilities_cpp,v 1.1.1.1 2013/02/05 14:00:16 zhuk Exp $
Add support for OpenBSD sensors framework when checking if this PC is a laptop.
--- src/core/utilities.cpp.orig Wed Nov 28 19:53:29 2012
+++ src/core/utilities.cpp Wed Nov 28 20:07:07 2012
@@ -59,6 +59,14 @@
# include "IOKit/ps/IOPSKeys.h"
$OpenBSD: patch-src_core_utilities_cpp,v 1.2 2013/12/12 11:13:39 zhuk Exp $
1. Add support for OpenBSD sensors framework when checking if this PC
is a laptop.
2. Make Clementine use system SHA-2 implementation.
--- src/core/utilities.cpp.orig Sun Oct 13 04:27:04 2013
+++ src/core/utilities.cpp Wed Oct 30 16:23:55 2013
@@ -66,6 +66,14 @@
# include <QProcess>
#endif
+#ifdef Q_OS_OPENBSD
@ -14,31 +16,44 @@ Add support for OpenBSD sensors framework when checking if this PC is a laptop.
+# include <string.h>
+#endif
+
#include <boost/scoped_array.hpp>
namespace Utilities {
@@ -538,6 +546,24 @@ bool IsLaptop() {
static QString tr(const char* str) {
@@ -436,6 +444,13 @@ QByteArray HmacSha1(const QByteArray& key, const QByte
return Hmac(key, data, Sha1_Algo);
}
+#if !HAVE_SHA2_UNDERSCORED
+# define SHA256_CTX SHA2_CTX
+# define SHA256_Init(x) SHA256Init((x))
+# define SHA256_Update(x,y,z) SHA256Update((x) , (y) , (z))
+# define SHA256_Final(x,y) SHA256Final((x) , (y))
+#endif // !HAVE_SHA2_UNDERSCORED
+
QByteArray Sha256(const QByteArray& data) {
SHA256_CTX context;
SHA256_Init(&context);
@@ -592,6 +607,23 @@ bool IsLaptop() {
if (CFDictionaryContainsKey(description, CFSTR(kIOPSBatteryHealthKey))) {
return true;
}
+ }
+ return false;
+#endif
+
+#ifdef Q_OS_OPENBSD
+#elif defined(Q_OS_OPENBSD)
+ struct sensordev snsrdev;
+ size_t sdlen = sizeof(snsrdev);
+ int mib[3] = { CTL_HW, HW_SENSORS, 0 };
+ for (int i = 0; ; ++i) {
+ mib[2] = i;
+ if (::sysctl(mib, 3, &snsrdev, &sdlen, NULL, 0) == -1) {
+ if (errno == ENXIO)
+ continue;
+ if (errno == ENOENT)
+ break;
+ if (errno == EAGAIN)
+ i--;
+ continue;
+ }
+ if (::memcmp("acpibat", snsrdev.xname, 7) == 0)
+ return true;
}
return false;
#endif
#else

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_devices_cddadevice_h,v 1.1.1.1 2013/02/05 14:00:16 zhuk Exp $
--- src/devices/cddadevice.h.orig Sun Feb 12 21:51:39 2012
+++ src/devices/cddadevice.h Sun Feb 12 21:52:04 2012
@@ -18,11 +18,11 @@
#ifndef CDDADEVICE_H
#define CDDADEVICE_H
-#include <cdio/cdio.h>
#include <gst/cdda/gstcddabasesrc.h>
#include <QMutex>
#include "connecteddevice.h"
+#include <cdio/cdio.h>
#include "core/song.h"
#include "musicbrainz/musicbrainzclient.h"

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src_main_cpp,v 1.1 2013/03/27 18:00:00 ajacoutot Exp $
Fix build with glib2>=2.36.0
--- src/main.cpp.orig Wed Mar 27 09:55:18 2013
+++ src/main.cpp Wed Mar 27 09:55:29 2013
@@ -265,7 +265,6 @@ int main(int argc, char *argv[]) {
#endif
// This makes us show up nicely in gnome-volume-control
- g_type_init();
g_set_application_name(QCoreApplication::applicationName().toLocal8Bit());
RegisterMetaTypes();