[SCM] csound/master: fix patches for new upstream sources
fcahoon-guest at users.alioth.debian.org
fcahoon-guest at users.alioth.debian.org
Tue Jun 12 01:17:16 UTC 2012
The following commit has been merged in the master branch:
commit e1c74bd9a0f061df73bd0b8e9ea02b2e11ccd8f0
Author: Forrest Cahoon <forrest.cahoon at gmail.com>
Date: Sat Jun 9 00:17:03 2012 -0500
fix patches for new upstream sources
diff --git a/debian/patches/0000-backported-cmake-additions.diff b/debian/patches/0000-backported-cmake-additions.diff
index 395a7b2..6d805fa 100644
--- a/debian/patches/0000-backported-cmake-additions.diff
+++ b/debian/patches/0000-backported-cmake-additions.diff
@@ -1,138 +1,3 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -32,6 +32,8 @@
- include(CheckFunctionExists)
- include(CheckIncludeFile)
- include(CheckIncludeFileCXX)
-+include(CheckLibraryExists)
-+include(CMakeParseArguments)
-
- # Utility function to make plugins. All plugin targets should use this as it
- # sets up output directory set in top-level CmakeLists.txt
-@@ -143,6 +145,45 @@
- endif()
- endfunction(check_deps)
-
-+# Shortcut to add compiler flags
-+# Mandatory arguments: the flags to add, should be passed before optional keywords, can be
-+# passed as lists or space-separated
-+# Optional keywords:
-+# LINKER: add to linker instead of compile flags (LDFLAGS vs CFLAGS)
-+# TARGETS <target1> <target2> ...
-+# if specified, will add the flags to a target instead
-+# of the global namespace
-+function(add_compiler_flags)
-+ set(bool_options LINKER)
-+ set(multi_val_args TARGETS)
-+ cmake_parse_arguments(FLAGS "${bool_options}" "" "${multi_val_args}" ${ARGN})
-+
-+ expand_list(FLAGS ${FLAGS_UNPARSED_ARGUMENTS})
-+
-+ if(FLAGS_TARGETS)
-+ foreach(target ${FLAGS_TARGETS})
-+ if(NOT FLAGS_LINKER)
-+ set(property "COMPILE_FLAGS")
-+ else()
-+ set(property "LINK_FLAGS")
-+ endif()
-+ get_target_property(propval ${target} ${property})
-+ if(NOT propval)
-+ set(propval "")
-+ endif()
-+ set_target_properties(${target} PROPERTIES
-+ ${property} "${propval} ${FLAGS}")
-+ endforeach()
-+ else()
-+ if(FLAGS_LINKER)
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FLAGS}")
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FLAGS}")
-+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${FLAGS}")
-+ else()
-+ add_definitions("${FLAGS}")
-+ endif()
-+ endif()
-+endfunction(add_compiler_flags)
-
- if(WIN32 AND NOT MSVC)
- if(EXISTS "C:/MinGW/include")
-@@ -217,6 +258,8 @@
- option(BUILD_STATIC_LIBRARY "Also build a static version of the csound library" OFF)
-
- option(USE_OPEN_MP "Use OpenMP for Parallel Performance" ON)
-+option(USE_LRINT "Use lrint/lrintf for converting floating point values to integers." ON)
-+option(BUILD_RELEASE "Build for release" ON)
- # Optional targets, they should all default to ON (check_deps will disable them if not possible to build)
-
-
-@@ -227,12 +270,23 @@
- add_definitions("-DUSE_DOUBLE")
- endif(USE_DOUBLE)
- if(${CMAKE_C_COMPILER} MATCHES "gcc" AND LINUX)
-- add_definitions("-fvisibility=hidden")
-- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fvisibility=hidden")
-+ add_compiler_flags("-fvisibility=hidden")
-+ add_compiler_flags("-fvisibility=hidden" LINKER)
-+endif()
-+
-+if(BUILD_RELEASE)
-+ add_definitions("-D_CSOUND_RELEASE_")
-+ if(LINUX)
-+ set(DEFAULT_OPCODEDIR "${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_DIR}")
-+ add_definitions("-DCS_DEFAULT_PLUGINDIR=\"${DEFAULT_OPCODEDIR}\"")
-+ endif()
-+else()
-+ add_definitions("-DBETA")
- endif()
-
- if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
- add_definitions("-Wno-format")
-+ add_compiler_flags("-g")
- endif()
-
- #if(USE_DOUBLE)
-@@ -298,6 +352,7 @@
- check_include_file(libintl.h LIBINTL_HEADER)
- find_library(LIBINTL_LIBRARY intl)
- find_package(Gettext)
-+check_library_exists(m lrint "" HAVE_LRINT)
-
- set(HEADERS_TO_CHECK
- unistd.h io.h fcntl.h stdint.h
-@@ -312,6 +367,11 @@
- check_include_file(${header} HAVE_${upper_header})
- endforeach()
-
-+check_deps(USE_LRINT HAVE_LRINT)
-+if(USE_LRINT)
-+ add_definitions("-DUSE_LRINT")
-+endif()
-+
- # Flex/Bison for the new parser
- if(BUILD_NEW_PARSER)
- find_package(FLEX)
-@@ -745,10 +805,7 @@
- list(APPEND libcsound_CFLAGS -DWORDS_BIGENDIAN)
- endif()
-
--expand_list(expanded_libcsound_CFLAGS ${libcsound_CFLAGS})
--set_property(
-- TARGET ${CSOUNDLIB}
-- PROPERTY COMPILE_FLAGS "${expanded_libcsound_CFLAGS}")
-+add_compiler_flags(${libcsound_CFLAGS} TARGETS ${CSOUNDLIB})
-
- target_link_libraries(${CSOUNDLIB} ${libcsound_LIBS})
-
-@@ -761,9 +818,7 @@
- add_library(${CSOUNDLIB_STATIC} STATIC ${libcsound_SRCS})
- SET_TARGET_PROPERTIES(${CSOUNDLIB_STATIC} PROPERTIES OUTPUT_NAME ${CSOUNDLIB})
- SET_TARGET_PROPERTIES(${CSOUNDLIB_STATIC} PROPERTIES PREFIX "lib")
-- set_property(
-- TARGET ${CSOUNDLIB_STATIC}
-- PROPERTY COMPILE_FLAGS "${expanded_libcsound_CFLAGS}")
-+ add_compiler_flags(${libcsound_CFLAGS} TARGETS ${CSOUNDLIB_STATIC})
-
- target_link_libraries(${CSOUNDLIB_STATIC} ${libcsound_LIBS})
-
--- a/Opcodes/CMakeLists.txt
+++ b/Opcodes/CMakeLists.txt
@@ -105,8 +105,7 @@
@@ -145,15 +10,3 @@
endif()
check_deps(BUILD_PYTHON_OPCODES PYTHONLIBS_FOUND)
---- a/interfaces/CMakeLists.txt
-+++ b/interfaces/CMakeLists.txt
-@@ -31,8 +31,7 @@
- ARCHIVE_OUTPUT_DIRECTORY ${BUILD_LIB_DIR}
- )
- if(${libcsnd_CFLAGS})
-- set_target_properties(libcsnd PROPERTIES
-- COMPILE_FLAGS ${libcsnd_CFLAGS})
-+ add_compiler_flags(${libcsnd_CFLAGS} TARGETS libcsnd)
- endif()
-
- install(TARGETS libcsnd
diff --git a/debian/patches/0001-functions-custom-cmake.diff b/debian/patches/0001-functions-custom-cmake.diff
deleted file mode 100644
index f994c5b..0000000
--- a/debian/patches/0001-functions-custom-cmake.diff
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 322ca62..b4ed49b 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -21,13 +21,6 @@ set(LUA_MODULE_INSTALL_DIR ${LIBRARY_INSTALL_DIR})
- set(LOCALE_INSTALL_DIR "share/locale")
- set(HEADER_INSTALL_DIR "include/csound")
-
--# Include this after the install path definitions so we can override them here.
--find_file(CUSTOM_CMAKE "Custom.cmake" HINTS ${CMAKE_HOME_DIRECTORY})
--if(CUSTOM_CMAKE)
-- message(STATUS "Including Custom.cmake file: ${CUSTOM_CMAKE}")
-- include(${CUSTOM_CMAKE})
--endif()
--
- include(TestBigEndian)
- include(CheckFunctionExists)
- include(CheckIncludeFile)
-@@ -185,6 +178,16 @@ function(add_compiler_flags)
- endif()
- endfunction(add_compiler_flags)
-
-+
-+# Include this after the install path definitions so we can override them here.
-+# Also after function definitions so we can use them there
-+find_file(CUSTOM_CMAKE "Custom.cmake" HINTS ${CMAKE_HOME_DIRECTORY})
-+if(CUSTOM_CMAKE)
-+ message(STATUS "Including Custom.cmake file: ${CUSTOM_CMAKE}")
-+ include(${CUSTOM_CMAKE})
-+endif()
-+
-+
- if(WIN32 AND NOT MSVC)
- if(EXISTS "C:/MinGW/include")
- include_directories(C:/MinGW/include)
diff --git a/debian/patches/0002-link-dssi-dl.patch b/debian/patches/0002-link-dssi-dl.patch
deleted file mode 100644
index 853dfda..0000000
--- a/debian/patches/0002-link-dssi-dl.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Opcodes/CMakeLists.txt
-+++ b/Opcodes/CMakeLists.txt
-@@ -69,7 +69,7 @@
- check_deps(BUILD_DSSI_OPCODES LADSPA_H)
- if(BUILD_DSSI_OPCODES)
- set(dssi_SRC dssi4cs/src/load.c dssi4cs/src/dssi4cs.c)
-- make_plugin(dssi4cs "${dssi_SRC}" )
-+ make_plugin(dssi4cs "${dssi_SRC}" dl)
- endif()
-
- check_deps(BUILD_FLUID_OPCODES FLUIDSYNTH_H)
diff --git a/debian/patches/0003-csoundac.patch b/debian/patches/0003-csoundac.patch
index b95a91b..3f04e53 100644
--- a/debian/patches/0003-csoundac.patch
+++ b/debian/patches/0003-csoundac.patch
@@ -1,24 +1,6 @@
--- a/frontends/CsoundAC/CMakeLists.txt
+++ b/frontends/CsoundAC/CMakeLists.txt
-@@ -46,7 +46,16 @@
- StrangeAttractor.cpp
- System.cpp
- Voicelead.cpp
-- VoiceleadingNode.cpp)
-+ VoiceleadingNode.cpp
-+ allegro.cpp
-+ allegrord.cpp
-+ allegroserial.cpp
-+ allegrosmfrd.cpp
-+ allegrosmfwr.cpp
-+ allegrowr.cpp
-+ mfmidi.cpp
-+ strparse.cpp
-+ trace.cpp)
-
- add_library(libCsoundAC SHARED ${libcsoundac_SRCS})
- set_target_properties(libCsoundAC PROPERTIES
-@@ -57,7 +66,9 @@
+@@ -68,7 +68,9 @@
LIBRARY_OUTPUT_DIRECTORY ${BUILD_LIB_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${BUILD_LIB_DIR}
)
@@ -29,7 +11,7 @@
if(MUSICXML_LIBRARY)
target_link_libraries(CsoundAC MUSICXML_LIBRARY)
-@@ -82,7 +93,7 @@
+@@ -93,7 +95,7 @@
PROPERTIES CPLUSPLUS ON
SWIG_MODULE_NAME CsoundAC)
swig_add_module(CsoundAC python CsoundAC.i)
@@ -38,35 +20,3 @@
set_target_properties(${SWIG_MODULE_CsoundAC_REAL_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${BUILD_LIB_DIR}
---- a/frontends/CsoundAC/Cell.hpp
-+++ b/frontends/CsoundAC/Cell.hpp
-@@ -37,7 +37,7 @@
- * Score node that simplifies building up repetitive
- * and overlapping motivic cells, such as used in Minimalism.
- */
-- class Cell :
-+ class SILENCE_PUBLIC Cell :
- public ScoreNode
- {
- public:
---- a/frontends/CsoundAC/System.hpp
-+++ b/frontends/CsoundAC/System.hpp
-@@ -252,7 +252,7 @@
- /**
- * Encapsulates a thread monitor, such as a Windows event handle.
- */
-- class ThreadLock
-+ class SILENCE_PUBLIC ThreadLock
- {
- void *lock;
- public:
---- a/frontends/CsoundAC/Event.hpp
-+++ b/frontends/CsoundAC/Event.hpp
-@@ -167,6 +167,6 @@
- #endif
- };
-
-- bool operator < (const Event& a, const Event &b);
-+ bool SILENCE_PUBLIC operator < (const Event& a, const Event &b);
- }
- #endif
diff --git a/debian/patches/0004-fix-unsafe-strcpy.patch b/debian/patches/0004-fix-unsafe-strcpy.patch
deleted file mode 100644
index 8f6fd1a..0000000
--- a/debian/patches/0004-fix-unsafe-strcpy.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-commit 6a7654d5a23c5f8dc8773c83862f7677945712b1
-Author: Felipe Sateler <fsateler at debian.org>
-Date: Sun May 6 11:53:15 2012 -0400
-
- Fix unsafe strcpy
-
- getenv returns NULL when an environment variable is not set. strcpy'ing
- NULL is not safe. At the same time, strcpy on untrusted input is not
- safe either. So, move from strcpy to strncpy and protect it
-
-diff --git a/frontends/csladspa/csladspa.cpp b/frontends/csladspa/csladspa.cpp
-index 567d184..95f4f30 100644
---- a/frontends/csladspa/csladspa.cpp
-+++ b/frontends/csladspa/csladspa.cpp
-@@ -412,12 +412,19 @@ unsigned int CountCSD(char **csdnames)
- int i = 0;
- size_t indx = 0;
- char ladspa_path[1024] = "";
-+ const char *src = NULL;
-
--#ifndef MACOSX
-- strcpy(ladspa_path, getenv("LADSPA_PATH"));
-+#ifdef MACOSX
-+ src = "/Library/Audio/Plug-Ins/LADSPA";
- #else
-- strcpy(ladspa_path, "/Library/Audio/Plug-Ins/LADSPA");
-+ src = getenv("LADSPA_PATH");
- #endif
-+
-+ if(src) {
-+ strncpy(ladspa_path, src, 1024);
-+ ladspa_path[1023] = '\0';
-+ }
-+
- // if no LADSPA_PATH attempt to open
- // current directory
- if(strlen(ladspa_path) == 0) dip = opendir(".");
diff --git a/debian/patches/2001-lua-link.diff b/debian/patches/2001-lua-link.diff
index 7e23060..e93e489 100644
--- a/debian/patches/2001-lua-link.diff
+++ b/debian/patches/2001-lua-link.diff
@@ -8,7 +8,7 @@ Description: Only link to lua when necessary, and to the correct lib
Author: Felipe Sateler <fsateler at gmail.com>
--- a/frontends/CsoundAC/CMakeLists.txt
+++ b/frontends/CsoundAC/CMakeLists.txt
-@@ -116,7 +116,7 @@
+@@ -117,7 +117,7 @@
PROPERTIES CPLUSPLUS ON
SWIG_MODULE_NAME luaCsoundAC)
SWIG_ADD_MODULE(luaCsoundAC lua luaCsoundAC.i)
diff --git a/debian/patches/series b/debian/patches/series
index b26aa71..7c0c183 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,8 +1,6 @@
0000-backported-cmake-additions.diff
-0001-functions-custom-cmake.diff
-0002-link-dssi-dl.patch
0003-csoundac.patch
-0004-fix-unsafe-strcpy.patch
+1000-csoundac-cmake-bugfix.patch
2000-avoid-nonfree-scansyn-plugin.diff
2001-lua-link.diff
2004-fix-gettext.diff
--
csound packaging
More information about the pkg-multimedia-commits
mailing list