| 1 |
|
# Copyright 1999-2025 Gentoo Authors
|
|
1 |
# Copyright 1999-2026 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
|
6 |
# doc/android/fluidsynth-assetloader/CMakeLists.txt unused
|
|
7 |
CMAKE_QA_COMPAT_SKIP=yes
|
| 6 |
8 |
inherit cmake-multilib systemd toolchain-funcs tmpfiles
|
| 7 |
9 |
|
|
10 |
# gcem is headers-only
|
|
11 |
HASH_GCEM="012ae73c6d0a2cb09ffe86475f5c6fba3926e200"
|
| 8 |
12 |
DESCRIPTION="Software real-time synthesizer based on the Soundfont 2 specifications"
|
| 9 |
13 |
HOMEPAGE="https://www.fluidsynth.org"
|
| 10 |
|
SRC_URI="https://github.com/FluidSynth/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
14 |
SRC_URI="
|
|
15 |
https://github.com/FluidSynth/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
|
16 |
https://github.com/kthohr/gcem/archive/${HASH_GCEM}.tar.gz -> gcem-${HASH_GCEM}.tar.gz
|
|
17 |
"
|
| 11 |
18 |
|
| 12 |
|
LICENSE="LGPL-2.1+"
|
|
19 |
# Apache-2.0 for gcem
|
|
20 |
LICENSE="Apache-2.0 LGPL-2.1+"
|
| 13 |
21 |
SLOT="0/3"
|
| 14 |
|
KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~sparc x86"
|
|
22 |
KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~sparc x86"
|
| 15 |
23 |
IUSE="alsa dbus debug doc ipv6 jack ladspa openmp oss pipewire portaudio pulseaudio +readline sdl +sndfile systemd threads"
|
| 16 |
24 |
|
| 17 |
25 |
BDEPEND="
|
| ... | ... | |
| 22 |
30 |
)
|
| 23 |
31 |
"
|
| 24 |
32 |
DEPEND="
|
| 25 |
|
dev-libs/glib:2[${MULTILIB_USEDEP}]
|
| 26 |
|
alsa? (
|
| 27 |
|
media-libs/alsa-lib[${MULTILIB_USEDEP}]
|
| 28 |
|
)
|
|
33 |
alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
|
| 29 |
34 |
dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
|
| 30 |
35 |
jack? ( virtual/jack[${MULTILIB_USEDEP}] )
|
| 31 |
36 |
ladspa? (
|
| 32 |
37 |
media-libs/ladspa-sdk[${MULTILIB_USEDEP}]
|
| 33 |
38 |
media-plugins/cmt-plugins[${MULTILIB_USEDEP}]
|
| 34 |
39 |
)
|
| 35 |
|
pipewire? (
|
| 36 |
|
media-video/pipewire:0=[${MULTILIB_USEDEP}]
|
| 37 |
|
)
|
|
40 |
pipewire? ( media-video/pipewire:0=[${MULTILIB_USEDEP}] )
|
| 38 |
41 |
portaudio? ( media-libs/portaudio[${MULTILIB_USEDEP}] )
|
| 39 |
42 |
pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
|
| 40 |
43 |
readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
|
| ... | ... | |
| 46 |
49 |
|
| 47 |
50 |
DOCS=( AUTHORS CONTRIBUTING.md README.md THANKS TODO doc/fluidsynth-v20-devdoc.txt )
|
| 48 |
51 |
|
|
52 |
PATCHES=(
|
|
53 |
"${FILESDIR}"/${PN}-2.5.2-big-endian.patch
|
|
54 |
)
|
|
55 |
|
| 49 |
56 |
pkg_pretend() {
|
| 50 |
57 |
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
|
| 51 |
58 |
}
|
| ... | ... | |
| 54 |
61 |
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
|
| 55 |
62 |
}
|
| 56 |
63 |
|
| 57 |
|
src_prepare() {
|
| 58 |
|
# https://bugs.gentoo.org/833979#c17
|
| 59 |
|
sed -i "/CONFIGURE_COMMAND/{n;s/$/ -DCMAKE_C_COMPILER=$(tc-getBUILD_CC)/}" \
|
| 60 |
|
src/CMakeLists.txt || die
|
| 61 |
|
cmake_src_prepare
|
|
64 |
src_unpack() {
|
|
65 |
default
|
|
66 |
rmdir "${S}"/gcem || die
|
|
67 |
ln -sfT ../gcem-${HASH_GCEM} "${S}"/gcem || die
|
| 62 |
68 |
}
|
| 63 |
69 |
|
| 64 |
70 |
src_configure() {
|
| ... | ... | |
| 72 |
78 |
-Denable-ipv6=$(usex ipv6)
|
| 73 |
79 |
-Denable-jack=$(usex jack)
|
| 74 |
80 |
-Denable-ladspa=$(usex ladspa)
|
| 75 |
|
-Denable-libinstpatch=OFF # https://github.com/swami/libinstpatch
|
|
81 |
-Denable-libinstpatch=OFF # deprecated
|
| 76 |
82 |
-Denable-midishare=OFF # http://midishare.sourceforge.net/
|
| 77 |
83 |
-Denable-network=ON
|
| 78 |
84 |
-Denable-openmp=$(usex openmp)
|
| ... | ... | |
| 80 |
86 |
-Denable-oboe=OFF # requires OpenSLES and/or AAudio
|
| 81 |
87 |
-Denable-oss=$(usex oss)
|
| 82 |
88 |
-Denable-libsndfile=$(usex sndfile)
|
|
89 |
-Denable-native-dls=ON # instead of libinstpatch
|
| 83 |
90 |
-Denable-portaudio=$(usex portaudio)
|
| 84 |
91 |
-Denable-profiling=$(usex debug)
|
| 85 |
92 |
-Denable-pulseaudio=$(usex pulseaudio)
|
| 86 |
93 |
-Denable-pipewire=$(usex pipewire)
|
| 87 |
94 |
-Denable-readline=$(usex readline)
|
| 88 |
95 |
-Denable-sdl3=$(usex sdl)
|
| 89 |
|
-Denable-sdl2=OFF
|
| 90 |
96 |
-Denable-systemd=$(multilib_native_usex systemd)
|
| 91 |
97 |
-Denable-threads=$(usex threads)
|
| 92 |
98 |
-Denable-trap-on-fpe=$(usex debug)
|
| 93 |
99 |
-Denable-ubsan=OFF # compile and link against UBSan (for debugging fluidsynth internals)
|
| 94 |
100 |
-Denable-waveout=OFF # Windows
|
| 95 |
101 |
-Denable-winmidi=OFF # Windows
|
|
102 |
-Dosal=cpp11 # instead of glib
|
| 96 |
103 |
$(cmake_use_find_package doc Doxygen)
|
| 97 |
104 |
-DFLUID_DAEMON_ENV_FILE="/etc/fluidsynth.conf"
|
| 98 |
105 |
-DDEFAULT_SOUNDFONT="/usr/share/sounds/sf2/FluidR3_GM.sf2"
|
| ... | ... | |
| 111 |
118 |
}
|
| 112 |
119 |
|
| 113 |
120 |
multilib_src_install() {
|
| 114 |
|
cmake_src_install
|
| 115 |
|
|
| 116 |
121 |
if multilib_is_native_abi ; then
|
| 117 |
122 |
systemd_dounit "${BUILD_DIR}/fluidsynth.service"
|
| 118 |
123 |
|
| ... | ... | |
| 121 |
126 |
insinto /etc
|
| 122 |
127 |
doins "${BUILD_DIR}/fluidsynth.conf"
|
| 123 |
128 |
|
| 124 |
|
if use doc ; then
|
| 125 |
|
docinto .
|
| 126 |
|
dodoc -r "${BUILD_DIR}/doc/api/html"
|
| 127 |
|
fi
|
|
129 |
use doc && HTML_DOCS=( "${BUILD_DIR}"/doc/api/html/. )
|
| 128 |
130 |
fi
|
|
131 |
|
|
132 |
cmake_src_install
|
| 129 |
133 |
}
|
| 130 |
134 |
|
| 131 |
135 |
multilib_src_install_all() {
|
| ... | ... | |
| 133 |
137 |
dodoc doc/*.pdf
|
| 134 |
138 |
|
| 135 |
139 |
docinto examples
|
| 136 |
|
dodoc doc/examples/*.c
|
|
140 |
dodoc doc/examples/*.{c,cxx}
|
| 137 |
141 |
|
| 138 |
142 |
newinitd "${FILESDIR}/fluidsynth.init" fluidsynth
|
| 139 |
143 |
newconfd "${FILESDIR}/fluidsynth.confd" fluidsynth
|