Files
haikuports/media-sound/csound/patches/csound-6.18.1.patchset

100 lines
3.7 KiB
Plaintext

From a122ed0884026794eb18d11a3fc88dde799e0908 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Tue, 20 Aug 2024 20:24:41 -0300
Subject: Fix install paths
Co-authored-by: Oscar Lesta <oscar.lesta@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c333e83..fde261c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,9 +60,17 @@ set(MACOSX_FRAMEWORK_SHORT_VERSION_STRING
set(MACOSX_FRAMEWORK_IDENTIFIER "CSND")
# Relative install paths
-set(EXECUTABLE_INSTALL_DIR "bin")
-set(LOCALE_INSTALL_DIR "share/locale")
-set(HEADER_INSTALL_DIR "include/csound")
+set (CMAKE_INSTALL_BINDIR=bin)
+set (CMAKE_INSTALL_LIBDIR=lib)
+set (CMAKE_INSTALL_LOCALEDIR=share/locale)
+set (CMAKE_INSTALL_INCLUDEDIR=include/csound)
+set (CMAKE_INSTALL_MODULEDIR=share/cmake/Csound)
+
+set(EXECUTABLE_INSTALL_DIR ${CMAKE_INSTALL_BINDIR})
+
+set(LOCALE_INSTALL_DIR ${CMAKE_INSTALL_LOCALEDIR})
+set(HEADER_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
+
set(SAMPLES_INSTALL_DIR "/samples")
set(CS_FRAMEWORK_DEST "$ENV{HOME}/Library/Frameworks" CACHE PATH
"Csound framework path")
@@ -236,7 +244,7 @@ if(USE_LIB64)
set(LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib64")
add_definitions("-DLIB64")
elseif(NOT DEFINED LIBRARY_INSTALL_DIR)
- set(LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+ set(LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
endif()
message(STATUS "LIBRARY INSTALL DIR: ${LIBRARY_INSTALL_DIR}")
@@ -1433,12 +1441,15 @@ endif(DOXYGEN_FOUND)
# install CMake module
install(FILES ${CMAKE_SOURCE_DIR}/cmake/Modules/FindCsound.cmake
- DESTINATION "${CMAKE_INSTALL_PREFIX}/share/cmake/Csound")
+ DESTINATION "${CMAKE_INSTALL_MODULEDIR}")
# install samples
if(APPLE)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/samples
DESTINATION ${CS_FRAMEWORK_DEST}/${CSOUNDLIB}.framework/Versions/${APIVERSION})
+elseif(HAIKU)
+ install(DIRECTORY ${CMAKE_SOURCE_DIR}/samples
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/csound)
else()
install(DIRECTORY ${CMAKE_SOURCE_DIR}/samples
DESTINATION ${CMAKE_INSTALL_PREFIX}/share)
--
2.45.2
From 9d0eb93094ff45f01d672b76042d2523639f8eaa Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Sun, 25 Aug 2024 03:35:25 -0300
Subject: Update plugin search paths to match what CMakeLists.txt does.
diff --git a/Top/csmodule.c b/Top/csmodule.c
index a401962..0b3befa 100644
--- a/Top/csmodule.c
+++ b/Top/csmodule.c
@@ -141,15 +141,15 @@ static const char *plugindir64_envvar = "OPCODE6DIR64";
#if !(defined (NACL)) && !(defined (__wasi__))
#ifdef __HAIKU__
# ifndef USE_DOUBLE
- static char haikudirs[] = "/boot/system/lib/csound6/plugins:"
- "/boot/home/config/lib/csound6/plugins:"
- "/boot/system/non-packaged/lib/csound6/plugins:"
- "/boot/home/config/non-packaged/lib/csound6/plugins";
+ static char haikudirs[] = "/boot/system/lib/csound/plugins-6.0:"
+ "/boot/home/config/lib/csound/plugins-6.0:"
+ "/boot/system/non-packaged/lib/csound/plugins-:"
+ "/boot/home/config/non-packaged/lib/csound/plugins-6.0";
# else
- static char haikudirs[] = "/boot/system/lib/csound6/plugins64:"
- "/boot/home/config/lib/csound6/plugins64:"
- "/boot/system/non-packaged/lib/csound6/plugins64:"
- "/boot/home/config/non-packaged/lib/csound6/plugins64";
+ static char haikudirs[] = "/boot/system/lib/csound/plugins64-6.0:"
+ "/boot/home/config/lib/csound/plugins64-6.0:"
+ "/boot/system/non-packaged/lib/csound/plugins64-6.0:"
+ "/boot/home/config/non-packaged/lib/csound/plugins64-6.0";
# endif
# define CS_DEFAULT_PLUGINDIR haikudirs
#elif !(defined(_CSOUND_RELEASE_) && (defined(LINUX) || defined(__MACH__)))
--
2.45.2