From 3839cac1ca7adfc7f0ec67a2cee0c651e0974e2b Mon Sep 17 00:00:00 2001 From: eater <=@eater.me> Date: Tue, 14 Apr 2020 12:27:24 +0200 Subject: [PATCH] musikcube: update to 0.90.0 --- .../patches/fix-install-locations.patch | 122 ++++++++++-------- srcpkgs/musikcube/patches/no-strip.patch | 13 +- srcpkgs/musikcube/template | 7 +- 3 files changed, 80 insertions(+), 62 deletions(-) diff --git a/srcpkgs/musikcube/patches/fix-install-locations.patch b/srcpkgs/musikcube/patches/fix-install-locations.patch index a20980070fa0ab..9693c233b571e8 100644 --- a/srcpkgs/musikcube/patches/fix-install-locations.patch +++ b/srcpkgs/musikcube/patches/fix-install-locations.patch @@ -1,61 +1,11 @@ Currently all ELF files (binaries and libraries), get installed to /usr/share/musikcube. This patch moves all those files to their normal locations and fixes the code to expect that -diff --git CMakeLists.txt CMakeLists.txt -index f865a110..e9536178 100644 ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -181,7 +181,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin") - install(FILES ${plugins} DESTINATION share/musikcube/plugins) - else () - file(GLOB plugins "bin/plugins/*.so") -- install(FILES ${plugins} DESTINATION share/musikcube/plugins) -+ install(FILES ${plugins} DESTINATION lib/musikcube/plugins) - endif () - - file(GLOB sdk_headers "src/core/sdk/*.h") -@@ -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 () -- install(FILES "bin/libmusikcore.so" DESTINATION share/musikcube) -+ install(FILES "bin/libmusikcore.so" DESTINATION lib/) - endif () - - # executable and shell script for musikcube - install( - FILES bin/musikcube -- DESTINATION share/musikcube -- PERMISSIONS -- OWNER_EXECUTE OWNER_READ OWNER_WRITE -- GROUP_EXECUTE GROUP_READ GROUP_WRITE -- WORLD_EXECUTE WORLD_READ) -- --install( -- FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcube/musikcube" - DESTINATION bin/ - PERMISSIONS - OWNER_EXECUTE OWNER_READ OWNER_WRITE -@@ -222,14 +214,6 @@ install( - # executable and shell script for daemon - install( - FILES bin/musikcubed -- DESTINATION share/musikcube -- PERMISSIONS -- OWNER_EXECUTE OWNER_READ OWNER_WRITE -- GROUP_EXECUTE GROUP_READ GROUP_WRITE -- WORLD_EXECUTE WORLD_READ) -- --install( -- FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcubed/musikcubed" - DESTINATION bin/ - PERMISSIONS - OWNER_EXECUTE OWNER_READ OWNER_WRITE diff --git src/core/support/Common.cpp src/core/support/Common.cpp -index 43e7a3ed..0ee3c8c0 100644 +index f31cde146f..bad24a40b4 100644 --- src/core/support/Common.cpp +++ src/core/support/Common.cpp -@@ -80,49 +80,11 @@ static inline void silentDelete(const std::string fn) { +@@ -102,65 +102,11 @@ static inline void silentDelete(const std::string fn) { namespace musik { namespace core { std::string GetPluginDirectory() { @@ -92,6 +42,22 @@ index 43e7a3ed..0ee3c8c0 100644 - mib[3] = -1; - size_t bufsize = sizeof(pathbuf); - sysctl(mib, 4, pathbuf, &bufsize, nullptr, 0); +- #elif defined __OpenBSD__ +- int mib[4]; +- char **argv; +- size_t len = ARG_MAX; +- +- mib[0] = CTL_KERN; +- mib[1] = KERN_PROC_ARGS; +- mib[2] = getpid(); +- mib[3] = KERN_PROC_ARGV; +- +- argv = new char*[len]; +- if (sysctl(mib, 4, argv, &len, nullptr, 0) < 0) abort(); +- +- boost::filesystem::path command = boost::filesystem::system_complete(argv[0]); +- realpath(command.c_str(), pathbuf); +- delete[] argv; - #else - std::string pathToProc = u8fmt("/proc/%d/exe", (int) getpid()); - readlink(pathToProc.c_str(), pathbuf, PATH_MAX); @@ -103,7 +69,57 @@ index 43e7a3ed..0ee3c8c0 100644 - #endif - - return result; -+ return std::string("/usr/share/musikcube"); ++ return std::string("/usr/share/musikcube"); } std::string GetHomeDirectory() { +diff --git CMakeLists.txt CMakeLists.txt +index 3850e4050f..063e09f718 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -223,7 +223,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin") + install(FILES ${plugins} DESTINATION share/musikcube/plugins) + else () + file(GLOB plugins "bin/plugins/*.so") +- install(FILES ${plugins} DESTINATION share/musikcube/plugins) ++ install(FILES ${plugins} DESTINATION lib/musikcube/plugins) + endif () + + file(GLOB sdk_headers "src/core/sdk/*.h") +@@ -257,20 +257,12 @@ endif() + if (CMAKE_SYSTEM_NAME MATCHES "Darwin") + install(FILES "bin/libmusikcore.dylib" DESTINATION share/musikcube) + else() +- install(FILES "bin/libmusikcore.so" DESTINATION share/musikcube) ++ install(FILES "bin/libmusikcore.so" DESTINATION lib/) + endif() + + # executable and shell script for musikcube + install( + FILES bin/musikcube +- DESTINATION share/musikcube +- PERMISSIONS +- OWNER_EXECUTE OWNER_READ OWNER_WRITE +- GROUP_EXECUTE GROUP_READ GROUP_WRITE +- WORLD_EXECUTE WORLD_READ) +- +-install( +- FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcube/musikcube" + DESTINATION bin/ + PERMISSIONS + OWNER_EXECUTE OWNER_READ OWNER_WRITE +@@ -280,14 +272,6 @@ install( + # executable and shell script for daemon + install( + FILES bin/musikcubed +- DESTINATION share/musikcube +- PERMISSIONS +- OWNER_EXECUTE OWNER_READ OWNER_WRITE +- GROUP_EXECUTE GROUP_READ GROUP_WRITE +- WORLD_EXECUTE WORLD_READ) +- +-install( +- FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcubed/musikcubed" + DESTINATION bin/ + PERMISSIONS + OWNER_EXECUTE OWNER_READ OWNER_WRITE diff --git a/srcpkgs/musikcube/patches/no-strip.patch b/srcpkgs/musikcube/patches/no-strip.patch index f01d57444dfab5..738a5bc2039eee 100644 --- a/srcpkgs/musikcube/patches/no-strip.patch +++ b/srcpkgs/musikcube/patches/no-strip.patch @@ -1,16 +1,17 @@ Musikcube does some stripping which breaks with a custom build directory, also not necessary as we do stripping ourselves -diff --git CMakeLists.txt CMakeLists.txt.2 -index 2dbd1f6e99..35405944b1 100644 +diff --git CMakeLists.txt CMakeLists.txt +index 063e09f718..0d3fe883e9 100644 --- CMakeLists.txt -+++ CMakeLists.txt.2 -@@ -322,8 +322,3 @@ endif() ++++ CMakeLists.txt +@@ -354,9 +354,3 @@ endif() + # they don't yet exist! add_custom_target(postbuild ALL DEPENDS musikcube musikcubed) add_custom_command(TARGET postbuild POST_BUILD COMMAND cmake .) - +- -# strip binaries in release mode -if (CMAKE_BUILD_TYPE MATCHES Release) - message(STATUS "stripping binaries...") -- add_custom_command(TARGET postbuild POST_BUILD COMMAND ./strip-nix.sh) +- add_custom_command(TARGET postbuild POST_BUILD COMMAND "${CMAKE_SOURCE_DIR}/strip-nix.sh") -endif() diff --git a/srcpkgs/musikcube/template b/srcpkgs/musikcube/template index d43e9e9bb001ca..5ed3f2112f2d1c 100644 --- a/srcpkgs/musikcube/template +++ b/srcpkgs/musikcube/template @@ -1,9 +1,10 @@ # Template file for 'musikcube' pkgname=musikcube -version=0.83.0 -revision=2 +version=0.90.0 +revision=1 build_style=cmake configure_args="-DNO_NCURSESW=1 -DENABLE_SNDIO=true" +hostmakedepends="pkg-config" 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 @@ -13,7 +14,7 @@ maintainer="eater <=@eater.me>" license="BSD-3-Clause" homepage="https://musikcube.com/" distfiles="https://github.com/clangen/musikcube/archive/${version}.tar.gz" -checksum=7841db0358d691fed768d10a7cbb2bfaace85c2a744ad59a65ce581ca972a426 +checksum=e55e4ea8f84f92f18a572d1e12a8f68d88228b04324507e49d833b21e042f5bf if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then makedepends+=" libatomic-devel"