csound, bump version, fix build (#3637)

This commit is contained in:
Schrijvers Luc
2019-03-09 09:59:56 +01:00
committed by GitHub
parent 663a4d62f9
commit 1e05558eed
2 changed files with 179 additions and 0 deletions

View File

@@ -0,0 +1,145 @@
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="1"
SOURCE_URI="$HOMEPAGE/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="39f4872b896eb1cbbf596fcacc0f2122fd3e5ebbb5cec14a81b4207d6b8630ff"
SOURCE_DIR="csound-$portVersion"
PATCHES="csound-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
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$secondaryArchSuffix
"
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

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