Update audio/clementine to 1.4.0rc1. Tested with some default streaming services and local MP3s.
You need audio/liblastfm>=1.1.0 and net/libmygpo-qt>=1.1.0 from the ports@ list to test the update. OK? Index: Makefile =================================================================== RCS file: /cvs/ports/audio/clementine/Makefile,v retrieving revision 1.40 diff -u -p -u -p -r1.40 Makefile --- Makefile 13 Aug 2019 14:50:12 -0000 1.40 +++ Makefile 25 Jan 2020 07:19:19 -0000 @@ -1,87 +1,67 @@ # $OpenBSD: Makefile,v 1.40 2019/08/13 14:50:12 sthen Exp $ -COMMENT = Qt4-based featureful music player +COMMENT = music player GH_ACCOUNT = clementine-player GH_PROJECT = Clementine -GH_TAGNAME = 1.2.3 +GH_TAGNAME = 1.4.0rc1 CATEGORIES = audio x11 -REVISION = 16 HOMEPAGE = https://clementine-player.org/ # GPLv2/LGPLv2/GFDL -PERMIT_PACKAGE = Yes +PERMIT_PACKAGE = Yes + +WANTLIB += ${COMPILER_LIBCXX} GL GLEW GLU Qt5Concurrent Qt5Core +WANTLIB += Qt5DBus Qt5Gui Qt5Network Qt5OpenGL Qt5Sql Qt5Widgets +WANTLIB += Qt5X11Extras Qt5Xml X11 c cdio chromaprint execinfo +WANTLIB += fftw3 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gpod +WANTLIB += gstapp-1.0 gstaudio-1.0 gstbase-1.0 gstpbutils-1.0 +WANTLIB += gstreamer-1.0 gsttag-1.0 gstvideo-1.0 iconv intl lastfm5 +WANTLIB += m mtp mygpo-qt5 protobuf pulse sqlite3 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 += 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 iconv intl -WANTLIB += cdio chromaprint gpod execinfo fftw3 lastfm mtp mygpo-qt -WANTLIB += protobuf qca qjson tag>=5.0 usb-1.0 xml2 ${COMPILER_LIBCXX} # those are dlopen'ed WANTLIB += plist -MODULES = devel/cmake x11/qt4 -COMPILER = base-clang ports-gcc -# clementine is originally meant to be build with c++0x, but -# protobuf>=3.6 wants c++11 -CXXFLAGS += -std=c++11 +MODULES = devel/cmake \ + x11/qt5 BUILD_DEPENDS = devel/boost \ - devel/cmake>=2.8.10.2p3 \ devel/gettext,-tools \ devel/sparsehash RUN_DEPENDS = devel/desktop-file-utils \ - multimedia/gstreamer-0.10/plugins-good \ - multimedia/gstreamer-0.10/plugins-ffmpeg \ + multimedia/gstreamer1/plugins-good \ + multimedia/gstreamer1/plugins-libav \ x11/gtk+3,-guic LIB_DEPENDS = audio/chromaprint \ audio/libcdio \ audio/libgpod \ - audio/liblastfm \ - audio/taglib>=1.4 \ + audio/liblastfm>=1.1.0 \ + audio/pulseaudio \ devel/libexecinfo \ devel/libmtp \ devel/libplist \ - devel/libusb1 \ devel/protobuf \ - devel/qjson \ graphics/glew \ math/fftw3 \ - multimedia/gstreamer-0.10/core \ - multimedia/gstreamer-0.10/plugins-base \ - net/libmygpo-qt \ - security/qca + multimedia/gstreamer1/core \ + multimedia/gstreamer1/plugins-base \ + net/libmygpo-qt>=1.1.0 \ + x11/qt5/qtx11extras TEST_DEPENDS = ${MODPY_BUILD_DEPENDS} # Unported stuff -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 -# XXX Currently not possible, because devel/sqlite3 is built without -# -DSQLITE_ENABLE_FTS3_TOKENIZER. -#CONFIGURE_ARGS += -DSTATIC_SQLITE:Bool=No \ -# -DI_HATE_MY_USERS:Bool=Yes \ -# -DMY_USERS_WILL_SUFFER_BECAUSE_OF_ME:Bool=Yes +CONFIGURE_ARGS = -DENABLE_SPOTIFY_BLOB=OFF # stupidity -CONFIGURE_ARGS += -DBUILD_WERROR:Bool=No +CONFIGURE_ARGS += -DBUILD_WERROR=ON # XXX Builds tend to sometimes omit projectM presets when this option # is missing. To be investigated. -CONFIGURE_ARGS += -DBUNDLE_PROJECTM_PRESETS:Bool=Yes +CONFIGURE_ARGS += -DBUNDLE_PROJECTM_PRESETS=ON post-extract: cp ${FILESDIR}/config.h.in ${WRKSRC}/ext/libclementine-common/ Index: distinfo =================================================================== RCS file: /cvs/ports/audio/clementine/distinfo,v retrieving revision 1.4 diff -u -p -u -p -r1.4 distinfo --- distinfo 13 Aug 2019 14:50:12 -0000 1.4 +++ distinfo 25 Jan 2020 07:19:19 -0000 @@ -1,2 +1,2 @@ -SHA256 (Clementine-1.2.3.tar.gz) = ffVlBEWgBcCfXw4aGw0HcDfDfsvk7ne6+dRfEhMIob8= -SIZE (Clementine-1.2.3.tar.gz) = 9076977 +SHA256 (Clementine-1.4.0rc1.tar.gz) = rUk6GVRZQoPUGhV1NBEY4ZCYRjulYmo3uJPYOE4KH3s= +SIZE (Clementine-1.4.0rc1.tar.gz) = 8571013 Index: patches/patch-3rdparty_libechonest_CMakeLists_txt =================================================================== RCS file: patches/patch-3rdparty_libechonest_CMakeLists_txt diff -N patches/patch-3rdparty_libechonest_CMakeLists_txt --- patches/patch-3rdparty_libechonest_CMakeLists_txt 11 Aug 2019 20:42:44 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,20 +0,0 @@ -$OpenBSD: patch-3rdparty_libechonest_CMakeLists_txt,v 1.1 2019/08/11 20:42:44 cwen Exp $ - -ports-gcc: don't build with -Werror because the code uses dynamic -exception specifications that are deprecated in C++11, thus -generating a warning. - -Index: 3rdparty/libechonest/CMakeLists.txt ---- 3rdparty/libechonest/CMakeLists.txt.orig -+++ 3rdparty/libechonest/CMakeLists.txt -@@ -40,10 +40,6 @@ set( LIBECHONEST_H - - QT4_WRAP_CPP( ${LIBECHONEST_H} ) - --if (CMAKE_COMPILER_IS_GNUCXX) -- add_definitions( -Werror ) --endif (CMAKE_COMPILER_IS_GNUCXX) -- - SET( OS_SPECIFIC_LINK_LIBRARIES "" ) - IF( APPLE OR MINGW ) - SET( OS_SPECIFIC_LINK_LIBRARIES ${QJSON_LIBRARIES} ) Index: patches/patch-3rdparty_libprojectm_CMakeLists_txt =================================================================== RCS file: /cvs/ports/audio/clementine/patches/patch-3rdparty_libprojectm_CMakeLists_txt,v retrieving revision 1.2 diff -u -p -u -p -r1.2 patch-3rdparty_libprojectm_CMakeLists_txt --- patches/patch-3rdparty_libprojectm_CMakeLists_txt 15 Jun 2019 07:12:41 -0000 1.2 +++ patches/patch-3rdparty_libprojectm_CMakeLists_txt 25 Jan 2020 07:19:19 -0000 @@ -11,7 +11,7 @@ Index: 3rdparty/libprojectm/CMakeLists.t set(USE_NATIVE_GLEW OFF) set(USE_CG OFF) set(BUILD_PROJECTM_STATIC ON) -@@ -164,7 +164,7 @@ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libproject +@@ -168,7 +168,7 @@ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libproject CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/config.inp.in" "${CMAKE_CURRENT_SOURCE_DIR}/config.inp" @ONLY) if(BUNDLE_PROJECTM_PRESETS) Index: patches/patch-CMakeLists_txt =================================================================== RCS file: patches/patch-CMakeLists_txt diff -N patches/patch-CMakeLists_txt --- patches/patch-CMakeLists_txt 1 Oct 2014 20:52:48 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,65 +0,0 @@ -$OpenBSD: patch-CMakeLists_txt,v 1.3 2014/10/01 20:52:48 dcoppa 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 Wed Apr 23 12:16:44 2014 -+++ CMakeLists.txt Wed Oct 1 16:34:54 2014 -@@ -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) -@@ -366,27 +367,45 @@ 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) - set(USE_SYSTEM_GMOCK 1) - set(GMOCK_LIBRARIES ${GMOCK_LIBRARIES} ${GTEST_LIBRARIES}) - endif(GTEST_INCLUDE_DIRS) --endif(GMOCK_INCLUDE_DIRS) -+endif(NOT FORCE_BUNDLED_GMOCK AND 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) Index: patches/patch-ext_libclementine-common_CMakeLists_txt =================================================================== RCS file: /cvs/ports/audio/clementine/patches/patch-ext_libclementine-common_CMakeLists_txt,v retrieving revision 1.5 diff -u -p -u -p -r1.5 patch-ext_libclementine-common_CMakeLists_txt --- patches/patch-ext_libclementine-common_CMakeLists_txt 10 Jul 2018 10:55:07 -0000 1.5 +++ patches/patch-ext_libclementine-common_CMakeLists_txt 25 Jan 2020 07:19:19 -0000 @@ -15,7 +15,7 @@ Index: ext/libclementine-common/CMakeLis set(SOURCES core/closure.cpp -@@ -33,3 +33,11 @@ target_link_libraries(libclementine-common +@@ -40,3 +40,11 @@ target_link_libraries(libclementine-common ${TAGLIB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ) Index: patches/patch-ext_libclementine-common_core_logging_cpp =================================================================== RCS file: /cvs/ports/audio/clementine/patches/patch-ext_libclementine-common_core_logging_cpp,v retrieving revision 1.4 diff -u -p -u -p -r1.4 patch-ext_libclementine-common_core_logging_cpp --- patches/patch-ext_libclementine-common_core_logging_cpp 12 Dec 2013 11:13:39 -0000 1.4 +++ patches/patch-ext_libclementine-common_core_logging_cpp 25 Jan 2020 07:19:19 -0000 @@ -1,7 +1,8 @@ $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 +Index: ext/libclementine-common/core/logging.cpp +--- ext/libclementine-common/core/logging.cpp.orig ++++ ext/libclementine-common/core/logging.cpp @@ -18,12 +18,11 @@ // it is used by the Spotify blob which links against libspotify and is not GPL // compatible. @@ -15,18 +16,18 @@ Use shiny CMake FindBacktrace module. -#include <execinfo.h> -#endif - #include <QCoreApplication> - #include <QDateTime> -@@ -230,7 +229,7 @@ QString DemangleSymbol(const QString& symbol) { + #include <iostream> + +@@ -254,7 +253,7 @@ QString DemangleSymbol(const QString& symbol) { } void DumpStackTrace() { -#ifdef Q_OS_UNIX +#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); -@@ -240,7 +239,7 @@ void DumpStackTrace() { + int callstack_size = + backtrace(reinterpret_cast<void**>(&callstack), sizeof(callstack)); +@@ -267,7 +266,7 @@ void DumpStackTrace() { } free(symbols); #else Index: patches/patch-src_CMakeLists_txt =================================================================== RCS file: /cvs/ports/audio/clementine/patches/patch-src_CMakeLists_txt,v retrieving revision 1.4 diff -u -p -u -p -r1.4 patch-src_CMakeLists_txt --- patches/patch-src_CMakeLists_txt 10 Jul 2018 10:55:07 -0000 1.4 +++ patches/patch-src_CMakeLists_txt 25 Jan 2020 07:19:19 -0000 @@ -1,7 +1,6 @@ $OpenBSD: patch-src_CMakeLists_txt,v 1.4 2018/07/10 10:55:07 tb Exp $ 1. -Wno-unused-private-field -Wno-unknown-warning-option dont exist on gcc 4.8 2. Respect CXXFLAGS -3. FIX BUG 4401: No namespaces for DBus interfaces, from upstream. Index: src/CMakeLists.txt --- src/CMakeLists.txt.orig +++ src/CMakeLists.txt @@ -13,36 +12,3 @@ Index: src/CMakeLists.txt option(BUILD_WERROR "Build with -Werror" ON) -@@ -885,11 +885,6 @@ optional_source(LINUX SOURCES widgets/osd_x11.cpp) - if(HAVE_DBUS) - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dbus) - -- # Hack to get it to generate interfaces without namespaces - required -- # because otherwise org::freedesktop::UDisks and -- # org::freedesktop::UDisks::Device conflict. -- list(APPEND QT_DBUSXML2CPP_EXECUTABLE -N) -- - # MPRIS DBUS interfaces - qt4_add_dbus_adaptor(SOURCES - dbus/org.freedesktop.MediaPlayer.player.xml -@@ -957,6 +952,10 @@ if(HAVE_DBUS) - - # DeviceKit DBUS interfaces - if(HAVE_DEVICEKIT) -+ set_source_files_properties(dbus/org.freedesktop.UDisks.xml -+ PROPERTIES NO_NAMESPACE dbus/udisks) -+ set_source_files_properties(dbus/org.freedesktop.UDisks.Device.xml -+ PROPERTIES NO_NAMESPACE dbus/udisksdevice) - qt4_add_dbus_interface(SOURCES - dbus/org.freedesktop.UDisks.xml - dbus/udisks) -@@ -1167,9 +1166,6 @@ add_library(clementine_lib STATIC - ${PO} - ${OTHER_UIC_SOURCES} - ) -- --add_dependencies(clementine_lib pot) -- - - target_link_libraries(clementine_lib - clementine-spotifyblob-messages Index: patches/patch-src_config_h_in =================================================================== RCS file: patches/patch-src_config_h_in diff -N patches/patch-src_config_h_in --- patches/patch-src_config_h_in 11 Sep 2014 09:02:13 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ -$OpenBSD: patch-src_config_h_in,v 1.2 2014/09/11 09:02:13 zhuk Exp $ -Make Clementine use system SHA-2 implementation. ---- src/config.h.in.orig Wed Apr 23 14:16:44 2014 -+++ src/config.h.in Thu Sep 11 11:24:16 2014 -@@ -48,5 +48,6 @@ - #cmakedefine USE_INSTALL_PREFIX - #cmakedefine USE_SYSTEM_PROJECTM - #cmakedefine HAVE_LAMBDAS -+#cmakedefine HAVE_SHA2_UNDERSCORED - - #endif // CONFIG_H_IN Index: patches/patch-src_core_mergedproxymodel_h =================================================================== RCS file: patches/patch-src_core_mergedproxymodel_h diff -N patches/patch-src_core_mergedproxymodel_h --- patches/patch-src_core_mergedproxymodel_h 4 Oct 2014 22:34:27 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,28 +0,0 @@ -$OpenBSD: patch-src_core_mergedproxymodel_h,v 1.1 2014/10/04 22:34:27 zhuk Exp $ -Unbreak tests. ---- src/core/mergedproxymodel.h.orig Sun Oct 5 02:05:53 2014 -+++ src/core/mergedproxymodel.h Sun Oct 5 02:20:59 2014 -@@ -18,17 +18,19 @@ - #ifndef MERGEDPROXYMODEL_H - #define MERGEDPROXYMODEL_H - --#include <functional> -- - #include <QAbstractProxyModel> - --using std::placeholders::_1; --using std::placeholders::_2; -+#include <boost/bind/placeholders.hpp> - - #include <boost/multi_index_container.hpp> - #include <boost/multi_index/member.hpp> - #include <boost/multi_index/ordered_index.hpp> - #include <boost/multi_index/hashed_index.hpp> -+ -+#include <functional> -+ -+using std::placeholders::_1; -+using std::placeholders::_2; - - using boost::multi_index::multi_index_container; - using boost::multi_index::indexed_by; Index: patches/patch-src_core_utilities_cpp =================================================================== RCS file: /cvs/ports/audio/clementine/patches/patch-src_core_utilities_cpp,v retrieving revision 1.4 diff -u -p -u -p -r1.4 patch-src_core_utilities_cpp --- patches/patch-src_core_utilities_cpp 1 Oct 2014 20:52:48 -0000 1.4 +++ patches/patch-src_core_utilities_cpp 25 Jan 2020 07:19:19 -0000 @@ -1,63 +1,29 @@ $OpenBSD: patch-src_core_utilities_cpp,v 1.4 2014/10/01 20:52:48 dcoppa 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 Wed Apr 23 12:16:44 2014 -+++ src/core/utilities.cpp Wed Oct 1 22:17:52 2014 -@@ -67,6 +67,14 @@ - # include <QProcess> +Index: src/core/utilities.cpp +--- src/core/utilities.cpp.orig ++++ src/core/utilities.cpp +@@ -66,6 +66,14 @@ + #ifdef Q_OS_DARWIN + #include <sys/resource.h> #endif - +#ifdef Q_OS_OPENBSD -+# include <sys/param.h> -+# include <sys/sensors.h> -+# include <sys/sysctl.h> -+# include <errno.h> -+# include <string.h> ++#include <unistd.h> ++#include <errno.h> ++#include <sys/time.h> ++#include <sys/sensors.h> ++#include <sys/types.h> ++#include <sys/sysctl.h> +#endif -+ - namespace Utilities { - - static QString tr(const char* str) { -@@ -437,16 +445,26 @@ QByteArray HmacSha1(const QByteArray& key, const QByte - return Hmac(key, data, Sha1_Algo); - } - -+#if !HAVE_SHA2_UNDERSCORED -+namespace clementine_sha2 { -+typedef ::SHA2_CTX SHA256_CTX; -+void SHA256_Init(SHA256_CTX *ctx) { SHA256Init(ctx); } -+void SHA256_Update(SHA256_CTX *ctx, const u_int8_t *data, size_t len) { SHA256Update(ctx, data, len); } -+void SHA256_Final(u_int8_t digest[SHA256_DIGEST_LENGTH], SHA256_CTX *ctx) { SHA256Final(digest, ctx); } -+} -+#endif // !HAVE_SHA2_UNDERSCORED -+ -+using namespace clementine_sha2; -+ - QByteArray Sha256(const QByteArray& data) { -- clementine_sha2::SHA256_CTX context; -- clementine_sha2::SHA256_Init(&context); -- clementine_sha2::SHA256_Update( -+ SHA256_CTX context; -+ SHA256_Init(&context); -+ SHA256_Update( - &context, reinterpret_cast<const quint8*>(data.constData()), - data.length()); -- QByteArray ret(clementine_sha2::SHA256_DIGEST_LENGTH, '\0'); -- clementine_sha2::SHA256_Final( -- reinterpret_cast<quint8*>(ret.data()), &context); -+ QByteArray ret(SHA256_DIGEST_LENGTH, '\0'); -+ SHA256_Final(reinterpret_cast<quint8*>(ret.data()), &context); - - return ret; - } -@@ -595,6 +613,23 @@ bool IsLaptop() { - if (CFDictionaryContainsKey(description, CFSTR(kIOPSBatteryHealthKey))) { - return true; + #ifdef Q_OS_DARWIN + #include "core/mac_startup.h" +@@ -690,9 +698,25 @@ bool IsLaptop() { } -+ } -+ return false; + } + return false; +-#else +#elif defined(Q_OS_OPENBSD) + struct sensordev snsrdev; + size_t sdlen = sizeof(snsrdev); @@ -73,6 +39,10 @@ $OpenBSD: patch-src_core_utilities_cpp,v + } + if (::memcmp("acpibat", snsrdev.xname, 7) == 0) + return true; - } ++ } return false; - #else + #endif ++ return false; + } + + QString SystemLanguageName() { Index: patches/patch-src_devices_giolister_cpp =================================================================== RCS file: /cvs/ports/audio/clementine/patches/patch-src_devices_giolister_cpp,v retrieving revision 1.1 diff -u -p -u -p -r1.1 patch-src_devices_giolister_cpp --- patches/patch-src_devices_giolister_cpp 11 Aug 2019 20:42:44 -0000 1.1 +++ patches/patch-src_devices_giolister_cpp 25 Jan 2020 07:19:19 -0000 @@ -6,11 +6,11 @@ https://github.com/clementine-player/Cle Index: src/devices/giolister.cpp --- src/devices/giolister.cpp.orig +++ src/devices/giolister.cpp -@@ -17,6 +17,7 @@ +@@ -17,7 +17,6 @@ #include "config.h" -+#include <functional> +-#include <functional> #include <memory> #include <QFile> Index: patches/patch-src_engines_gstenginepipeline_cpp =================================================================== RCS file: patches/patch-src_engines_gstenginepipeline_cpp diff -N patches/patch-src_engines_gstenginepipeline_cpp --- patches/patch-src_engines_gstenginepipeline_cpp 5 Oct 2014 00:07:33 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ -$OpenBSD: patch-src_engines_gstenginepipeline_cpp,v 1.1 2014/10/05 00:07:33 zhuk Exp $ -Dirty hack to allow playing files with non-ASCII characters. Source: -https://github.com/clementine-player/Clementine/issues/2106 ---- src/engines/gstenginepipeline.cpp.orig Sun Oct 5 03:51:00 2014 -+++ src/engines/gstenginepipeline.cpp Sun Oct 5 03:52:21 2014 -@@ -166,7 +166,9 @@ bool GstEnginePipeline::ReplaceDecodeBin(const QUrl& u - InternetModel::Service<SpotifyService>()->server()->StartPlaybackLater(url.toString(), port); - } else { - new_bin = engine_->CreateElement("uridecodebin"); -- g_object_set(G_OBJECT(new_bin), "uri", url.toEncoded().constData(), NULL); -+ g_object_set(G_OBJECT(new_bin), "uri", -+ url.toString().toLocal8Bit().toPercentEncoding("!$&'()*+,;=:/?[]@").constData(), NULL); -+ - CHECKED_GCONNECT(G_OBJECT(new_bin), "drained", &SourceDrainedCallback, this); - CHECKED_GCONNECT(G_OBJECT(new_bin), "pad-added", &NewPadCallback, this); - CHECKED_GCONNECT(G_OBJECT(new_bin), "notify::source", &SourceSetupCallback, this); Index: patches/patch-src_internet_spotifyblobdownloader_cpp =================================================================== RCS file: patches/patch-src_internet_spotifyblobdownloader_cpp diff -N patches/patch-src_internet_spotifyblobdownloader_cpp --- patches/patch-src_internet_spotifyblobdownloader_cpp 11 Sep 2014 09:02:13 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-src_internet_spotifyblobdownloader_cpp,v 1.2 2014/09/11 09:02:13 zhuk Exp $ -include unistd.h for symlink() ---- src/internet/spotifyblobdownloader.cpp.orig Wed Apr 23 14:16:44 2014 -+++ src/internet/spotifyblobdownloader.cpp Thu Sep 11 11:24:16 2014 -@@ -23,6 +23,7 @@ - #include "core/network.h" - #include "core/utilities.h" - -+#include <unistd.h> - #include <QCoreApplication> - #include <QDir> - #include <QMessageBox> Index: patches/patch-src_library_groupbydialog_h =================================================================== RCS file: /cvs/ports/audio/clementine/patches/patch-src_library_groupbydialog_h,v retrieving revision 1.1 diff -u -p -u -p -r1.1 patch-src_library_groupbydialog_h --- patches/patch-src_library_groupbydialog_h 24 May 2017 08:07:32 -0000 1.1 +++ patches/patch-src_library_groupbydialog_h 25 Jan 2020 07:19:19 -0000 @@ -9,5 +9,5 @@ Index: src/library/groupbydialog.h #include <memory> +#include <functional> - using std::placeholders::_1; - using std::placeholders::_2; + #include "librarymodel.h" + Index: patches/patch-src_musicbrainz_chromaprinter_cpp =================================================================== RCS file: patches/patch-src_musicbrainz_chromaprinter_cpp diff -N patches/patch-src_musicbrainz_chromaprinter_cpp --- patches/patch-src_musicbrainz_chromaprinter_cpp 11 Aug 2019 20:42:44 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,34 +0,0 @@ -$OpenBSD: patch-src_musicbrainz_chromaprinter_cpp,v 1.1 2019/08/11 20:42:44 cwen Exp $ - -Unbreak with chromaprint >=1.4 (and keep backward compat), see: -https://github.com/clementine-player/Clementine/commit/d3ea0c8482dfd3f6264a30cfceb456076d76e6cd - -Index: src/musicbrainz/chromaprinter.cpp ---- src/musicbrainz/chromaprinter.cpp.orig -+++ src/musicbrainz/chromaprinter.cpp -@@ -127,15 +127,22 @@ QString Chromaprinter::CreateFingerprint() { - - ChromaprintContext* chromaprint = chromaprint_new(CHROMAPRINT_ALGORITHM_DEFAULT); - chromaprint_start(chromaprint, kDecodeRate, kDecodeChannels); -- chromaprint_feed(chromaprint, reinterpret_cast<void*>(data.data()), data.size() / 2); -+ chromaprint_feed(chromaprint, reinterpret_cast<int16_t*>(data.data()), data.size() / 2); - chromaprint_finish(chromaprint); - -- void* fprint = NULL; - int size = 0; -+ -+ #if CHROMAPRINT_VERSION_MAJOR >= 1 && CHROMAPRINT_VERSION_MINOR >= 4 -+ u_int32_t *fprint = nullptr; -+ char *encoded = nullptr; -+ #else -+ void *fprint = nullptr; -+ void *encoded = nullptr; -+ #endif -+ - int ret = chromaprint_get_raw_fingerprint(chromaprint, &fprint, &size); - QByteArray fingerprint; - if (ret == 1) { -- void* encoded = NULL; - int encoded_size = 0; - chromaprint_encode_fingerprint( - fprint, size, CHROMAPRINT_ALGORITHM_DEFAULT, &encoded, &encoded_size, 1); Index: patches/patch-src_ripper_ripper_h =================================================================== RCS file: patches/patch-src_ripper_ripper_h diff -N patches/patch-src_ripper_ripper_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_ripper_ripper_h 25 Jan 2020 07:19:19 -0000 @@ -0,0 +1,17 @@ +$OpenBSD$ + +Index: src/ripper/ripper.h +--- src/ripper/ripper.h.orig ++++ src/ripper/ripper.h +@@ -18,9 +18,10 @@ + #ifndef SRC_RIPPER_RIPPER_H_ + #define SRC_RIPPER_RIPPER_H_ + +-#include <cdio/cdio.h> + #include <QMutex> + #include <QObject> ++ ++#include <cdio/cdio.h> + + #include "core/song.h" + #include "core/tagreaderclient.h" Index: patches/patch-tests_CMakeLists_txt =================================================================== RCS file: /cvs/ports/audio/clementine/patches/patch-tests_CMakeLists_txt,v retrieving revision 1.1 diff -u -p -u -p -r1.1 patch-tests_CMakeLists_txt --- patches/patch-tests_CMakeLists_txt 10 Jul 2018 10:55:07 -0000 1.1 +++ patches/patch-tests_CMakeLists_txt 25 Jan 2020 07:19:19 -0000 @@ -6,7 +6,7 @@ Index: tests/CMakeLists.txt --- tests/CMakeLists.txt.orig +++ tests/CMakeLists.txt @@ -1,6 +1,6 @@ - cmake_minimum_required(VERSION 2.6) + cmake_minimum_required(VERSION 2.8.11) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -fpermissive -Wno-c++11-narrowing -U__STRICT_ANSI__") +set(CMAKE_CXX_FLAGS "-std=c++0x -fpermissive -Wno-c++11-narrowing -U__STRICT_ANSI__ ${CMAKE_CXX_FLAGS}") Index: patches/patch-tests_closure_test_cpp =================================================================== RCS file: /cvs/ports/audio/clementine/patches/patch-tests_closure_test_cpp,v retrieving revision 1.1 diff -u -p -u -p -r1.1 patch-tests_closure_test_cpp --- patches/patch-tests_closure_test_cpp 4 Oct 2014 22:34:27 -0000 1.1 +++ patches/patch-tests_closure_test_cpp 25 Jan 2020 07:19:19 -0000 @@ -1,9 +1,11 @@ $OpenBSD: patch-tests_closure_test_cpp,v 1.1 2014/10/04 22:34:27 zhuk Exp $ Unbreak tests. ---- tests/closure_test.cpp.orig Sun Oct 5 00:12:26 2014 -+++ tests/closure_test.cpp Sun Oct 5 00:26:17 2014 -@@ -1,5 +1,8 @@ - #include "gtest/gtest.h" +Index: tests/closure_test.cpp +--- tests/closure_test.cpp.orig ++++ tests/closure_test.cpp +@@ -3,6 +3,9 @@ + #include <functional> + #include <memory> +#include <boost/scoped_ptr.hpp> +#include <boost/function.hpp> @@ -11,12 +13,3 @@ Unbreak tests. #include <QCoreApplication> #include <QPointer> #include <QSharedPointer> -@@ -92,7 +95,7 @@ TEST(ClosureTest, ClosureWorksWithStandardFunctions) { - bool called = false; - int question = 42; - int answer = 0; -- std::tr1::function<void(bool*,int,int*)> callback(&Foo); -+ std::function<void(bool*,int,int*)> callback(&Foo); - NewClosure( - &sender, SIGNAL(Emitted()), - callback, &called, question, &answer); Index: patches/patch-tests_concurrentrun_test_cpp =================================================================== RCS file: patches/patch-tests_concurrentrun_test_cpp diff -N patches/patch-tests_concurrentrun_test_cpp --- patches/patch-tests_concurrentrun_test_cpp 4 Oct 2014 22:34:27 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-tests_concurrentrun_test_cpp,v 1.1 2014/10/04 22:34:27 zhuk Exp $ -Unbreak tests. ---- tests/concurrentrun_test.cpp.orig Sun Oct 5 00:13:58 2014 -+++ tests/concurrentrun_test.cpp Sun Oct 5 01:59:43 2014 -@@ -144,7 +144,8 @@ TEST(ConcurrentRunTest, ConcurrentRunVoidBindFunctionS - - A a; - int nb = 10; -- QFuture<void> future = ConcurrentRun::Run<void>(&threadpool, std::tr1::bind(&A::f, &a, &nb)); -+ std::function<void()> fn = std::bind(&A::f, &a, &nb); -+ QFuture<void> future = ConcurrentRun::Run<void>(&threadpool, fn); - QFutureWatcher<void> watcher; - watcher.setFuture(future); - QEventLoop loop; Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/audio/clementine/pkg/PLIST,v retrieving revision 1.3 diff -u -p -u -p -r1.3 PLIST --- pkg/PLIST 29 Jun 2018 22:16:08 -0000 1.3 +++ pkg/PLIST 25 Jan 2020 07:19:19 -0000 @@ -575,13 +575,15 @@ share/clementine/projectm-presets/nil - share/clementine/projectm-presets/project.tga share/clementine/projectm-presets/shifter - escape the worm - Eo.S. + Phat - Before_It_Eats_Your_Brain_Mix_v2.milk share/clementine/projectm-presets/shifter - escape the worm - Eo.S. + Phat 5362.milk -share/icons/hicolor/64x64/apps/application-x-clementine.png -share/icons/hicolor/scalable/apps/application-x-clementine.svg -share/kde4/ -share/kde4/services/ -share/kde4/services/clementine-feed.protocol -share/kde4/services/clementine-itms.protocol -share/kde4/services/clementine-itpc.protocol -share/kde4/services/clementine-zune.protocol +share/icons/hicolor/128x128/apps/clementine.png +share/icons/hicolor/64x64/apps/clementine.png +share/icons/hicolor/scalable/apps/clementine.svg +share/kservices5/ +share/kservices5/clementine-feed.protocol +share/kservices5/clementine-itms.protocol +share/kservices5/clementine-itpc.protocol +share/kservices5/clementine-zune.protocol +share/metainfo/ +share/metainfo/clementine.appdata.xml @tag update-desktop-database @tag gtk-update-icon-cache %D/share/icons/hicolor
