From 562b81444a37d90f5ae3cb1dd4f64b735fc9cb5c Mon Sep 17 00:00:00 2001 From: eater <=@eater.me> Date: Tue, 13 Apr 2021 17:38:11 +0200 Subject: [PATCH] musikcube: update to 0.96.5 --- .../patches/fix-install-locations.patch | 143 +++++++++--------- srcpkgs/musikcube/patches/microhttpd.patch | 16 -- srcpkgs/musikcube/template | 6 +- 3 files changed, 74 insertions(+), 91 deletions(-) delete mode 100644 srcpkgs/musikcube/patches/microhttpd.patch diff --git a/srcpkgs/musikcube/patches/fix-install-locations.patch b/srcpkgs/musikcube/patches/fix-install-locations.patch index 9693c233b571..aaa0d7c16721 100644 --- a/srcpkgs/musikcube/patches/fix-install-locations.patch +++ b/srcpkgs/musikcube/patches/fix-install-locations.patch @@ -1,18 +1,68 @@ 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 src/core/support/Common.cpp src/core/support/Common.cpp -index f31cde146f..bad24a40b4 100644 ---- src/core/support/Common.cpp -+++ src/core/support/Common.cpp -@@ -102,65 +102,11 @@ static inline void silentDelete(const std::string fn) { - namespace musik { namespace core { +diff --git CMakeLists.txt CMakeLists.txt +index 7e0ea437..896d45d4 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -193,7 +193,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/musikcore/sdk/*.h") +@@ -228,20 +228,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 +@@ -251,14 +243,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/musikcore/support/Common.cpp src/musikcore/support/Common.cpp +index 9e327b63..08f49351 100644 +--- src/musikcore/support/Common.cpp ++++ src/musikcore/support/Common.cpp +@@ -86,64 +86,11 @@ 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() { @@ -43,83 +93,32 @@ index f31cde146f..bad24a40b4 100644 - 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; +- 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; +- 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(); +- 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; +- 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); -- #endif -- +- #endif - result.assign(pathbuf); - size_t last = result.find_last_of("/"); - result = result.substr(0, last); /* remove filename component */ - #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/microhttpd.patch b/srcpkgs/musikcube/patches/microhttpd.patch deleted file mode 100644 index dc807dbf6bf4..000000000000 --- a/srcpkgs/musikcube/patches/microhttpd.patch +++ /dev/null @@ -1,16 +0,0 @@ -Although musikcube thinks that MHD (microhttpd) version 0.9.70 -defines MHD_Result, the headers installed by our version 0.9.70 -(see PR 247180) don't define that type. So bump the version -check here trivially, to keep using int. - ---- src/plugins/server/HttpServer.h.orig 2020-07-18 17:58:19 UTC -+++ src/plugins/server/HttpServer.h -@@ -43,7 +43,7 @@ extern "C" { - #include - #include - --#if MHD_VERSION < 0x00097000 -+#if MHD_VERSION < 0x00097001 - #define MHD_Result int - #endif - diff --git a/srcpkgs/musikcube/template b/srcpkgs/musikcube/template index bf42f9e53c25..633432afe5ad 100644 --- a/srcpkgs/musikcube/template +++ b/srcpkgs/musikcube/template @@ -1,7 +1,7 @@ # Template file for 'musikcube' pkgname=musikcube -version=0.93.1 -revision=3 +version=0.96.4 +revision=1 build_style=cmake make_cmd=make configure_args="-DNO_NCURSESW=1 -DENABLE_SNDIO=true -DDISABLE_STRIP=true" @@ -15,7 +15,7 @@ maintainer="eater <=@eater.me>" license="BSD-3-Clause" homepage="https://musikcube.com/" distfiles="https://github.com/clangen/musikcube/archive/${version}.tar.gz" -checksum=e84e060acaab40266cc3d866f50f727c770c42273a5219fff5d6757186dbad21 +checksum=c184fe12a62da15f6dfabab885a991f5ad49065fcc7e1bef2b2892b15ed7bb99 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then makedepends+=" libatomic-devel"