fluidsynth: add recipe for version 1.1.8.

This commit is contained in:
Jerome Duval
2017-10-20 18:48:03 +02:00
parent 4a08afd8fd
commit a6b74ea37b
2 changed files with 221 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
SUMMARY="FA software real-time synthesizer"
DESCRIPTION="
Fluidsynth is a free open source software synthesizer written in C. It \
can convert MIDI note data to an audio signal using SoundFont technology \
without a SoundFont compatible soundcard. Fluidsynth can perform as a virtual \
MIDI device and read in SMF (.mid) files directly. Another function is its \
ability to send audio data to a Raw or Wave file."
HOMEPAGE="http://www.fluidsynth.org/"
COPYRIGHT="2007-2012 Josh Green, Pedro Lopez-Cabanillas, David Henningsson"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://github.com/FluidSynth/fluidsynth/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="318df5aebde8e7353c8878f5c9cb3ba8ed578c2607978b6fbfc5f1cb2ad9d799"
PATCHES="fluidsynth-$portVersion.patchset"
ARCHITECTURES="?x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
PROVIDES="
fluidsynth${secondaryArchSuffix} = $portVersion
lib:libfluidsynth${secondaryArchSuffix} = 1.6.1 compat >= 1
cmd:fluidsynth${secondaryArchSuffix}
"
REQUIRES="
haiku${secondaryArchSuffix}
lib:libFLAC$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libncurses$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libreadline$secondaryArchSuffix
lib:libsndfile$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
"
PROVIDES_devel="
fluidsynth${secondaryArchSuffix}_devel = $portVersion
devel:libfluidsynth$secondaryArchSuffix = 1.6.1 compat >= 1
"
REQUIRES_devel="
fluidsynth$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libFLAC$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libncurses$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libreadline$secondaryArchSuffix
devel:libsndfile$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake . $cmakeDirArgs
make $jobArgs
}
INSTALL()
{
make install
mkdir -p $(dirname $includeDir)
mv $prefix/include $includeDir
mv $prefix/lib64 $libDir || true
mkdir -p $(dirname $manDir)
mv $prefix/share/man $manDir
rm -rf $prefix/share
prepareInstalledDevelLib libfluidsynth
fixPkgconfig
# devel package
packageEntries devel \
$developDir
}

View File

@@ -0,0 +1,134 @@
From a5d73acc21fdc084697ef1e767debd5a779bedaa 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 aa4154c..c120590 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,7 +151,7 @@ if ( CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
set ( GNUCC_VISIBILITY_FLAG "-fvisibility=hidden" )
endif ( 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 "-std=gnu89 -g ${GNUCC_VISIBILITY_FLAG} -DDEBUG ${GNUCC_WARNING_FLAGS}" )
set ( CMAKE_C_FLAGS_RELEASE "-std=gnu89 -O2 -fomit-frame-pointer -finline-functions ${GNUCC_VISIBILITY_FLAG} -DNDEBUG ${GNUCC_WARNING_FLAGS}" )
set ( CMAKE_C_FLAGS_RELWITHDEBINFO "-std=gnu89 -O2 -g -fomit-frame-pointer -finline-functions ${GNUCC_VISIBILITY_FLAG} -DNDEBUG ${GNUCC_WARNING_FLAGS}" )
@@ -181,7 +181,7 @@ else ( WIN32 )
# Check PThreads, but not in Windows
find_package ( Threads REQUIRED )
set ( HAVE_LIBPTHREAD ${Threads_FOUND} )
- set ( LIBFLUID_LIBS "m" ${CMAKE_THREAD_LIBS_INIT} )
+ set ( LIBFLUID_LIBS "network;bsd" ${CMAKE_THREAD_LIBS_INIT} )
endif ( WIN32 )
# IBM OS/2
@@ -458,7 +458,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 b5034e9..9d4797c 100644
--- a/src/utils/fluid_sys.h
+++ b/src/utils/fluid_sys.h
@@ -421,7 +421,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
--
2.14.2
From a2d6c08c2a7dcda8f0beb3a9ecd41b5a00580054 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Fri, 15 Aug 2014 16:10:40 +0200
Subject: configure: Haiku: drop libm, add libnetwork
Haiku doesn't have libm proper, it's embedded in libroot.
Also, we use libnetwork for socket() and friends.
Somehow all this doesn't seem to change anything though!?
diff --git a/configure.ac b/configure.ac
index 3c0e62c..7d86739 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,10 @@ os2*)
solaris*)
LDFLAGS="$LDFLAGS -lnsl -lsocket"
;;
+haiku*)
+ LIBFLUID_LIBS=""
+ LDFLAGS="$LDFLAGS -lnetwork"
+ ;;
esac
AC_SUBST(LIBFLUID_LIBS)
--
2.14.2
From 151ebec6a1f8bc70b64473044ff7dee1c79ee740 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Fri, 15 Aug 2014 16:37:55 +0200
Subject: configure: AM_CONFIG_HEADER is deprecated
Use AC_CONFIG_HEADER instead.
diff --git a/configure.ac b/configure.ac
index 7d86739..da1cffa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,7 +35,7 @@ m4_define([lt_age], [6])
LT_VERSION_INFO="lt_current:lt_revision:lt_age"
AC_SUBST(LT_VERSION_INFO)
-AM_CONFIG_HEADER(src/config.h)
+AC_CONFIG_HEADER(src/config.h)
AC_CONFIG_MACRO_DIR([m4])
CFLAGS="$CFLAGS"
--
2.14.2
From c1e0919abc7aaa87be61207612517a175cbad252 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Fri, 15 Aug 2014 16:41:10 +0200
Subject: configure: Drop -Wno-unused-parameter (gcc2 doesn't know this)
Haiku requires buiding with gcc2 for some parts...
diff --git a/configure.ac b/configure.ac
index da1cffa..a3f358b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -151,10 +151,10 @@ AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],
# Those are only valid for GCC
if test "$GCC" = yes; then
if test "$ENABLE_DEBUG" = "yes"; then
- CFLAGS="${CFLAGS} ${FCCFLAGS} -g -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wno-unused-parameter -Wno-cast-qual"
+ CFLAGS="${CFLAGS} ${FCCFLAGS} -g -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wno-cast-qual"
AC_DEFINE(DEBUG, 1, [Define to activate debugging message])
else
- CFLAGS="${CFLAGS} ${FCCFLAGS} -O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Winline -Wno-unused-parameter -Wno-cast-qual"
+ CFLAGS="${CFLAGS} ${FCCFLAGS} -O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Winline -Wno-cast-qual"
AC_DEFINE(DEBUG, 0, [Define to activate debugging message])
fi
fi
--
2.14.2