Skip to content

Commit

Permalink
Import fluidsynth v2.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
komh committed Apr 3, 2022
1 parent 1c13231 commit 95e260c
Show file tree
Hide file tree
Showing 34 changed files with 430 additions and 164 deletions.
69 changes: 13 additions & 56 deletions .azure/azure-pipelines-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ schedules:
variables:
ICONV_VERSION: '1.16'
# Use recent master libffi, because 3.3 is broken: checking host system type... Invalid configuration `arm-none-linux-eabi': machine `arm-none-linux' not recognized
FFI_VERSION: 'dd5bd03075149d7cf8441875c1a344e8beb57dde'
FFI_VERSION: '3.4.2'
GETTEXT_VERSION: '0.21'
#need to switch to meson build system to use a more recent version
GLIB_VERSION: '2.58'
Expand All @@ -44,8 +44,7 @@ variables:
VORBIS_VERSION: '1.3.7'
OGG_VERSION: '1.3.5'
OPUS_VERSION: '1.3.1'
# flac 1.3.3 is completely broken: pkgconfig is incorrectly installed, compilation failure, etc.; use recent master instead
FLAC_VERSION: '27c615706cedd252a206dd77e3910dfa395dcc49'
FLAC_VERSION: '1.3.4'

# Android NDK sources and standalone toolchain is put here
DEV: '$(System.DefaultWorkingDirectory)/android-build-root'
Expand Down Expand Up @@ -136,7 +135,7 @@ jobs:
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz
tar zxf libiconv-${ICONV_VERSION}.tar.gz
wget -O libffi-${FFI_VERSION}.tar.gz https://github.com/libffi/libffi/archive/${FFI_VERSION}.tar.gz
wget -O libffi-${FFI_VERSION}.tar.gz https://github.com/libffi/libffi/releases/download/v${FFI_VERSION}/libffi-${FFI_VERSION}.tar.gz
tar zxf libffi-${FFI_VERSION}.tar.gz
wget http://ftp.gnu.org/pub/gnu/gettext/gettext-${GETTEXT_VERSION}.tar.gz
Expand All @@ -160,7 +159,7 @@ jobs:
wget https://github.com/xiph/ogg/releases/download/v${OGG_VERSION}/libogg-${OGG_VERSION}.tar.gz
tar zxf libogg-${OGG_VERSION}.tar.gz
wget -O flac-${FLAC_VERSION}.tar.gz https://github.com/xiph/flac/archive/${FLAC_VERSION}.tar.gz
wget -O flac-${FLAC_VERSION}.tar.gz https://github.com/xiph/flac/archive/refs/tags/${FLAC_VERSION}.tar.gz
tar xf flac-${FLAC_VERSION}.tar.gz
wget -O opus-${OPUS_VERSION}.tar.gz https://github.com/xiph/opus/archive/refs/tags/v${OPUS_VERSION}.tar.gz
Expand All @@ -184,19 +183,19 @@ jobs:
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
displayName: 'Use recent CMake Version'
condition: ne(variables.CACHE_RESTORED, 'true')
condition: and(succeeded(), ne(variables.CACHE_RESTORED, 'true'))
enabled: 'false'
- script: |
sudo apt-get update -y
displayName: 'Update apt'
condition: ne(variables.CACHE_RESTORED, 'true')
condition: and(succeeded(), ne(variables.CACHE_RESTORED, 'true'))
- script: |
set -ex
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install gettext cmake zlib1g-dev autogen automake autoconf libtool pkg-config autotools-dev build-essential meson ninja-build
displayName: 'apt-get install'
condition: ne(variables.CACHE_RESTORED, 'true')
condition: and(succeeded(), ne(variables.CACHE_RESTORED, 'true'))
- script: |
set -e
Expand Down Expand Up @@ -260,7 +259,7 @@ jobs:
displayName: 'Compile libiconv'
workingDirectory: $(DEV)
condition: ne(variables.CACHE_RESTORED, 'true')
condition: and(succeeded(), ne(variables.CACHE_RESTORED, 'true'))

- script: |
set -ex
Expand All @@ -276,7 +275,7 @@ jobs:
popd
displayName: 'Compile libffi'
workingDirectory: $(DEV)
condition: ne(variables.CACHE_RESTORED, 'true')
condition: and(succeeded(), ne(variables.CACHE_RESTORED, 'true'))
- script: |
set -ex
Expand Down Expand Up @@ -400,7 +399,7 @@ jobs:
popd
displayName: 'Compile gettext'
workingDirectory: $(DEV)
condition: ne(variables.CACHE_RESTORED, 'true')
condition: and(succeeded(), ne(variables.CACHE_RESTORED, 'true'))
- script: |
set -ex
Expand Down Expand Up @@ -463,76 +462,35 @@ jobs:
popd
displayName: 'Compile glib'
workingDirectory: $(DEV)
condition: ne(variables.CACHE_RESTORED, 'true')
condition: and(succeeded(), ne(variables.CACHE_RESTORED, 'true'))
- template: cmake-android.yml
parameters:
sourceDir: 'libogg-$(OGG_VERSION)'
cmakeArgs: '-DINSTALL_DOCS=0'

- script: |
ls -la libogg-${OGG_VERSION}/build/CMakeFiles/
cat libogg-${OGG_VERSION}/build/CMakeFiles/CMakeError.log
true
displayName: 'Print OGG Cmake Error Log'
condition: always()
workingDirectory: $(DEV)
- template: cmake-android.yml
parameters:
sourceDir: 'libvorbis-$(VORBIS_VERSION)'

- script: |
ls -la libvorbis-${VORBIS_VERSION}/build/CMakeFiles/
cat libvorbis-${VORBIS_VERSION}/build/CMakeFiles/CMakeError.log
true
displayName: 'Print Vorbis Cmake Error Log'
condition: always()
workingDirectory: $(DEV)
# flac uses c99 macros, but doesnt specify a standard, so we need to do it explicitly.
# On i686, they invoke yasm with -fstack-protector-strong flag... turn off asm optimizations.
- template: cmake-android.yml
parameters:
sourceDir: 'flac-$(FLAC_VERSION)'
cmakeArgs: '-DCMAKE_C_STANDARD=99 -DCMAKE_C_STANDARD_REQUIRED=1 -DWITH_ASM=0 -DBUILD_CXXLIBS=0 -DBUILD_PROGRAMS=0 -DBUILD_EXAMPLES=0 -DBUILD_DOCS=0 -DINSTALL_MANPAGES=0'

- script: |
ls -la flac-${FLAC_VERSION}/build/CMakeFiles/
cat flac-${FLAC_VERSION}/build/CMakeFiles/CMakeError.log
true
displayName: 'Print FLAC Cmake Error Log'
condition: always()
workingDirectory: $(DEV)
# another broken xiph project that doesn't specify the C standard and keeps complaining of you don't have C99
- template: cmake-android.yml
parameters:
sourceDir: 'opus-$(OPUS_VERSION)'
cmakeArgs: '-DBUILD_PROGRAMS=0 -DOPUS_MAY_HAVE_NEON=1 -DCMAKE_C_STANDARD=99 -DCMAKE_C_STANDARD_REQUIRED=1'

- script: |
ls -la opus-${OPUS_VERSION}/build/CMakeFiles/
cat opus-${OPUS_VERSION}/build/CMakeFiles/CMakeError.log
cat opus-${OPUS_VERSION}/build/CMakeFiles/CMakeOutput.log
true
displayName: 'Print OPUS Cmake Error Log'
condition: always()
workingDirectory: $(DEV)
- template: cmake-android.yml
parameters:
sourceDir: 'libsndfile-$(SNDFILE_VERSION)'
cmakeArgs: '-DBUILD_PROGRAMS=0 -DBUILD_EXAMPLES=0'

- script: |
ls -la libsndfile-${SNDFILE_VERSION}/build/CMakeFiles/
cat libsndfile-${SNDFILE_VERSION}/build/CMakeFiles/CMakeError.log
true
displayName: 'Print libsndfile Cmake Error Log'
condition: always()
workingDirectory: $(DEV)
- template: cmake-android.yml
parameters:
sourceDir: 'oboe-$(OBOE_VERSION)'
Expand All @@ -559,7 +517,7 @@ jobs:
displayName: 'Create fake oboe.pc'
workingDirectory: $(DEV)
condition: ne(variables.CACHE_RESTORED, 'true')
condition: and(succeeded(), ne(variables.CACHE_RESTORED, 'true'))
- template: cmake-android.yml
parameters:
Expand Down Expand Up @@ -598,12 +556,11 @@ jobs:
sourceDir: '.'
condition: succeeded()
installCommand: 'cp *.so ${PREFIX}/lib/'


- script: |
ls -Rg $(PREFIX)
displayName: 'Show cross-compiled files in $(PREFIX)'
condition: always()
condition: or(succeeded(), failed())
- script: |
set -ex
Expand Down
30 changes: 25 additions & 5 deletions .azure/azure-pipelines-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ jobs:
- job: macOS
strategy:
matrix:
10_14:
imageName: 'macOS-10.14'
UnixLibs:
imageName: 'macos-11'
CMakeFlags: '-Denable-framework=0'
10_15:
imageName: 'macOS-10.15'
CMakeFlags: ''
11_0:
imageName: 'macos-11'
CMakeFlags: ''

pool:
vmImage: $(imageName)
Expand All @@ -39,11 +42,28 @@ jobs:
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 ..
cmake -Werror=dev $(CMakeFlags) -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 ..
make -j3
displayName: 'Compile fluidsynth'
- script: |
set -ex
cd build || exit -1
make -j3 check || exit -1
cd build
make -j3 check
displayName: 'Execute Unittests'
- script: |
set -ex
cd build
make -j3 demo
displayName: 'Compile demos'
- script: |
set -ex
cd build
sudo make install
rm -f install_manifest.txt
displayName: 'Install fluidsynth to default location'
- script: |
set -ex
cd build
cmake -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) ..
make install
displayName: 'Install fluidsynth to artifact dir'
12 changes: 8 additions & 4 deletions .azure/azure-pipelines-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ jobs:
# ninja --version
cmake --version
rm -rf C:/Strawberry/perl/bin/pkg-config*
choco install --svc --sdc -i pkgconfiglite &
chocoTask=$!
choco install --svc --sdc -i pkgconfiglite
# chocoTask=$!
# manually update vcpkg
cd $VCPKG_INSTALLATION_ROOT
# git checkout master
git remote -v
git fetch --unshallow --tags --prune --progress origin
git fetch --tags --prune --progress origin
git checkout --force $(VCPKG_REVISION)
sed -i 's/arm64/arm/g' ports/glib/portfile.cmake
./bootstrap-vcpkg.sh
wait $chocoTask
# wait $chocoTask
which pkg-config
displayName: 'Update vcpkg'
- task: DownloadBuildArtifacts@0
Expand Down Expand Up @@ -126,6 +126,10 @@ jobs:
cmake --build build --config $(configuration) --target check --parallel 3
displayName: 'Execute Unittests'
condition: and(succeeded(), and(ne(variables['platform'], 'arm'), ne(variables['platform'], 'arm64')))
- bash: |
set -ex
cmake --build build --config $(configuration) --target demo --parallel 3
displayName: 'Compile demos'
- script: |
@ECHO ON
cd build
Expand Down
21 changes: 21 additions & 0 deletions .azure/azure-pipelines-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ jobs:
cd build || exit -1
cmake --build . --config Release --target check || exit -1
displayName: 'Execute Unittests'
- script: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
cd build || exit -1
cmake --build . --config Release --target demo || exit -1
displayName: 'Compile demos'
- script: |
@ECHO ON
cd build
Expand Down Expand Up @@ -140,6 +146,12 @@ jobs:
cd build || exit -1
cmake --build . --config $(CMAKE_CONFIG) --target check || exit -1
displayName: 'Execute Unittests'
- script: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
cd build || exit -1
cmake --build . --config $(CMAKE_CONFIG) --target demo || exit -1
displayName: 'Compile demos'
- job: WindowsMinGW
variables:
Expand Down Expand Up @@ -208,6 +220,15 @@ jobs:
cd build || exit -1
mingw32-make.exe -j4 check || exit -1
displayName: 'Execute Unittests'
- script: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
REM remove that path from PATH to make sure sh.exe is not found (cmake will complain otherwise)
set PATH=%PATH:C:\Program Files\Git\bin;=%
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
cd build || exit -1
mingw32-make.exe -j4 demo || exit -1
displayName: 'Compile demos'
- script: |
@ECHO ON
cd build
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ jobs:
# Execute tests defined by the CMake configuration.
run: make -j`nproc` check

- name: Demo
working-directory: ${{github.workspace}}/build
shell: bash
run: make -j`nproc` demo

- name: Install
working-directory: ${{github.workspace}}/build
run: make install
1 change: 1 addition & 0 deletions .obs/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ workflow:
- branch_package:
source_project: home:derselbst:anmp
source_package: fluidsynth
target_project: home:derselbst:anmp:github-ci
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FluidSynth - A Software Synthesizer
#
# Copyright (C) 2003-2021 Peter Hanappe and others.
# Copyright (C) 2003-2022 Peter Hanappe and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
Expand Down Expand Up @@ -38,7 +38,7 @@ set ( PACKAGE "fluidsynth" )
# FluidSynth package version
set ( FLUIDSYNTH_VERSION_MAJOR 2 )
set ( FLUIDSYNTH_VERSION_MINOR 2 )
set ( FLUIDSYNTH_VERSION_MICRO 4 )
set ( FLUIDSYNTH_VERSION_MICRO 6 )
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 4 )
set ( LIB_VERSION_REVISION 6 )
set ( LIB_VERSION_INFO
"${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" )

Expand Down Expand Up @@ -879,14 +879,14 @@ if ( CMAKE_VERSION VERSION_EQUAL "3.12.0" OR CMAKE_VERSION VERSION_GREATER "3.12
list ( TRANSFORM LIBS_PRIVATE PREPEND "-l")
list ( JOIN LIBS_PRIVATE " " LIBS_PRIVATE_JOINED )
list ( JOIN LIBS_PRIVATE_WITH_PATH " " LIBS_PRIVATE_WITH_PATH_JOINED )

list ( JOIN PC_REQUIRES_PRIV " " PC_REQUIRES_PRIV_JOINED )
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_EQUAL "3.12.0" OR CMAKE_VERSION VERSION_GREATER "3.12.0" )

list ( JOIN PC_REQUIRES_PRIV " " PC_REQUIRES_PRIV_JOINED )

configure_file ( fluidsynth.pc.in
${CMAKE_BINARY_DIR}/fluidsynth.pc IMMEDIATE @ONLY )
install ( FILES ${CMAKE_BINARY_DIR}/fluidsynth.pc
Expand Down
13 changes: 9 additions & 4 deletions cmake_admin/DefaultDirs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ else ( WIN32 )
endif ( WIN32 )
mark_as_advanced (DEFAULT_SOUNDFONT)

set(FRAMEWORK_INSTALL_PREFIX "")
if ( CMAKE_VERSION VERSION_GREATER "3.7.0" AND NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT )
set(FRAMEWORK_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
endif()

# BUNDLE_INSTALL_DIR - Mac only: the directory for application bundles
set (BUNDLE_INSTALL_DIR "/Applications" CACHE STRING
set (BUNDLE_INSTALL_DIR "Applications" CACHE STRING
"The install dir for application bundles")
mark_as_advanced (BUNDLE_INSTALL_DIR)

# FRAMEWORK_INSTALL_DIR - Mac only: the directory for framework bundles
set (FRAMEWORK_INSTALL_DIR "/Library/Frameworks" CACHE STRING
set (FRAMEWORK_INSTALL_DIR "Library/Frameworks" CACHE STRING
"The install dir for framework bundles")
mark_as_advanced (FRAMEWORK_INSTALL_DIR)
mark_as_advanced (FRAMEWORK_INSTALL_DIR)

# BIN_INSTALL_DIR - the directory where executables will be installed
set (BIN_INSTALL_DIR "bin" CACHE STRING "The install dir for executables")
Expand Down
Loading

0 comments on commit 95e260c

Please sign in to comment.