From a102531d340247297b5018c35916052ec1b30c92 Mon Sep 17 00:00:00 2001 From: Christian Buschau Date: Thu, 24 Jan 2019 12:30:02 +0100 Subject: [PATCH] musikcube: update to 0.62.0. Enable sndio output plugin --- .../patches/fix-install-locations.patch | 18 +++++----- .../fix-musikcube-buffer-overflow.patch | 33 ------------------- srcpkgs/musikcube/patches/fix-sndio.patch | 12 +++++++ srcpkgs/musikcube/template | 11 ++++--- 4 files changed, 27 insertions(+), 47 deletions(-) delete mode 100644 srcpkgs/musikcube/patches/fix-musikcube-buffer-overflow.patch create mode 100644 srcpkgs/musikcube/patches/fix-sndio.patch diff --git a/srcpkgs/musikcube/patches/fix-install-locations.patch b/srcpkgs/musikcube/patches/fix-install-locations.patch index 0f25930a5e5..a20980070fa 100644 --- a/srcpkgs/musikcube/patches/fix-install-locations.patch +++ b/srcpkgs/musikcube/patches/fix-install-locations.patch @@ -2,10 +2,10 @@ Currently all ELF files (binaries and libraries), get installed to /usr/share/mu This patch moves all those files to their normal locations and fixes the code to expect that diff --git CMakeLists.txt CMakeLists.txt -index 8c2826e6..9d56b984 100644 +index f865a110..e9536178 100644 --- CMakeLists.txt +++ CMakeLists.txt -@@ -179,7 +179,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin") +@@ -181,7 +181,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin") install(FILES ${plugins} DESTINATION share/musikcube/plugins) else () file(GLOB plugins "bin/plugins/*.so") @@ -14,7 +14,7 @@ index 8c2826e6..9d56b984 100644 endif () file(GLOB sdk_headers "src/core/sdk/*.h") -@@ -197,20 +197,12 @@ install(FILES ${locales} DESTINATION share/musikcube/locales) +@@ -199,20 +199,12 @@ install(FILES ${locales} DESTINATION share/musikcube/locales) if (CMAKE_SYSTEM_NAME MATCHES "Darwin") install(FILES "bin/libmusikcore.dylib" DESTINATION share/musikcube) else () @@ -36,7 +36,7 @@ index 8c2826e6..9d56b984 100644 DESTINATION bin/ PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE -@@ -220,14 +212,6 @@ install( +@@ -222,14 +214,6 @@ install( # executable and shell script for daemon install( FILES bin/musikcubed @@ -52,17 +52,17 @@ index 8c2826e6..9d56b984 100644 PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE diff --git src/core/support/Common.cpp src/core/support/Common.cpp -index 9580c2aa..694876e7 100644 +index 43e7a3ed..0ee3c8c0 100644 --- src/core/support/Common.cpp +++ src/core/support/Common.cpp -@@ -82,49 +82,11 @@ static inline void silentDelete(const std::string fn) { +@@ -80,49 +80,11 @@ static inline void silentDelete(const std::string fn) { namespace musik { namespace core { std::string GetPluginDirectory() { - std::string path(GetApplicationDirectory()); - path.append("/plugins/"); - return path; -+ return std::string("/usr/lib/musikcube/plugins"); ++ return std::string("/usr/lib/musikcube/plugins"); } std::string GetApplicationDirectory() { @@ -93,7 +93,7 @@ index 9580c2aa..694876e7 100644 - size_t bufsize = sizeof(pathbuf); - sysctl(mib, 4, pathbuf, &bufsize, nullptr, 0); - #else -- std::string pathToProc = boost::str(boost::format("/proc/%d/exe") % (int) getpid()); +- std::string pathToProc = u8fmt("/proc/%d/exe", (int) getpid()); - readlink(pathToProc.c_str(), pathbuf, PATH_MAX); - #endif - @@ -103,7 +103,7 @@ index 9580c2aa..694876e7 100644 - #endif - - return result; -+ return std::string("/usr/share/musikcube"); ++ return std::string("/usr/share/musikcube"); } std::string GetHomeDirectory() { diff --git a/srcpkgs/musikcube/patches/fix-musikcube-buffer-overflow.patch b/srcpkgs/musikcube/patches/fix-musikcube-buffer-overflow.patch deleted file mode 100644 index ec5ac67f45c..00000000000 --- a/srcpkgs/musikcube/patches/fix-musikcube-buffer-overflow.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 3fb2c0658ab3d3ab7a92587dac426b057433fcf8 Mon Sep 17 00:00:00 2001 -From: eater <=@eater.me> -Date: Sun, 20 Jan 2019 15:21:59 +0100 -Subject: [PATCH] Fix: let libc set length of resolved in realpath - ---- - src/plugins/gmedecoder/Constants.h | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git src/plugins/gmedecoder/Constants.h src/plugins/gmedecoder/Constants.h -index bcd887c7..62ef2e00 100644 ---- src/plugins/gmedecoder/Constants.h -+++ src/plugins/gmedecoder/Constants.h -@@ -221,6 +221,12 @@ static inline std::string canonicalizePath(const std::string& path) { - delete[] dest; - } - return result8; -+#elif __gnu_linux__ -+ char* realname = realpath(path.c_str(), NULL); -+ if (!realname) { -+ return ""; -+ } -+ return std::string(realname); - #else - char realname[_POSIX_PATH_MAX]; - if (realpath(path.c_str(), realname) == 0) { -@@ -228,4 +234,4 @@ static inline std::string canonicalizePath(const std::string& path) { - } - return std::string(realname); - #endif --} -\ No newline at end of file -+} diff --git a/srcpkgs/musikcube/patches/fix-sndio.patch b/srcpkgs/musikcube/patches/fix-sndio.patch new file mode 100644 index 00000000000..40cb7f0bbee --- /dev/null +++ b/srcpkgs/musikcube/patches/fix-sndio.patch @@ -0,0 +1,12 @@ +diff --git src/plugins/sndioout/SndioOut.cpp src/plugins/sndioout/SndioOut.cpp +index b0a038e1..82aef7ec 100644 +--- src/plugins/sndioout/SndioOut.cpp ++++ src/plugins/sndioout/SndioOut.cpp +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + + #define BUFFER_COUNT 16 + #define ERROR(str) std::cerr << "SndioOut Error: " << str << "\n"; diff --git a/srcpkgs/musikcube/template b/srcpkgs/musikcube/template index 5adf5da1744..9098fb02cb7 100644 --- a/srcpkgs/musikcube/template +++ b/srcpkgs/musikcube/template @@ -1,18 +1,19 @@ # Template file for 'musikcube' pkgname=musikcube -version=0.61.0 -revision=2 +version=0.62.0 +revision=1 build_style=cmake -configure_args="-DNO_NCURSESW=1" +configure_args="-DNO_NCURSESW=1 -DENABLE_SNDIO=true" makedepends="boost-devel libogg-devel libmicrohttpd-devel ffmpeg-devel libressl-devel pulseaudio-devel lame-devel zlib-devel alsa-lib-devel - libvorbis-devel libcurl-devel ncurses-devel libev-devel taglib-devel" + libvorbis-devel libcurl-devel ncurses-devel libev-devel taglib-devel + sndio-devel" short_desc="Terminal-based music player in c++" maintainer="eater <=@eater.me>" license="BSD-3-Clause" homepage="https://musikcube.com/" distfiles="https://github.com/clangen/musikcube/archive/${version}.tar.gz" -checksum=6042ee35897fed16a30b00afc6a62b0d5b9b77d3526dab648599755231916aaf +checksum=4707d80813e92ce131cd3cb8bb5d58fc69e84233a0906e89a19298088f3a38ad case "${XBPS_TARGET_MACHINE}" in armv[56]*)