diff options
Diffstat (limited to 'audio/csound/files')
-rw-r--r-- | audio/csound/files/custom.py.in | 12 | ||||
-rw-r--r-- | audio/csound/files/patch-CMakeLists.txt | 84 | ||||
-rw-r--r-- | audio/csound/files/patch-H_remote.h | 14 | ||||
-rw-r--r-- | audio/csound/files/patch-InOut_rtalsa.c | 27 | ||||
-rw-r--r-- | audio/csound/files/patch-Opcodes_stk_CMakeLists.txt | 11 | ||||
-rw-r--r-- | audio/csound/files/patch-Top_csound.c | 65 | ||||
-rw-r--r-- | audio/csound/files/patch-cmake_Modules_FindFAUST.cmake | 11 | ||||
-rw-r--r-- | audio/csound/files/pkg-message.in | 4 |
8 files changed, 228 insertions, 0 deletions
diff --git a/audio/csound/files/custom.py.in b/audio/csound/files/custom.py.in new file mode 100644 index 000000000000..3e5fbf1a5856 --- /dev/null +++ b/audio/csound/files/custom.py.in @@ -0,0 +1,12 @@ +# Order is important: place local paths ahead of system paths. + +import sys + +customCPPPATH = [ '%%LOCALBASE%%/include', '%%PYTHON_INCLUDEDIR%%' ] +customCCFLAGS = [ ] +customCXXFLAGS = [ ] +customLIBS = [ 'intl' ] +customLIBPATH = [ '%%PORTAUDIO_L%%', '%%LOCALBASE%%/lib' ] +customSHLINKFLAGS = [ '%%PORTAUDIO_R%%', '%%PTHREAD_LIBS%%' ] +customSWIGFLAGS = [] +platform = 'linux' diff --git a/audio/csound/files/patch-CMakeLists.txt b/audio/csound/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..2d6f0f93e3dd --- /dev/null +++ b/audio/csound/files/patch-CMakeLists.txt @@ -0,0 +1,84 @@ +--- CMakeLists.txt.orig 2018-11-07 14:05:23 UTC ++++ CMakeLists.txt +@@ -164,8 +164,8 @@ endif() + + # set -Werror if in Debug configuration + if(NOT MSVC AND NOT WASM) +-set(CMAKE_CXX_FLAGS_RELEASE "-O3 ") +-set(CMAKE_C_FLAGS_RELEASE "-O3 ") ++#set(CMAKE_CXX_FLAGS_RELEASE "-O3 ") ++#set(CMAKE_C_FLAGS_RELEASE "-O3 ") + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wno-missing-field-initializers") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wno-missing-field-initializers") +@@ -206,7 +206,7 @@ execute_process ( + OUTPUT_VARIABLE PYTHON_USER_SITE_PACKAGES + ) + +-SET(PYTHON_MODULE_INSTALL_DIR ${PYTHON_USER_SITE_PACKAGES} CACHE PATH "Python module install dir") ++#SET(PYTHON_MODULE_INSTALL_DIR ${PYTHON_USER_SITE_PACKAGES} CACHE PATH "Python module install dir") + + set(JAVA_MODULE_INSTALL_DIR ${LIBRARY_INSTALL_DIR} CACHE PATH "Java module install dir") + set(LUA_MODULE_INSTALL_DIR ${LIBRARY_INSTALL_DIR} CACHE PATH "Lua module install dir") +@@ -373,12 +373,12 @@ endif() + + endif(WIN32) + +-if(APPLE) ++if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "${OPSYS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + set_target_properties(${CSOUNDLIB} PROPERTIES CXX_COMPILE_FLAGS "-std=c++11") + endif() + +-if(CMAKE_SYSTEM_NAME MATCHES "Linux") ++if(CMAKE_SYSTEM_NAME MATCHES "${OPSYS}") + set(LINUX YES) + else() + set(LINUX NO) +@@ -527,15 +527,17 @@ find_package(FLTK ) + # LIST_REPLACE(FLTK_LIBRARIES 2 "fltk_images_SHARED") + # endif() + #endif() +-find_package(FAUST) +-find_package(Java) +-find_package(JNI) ++if (BUILD_FAUST_OPCODES) ++ find_package(FAUST) ++endif() ++#find_package(Java) ++#find_package(JNI) + find_package(LIBLO) + find_package(LUAJIT) + find_package(MUSICXML) + find_package(PORTSMF) + find_package(PythonLibs 2.7) +-if(NOT STK_LOCAL) ++if(BUILD_STK_OPCODES AND NOT STK_LOCAL) + find_package(STK) + endif() + find_package(SWIG) +@@ -1245,11 +1247,11 @@ if(CURL_FOUND) + endif() + + # Linux does not have a separate libintl, it is part of libc +-set(LIBINTL_AVAIL (LIBINTL_LIBRARY OR LINUX)) ++set(LIBINTL_AVAIL (LIBINTL_LIBRARY)) + check_deps(USE_GETTEXT LIBINTL_HEADER LIBINTL_AVAIL GETTEXT_MSGFMT_EXECUTABLE) + if(USE_GETTEXT) + message(STATUS "Using GNU gettext.") +- if(NOT LINUX) ++ if(LINUX) + list(APPEND libcsound_LIBS ${LIBINTL_LIBRARY}) + endif() + list(APPEND libcsound_CFLAGS -DGNU_GETTEXT) +@@ -1269,8 +1271,8 @@ endif() + + if(LINUX) + message(STATUS "Building on Linux.") +- add_definitions(-DLINUX -DPIPES -DNO_FLTK_THREADS -D_GNU_SOURCE -DHAVE_SOCKETS) +- list(APPEND libcsound_LIBS m dl) ++ add_definitions(-DLINUX -DPIPES -DNO_FLTK_THREADS -DHAVE_SOCKETS) ++ list(APPEND libcsound_LIBS m) + + find_library(LIBRT_LIBRARY rt) + diff --git a/audio/csound/files/patch-H_remote.h b/audio/csound/files/patch-H_remote.h new file mode 100644 index 000000000000..d83fa52cd1f1 --- /dev/null +++ b/audio/csound/files/patch-H_remote.h @@ -0,0 +1,14 @@ +--- H/remote.h.orig 2015-09-29 11:13:27 UTC ++++ H/remote.h +@@ -42,7 +42,10 @@ + #ifdef MACOSX + #include <net/if.h> + #endif +- #ifdef LINUX ++ #ifdef __FreeBSD__ ++ #include <net/if.h> ++ #endif ++ #ifdef linux + #include <linux/if.h> + #endif + #include <arpa/inet.h> diff --git a/audio/csound/files/patch-InOut_rtalsa.c b/audio/csound/files/patch-InOut_rtalsa.c new file mode 100644 index 000000000000..11f938a16a08 --- /dev/null +++ b/audio/csound/files/patch-InOut_rtalsa.c @@ -0,0 +1,27 @@ +--- InOut/rtalsa.c.orig 2018-11-07 14:05:23 UTC ++++ InOut/rtalsa.c +@@ -23,6 +23,7 @@ + 02110-1301 USA + */ + ++/* + #ifndef _ISOC99_SOURCE + #define _ISOC99_SOURCE 1 + #endif +@@ -36,6 +37,7 @@ + #ifndef _BSD_SOURCE + #define _BSD_SOURCE 1 + #endif ++*/ + + #include "csdl.h" + +@@ -54,6 +56,8 @@ + #include <signal.h> + #include <sys/mman.h> + #include <sys/resource.h> ++#include <stdlib.h> ++#include <sys/fcntl.h> + + + #include "soundio.h" diff --git a/audio/csound/files/patch-Opcodes_stk_CMakeLists.txt b/audio/csound/files/patch-Opcodes_stk_CMakeLists.txt new file mode 100644 index 000000000000..f7b69b36bd55 --- /dev/null +++ b/audio/csound/files/patch-Opcodes_stk_CMakeLists.txt @@ -0,0 +1,11 @@ +--- Opcodes/stk/CMakeLists.txt.orig 2018-11-17 19:16:54 UTC ++++ Opcodes/stk/CMakeLists.txt +@@ -4,7 +4,7 @@ if(WIN32) + cmake_policy(SET CMP0060 NEW) + endif() + +-if(NOT STK_LOCAL) ++if(BUILD_STK_OPCODES AND NOT STK_LOCAL) + find_package(STK) + endif() + diff --git a/audio/csound/files/patch-Top_csound.c b/audio/csound/files/patch-Top_csound.c new file mode 100644 index 000000000000..e5b3f6e4fd2a --- /dev/null +++ b/audio/csound/files/patch-Top_csound.c @@ -0,0 +1,65 @@ +--- Top/csound.c.orig 2018-11-07 14:05:23 UTC ++++ Top/csound.c +@@ -60,10 +60,14 @@ + //#include "cs_par_dispatch.h" + #include "find_opcode.h" + +-#if defined(linux)||defined(__HAIKU__)|| defined(__EMSCRIPTEN__)||defined(__CYGWIN__) ++#if defined(linux) || defined(__FreeBSD__) || defined(__HAIKU__)|| defined(__EMSCRIPTEN__)||defined(__CYGWIN__) + #define PTHREAD_SPINLOCK_INITIALIZER 0 + #endif + ++#if defined(__FreeBSD__) ++#include <sys/sysctl.h> ++#endif ++ + #include "csound_standard_types.h" + + #include "csdebug.h" +@@ -405,7 +409,7 @@ static const CSOUND cenviron_ = { + rewriteheader, + csoundLoadSoundFile, + fdrecord, +- fdclose, ++ fd__close, + csoundCreateFileHandle, + csoundGetFileName, + csoundFileClose, +@@ -3755,7 +3759,7 @@ void csoundNotifyFileOpened(CSOUND* csou + /* ------------------------------------ */ + + #if defined(HAVE_RDTSC) +-#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__)) ++#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__)) || !(defined(__FreeBSD__) && defined(__i386__)) + #undef HAVE_RDTSC + #endif + #endif +@@ -3768,6 +3772,13 @@ static double timeResolutionSeconds = -1 + static int getTimeResolution(void) + { + #if defined(HAVE_RDTSC) ++#if defined(__FreeBSD__) ++ size_t size; ++ int timeResolutionSeconds; ++ size = sizeof timeResolutionSeconds; ++ sysctlbyname("hw.clockrate", &timeResolutionSeconds, &size, NULL, 0); ++ ++#else + FILE *f; + char buf[256]; + +@@ -3803,9 +3814,14 @@ static int getTimeResolution(void) + } + } + fclose(f); ++#endif /* __FreeBSD__ */ + if (UNLIKELY(timeResolutionSeconds <= 0.0)) { + fprintf(stderr, Str("No valid CPU frequency entry " ++#if defined(__FreeBSD__) ++ "was found.\n")); ++#else + "was found in /proc/cpuinfo.\n")); ++#endif /* __FreeBSD__ */ + return -1; + } + /* MHz -> seconds */ diff --git a/audio/csound/files/patch-cmake_Modules_FindFAUST.cmake b/audio/csound/files/patch-cmake_Modules_FindFAUST.cmake new file mode 100644 index 000000000000..40e45b4557cc --- /dev/null +++ b/audio/csound/files/patch-cmake_Modules_FindFAUST.cmake @@ -0,0 +1,11 @@ +--- cmake/Modules/FindFAUST.cmake.orig 2018-11-17 16:56:13 UTC ++++ cmake/Modules/FindFAUST.cmake +@@ -27,7 +27,7 @@ if(FAUST_FOUND) + # This is a static build of faust, hence + # we have to add all the LLVM flags... + +- find_program(LLVM_CONFIG llvm-config HINTS /usr/bin /usr/local/bin /usr/local/opt/llvm/bin) ++ find_program(LLVM_CONFIG llvm-config${FAUST_LLVM_VERSION} HINTS /usr/bin /usr/local/bin /usr/local/opt/llvm/bin) + if(NOT LLVM_CONFIG) + message(FATAL_ERROR "Using a static Faust library requires LLVM tooling to be present in the path") + endif() diff --git a/audio/csound/files/pkg-message.in b/audio/csound/files/pkg-message.in new file mode 100644 index 000000000000..94fe1c601a87 --- /dev/null +++ b/audio/csound/files/pkg-message.in @@ -0,0 +1,4 @@ +===================-Please Note:-==================================== +%%PREFIX%%/bin/mixer has been renamed to %%PREFIX%%/bin/csmixer so it +won't conflict with /usr/bin/mixer +===================================================================== |