csound: update to 6.18.1, remove old recipes. (#10854)

This commit is contained in:
OscarL
2024-08-25 08:43:25 -03:00
committed by GitHub
parent 32e517dff5
commit abeb67c889
8 changed files with 317 additions and 592 deletions

View File

@@ -1,50 +0,0 @@
SUMMARY="A sound processing language and software synthesizer"
DESCRIPTION="Csound is a user-programmable and user-extensible sound processing \
language and software synthesizer. It is not restricted to any style of music, \
having been used for many years in at least classical, pop, techno, and ambient."
HOMEPAGE="https://github.com/csound/csound"
COPYRIGHT="1991 Barry Vercoe, John ffitch"
LICENSE="GNU LGPL v2.1"
REVISION="2"
srcGitRev="be2e7e36946ce767329d330c5cf926def3aa5851"
SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="6db8221e2074d9b9acb5eb0572da4406b11c5a896098a774f120b38927be4fb4"
SOURCE_DIR="Csound-$srcGitRev"
PATCHES="csound-$portVersion.patch"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
csound$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libsndfile$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
boost${secondaryArchSuffix}_devel
devel:libsndfile$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$prefix ..
make $jobArgs
}
INSTALL()
{
cd build
make install
mv $prefix/include $oldIncludeDir
}

View File

@@ -1,145 +0,0 @@
SUMMARY="A sound processing language and software synthesizer"
DESCRIPTION="Csound is a user-programmable and user-extensible sound processing \
language and software synthesizer. It is not restricted to any style of music, \
having been used for many years in at least classical, pop, techno, and ambient."
HOMEPAGE="https://github.com/csound/csound"
COPYRIGHT="1991 Barry L. Vercoe
1991-2018 The Csound Developers"
LICENSE="GNU LGPL v2.1"
REVISION="4"
SOURCE_URI="$HOMEPAGE/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="39f4872b896eb1cbbf596fcacc0f2122fd3e5ebbb5cec14a81b4207d6b8630ff"
SOURCE_DIR="csound-$portVersion"
PATCHES="csound-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="6.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
csound$secondaryArchSuffix = $portVersion
cmd:atsa
cmd:cs
cmd:csanalyze
cmd:csb64enc
cmd:csbeats
cmd:csdebugger
cmd:csound
cmd:cvanal
cmd:dnoise
cmd:envext
cmd:extract
cmd:extractor
cmd:het_export
cmd:het_import
cmd:hetro
cmd:lpanal
cmd:lpc_export
cmd:lpc_import
cmd:makecsd
cmd:mixer
cmd:pv_export
cmd:pv_import
cmd:pvanal
cmd:pvlook
cmd:scale
cmd:scot
cmd:scsort
cmd:sdif2ad
cmd:sndinfo
cmd:src_conv
cmd:srconv
lib:libcsnd6$secondaryArchSuffix = $libVersionCompat
lib:libcsound64$secondaryArchSuffix = $libVersionCompat
lib:luaCsnd6$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libfluidsynth$secondaryArchSuffix
lib:libhdf5$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:liblo$secondaryArchSuffix
lib:liblua$secondaryArchSuffix
lib:libluajit_5.1$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libsamplerate$secondaryArchSuffix
lib:libsndfile$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
csound${secondaryArchSuffix}_devel = $portVersion
devel:libcsnd6$secondaryArchSuffix = $libVersionCompat
devel:libcsound64$secondaryArchSuffix = $libVersionCompat
devel:luaCsnd6$secondaryArchSuffix
"
REQUIRES_devel="
csound$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
boost169${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libfluidsynth$secondaryArchSuffix
devel:libhdf5$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:liblo$secondaryArchSuffix
devel:liblua$secondaryArchSuffix >= 5.1
devel:libluajit_5.1$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libsamplerate$secondaryArchSuffix
devel:libsndfile$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:bison
cmd:cmake
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:swig
"
defineDebugInfoPackage csound$secondaryArchSuffix \
$libDir/luaCsnd6.so
BUILD()
{
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$prefix ..\
-DLUAJIT_INCLUDE_DIR="-I$(finddir B_SYSTEM_HEADERS_DIRECTORY)$secondaryArchSubDir" \
-DLUAJIT_LIBRARY="$(finddir B_SYSTEM_DEVELOP_DIRECTORY)/lib$secondaryArchSubDir/libluajit-5.1.a" \
-DLUA_H_PATH="-I$(finddir B_SYSTEM_HEADERS_DIRECTORY)$secondaryArchSubDir/lua5.1"
make $jobArgs
}
INSTALL()
{
cd build
make install
mkdir -p $includeDir
mv $prefix/include/* $includeDir
rm -r $prefix/include
mv $prefix/lib $prefix/lib2
mkdir -p $libDir/csound
mv $prefix/lib2/* $libDir
rm -rf $prefix/lib2
mkdir -p $libDir/cmake/Csound
cp -r $prefix/share/cmake/Csound/* $libDir/cmake/Csound
rm -rf $prefix/share
prepareInstalledDevelLibs libcsnd6 libcsound64 luaCsnd6
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}

View File

@@ -1,141 +0,0 @@
SUMMARY="A sound processing language and software synthesizer"
DESCRIPTION="Csound is a user-programmable and user-extensible sound processing \
language and software synthesizer. It is not restricted to any style of music, \
having been used for many years in at least classical, pop, techno, and ambient."
HOMEPAGE="https://github.com/csound/csound"
COPYRIGHT="1991 Barry L. Vercoe
1991-2019 The Csound Developers"
LICENSE="GNU LGPL v2.1"
REVISION="3"
SOURCE_URI="$HOMEPAGE/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="183beeb3b720bfeab6cc8af12fbec0bf9fef2727684ac79289fd12d0dfee728b"
SOURCE_FILENAME="csound-$portVersion.tar.gz"
PATCHES="csound-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
GLOBAL_WRITABLE_FILES="
non-packaged/lib/python2.7/site-packages directory keep-old
"
libVersion="6.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
csound$secondaryArchSuffix = $portVersion
cmd:atsa
cmd:cs
cmd:csanalyze
cmd:csb64enc
cmd:csbeats
cmd:csdebugger
cmd:csound
cmd:cvanal
cmd:dnoise
cmd:envext
cmd:extract
cmd:extractor
cmd:het_export
cmd:het_import
cmd:hetro
cmd:lpanal
cmd:lpc_export
cmd:lpc_import
cmd:makecsd
cmd:mixer
cmd:pv_export
cmd:pv_import
cmd:pvanal
cmd:pvlook
cmd:scale
cmd:scot
cmd:scsort
cmd:sdif2ad
cmd:sndinfo
cmd:src_conv
cmd:srconv
lib:libcsnd6$secondaryArchSuffix = $libVersionCompat
lib:libcsound64$secondaryArchSuffix = $libVersionCompat
lib:luaCsnd6$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libfluidsynth$secondaryArchSuffix
lib:libhdf5$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:liblo$secondaryArchSuffix
lib:liblua$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libsamplerate$secondaryArchSuffix
lib:libsndfile$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
csound${secondaryArchSuffix}_devel = $portVersion
devel:libcsnd6$secondaryArchSuffix = $libVersionCompat
devel:libcsound64$secondaryArchSuffix = $libVersionCompat
devel:luaCsnd6$secondaryArchSuffix
"
REQUIRES_devel="
csound$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libfluidsynth$secondaryArchSuffix
devel:libhdf5$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:liblo$secondaryArchSuffix
devel:liblua$secondaryArchSuffix >= 5.1
devel:libpng16$secondaryArchSuffix
devel:libsamplerate$secondaryArchSuffix
devel:libsndfile$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:bison
cmd:cmake
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python2.7
cmd:swig
"
PYTHON_VERSION=2.7
defineDebugInfoPackage csound$secondaryArchSuffix \
$libDir/luaCsnd6.so
BUILD()
{
mkdir -p build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_INSTALL_BINDIR=$prefix/bin \
-DCMAKE_INSTALL_LIBDIR=$libDir \
-DCMAKE_INSTALL_LOCALEDIR=$dataDir/locale \
-DCMAKE_INSTALL_INCLUDEDIR=$includeDir \
-DCMAKE_INSTALL_MODULEDIR=$dataDir/cmake/Modules/Csound \
-DPYTHON_MODULE_INSTALL_DIR="$prefix/non-packaged/lib/python$PYTHON_VERSION/site-packages"
make $jobArgs
}
INSTALL()
{
cd build
make install
prepareInstalledDevelLibs libcsnd6 libcsound64 luaCsnd6
packageEntries devel \
$developDir \
$dataDir/cmake
}

View File

@@ -0,0 +1,218 @@
SUMMARY="A sound processing language and software synthesizer"
DESCRIPTION="Csound is a user-programmable and user-extensible sound processing \
language and software synthesizer. It is not restricted to any style of music, \
having been used for many years in at least classical, pop, techno, and ambient."
HOMEPAGE="https://github.com/csound/csound"
COPYRIGHT="1991-2020 The Csound Developers"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="b84be8237fa9258ef60fdddf36fae27b20c11665811bf5ed12540da9a9a4414e"
SOURCE_FILENAME="csound-$portVersion.tar.gz"
PATCHES="csound-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="6.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
# --> Recipe options:
luaBindings=false # Currently not working.
luaVersion=5.1
pythonBindings=false
pythonVersion=3.10
# Build standalone commmands for things that otherwise can be called via: "csound -U <utility name>".
standaloneUtilities=false
# Build just the basics, with only libsndfile as dependency, or everything *and* the kitchen sink?
kitchenSink=false
# <--
PROVIDES="
csound$secondaryArchSuffix = $portVersion
cmd:cs
cmd:csb64enc
cmd:csbeats
cmd:csdebugger
cmd:csound
cmd:extract
cmd:makecsd
cmd:scot
cmd:scsort
cmd:sdif2ad
lib:libcsnd6$secondaryArchSuffix = $libVersionCompat
lib:libcsound64$secondaryArchSuffix = $libVersionCompat
"
if $standaloneUtilities; then
PROVIDES+="
cmd:atsa
cmd:csanalyze
cmd:cvanal
cmd:dnoise
cmd:envext
cmd:extractor
cmd:het_export
cmd:het_import
cmd:hetro
cmd:lpanal
cmd:lpc_export
cmd:lpc_import
cmd:mixer
cmd:pv_export
cmd:pv_import
cmd:pvanal
cmd:pvlook
cmd:scale
cmd:sndinfo
cmd:srconv
"
fi
REQUIRES="
haiku$secondaryArchSuffix
lib:libsndfile$secondaryArchSuffix
"
PROVIDES_devel="
csound${secondaryArchSuffix}_devel = $portVersion
devel:libcsnd6$secondaryArchSuffix = $libVersionCompat
devel:libcsound64$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
csound$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libsndfile$secondaryArchSuffix # the only dependency required for a basic Csound build.
"
BUILD_PREREQUIRES="
cmd:bison
cmd:cmake
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
if $kitchenSink; then
PROVIDES+="
cmd:src_conv # requires libsamplerate
"
REQUIRES+="
# lib:libfluidsynth$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:liblo$secondaryArchSuffix
lib:libsamplerate$secondaryArchSuffix
"
BUILD_REQUIRES+="
# devel:libfluidsynth$secondaryArchSuffix < 2 # we don't have v1 _devel anymore.
devel:libintl$secondaryArchSuffix # to enable usage of gettext
devel:liblo$secondaryArchSuffix
devel:libsamplerate$secondaryArchSuffix
"
BUILD_PREREQUIRES+="
cmd:msgmerge$secondaryArchSuffix # gettext
"
maybeLocaleDir=-DCMAKE_INSTALL_LOCALEDIR=$dataDir/locale
fi
if $luaBindings; then
PROVIDES+="
lib:luaCsnd6$secondaryArchSuffix
"
PROVIDES_devel+="
devel:luaCsnd6$secondaryArchSuffix
"
REQUIRES="
lib:liblua$secondaryArchSuffix
"
BUILD_REQUIRES+="
devel:liblua$secondaryArchSuffix >= $luaVersion
"
BUILD_PREREQUIRES+="
cmd:swig
"
# This doesn't seems to help, getting:
# "make[2]: *** No rule to make target 'lua.so.5.1', needed by 'luaCsnd6.so'. Stop."
# and without it, LUA bindings are disabled because LUA_LIBRARY is not found.
maybeLUALibrary=-DLUA_LIBRARY=lua.so.5.1
defineDebugInfoPackage csound$secondaryArchSuffix \
$libDir/luaCsnd6.so
fi
maybePythonModulesDir=
if $pythonBindings; then
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage
\""
eval "REQUIRES_$pythonPackage=\"
csound$secondaryArchSuffix == $portVersion base
numpy_$pythonPackage
cmd:python$pythonVersion
\""
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
cmd:swig
"
pythonModuleDir="$prefix/lib/python$pythonVersion/vendor-packages"
maybePythonModulesDir=-DPYTHON3_MODULE_INSTALL_DIR=$pythonModuleDir
fi
BUILD()
{
mkdir -p build && cd build
maybeStandaloneUtilities=
if ! $standaloneUtilities; then
maybeStandaloneUtilities=-DBUILD_UTILITIES=OFF
fi
cmake .. $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_MODULEDIR=$dataDir/cmake/Modules/Csound \
-DCMAKE_SHARED_LINKER_FLAGS="-lnetwork" \
-DCMAKE_SKIP_INSTALL_RPATH=YES \
-DCMAKE_SKIP_RPATH=YES \
$maybeLocaleDir \
$maybeLUALibrary \
$maybePythonModulesDir \
$maybeStandaloneUtilities \
-DUSE_GIT_COMMIT=OFF
make $jobArgs
}
INSTALL()
{
cd build
make install
prepareInstalledDevelLibs \
libcsnd6 \
libcsound64
if $luaBindings; then
prepareInstalledDevelLib \
luaCsnd6
fi
if $pythonBindings; then
packageEntries $pythonPackage \
$pythonModuleDir/*.py
fi
packageEntries devel \
$developDir \
$dataDir/cmake
}

View File

@@ -1,77 +0,0 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -213,6 +213,10 @@ endif()
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -stdlib=libc++")
#endif()
+if(HAIKU)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+endif()
+
if(WIN32 AND NOT MSVC)
if(EXISTS "C:/MinGW/include")
--- a/Opcodes/control.c
+++ b/Opcodes/control.c
@@ -28,7 +28,7 @@
#include <sys/types.h>
#include <signal.h>
-#if defined(__MACH__)
+#if defined(__MACH__) || defined(__HAIKU__)
#include <unistd.h>
#endif
--- a/Opcodes/urandom.c
+++ b/Opcodes/urandom.c
@@ -21,6 +21,8 @@
02111-1307 USA
*/
+#include <fcntl.h>
+
#include "csdl.h"
//#include <ieee754.h>
--- a/Engine/cs_par_base.c
+++ b/Engine/cs_par_base.c
@@ -66,7 +66,7 @@ extern int barrier_init(barrier_t *b, void *,unsigned int max);
extern int barrier_destroy(barrier_t *b);
extern int barrier_wait(barrier_t *b);
-#ifndef PTHREAD_BARRIER_SERIAL_THREAD
+#if !defined(PTHREAD_BARRIER_SERIAL_THREAD) || defined(__HAIKU__)
/*#define pthread_barrier_t barrier_t */
#define PTHREAD_BARRIER_SERIAL_THREAD BARRIER_SERIAL_THREAD
#define pthread_barrier_init(barrier, attr, count) \
--- a/Engine/cs_par_base.c
+++ b/Engine/cs_par_base.c
@@ -53,7 +53,7 @@ int csp_thread_index_get(CSOUND *csound)
/* **** An implementation of Barriers for MAC that lacks them **** */
-#if defined(__MACH__) || defined(ANDROID) || defined(NACL)
+#if defined(__MACH__) || defined(ANDROID) || defined(NACL) || defined(__HAIKU__)
/*#define BARRIER_SERIAL_THREAD (-1)
typedef struct {
--- a/include/csoundCore.h
+++ b/include/csoundCore.h
@@ -71,7 +71,7 @@ extern "C" {
#include <xlocale.h>
#endif
-#if (defined(__MACH__) || defined(ANDROID) || defined(NACL) || defined(__CYGWIN__))
+#if (defined(__MACH__) || defined(ANDROID) || defined(__HAIKU__) || defined(NACL) || defined(__CYGWIN__))
#define BARRIER_SERIAL_THREAD (-1)
typedef struct {
pthread_mutex_t mut;
@@ -79,7 +79,7 @@ typedef struct {
unsigned int count, max, iteration;
} barrier_t;
-#ifndef PTHREAD_BARRIER_SERIAL_THREAD
+#if !defined(PTHREAD_BARRIER_SERIAL_THREAD) || defined(__HAIKU__)
#define pthread_barrier_t barrier_t
#endif /* PTHREAD_BARRIER_SERIAL_THREAD */
#endif /* __MACH__ */

View File

@@ -1,34 +0,0 @@
From 8901f35a79fbfd3f003a95473a2a1589244c466e Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Wed, 13 Feb 2019 20:01:56 +0100
Subject: Import partial patch from previous version
diff --git a/Opcodes/control.c b/Opcodes/control.c
index ef1c881..7de5271 100644
--- a/Opcodes/control.c
+++ b/Opcodes/control.c
@@ -28,7 +28,7 @@
#include <sys/types.h>
#include <signal.h>
-#if defined(__MACH__)
+#if defined(__MACH__) || defined(__HAIKU__)
#include <unistd.h>
#endif
diff --git a/Opcodes/urandom.c b/Opcodes/urandom.c
index 2eb56b3..1216657 100644
--- a/Opcodes/urandom.c
+++ b/Opcodes/urandom.c
@@ -21,6 +21,7 @@
02110-1301 USA
*/
+#include <fcntl.h>
#include "csdl.h"
//#include <ieee754.h>
--
2.19.1

View File

@@ -1,145 +0,0 @@
From e9a832dffcc9800f0111a2a5584eb3b0b599887d Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Thu, 3 Oct 2019 11:17:18 +0200
Subject: Fix Haiku's defenitions to int types (Fix by PeteCA)
diff --git a/InOut/ipmidi.c b/InOut/ipmidi.c
index 49338f6..1910e2c 100644
--- a/InOut/ipmidi.c
+++ b/InOut/ipmidi.c
@@ -23,6 +23,9 @@
/* Realtime MIDI using ipmidi library */
+/* Haiku 'int32' etc definitions in net headers conflict with sysdep.h */
+#define __HAIKU_CONFLICT
+
#include <sys/types.h>
#ifdef WIN32
#include <winsock2.h>
diff --git a/Opcodes/OSC.c b/Opcodes/OSC.c
index 4f77966..4f6e7ab 100644
--- a/Opcodes/OSC.c
+++ b/Opcodes/OSC.c
@@ -22,6 +22,9 @@
02110-1301 USA
*/
+/* Haiku 'int32' etc definitions in net headers conflict with sysdep.h */
+#define __HAIKU_CONFLICT
+
#include "csdl.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/Opcodes/sockrecv.c b/Opcodes/sockrecv.c
index 757f2cc..4784e92 100644
--- a/Opcodes/sockrecv.c
+++ b/Opcodes/sockrecv.c
@@ -21,6 +21,9 @@
02110-1301 USA
*/
+/* Haiku 'int32' etc definitions in net headers conflict with sysdep.h */
+#define __HAIKU_CONFLICT
+
#include "csoundCore.h"
#include <stdlib.h>
#include <sys/types.h>
diff --git a/Opcodes/socksend.c b/Opcodes/socksend.c
index 273c344..542b2be 100644
--- a/Opcodes/socksend.c
+++ b/Opcodes/socksend.c
@@ -22,6 +22,9 @@
02110-1301 USA
*/
+/* Haiku 'int32' etc definitions in net headers conflict with sysdep.h */
+#define __HAIKU_CONFLICT
+
#include "csoundCore.h"
#include <sys/types.h>
#if defined(WIN32) && !defined(__CYGWIN__)
diff --git a/Top/server.c b/Top/server.c
index ff4be9a..5754e9f 100644
--- a/Top/server.c
+++ b/Top/server.c
@@ -24,6 +24,9 @@
typedef unsigned int u_int32_t;
#endif
+/* Haiku 'int32' etc definitions in net headers conflict with sysdep.h */
+#define __HAIKU_CONFLICT
+
#include "csoundCore.h"
#if defined(WIN32) && !defined(__CYGWIN__)
#include <winsock2.h>
diff --git a/include/sysdep.h b/include/sysdep.h
index 932b091..40aebb4 100644
--- a/include/sysdep.h
+++ b/include/sysdep.h
@@ -89,8 +89,10 @@ typedef unsigned __int32 uint32;
typedef unsigned __int16 uint16;
#else
#include <stdint.h>
-#ifndef __HAIKU_CONFLICT
-/* Haiku has different typedefs -- only relevant to rthaiku */
+#if defined(__HAIKU__) && defined(__HAIKU_CONFLICT)
+/* Haiku has different typedefs -- relevant to rthaiku and network*/
+#include <SupportDefs.h>
+#else
typedef int_least32_t int32;
typedef int_least16_t int16;
typedef uint_least32_t uint32;
--
2.23.0
From ed27266009ae7889140cfc05005956206cbbbb81 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Thu, 3 Oct 2019 15:19:09 +0200
Subject: Fix install paths
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c1db25..b9cb1fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,10 +20,16 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(APIVERSION "6.0")
# Relative install paths
-set(EXECUTABLE_INSTALL_DIR "bin")
+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(LOCALE_INSTALL_DIR "share/locale")
-set(HEADER_INSTALL_DIR "include/csound")
+set(EXECUTABLE_INSTALL_DIR ${CMAKE_INSTALL_BINDIR})
+
+set(LOCALE_INSTALL_DIR ${CMAKE_INSTALL_LOCALEDIR})
+set(HEADER_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
set(CS_FRAMEWORK_DEST "~/Library/Frameworks" CACHE PATH "Csound framework path")
include(TestBigEndian)
@@ -191,7 +197,7 @@ if(USE_LIB64)
set(LIBRARY_INSTALL_DIR "lib64")
add_definitions("-DLIB64")
else()
- set(LIBRARY_INSTALL_DIR "lib")
+ set(LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
endif()
message(STATUS "LIBRARY INSTALL DIR: ${LIBRARY_INSTALL_DIR}")
@@ -1487,4 +1493,4 @@ 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}")
--
2.23.0

View File

@@ -0,0 +1,99 @@
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