musikcube: update to 0.96.5

This commit is contained in:
eater 2021-04-13 17:38:11 +02:00 committed by Érico Nogueira Rolim
parent 625c5077ec
commit 2561fa2dd8
3 changed files with 74 additions and 91 deletions

View file

@ -1,18 +1,68 @@
Currently all ELF files (binaries and libraries), get installed to /usr/share/musikcube. 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 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 diff --git CMakeLists.txt CMakeLists.txt
index f31cde146f..bad24a40b4 100644 index 7e0ea437..896d45d4 100644
--- src/core/support/Common.cpp --- CMakeLists.txt
+++ src/core/support/Common.cpp +++ CMakeLists.txt
@@ -102,65 +102,11 @@ static inline void silentDelete(const std::string fn) { @@ -193,7 +193,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
namespace musik { namespace core { 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 GetPluginDirectory() {
- std::string path(GetApplicationDirectory()); - std::string path(GetApplicationDirectory());
- path.append("/plugins/"); - path.append("/plugins/");
- return path; - return path;
+ return std::string("/usr/lib/musikcube/plugins"); + return std::string("/usr/lib/musikcube/plugins");
} }
std::string GetApplicationDirectory() { std::string GetApplicationDirectory() {
@ -43,83 +93,32 @@ index f31cde146f..bad24a40b4 100644
- size_t bufsize = sizeof(pathbuf); - size_t bufsize = sizeof(pathbuf);
- sysctl(mib, 4, pathbuf, &bufsize, nullptr, 0); - sysctl(mib, 4, pathbuf, &bufsize, nullptr, 0);
- #elif defined __OpenBSD__ - #elif defined __OpenBSD__
- int mib[4]; - int mib[4];
- char **argv; - char **argv;
- size_t len = ARG_MAX; - size_t len = ARG_MAX;
- -
- mib[0] = CTL_KERN; - mib[0] = CTL_KERN;
- mib[1] = KERN_PROC_ARGS; - mib[1] = KERN_PROC_ARGS;
- mib[2] = getpid(); - mib[2] = getpid();
- mib[3] = KERN_PROC_ARGV; - mib[3] = KERN_PROC_ARGV;
- -
- argv = new char*[len]; - argv = new char*[len];
- if (sysctl(mib, 4, argv, &len, nullptr, 0) < 0) abort(); - if (sysctl(mib, 4, argv, &len, nullptr, 0) < 0) abort();
- -
- boost::filesystem::path command = boost::filesystem::system_complete(argv[0]); - boost::filesystem::path command = boost::filesystem::system_complete(argv[0]);
- realpath(command.c_str(), pathbuf); - realpath(command.c_str(), pathbuf);
- delete[] argv; - delete[] argv;
- #else - #else
- std::string pathToProc = u8fmt("/proc/%d/exe", (int) getpid()); - std::string pathToProc = u8fmt("/proc/%d/exe", (int) getpid());
- readlink(pathToProc.c_str(), pathbuf, PATH_MAX); - readlink(pathToProc.c_str(), pathbuf, PATH_MAX);
- #endif - #endif
-
- result.assign(pathbuf); - result.assign(pathbuf);
- size_t last = result.find_last_of("/"); - size_t last = result.find_last_of("/");
- result = result.substr(0, last); /* remove filename component */ - result = result.substr(0, last); /* remove filename component */
- #endif - #endif
- -
- return result; - return result;
+ return std::string("/usr/share/musikcube"); + return std::string("/usr/share/musikcube");
} }
std::string GetHomeDirectory() { 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

View file

@ -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 <mutex>
#include <vector>
-#if MHD_VERSION < 0x00097000
+#if MHD_VERSION < 0x00097001
#define MHD_Result int
#endif

View file

@ -1,7 +1,7 @@
# Template file for 'musikcube' # Template file for 'musikcube'
pkgname=musikcube pkgname=musikcube
version=0.93.1 version=0.96.4
revision=3 revision=1
build_style=cmake build_style=cmake
make_cmd=make make_cmd=make
configure_args="-DNO_NCURSESW=1 -DENABLE_SNDIO=true -DDISABLE_STRIP=true" configure_args="-DNO_NCURSESW=1 -DENABLE_SNDIO=true -DDISABLE_STRIP=true"
@ -15,7 +15,7 @@ maintainer="eater <=@eater.me>"
license="BSD-3-Clause" license="BSD-3-Clause"
homepage="https://musikcube.com/" homepage="https://musikcube.com/"
distfiles="https://github.com/clangen/musikcube/archive/${version}.tar.gz" distfiles="https://github.com/clangen/musikcube/archive/${version}.tar.gz"
checksum=e84e060acaab40266cc3d866f50f727c770c42273a5219fff5d6757186dbad21 checksum=c184fe12a62da15f6dfabab885a991f5ad49065fcc7e1bef2b2892b15ed7bb99
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel" makedepends+=" libatomic-devel"