Improve pianobooster packages

* Enable FluidSynth in custom and mingw-w64 package
* Use minimal build of mingw-w64-fluidsynth after all to avoid
  pulling in too many dependencies which unfortunately would
  cause various linker errors
* Make the static library in mingw-w64-fluidsynth usable with
  the static libraries of mingw-w64-glib2
* Fix missing build dependencies in custom package
* Workaround CMake not configuring static libraries correctly
This commit is contained in:
Martchus 2023-06-12 23:44:35 +02:00
parent efa277b114
commit faecd93a37
3 changed files with 20 additions and 12 deletions

View File

@ -3,15 +3,16 @@
_realname=fluidsynth
pkgname=mingw-w64-fluidsynth
pkgver=2.3.2
pkgrel=1
pkgrel=2
pkgdesc="A real-time software synthesizer based on the SoundFont 2 specifications (mingw-w64)"
url="http://www.fluidsynth.org/"
arch=('any')
license=('LGPL')
depends=('mingw-w64-glib2'
'mingw-w64-libsndfile'
'mingw-w64-portaudio'
'mingw-w64-readline')
depends=('mingw-w64-sdl2' 'mingw-w64-glib2')
#depends=('mingw-w64-glib2'
# 'mingw-w64-libsndfile'
# 'mingw-w64-portaudio'
# 'mingw-w64-readline')
makedepends=('mingw-w64-cmake'
'mingw-w64-pkg-config'
'mingw-w64-make')
@ -26,11 +27,13 @@ build() {
for _arch in ${_architectures}; do
mkdir -p build-${_arch} && pushd build-${_arch}
# If you need every feature, use this
export CFLAGS+=' -DGLIB_STATIC_COMPILATION=1 -DGMODULE_STATIC_COMPILATION=1'
# If you need every feature, use this
${_arch}-cmake -DBUILD_SHARED_LIBS=0 -Denable-portaudio=1 -Denable-dbus=0 ..
# If you only need the bare minimum to play with SF2/SF3 soundfonts with SDL2, uncomment this instead
#${_arch}-cmake -DBUILD_SHARED_LIBS=0 -Denable-aufile=0 -Denable-dbus=0 -Denable-ipv6=0 -Denable-jack=0 -Denable-ladspa=0 -Denable-midishare=0 -Denable-opensles=0 -Denable-oboe=0 -Denable-oss=0 -Denable-readline=0 -Denable-winmidi=0 -Denable-waveout=0 -Denable-network=0 -Denable-pulseaudio=0 -Denable-dsound=0 -Denable-alsa=0 -Denable-libinstpatch=0 -Denable-portaudio=0 -Denable-wasapi=0 -Denable-openmp=1 -Denable-libsndfile=0 -Denable-sdl2=1 ..
# If you only need the bare minimum to play with SF2/SF3 soundfonts with SDL2, uncomment this instead
${_arch}-cmake -DBUILD_SHARED_LIBS=0 -Denable-aufile=0 -Denable-dbus=0 -Denable-ipv6=0 -Denable-jack=0 -Denable-ladspa=0 -Denable-midishare=0 -Denable-opensles=0 -Denable-oboe=0 -Denable-oss=0 -Denable-readline=0 -Denable-winmidi=1 -Denable-waveout=0 -Denable-network=0 -Denable-pulseaudio=0 -Denable-dsound=0 -Denable-alsa=0 -Denable-libinstpatch=0 -Denable-portaudio=0 -Denable-wasapi=0 -Denable-openmp=1 -Denable-libsndfile=0 -Denable-sdl2=1 ..
make
popd
done

View File

@ -3,8 +3,8 @@ pkgname='pianobooster-custom'
pkgdesc='A MIDI file player that teaches you how to play the piano (with custom, experimental patches)'
pkgver=1.0.1
pkgrel=1
depends=('ftgl' 'hicolor-icon-theme' 'qt6-base' 'libfluidsynth.so' 'librtmidi.so' 'libqtutilities-qt6.so' 'libc++utilities.so')
makedepends=('git' 'cmake' 'qt6-tools' 'qt6-5compat' 'ninja')
depends=('ftgl' 'hicolor-icon-theme' 'qt6-base' 'libfluidsynth.so' 'librtmidi.so' 'libqtutilities-qt6.so')
makedepends=('git' 'cmake' 'clang' 'qt6-tools' 'qt6-5compat' 'qt6-declarative' 'ninja')
optdepends=('qt6-translations')
conflicts=('pianobooster')
arch=('x86_64')
@ -25,6 +25,7 @@ build () {
-DCMAKE_INSTALL_PREFIX=/usr \
-DUSE_SYSTEM_FONT=ON \
-DUSE_JACK=ON \
-DWITH_INTERNAL_FLUIDSYNTH=ON \
-DCONFIGURATION_PACKAGE_SUFFIX_QTUTILITIES=-qt6 \
-DQT_PACKAGE_PREFIX=Qt6 \
-DWITH_MAN=ON \

View File

@ -13,7 +13,8 @@ source=("${_pkgname}::${MARTCHUS_GIT_URL_PREFIX:-git+https://github.com/Martchus
sha256sums=(SKIP)
options=(!buildflags staticlibs !strip !emptydirs)
_architectures=('i686-w64-mingw32' 'x86_64-w64-mingw32')
#_architectures=('i686-w64-mingw32' 'x86_64-w64-mingw32')
_architectures=('x86_64-w64-mingw32')
pkgver() {
cd "${srcdir}/${_pkgname}"
@ -25,6 +26,7 @@ build () {
for _arch in "${_architectures[@]}"; do
${_arch}-cmake-static \
-B "build-${_arch}-static" \
-G Ninja \
-DCMAKE_BUILD_TYPE:STRING='Release' \
-DCMAKE_INSTALL_PREFIX="/usr/${_arch}" \
-DCONFIGURATION_NAME:STRING="static-qt6" \
@ -45,10 +47,12 @@ build () {
-DENABLE_TARGETS_FOR_MINGW64_CROSS_PACKAGING:BOOL=ON \
-DQT_PACKAGE_PREFIX=Qt6 \
-DCMAKE_POLICY_DEFAULT_CMP0057=NEW \
-DWITH_INTERNAL_FLUIDSYNTH:BOOL=OFF \
-DWITH_INTERNAL_FLUIDSYNTH:BOOL=ON \
-DUSE_FTGL:BOOL=OFF \
-DWITH_MAN=ON \
.
sed -i 's|-lintl|-lintl -liconv|g' "build-${_arch}-static/build.ninja"
sed -i 's|-Wl,-Bdynamic /usr/x86_64-w64-mingw32/lib/libSDL2.dll.a|-lSDL2 -lwinmm -lsetupapi -limm32 -lversion|g' "build-${_arch}-static/build.ninja"
VERBOSE=1 cmake --build "build-${_arch}-static"
done
}