mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
Add Csound (#951)
This commit is contained in:
committed by
waddlesplash
parent
c5a45f5ee5
commit
0fa4a40c4a
50
media-sound/csound/csound-6.06.0.recipe
Normal file
50
media-sound/csound/csound-6.06.0.recipe
Normal file
@@ -0,0 +1,50 @@
|
||||
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="1"
|
||||
srcGitRev="be2e7e36946ce767329d330c5cf926def3aa5851"
|
||||
SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="6db8221e2074d9b9acb5eb0572da4406b11c5a896098a774f120b38927be4fb4"
|
||||
SOURCE_DIR="Csound-$srcGitRev"
|
||||
PATCHES="csound-$portVersion.patch"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
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
|
||||
}
|
||||
77
media-sound/csound/patches/csound-6.06.0.patch
Normal file
77
media-sound/csound/patches/csound-6.06.0.patch
Normal file
@@ -0,0 +1,77 @@
|
||||
--- 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__ */
|
||||
Reference in New Issue
Block a user