1 |
|
# Copyright 1999-2024 Gentoo Authors
|
|
1 |
# Copyright 1999-2025 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
6 |
MY_P="SDL2_mixer-${PV}"
|
7 |
|
inherit multilib-minimal
|
|
7 |
inherit cmake-multilib
|
8 |
8 |
|
9 |
9 |
DESCRIPTION="Simple Direct Media Layer Mixer Library"
|
10 |
10 |
HOMEPAGE="https://github.com/libsdl-org/SDL_mixer"
|
... | ... | |
13 |
13 |
|
14 |
14 |
LICENSE="ZLIB"
|
15 |
15 |
SLOT="0"
|
16 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv sparc x86"
|
17 |
|
IUSE="flac fluidsynth midi mod mp3 opus playtools static-libs timidity tremor vorbis +wav"
|
|
16 |
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~ppc ppc64 ~riscv sparc x86"
|
|
17 |
IUSE="flac fluidsynth gme midi mod modplug mp3 opus playtools stb timidity tremor vorbis +wav wavpack xmp"
|
18 |
18 |
REQUIRED_USE="
|
19 |
19 |
midi? ( || ( timidity fluidsynth ) )
|
20 |
20 |
timidity? ( midi )
|
21 |
21 |
fluidsynth? ( midi )
|
|
22 |
|
|
23 |
vorbis? ( ?? ( stb tremor ) )
|
|
24 |
stb? ( vorbis )
|
22 |
25 |
tremor? ( vorbis )
|
|
26 |
|
|
27 |
mod? ( || ( modplug xmp ) )
|
|
28 |
modplug? ( mod )
|
|
29 |
xmp? ( mod )
|
23 |
30 |
"
|
24 |
31 |
|
25 |
32 |
RDEPEND="
|
26 |
|
>=media-libs/libsdl2-2.0.7[${MULTILIB_USEDEP}]
|
27 |
|
flac? ( >=media-libs/flac-1.2.1-r5:=[${MULTILIB_USEDEP}] )
|
|
33 |
media-libs/libsdl2[${MULTILIB_USEDEP}]
|
|
34 |
flac? ( media-libs/flac:=[${MULTILIB_USEDEP}] )
|
28 |
35 |
midi? (
|
29 |
|
fluidsynth? ( >=media-sound/fluidsynth-1.1.6-r1:=[${MULTILIB_USEDEP}] )
|
|
36 |
fluidsynth? ( media-sound/fluidsynth:=[${MULTILIB_USEDEP}] )
|
30 |
37 |
timidity? ( media-sound/timidity++ )
|
31 |
38 |
)
|
32 |
|
mod? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
|
33 |
|
mp3? ( media-sound/mpg123[${MULTILIB_USEDEP}] )
|
34 |
|
opus? ( >=media-libs/opusfile-0.2 )
|
|
39 |
mod? (
|
|
40 |
modplug? ( media-libs/libmodplug[${MULTILIB_USEDEP}] )
|
|
41 |
xmp? ( media-libs/libxmp[${MULTILIB_USEDEP}] )
|
|
42 |
)
|
|
43 |
mp3? ( media-sound/mpg123-base[${MULTILIB_USEDEP}] )
|
|
44 |
opus? ( media-libs/opusfile[${MULTILIB_USEDEP}] )
|
35 |
45 |
vorbis? (
|
36 |
|
tremor? ( >=media-libs/tremor-0_pre20130223[${MULTILIB_USEDEP}] )
|
37 |
|
!tremor? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
|
|
46 |
stb? ( dev-libs/stb )
|
|
47 |
tremor? ( media-libs/tremor[${MULTILIB_USEDEP}] )
|
|
48 |
!stb? ( !tremor? ( media-libs/libvorbis[${MULTILIB_USEDEP}] ) )
|
38 |
49 |
)
|
|
50 |
gme? ( media-libs/game-music-emu[${MULTILIB_USEDEP}] )
|
|
51 |
wavpack? ( media-sound/wavpack[${MULTILIB_USEDEP}] )
|
39 |
52 |
"
|
40 |
53 |
DEPEND="${RDEPEND}"
|
41 |
54 |
|
42 |
|
src_prepare() {
|
43 |
|
default
|
44 |
|
|
45 |
|
multilib_copy_sources
|
46 |
|
}
|
47 |
|
|
48 |
55 |
multilib_src_configure() {
|
49 |
|
local myeconfargs=(
|
50 |
|
$(use_enable static-libs static)
|
51 |
|
--disable-sdltest
|
52 |
|
--enable-music-cmd
|
53 |
|
$(use_enable wav music-wave)
|
54 |
|
$(use_enable mod music-mod)
|
55 |
|
$(use_enable mod music-mod-modplug)
|
56 |
|
--disable-music-mod-modplug-shared
|
57 |
|
$(use_enable midi music-midi)
|
58 |
|
$(use_enable timidity music-midi-timidity)
|
59 |
|
$(use_enable fluidsynth music-midi-fluidsynth)
|
60 |
|
--disable-music-midi-fluidsynth-shared
|
61 |
|
$(use_enable vorbis music-ogg)
|
62 |
|
--disable-music-ogg-stb
|
63 |
|
$(usex vorbis \
|
64 |
|
$(use_enable !tremor music-ogg-vorbis) \
|
65 |
|
--disable-music-ogg-vorbis)
|
66 |
|
--disable-music-ogg-vorbis-shared
|
67 |
|
$(use_enable tremor music-ogg-tremor)
|
68 |
|
--disable-music-ogg-tremor-shared
|
69 |
|
$(use_enable flac music-flac)
|
70 |
|
$(use_enable flac music-flac-libflac)
|
71 |
|
--disable-music-flac-libflac-shared
|
72 |
|
$(use_enable mp3 music-mp3)
|
73 |
|
$(use_enable mp3 music-mp3-mpg123)
|
74 |
|
--disable-music-mp3-mpg123-shared
|
75 |
|
$(use_enable opus music-opus)
|
76 |
|
--disable-music-opus-shared
|
|
56 |
local mycmakeargs=(
|
|
57 |
-DSDL2MIXER_DEPS_SHARED=no # aka, no dlopen() (bug #950965)
|
|
58 |
-DSDL2MIXER_CMD=yes
|
|
59 |
-DSDL2MIXER_WAVE=$(usex wav)
|
|
60 |
-DSDL2MIXER_MOD=$(usex mod)
|
|
61 |
-DSDL2MIXER_MOD_MODPLUG=$(usex modplug)
|
|
62 |
-DSDL2MIXER_MOD_XMP=$(usex xmp)
|
|
63 |
-DSDL2MIXER_MIDI=$(usex midi)
|
|
64 |
-DSDL2MIXER_MIDI_TIMIDITY=$(usex timidity)
|
|
65 |
-DSDL2MIXER_MIDI_FLUIDSYNTH=$(usex fluidsynth)
|
|
66 |
-DSDL2MIXER_VORBIS=$(usex vorbis $(usex stb STB $(usex tremor TREMOR VORBISFILE) ) no )
|
|
67 |
-DSDL2MIXER_FLAC=$(usex flac)
|
|
68 |
-DSDL2MIXER_FLAC_LIBFLAC=$(usex flac)
|
|
69 |
-DSDL2MIXER_MP3=$(usex mp3)
|
|
70 |
-DSDL2MIXER_MP3_MPG123=$(usex mp3)
|
|
71 |
-DSDL2MIXER_OPUS=$(usex opus)
|
|
72 |
-DSDL2MIXER_GME=$(usex gme)
|
|
73 |
-DSDL2MIXER_WAVPACK=$(usex wavpack)
|
|
74 |
-DSDL2MIXER_SAMPLES=$(usex playtools)
|
|
75 |
-DSDL2MIXER_SAMPLES_INSTALL=$(usex playtools)
|
77 |
76 |
)
|
78 |
|
|
79 |
|
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
80 |
|
}
|
81 |
|
|
82 |
|
multilib_src_install() {
|
83 |
|
emake DESTDIR="${D}" install
|
84 |
|
if multilib_is_native_abi && use playtools ; then
|
85 |
|
emake DESTDIR="${D}" install-bin
|
86 |
|
fi
|
|
77 |
cmake_src_configure
|
87 |
78 |
}
|
88 |
79 |
|
89 |
80 |
multilib_src_install_all() {
|
90 |
81 |
dodoc {CHANGES,README}.txt
|
91 |
|
find "${D}" -name '*.la' -delete || die
|
|
82 |
rm -r "${ED}"/usr/share/licenses || die
|
92 |
83 |
}
|
93 |
84 |
|
94 |
85 |
pkg_postinst() {
|