# fluidsynth/cfg - "Build" settings for package

#---------------------------------------------------------------------

[technotes]

1. The source tarball used by this  package was created based on "git"
upstream sources. The following command was used:

      ocgitfetch --run \
--checkout=v2.3.5 \
https://github.com/FluidSynth/fluidsynth.git

#---------------------------------------------------------------------

[buildtimes]

#---------------------------------------------------------------------

[settings]
compiler = clang
license  = See "license*.txt" in installed tree
licfile  = LICENSE
tmpsize  = 23M

setpaths = alsa fluidsynth pulseaudio

#---------------------------------------------------------------------

[depends]
alsa
cmake
db
dbus
deco
gtkcore
jackone
ladspa
libbsd
libsamplerate
libsndfile
libxslt
ncurses
p7zip
pkgconf
pulseaudio
readline
sdl:forward
tcp-wrappers
xorg

#---------------------------------------------------------------------

[configure]
mkdir obj && cd obj
cmake \
    -DCMAKE_BUILD_TYPE=RELEASE           \
    -DCMAKE_INSTALL_PREFIX=$PKGDIR_PROD  \
    -DCMAKE_INSTALL_LIBDIR=lib           \
    ..

#---------------------------------------------------------------------

[build]
cd obj
smpmake && make install

#---------------------------------------------------------------------

[postbuild]
SF2DIR=$PKGDIR_PROD/share/soundfonts
XTMPDIR=$PKGDIR_PROD/tmp

mkdir -p $SF2DIR $XTMPDIR
cd $XTMPDIR
for x in $PKGDIR_SPECIAL/sf2*.{7z,zip}
do
    if [ -f $x ]; then
        deco $x
        mv */*.sf2 $SF2DIR/
    fi
done

cd $SF2DIR
rm -fr $XTMPDIR
ln -nsf `ls *.sf2 | grep -v default.sf2 | head -1` default.sf2

#---------------------------------------------------------------------

# Original URLs. These URLs were valid at one point, but may have died
# since then. If you download newer versions of tarballs [etc.], don't
# delete  the  original versions,  as you may not  be able  to replace
# them.

[urls]
url_debian  = tbd
url_home    = tbd
url_lfs     = tbd
url_tarball = git               # See "technotes" in "cfg" file

#---------------------------------------------------------------------

[history]
211112 Added package. Started with a3dd7fddc ("git" hash).
240609 Updated to 619fc5c33 - Same as 2.3.5
240609 Prefer "sdl2" audio driver to "alsa"