From 1e05558eed4c951f3e47bb426bae88f9a853abf7 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Sat, 9 Mar 2019 09:59:56 +0100 Subject: [PATCH] csound, bump version, fix build (#3637) --- media-sound/csound/csound-6.12.2.recipe | 145 ++++++++++++++++++ .../csound/patches/csound-6.12.2.patchset | 34 ++++ 2 files changed, 179 insertions(+) create mode 100644 media-sound/csound/csound-6.12.2.recipe create mode 100644 media-sound/csound/patches/csound-6.12.2.patchset diff --git a/media-sound/csound/csound-6.12.2.recipe b/media-sound/csound/csound-6.12.2.recipe new file mode 100644 index 000000000..0796ba67f --- /dev/null +++ b/media-sound/csound/csound-6.12.2.recipe @@ -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 +} diff --git a/media-sound/csound/patches/csound-6.12.2.patchset b/media-sound/csound/patches/csound-6.12.2.patchset new file mode 100644 index 000000000..095234ae8 --- /dev/null +++ b/media-sound/csound/patches/csound-6.12.2.patchset @@ -0,0 +1,34 @@ +From 8901f35a79fbfd3f003a95473a2a1589244c466e Mon Sep 17 00:00:00 2001 +From: begasus +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 + #include + +-#if defined(__MACH__) ++#if defined(__MACH__) || defined(__HAIKU__) + #include + #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 + #include "csdl.h" + //#include + +-- +2.19.1 +