[SCM] csound/master: Fix build failure with GMM 5.2+

fsateler at users.alioth.debian.org fsateler at users.alioth.debian.org
Wed Aug 23 17:09:34 UTC 2017


The following commit has been merged in the master branch:
commit 16d9638b80c4dbdabfaf0cabb6dc6c8ab533659e
Author: Felipe Sateler <fsateler at debian.org>
Date:   Wed Aug 23 13:12:41 2017 -0300

    Fix build failure with GMM 5.2+
    
    Closes: #872860

diff --git a/debian/patches/Fix-build-failure-with-GMM-5.2.patch b/debian/patches/Fix-build-failure-with-GMM-5.2.patch
new file mode 100644
index 0000000..79f2094
--- /dev/null
+++ b/debian/patches/Fix-build-failure-with-GMM-5.2.patch
@@ -0,0 +1,93 @@
+From: Felipe Sateler <fsateler at debian.org>
+Date: Wed, 23 Aug 2017 13:11:10 -0300
+Subject: Fix build failure with GMM 5.2+
+
+Forwarded: https://github.com/csound/csound/pull/839
+---
+ CMakeLists.txt              |  1 +
+ Opcodes/CMakeLists.txt      |  4 ++--
+ Opcodes/linear_algebra.cpp  | 10 ++++++++++
+ cmake/Modules/FindGMM.cmake | 17 +++++++++++++++++
+ 4 files changed, 30 insertions(+), 2 deletions(-)
+ create mode 100644 cmake/Modules/FindGMM.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6013c93..e33ab74 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -504,6 +504,7 @@ endif()
+ find_library(VORBISFILE_LIBRARY vorbisfile)
+ check_include_file(libintl.h LIBINTL_HEADER)
+ find_path(EIGEN3_INCLUDE_PATH eigen3/Eigen/Dense)
++find_package(GMM)
+ find_library(LIBINTL_LIBRARY intl)
+ find_package(Gettext)
+ check_library_exists(m lrint "" HAVE_LRINT)
+diff --git a/Opcodes/CMakeLists.txt b/Opcodes/CMakeLists.txt
+index 9ab4051..45d88e1 100644
+--- a/Opcodes/CMakeLists.txt
++++ b/Opcodes/CMakeLists.txt
+@@ -29,7 +29,6 @@ find_library(FLUIDSYNTH_LIBRARY fluidsynth)
+ find_library(JACK_LIBRARY jack)
+ find_library(JACKDMP_LIBRARY jackdmp)
+ check_include_file(jack/jack.h JACK_HEADER)
+-check_include_file_cxx(gmm/gmm.h GMM_HEADER)
+ check_include_file(lo/lo.h OSC_HEADER)
+ find_library(LIBLO_LIBRARY lo)
+ find_package(ZLIB)
+@@ -197,9 +196,10 @@ if(BUILD_JACK_OPCODES)
+     make_plugin(jackTransport jackTransport.c "${jack_LIBS}")
+ endif()
+ 
+-check_deps(BUILD_LINEAR_ALGEBRA_OPCODES GMM_HEADER)
++check_deps(BUILD_LINEAR_ALGEBRA_OPCODES GMM_FOUND)
+ if(BUILD_LINEAR_ALGEBRA_OPCODES)
+     make_plugin(linear_algebra linear_algebra.cpp)
++    target_include_directories(linear_algebra PRIVATE ${GMM_INCLUDE_DIRS})
+ endif()
+ 
+ check_deps(BUILD_OSC_OPCODES LIBLO_LIBRARY OSC_HEADER)
+diff --git a/Opcodes/linear_algebra.cpp b/Opcodes/linear_algebra.cpp
+index a8a87b1..4bc84f7 100644
+--- a/Opcodes/linear_algebra.cpp
++++ b/Opcodes/linear_algebra.cpp
+@@ -349,6 +349,16 @@ extern "C"
+ 
+ using namespace csound;
+ 
++static std::ostream &operator <<(std::ostream &o, const std::vector<double>& m)
++{
++  gmm::write(o,m); return o;
++}
++
++static std::ostream &operator <<(std::ostream &o, const std::vector< std::complex<double> >& m)
++{
++  gmm::write(o,m); return o;
++}
++
+ /**
+  * Template union for safely and efficiently
+  * typecasting the value of a MYFLT variable
+diff --git a/cmake/Modules/FindGMM.cmake b/cmake/Modules/FindGMM.cmake
+new file mode 100644
+index 0000000..5bd70f6
+--- /dev/null
++++ b/cmake/Modules/FindGMM.cmake
+@@ -0,0 +1,17 @@
++# Try to find the GMM library.
++# Once done this will define:
++#  GMM_FOUND - System has the GMM library.
++#  GMM_INCLUDE_DIRS - The GMM include directories.
++#  GMM_HAS_VECTOR_OSTREAM - Wether GMM defines operator<< for std::vector
++
++find_path(GMM_INCLUDE_DIR gmm/gmm.h)
++
++set(GMM_INCLUDE_DIRS ${GMM_INCLUDE_DIR})
++
++include(FindPackageHandleStandardArgs)
++# handle the QUIETLY and REQUIRED arguments and set GMM_FOUND to TRUE
++# if all listed variables are TRUE
++find_package_handle_standard_args(GMM DEFAULT_MSG
++    GMM_INCLUDE_DIR)
++
++mark_as_advanced(GMM_INCLUDE_DIR GMM_HAS_VECTOR_OSTREAM)
diff --git a/debian/patches/series b/debian/patches/series
index 919069e..1f1653b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 debian-specific/lua-link.diff
 Allow-overriding-_MODULE_INSTALL_DIR.patch
+Fix-build-failure-with-GMM-5.2.patch

-- 
csound packaging



More information about the pkg-multimedia-commits mailing list