Forgot to add patch for fluidsynth.

This commit is contained in:
Adrien Destugues
2014-07-09 16:51:24 +02:00
committed by Puck Meerburg
parent 23a759a72e
commit 953cabe9ba

View File

@@ -0,0 +1,57 @@
From 24f44d67be0ad012ec04ffc8fd620d19ae1aaa75 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 9 Jul 2014 15:19:11 +0200
Subject: Get things to build on Haiku.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 004b022..e210f6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -140,7 +140,7 @@ if ( CMAKE_COMPILER_IS_GNUCC )
set ( CMAKE_SHARED_LINKER_FLAGS
"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
endif ( NOT APPLE AND NOT OS2 )
- set ( GNUCC_WARNING_FLAGS "-Wall -W -Wpointer-arith -Wbad-function-cast -Wno-cast-qual -Wcast-align -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement" )
+ set ( GNUCC_WARNING_FLAGS "-Wall -W -Wpointer-arith -Wbad-function-cast -Wno-cast-qual -Wcast-align -Wstrict-prototypes" )
set ( CMAKE_C_FLAGS_DEBUG "-g -DDEBUG ${GNUCC_WARNING_FLAGS}" )
set ( CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -DNDEBUG ${GNUCC_WARNING_FLAGS}" )
set ( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -fomit-frame-pointer -funroll-all-loops -finline-functions -DNDEBUG ${GNUCC_WARNING_FLAGS}" )
@@ -168,9 +168,9 @@ if ( WIN32 )
endif ( MINGW )
else ( WIN32 )
# Check PThreads, but not in Windows
- find_package ( Pthreads REQUIRED )
- set ( HAVE_LIBPTHREAD ${PTHREADS_FOUND} )
- set ( LIBFLUID_LIBS "m" )
+ find_package ( Threads REQUIRED )
+ set ( HAVE_LIBPTHREAD ${THREADS_FOUND} )
+ set ( LIBFLUID_LIBS "network;bsd" )
endif ( WIN32 )
# IBM OS/2
@@ -412,7 +412,7 @@ set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}" )
configure_file ( fluidsynth.pc.in
${CMAKE_BINARY_DIR}/fluidsynth.pc IMMEDIATE @ONLY )
install ( FILES ${CMAKE_BINARY_DIR}/fluidsynth.pc
- DESTINATION ${LIB_INSTALL_DIR}${LIB_SUFFIX}/pkgconfig )
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}${LIB_SUFFIX}/pkgconfig )
# Extra targets for Unix build environments
if ( UNIX )
diff --git a/src/utils/fluid_sys.h b/src/utils/fluid_sys.h
index 7cfb7a9..6ac460e 100644
--- a/src/utils/fluid_sys.h
+++ b/src/utils/fluid_sys.h
@@ -335,7 +335,7 @@ extern fluid_profile_data_t fluid_profile_data[];
sample data.
*/
-#if defined(HAVE_SYS_MMAN_H) && !defined(__OS2__)
+#if defined(HAVE_SYS_MMAN_H) && !defined(__OS2__) && !defined(__HAIKU__)
#define fluid_mlock(_p,_n) mlock(_p, _n)
#define fluid_munlock(_p,_n) munlock(_p,_n)
#else
--
1.8.3.4