Skip to content

Commit

Permalink
Import fluidsynth v2.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
komh committed Sep 14, 2021
1 parent bd6d3ad commit cc75798
Show file tree
Hide file tree
Showing 26 changed files with 535 additions and 149 deletions.
18 changes: 15 additions & 3 deletions .azure/azure-pipelines-mac.yml
Expand Up @@ -15,23 +15,35 @@ trigger:

jobs:
- job: macOS
strategy:
matrix:
10_14:
imageName: 'macOS-10.14'
10_15:
imageName: 'macOS-10.15'
11_0:
imageName: 'macos-11'

pool:
vmImage: 'macOS-10.14'
vmImage: $(imageName)
# recommended by https://github.com/Homebrew/brew/issues/2491#issuecomment-294207661
# brew update || brew update
# brew upgrade $PACKAGES
steps:
- script: |
set -ex
PACKAGES="glib gobject-introspection libsndfile pkg-config jack dbus-glib pulseaudio portaudio sdl2 libomp"
brew install $PACKAGES
displayName: 'Prerequisites'
- script: |
set -ex
mkdir build && cd build
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
cmake -Werror=dev -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 ..
make -j`nproc`
make -j3
displayName: 'Compile fluidsynth'
- script: |
set -ex
cd build || exit -1
make -j`nproc` check || exit -1
make -j3 check || exit -1
displayName: 'Execute Unittests'
16 changes: 6 additions & 10 deletions .github/workflows/linux.yml
Expand Up @@ -25,26 +25,22 @@ jobs:
matrix:
CC: [""]
CXX: [""]
CMAKE_FLAGS: ["-Denable-profiling=1","-Denable-floats=1 -Denable-profiling=1","-Denable-floats=1","-Denable-trap-on-fpe=1","-Denable-fpe-check=1","-Denable-ipv6=0","-Denable-network=0","-Denable-aufile=0","-DBUILD_SHARED_LIBS=0","-Denable-ubsan=1 -Denable-debug=1"]
CMAKE_FLAGS: ["-Denable-profiling=1","-Denable-floats=1 -Denable-profiling=1","-Denable-floats=1","-Denable-trap-on-fpe=1","-Denable-fpe-check=1","-Denable-ipv6=0","-Denable-network=0","-Denable-aufile=0","-DBUILD_SHARED_LIBS=0","-Denable-ubsan=1 -Denable-debug=1", "-Denable-debug=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"]
include:
- CC: "gcc-7"
CXX: "g++-7"
CMAKE_FLAGS: ""
- CC: "gcc-8"
CXX: "g++-8"
CMAKE_FLAGS: "-Denable-debug=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"
- CC: "clang-7"
CXX: "clang++-7"
CMAKE_FLAGS: ""
- CC: "clang-8"
CXX: "clang++-8"
CMAKE_FLAGS: ""
- CC: "clang-9"
CXX: "clang++-9"
CMAKE_FLAGS: ""
- CC: "clang-10"
CXX: "clang++-10"
CMAKE_FLAGS: ""
- CC: "clang-12"
CXX: "clang++-12"
CMAKE_FLAGS: ""
# clang9 is covered by openSUSE Leap 15.2
# clang11 is covered by openSUSE Leap 15.3

steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 5 additions & 0 deletions .obs/workflows.yml
@@ -0,0 +1,5 @@
workflow:
steps:
- branch_package:
source_project: home:derselbst:anmp
source_package: fluidsynth
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -152,3 +152,4 @@ Marcus Weseloh
Jean-jacques Ceresa
Vladimir Davidovich
Tamás Korodi
Evan Miller
30 changes: 19 additions & 11 deletions CMakeLists.txt
Expand Up @@ -30,15 +30,15 @@ if(POLICY CMP0091)
endif()

project ( FluidSynth C CXX )
set ( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_admin )
list( APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_admin )

# FluidSynth package name
set ( PACKAGE "fluidsynth" )

# FluidSynth package version
set ( FLUIDSYNTH_VERSION_MAJOR 2 )
set ( FLUIDSYNTH_VERSION_MINOR 2 )
set ( FLUIDSYNTH_VERSION_MICRO 2 )
set ( FLUIDSYNTH_VERSION_MICRO 3 )
set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" )
set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )

Expand All @@ -53,7 +53,7 @@ set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )
# This is not exactly the same algorithm as the libtool one, but the results are the same.
set ( LIB_VERSION_CURRENT 3 )
set ( LIB_VERSION_AGE 0 )
set ( LIB_VERSION_REVISION 2 )
set ( LIB_VERSION_REVISION 3 )
set ( LIB_VERSION_INFO
"${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" )

Expand Down Expand Up @@ -200,12 +200,12 @@ unset ( FLUID_LIBS CACHE )
unset ( ENABLE_UBSAN CACHE )

if ( CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "Intel" )
if ( NOT APPLE AND NOT OS2 )
if ( NOT APPLE AND NOT OS2 AND NOT EMSCRIPTEN )
set ( CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed" )
set ( CMAKE_SHARED_LINKER_FLAGS
"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
endif ( NOT APPLE AND NOT OS2 )
endif ( NOT APPLE AND NOT OS2 AND NOT EMSCRIPTEN )

# define some warning flags
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement -Werror=implicit-function-declaration" )
Expand Down Expand Up @@ -774,6 +774,18 @@ if ( enable-ipv6 )
endif ( HAVE_INETNTOP )
endif ( enable-ipv6 )

unset ( HAVE_SOCKLEN_T CACHE )
set ( CMAKE_EXTRA_INCLUDE_FILES_SAVE ${CMAKE_EXTRA_INCLUDE_FILES} )
if ( WIN32 )
set ( CMAKE_EXTRA_INCLUDE_FILES "winsock2.h;ws2tcpip.h" )
else ( WIN32 )
set ( CMAKE_EXTRA_INCLUDE_FILES sys/socket.h )
endif ( WIN32 )
check_type_size ( socklen_t SOCKLEN_T )
set ( CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES_SAVE} )
if ( HAVE_SOCKLEN_T )
set ( HAVE_SOCKLEN_T 1 )
endif ( HAVE_SOCKLEN_T )

# General configuration file
configure_file ( ${CMAKE_SOURCE_DIR}/src/config.cmake
Expand Down Expand Up @@ -816,7 +828,7 @@ else ()
set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}" )
endif ()

if ( CMAKE_VERSION VERSION_GREATER_EQUAL "3.12.0" )
if ( CMAKE_VERSION VERSION_EQUAL "3.12.0" OR CMAKE_VERSION VERSION_GREATER "3.12.0" )
# retrieve all the private libs we depend on
get_target_property ( LIBS_PRIVATE libfluidsynth INTERFACE_LINK_LIBRARIES)
# make a copy
Expand All @@ -837,7 +849,7 @@ else ()
set ( LIBS_PRIVATE "" )
set ( LIBS_PRIVATE_WITH_PATH "" )
message ( DEPRECATION "Your version of CMake is old. A complete pkg-config file can not created. Get cmake 3.13.3 or newer." )
endif ( CMAKE_VERSION VERSION_GREATER_EQUAL "3.12.0" )
endif ( CMAKE_VERSION VERSION_EQUAL "3.12.0" OR CMAKE_VERSION VERSION_GREATER "3.12.0" )

configure_file ( fluidsynth.pc.in
${CMAKE_BINARY_DIR}/fluidsynth.pc IMMEDIATE @ONLY )
Expand All @@ -846,10 +858,6 @@ install ( FILES ${CMAKE_BINARY_DIR}/fluidsynth.pc

# Extra targets for Unix build environments
if ( UNIX )
# RPM spec
configure_file ( fluidsynth.spec.in
${CMAKE_BINARY_DIR}/fluidsynth.spec IMMEDIATE @ONLY )

if ( DEFINED FLUID_DAEMON_ENV_FILE)
configure_file ( fluidsynth.service.in
${CMAKE_BINARY_DIR}/fluidsynth.service @ONLY )
Expand Down
1 change: 1 addition & 0 deletions contrib/baselibs.conf
@@ -0,0 +1 @@
libfluidsynth2
23 changes: 23 additions & 0 deletions contrib/debian.changelog
@@ -0,0 +1,23 @@
fluidsynth (1.1.8-1) unstable; urgency=low

- Update to version 1.1.8:
* fix build against glib < 2.30 (#202)
* fix dsound audio driver on windows (#215)
* fix a bug around `synth.audio-groups` setting, which caused improper multi-channel rendering (#225)
* cmake 3.0.2 is now required
* compilation with clang is now possible
* build fixes on OS/2 (thanks to @komh)

-- Tom Moebert <tom.mbrt@googlemail.com> Fri, 13 Oct 2017 15:53:00 +0000

fluidsynth (1.1.7-1) unstable; urgency=low

* OBS snapshot.

-- Rui Nuno Capela <rncbc@rncbc.org> Tue, 5 Sep 2017 20:00:00 +0000

fluidsynth (1.1.6-1) unstable; urgency=low

* OBS snapshot.

-- Rui Nuno Capela <rncbc@rncbc.org> Sun, 19 Aug 2012 23:45:01 +0000
1 change: 1 addition & 0 deletions contrib/debian.compat
@@ -0,0 +1 @@
9
34 changes: 34 additions & 0 deletions contrib/debian.control
@@ -0,0 +1,34 @@
Source: fluidsynth
Priority: optional
Section: sound
Maintainer: Rui Nuno Capela <rncbc@rncbc.org>
Build-Depends: debhelper (>= 5.0.0), cmake, pkg-config, libdb-dev, libjack-dev, libasound2-dev,
libsndfile-dev, libglib2.0-dev
Standards-Version: 3.7.2

Package: libfluidsynth1
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: FluidSynth is a real-time software synthesizer
FluidSynth is a real-time software synthesizer based on
the SoundFont 2 specifications.

Package: libfluidsynth-dev
Section: libdevel
Architecture: any
Depends: libfluidsynth1 (= ${source:Version})
Description: FluidSynth is a real-time software synthesizer
FluidSynth is a real-time software synthesizer based on
the SoundFont 2 specifications.
This package contains the header file required for compiling
hosts and plugins.

Package: fluidsynth
Section: sound
Architecture: any
Depends: libfluidsynth1 (= ${source:Version})
Description: FluidSynth is a real-time software synthesizer
FluidSynth is a real-time software synthesizer based on
the SoundFont 2 specifications.
This package contains the command-line utilities.
30 changes: 30 additions & 0 deletions contrib/debian.copyright
@@ -0,0 +1,30 @@
This package was debianized by Rui Nuno Capela <rncbc@rncbc.org> on
Mon, 25 Jun 2007 10:42:40 +0100.

It was downloaded from http://www.fluidsynth.org

Upstream Author: Rui Nuno Capela <rncbc@rncbc.org>

Copyright:

Copyright (C) 2003-2015, rncbc aka Rui Nuno Capela. All rights reserved.

License:

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

The Debian packaging is (C) 2007-2013, Rui Nuno Capela <rncbc@rncbc.org> and
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.

2 changes: 2 additions & 0 deletions contrib/debian.fluidsynth.install
@@ -0,0 +1,2 @@
debian/tmp/usr/bin/*
debian/tmp/usr/share/*
3 changes: 3 additions & 0 deletions contrib/debian.libfluidsynth-dev.install
@@ -0,0 +1,3 @@
debian/tmp/usr/include/*
debian/tmp/usr/lib*/*.so
debian/tmp/usr/lib*/pkgconfig/*.pc
1 change: 1 addition & 0 deletions contrib/debian.libfluidsynth1.install
@@ -0,0 +1 @@
debian/tmp/usr/lib*/lib*.so.*
98 changes: 98 additions & 0 deletions contrib/debian.rules
@@ -0,0 +1,98 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatibility version to use.
#export DH_COMPAT=7

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)


ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

config.status: CMakeLists.txt
dh_testdir

# Add here commands to configure the package.
cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=/usr/lib .

build: build-stamp
build-stamp: config.status
dh_testdir

# Add here commands to compile the package.
$(MAKE)

# the build should fail if the tests are not successful
#$(MAKE) check

touch build-stamp

clean:
dh_testdir
dh_testroot
rm -f build-stamp

# Add here commands to clean up after the build process.
#-$(MAKE) distclean

dh_clean -a

install: build
dh_testdir
dh_testroot
dh_clean -k -a
dh_installdirs

# Add here commands to install the package into debian/tmp
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_install -a --list-missing
# dh_installchangelogs -a ChangeLog
# dh_installdocs -a
# dh_installexamples
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
# dh_installman
# dh_link
dh_strip -a
dh_compress -a
dh_fixperms -a
# dh_perl
# dh_python
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
Empty file added contrib/debian.series
Empty file.
8 changes: 8 additions & 0 deletions contrib/fluidsynth.dsc
@@ -0,0 +1,8 @@
Format: 1.0
Source: fluidsynth
Version: 2.2.0-1
Binary: fluidsynth, libfluidsynth1, libfluidsynth-dev
Maintainer: Rui Nuno Capela <rncbc@rncbc.org>
Architecture: any
Standards-Version: 3.7.2
Build-Depends: debhelper (>= 5.0.0), cmake, pkg-config, libdb-dev, libjack-dev, libasound2-dev, libsndfile-dev, libglib2.0-dev

0 comments on commit cc75798

Please sign in to comment.