mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
Musikcube: new recipe (#7716)
* Musikcube: new recipe * cleanup * musikcube: update
This commit is contained in:
142
media-sound/musikcube/musikcube-3.0.0.recipe
Normal file
142
media-sound/musikcube/musikcube-3.0.0.recipe
Normal file
@@ -0,0 +1,142 @@
|
||||
SUMMARY="Terminal-based music player, audio engine, metadata indexer, server"
|
||||
DESCRIPTION="musikcube is a fully functional terminal-based music player, \
|
||||
library, and streaming audio server that runs natively on Windows, macOS, and \
|
||||
Linux. it also runs well on a Raspberry Pi with a custom DAC (e.g. IQaudIO \
|
||||
DAC+, HiFiBerry DAC+ and others), and can output 24bit/192k audio comfortably."
|
||||
HOMEPAGE="https://musikcube.com/"
|
||||
COPYRIGHT="2004-2021 musikcube team"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/clangen/musikcube/archive/refs/tags/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="b857980c214f86f17cc288eda4562b51683cd42a843a4a4d8d8e60169cf87345"
|
||||
srcGitRev_2="f693a3eb7fe72a5f19b975289afc4f437d373d9c"
|
||||
SOURCE_URI_2="https://github.com/chriskohlhoff/asio/archive/$srcGitRev_2.zip"
|
||||
CHECKSUM_SHA256_2="e597dec8e485f42bd555e05578bde1928db6596e609110c2220e5a275d94ad11"
|
||||
SOURCE_DIR_2="asio-$srcGitRev_2"
|
||||
PATCHES="musikcube-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all ?x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
PROVIDES="
|
||||
musikcube$secondaryArchSuffix = $portVersion
|
||||
cmd:musikcube$commandSuffix = $portVersion
|
||||
cmd:musikcubed$commandSuffix = $portVersion
|
||||
lib:libmusikcore$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libavcodec$secondaryArchSuffix
|
||||
lib:libavformat$secondaryArchSuffix
|
||||
lib:libavutil$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libev$secondaryArchSuffix
|
||||
lib:libgme$secondaryArchSuffix
|
||||
lib:libmicrohttpd$secondaryArchSuffix
|
||||
lib:libmp3lame$secondaryArchSuffix
|
||||
lib:libmpg123$secondaryArchSuffix
|
||||
lib:libncursesw$secondaryArchSuffix
|
||||
lib:libopenmpt$secondaryArchSuffix
|
||||
lib:libpanelw$secondaryArchSuffix
|
||||
lib:libportaudio$secondaryArchSuffix
|
||||
lib:libswresample$secondaryArchSuffix
|
||||
lib:libtag$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
musikcube${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libmusikcore$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
musikcube${secondaryArchSuffix} == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libavcodec$secondaryArchSuffix
|
||||
devel:libavformat$secondaryArchSuffix
|
||||
devel:libavutil$secondaryArchSuffix
|
||||
devel:libcrypto$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libev$secondaryArchSuffix
|
||||
devel:libgme$secondaryArchSuffix
|
||||
devel:libmicrohttpd$secondaryArchSuffix
|
||||
devel:libmp3lame$secondaryArchSuffix
|
||||
devel:libmpg123$secondaryArchSuffix
|
||||
devel:libncursesw$secondaryArchSuffix
|
||||
devel:libopenmpt$secondaryArchSuffix
|
||||
devel:libpanelw$secondaryArchSuffix
|
||||
devel:libportaudio$secondaryArchSuffix
|
||||
devel:libswresample$secondaryArchSuffix
|
||||
devel:libtag$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
defineDebugInfoPackage musikcube$secondaryArchSuffix \
|
||||
"$appsDir/MusikCube"/musikcube \
|
||||
"$appsDir/MusikCube"/musikcubed \
|
||||
"$appsDir/MusikCube/plugins"/libffmpegdecoder.so \
|
||||
"$appsDir/MusikCube/plugins"/libgmedecoder.so \
|
||||
"$appsDir/MusikCube/plugins"/libhttpdatastream.so \
|
||||
"$appsDir/MusikCube/plugins"/libnullout.so \
|
||||
"$appsDir/MusikCube/plugins"/libopenmptdecoder.so \
|
||||
"$appsDir/MusikCube/plugins"/libportaudioout.so \
|
||||
"$appsDir/MusikCube/plugins"/libserver.so \
|
||||
"$appsDir/MusikCube/plugins"/libstockencoders.so \
|
||||
"$appsDir/MusikCube/plugins"/libsupereqdsp.so \
|
||||
"$appsDir/MusikCube/plugins"/libtaglibreader.so \
|
||||
"$libDir"/libmusikcore.so
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# link submodules
|
||||
rm -rf $sourceDir/src/3rdparty/{asio,bin}
|
||||
ln -s $sourceDir2 $sourceDir/src/3rdparty/asio
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake $cmakeDirArgs .. \
|
||||
-DCMAKE_CXX_FLAGS="-D_DEFAULT_SOURCE" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DCMAKE_INSTALL_LIBDIR="$libDir" \
|
||||
-DCMAKE_INSTALL_PLUGINSDIR="$appsDir/MusikCube/plugins" \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR="$includeDir/musikcube/musikcore/sdk" \
|
||||
-DCMAKE_INSTALL_THEMESDIR="$appsDir/MusikCube/themes" \
|
||||
-DCMAKE_INSTALL_LOCALESDIR="$appsDir/MusikCube/locales" \
|
||||
-DCMAKE_INSTALL_BINDIR="$appsDir/MusikCube"
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
mkdir -p $commandBinDir
|
||||
ln -s $appsDir/MusikCube/musikcube* $commandBinDir
|
||||
|
||||
prepareInstalledDevelLib libmusikcore
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
163
media-sound/musikcube/patches/musikcube-3.0.0.patchset
Normal file
163
media-sound/musikcube/patches/musikcube-3.0.0.patchset
Normal file
@@ -0,0 +1,163 @@
|
||||
From 69f91c1608a7fc8439f11bf939ae5a1ee02b4675 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Sun, 1 Jan 2023 14:20:00 +0100
|
||||
Subject: Install path patches
|
||||
|
||||
|
||||
diff --git a/.cmake/InstallFiles.cmake b/.cmake/InstallFiles.cmake
|
||||
index 62d3c00..663286c 100644
|
||||
--- a/.cmake/InstallFiles.cmake
|
||||
+++ b/.cmake/InstallFiles.cmake
|
||||
@@ -1,31 +1,40 @@
|
||||
+set(CMAKE_INSTALL_LIBDIR=share/musikcube/lib)
|
||||
+set(CMAKE_INSTALL_SHAREDIR_STANDALONE=share/musikcube/share)
|
||||
+set(CMAKE_INSTALL_PLUGINSDIR=share/musikcube/plugins)
|
||||
+set(CMAKE_INSTALL_INCLUDEDIR=include/musikcube/musikcore/sdk)
|
||||
+set(CMAKE_INSTALL_THEMESDIR=share/musikcube/themes)
|
||||
+set(CMAKE_INSTALL_LOCALESDIR=bin/locales)
|
||||
+set(CMAKE_INSTALL_BINDIR=share/musikcube)
|
||||
+set(CMAKE_INSTALL_SCRIPTDIR=bin)
|
||||
+
|
||||
# plugin dynamic libraries
|
||||
if (APPLE)
|
||||
file(GLOB plugins "bin/plugins/*.dylib")
|
||||
- install(FILES ${plugins} DESTINATION share/musikcube/plugins)
|
||||
+ install(FILES ${plugins} DESTINATION ${CMAKE_INSTALL_PLUGINSDIR})
|
||||
else ()
|
||||
file(GLOB plugins "bin/plugins/*.so")
|
||||
- install(FILES ${plugins} DESTINATION share/musikcube/plugins)
|
||||
+ install(FILES ${plugins} DESTINATION ${CMAKE_INSTALL_PLUGINSDIR})
|
||||
endif ()
|
||||
|
||||
if (${BUILD_STANDALONE} MATCHES "true")
|
||||
file(GLOB libraries "bin/lib/*")
|
||||
- install(FILES ${libraries} DESTINATION share/musikcube/lib)
|
||||
+ install(FILES ${libraries} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
file(GLOB_RECURSE share "bin/share/*")
|
||||
- install(FILES ${share} DESTINATION share/musikcube/share)
|
||||
+ install(FILES ${share} DESTINATION ${CMAKE_INSTALL_SHAREDIR_STANDALONE})
|
||||
endif()
|
||||
|
||||
# sdk header files
|
||||
file(GLOB sdk_headers "src/musikcore/sdk/*.h")
|
||||
-install(FILES ${sdk_headers} DESTINATION include/musikcube/musikcore/sdk)
|
||||
+install(FILES ${sdk_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
# resources
|
||||
file(GLOB themes "src/musikcube/data/themes/*.json")
|
||||
file(COPY ${themes} DESTINATION bin/themes)
|
||||
-install(FILES ${themes} DESTINATION share/musikcube/themes)
|
||||
+install(FILES ${themes} DESTINATION ${CMAKE_INSTALL_THEMESDIR})
|
||||
|
||||
file(GLOB locales "src/musikcube/data/locales/*.json")
|
||||
file(COPY ${locales} DESTINATION bin/locales)
|
||||
-install(FILES ${locales} DESTINATION share/musikcube/locales)
|
||||
+install(FILES ${locales} DESTINATION ${CMAKE_INSTALL_LOCALESDIR})
|
||||
|
||||
# linux desktop shortcuts
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
@@ -41,15 +50,17 @@ endif()
|
||||
|
||||
# libmusikcore shared library
|
||||
if (APPLE)
|
||||
- install(FILES "bin/libmusikcore.dylib" DESTINATION share/musikcube)
|
||||
+ install(FILES "bin/libmusikcore.dylib" DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+elseif (HAIKU)
|
||||
+ install(FILES "bin/libmusikcore.so" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
else()
|
||||
- install(FILES "bin/libmusikcore.so" DESTINATION share/musikcube)
|
||||
+ install(FILES "bin/libmusikcore.so" DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
|
||||
# executable and shell script for musikcube
|
||||
install(
|
||||
FILES bin/musikcube
|
||||
- DESTINATION share/musikcube
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
PERMISSIONS
|
||||
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
||||
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
||||
@@ -57,7 +68,7 @@ install(
|
||||
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcube/musikcube"
|
||||
- DESTINATION bin/
|
||||
+ DESTINATION ${CMAKE_INSTALL_SCRIPTDIR}
|
||||
PERMISSIONS
|
||||
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
||||
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
||||
@@ -66,7 +77,7 @@ install(
|
||||
# executable and shell script for daemon
|
||||
install(
|
||||
FILES bin/musikcubed
|
||||
- DESTINATION share/musikcube
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
PERMISSIONS
|
||||
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
||||
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
||||
@@ -74,7 +85,7 @@ install(
|
||||
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcubed/musikcubed"
|
||||
- DESTINATION bin/
|
||||
+ DESTINATION ${CMAKE_INSTALL_SCRIPTDIR}
|
||||
PERMISSIONS
|
||||
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
||||
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
||||
diff --git a/src/musikcubed/CMakeLists.txt b/src/musikcubed/CMakeLists.txt
|
||||
index 2a4fbfa..56386f2 100644
|
||||
--- a/src/musikcubed/CMakeLists.txt
|
||||
+++ b/src/musikcubed/CMakeLists.txt
|
||||
@@ -18,4 +18,4 @@ else()
|
||||
find_library(EVLIB NAMES ev)
|
||||
endif()
|
||||
|
||||
-target_link_libraries(musikcubed ${musikcube_LINK_LIBS} ${EVLIB} musikcore)
|
||||
\ No newline at end of file
|
||||
+target_link_libraries(musikcubed ${musikcube_LINK_LIBS} ${EVLIB} musikcore)
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From a17ffb790bf749fe6ae86dffd85fc055460bf0c4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Tue, 3 Jan 2023 09:59:23 +0100
|
||||
Subject: Do not install startscripts on Haiku
|
||||
|
||||
|
||||
diff --git a/.cmake/InstallFiles.cmake b/.cmake/InstallFiles.cmake
|
||||
index 663286c..ce131bc 100644
|
||||
--- a/.cmake/InstallFiles.cmake
|
||||
+++ b/.cmake/InstallFiles.cmake
|
||||
@@ -66,6 +66,7 @@ install(
|
||||
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
||||
WORLD_EXECUTE WORLD_READ)
|
||||
|
||||
+if (NOT HAIKU)
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcube/musikcube"
|
||||
DESTINATION ${CMAKE_INSTALL_SCRIPTDIR}
|
||||
@@ -73,6 +74,7 @@ install(
|
||||
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
||||
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
||||
WORLD_EXECUTE WORLD_READ)
|
||||
+endif()
|
||||
|
||||
# executable and shell script for daemon
|
||||
install(
|
||||
@@ -83,6 +85,7 @@ install(
|
||||
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
||||
WORLD_EXECUTE WORLD_READ)
|
||||
|
||||
+if (NOT HAIKU)
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcubed/musikcubed"
|
||||
DESTINATION ${CMAKE_INSTALL_SCRIPTDIR}
|
||||
@@ -90,3 +93,4 @@ install(
|
||||
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
||||
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
||||
WORLD_EXECUTE WORLD_READ)
|
||||
+endif()
|
||||
--
|
||||
2.37.3
|
||||
|
||||
Reference in New Issue
Block a user