1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit cmake-multilib systemd
8 DESCRIPTION="Software real-time synthesizer based on the Soundfont 2 specifications"
9 HOMEPAGE="http://www.fluidsynth.org/"
10 SRC_URI="https://github.com/FluidSynth/fluidsynth/archive/v${PV}.tar.gz -> ${P}.tar.gz"
14 KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ppc ppc64 sparc x86"
15 IUSE="alsa dbus debug examples ipv6 jack ladspa lash oss portaudio pulseaudio +readline +sndfile systemd"
18 virtual/pkgconfig[${MULTILIB_USEDEP}]
21 dev-libs/glib:2[${MULTILIB_USEDEP}]
23 media-libs/alsa-lib[${MULTILIB_USEDEP}]
24 lash? ( media-sound/lash[${MULTILIB_USEDEP}] )
26 dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
27 jack? ( virtual/jack[${MULTILIB_USEDEP}] )
29 media-libs/ladspa-cmt[${MULTILIB_USEDEP}]
30 media-libs/ladspa-sdk[${MULTILIB_USEDEP}]
32 portaudio? ( media-libs/portaudio[${MULTILIB_USEDEP}] )
33 pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
34 readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
35 sndfile? ( media-libs/libsndfile[${MULTILIB_USEDEP}] )
39 DOCS=( AUTHORS NEWS README.md THANKS TODO doc/{fluidsynth-v20-devdoc,xtrafluid}.txt )
43 -Denable-alsa=$(usex alsa)
44 -Denable-dbus=$(usex dbus)
45 -Denable-debug=$(usex debug)
46 -Denable-ipv6=$(usex ipv6)
47 -Denable-jack=$(usex jack)
48 -Denable-ladspa=$(usex ladspa)
49 -Denable-oss=$(usex oss)
50 -Denable-libsndfile=$(usex sndfile)
51 -Denable-portaudio=$(usex portaudio)
52 -Denable-pulseaudio=$(usex pulseaudio)
53 -Denable-readline=$(usex readline)
54 -Denable-systemd=$(usex systemd)
58 mycmakeargs+=( -Denable-lash=$(usex lash) )
60 mycmakeargs+=( -Denable-lash=OFF )
64 mycmakeargs+=( -DFLUID_DAEMON_ENV_FILE="/etc/fluidsynth.conf" )
67 cmake-multilib_src_configure
70 install_systemd_files() {
71 if multilib_is_native_abi; then
72 systemd_dounit "${BUILD_DIR}/fluidsynth.service"
74 doins "${BUILD_DIR}/fluidsynth.conf"
79 cmake-multilib_src_install
90 multilib_foreach_abi install_systemd_files
92 elog "When using fluidsynth as a systemd service, make sure"
93 elog "to configure your fluidsynth settings globally in "
94 elog "/etc/fluidsynth.conf or per-user in ~/.config/fluidsynth"