mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 12:58:16 -07:00
media-libs/sdl3-mixer: new package, add 3.0.0_pre20250404
This adds USE `drlibs` when compared with `media-libs/sdl2-mixer`, which may be used to avoid depending on system libraries for flac and mp3, though likely at the expense of performance. It is up to the user to determine the appropriate trade-off. signed-off-by: Matt Jolly <kangie@gentoo.org>
This commit is contained in:
1
media-libs/sdl3-mixer/Manifest
Normal file
1
media-libs/sdl3-mixer/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST sdl3-mixer-3.0.0_pre20250404.tar.gz 3372186 BLAKE2B d874679a7b5a04c510b94564344d5d409f72ad24869a9c1e5789f4c33ee6e3518711b7c4ea299ee2c05cc4e832ea81042afd58db1113406a724e933f76fc7571 SHA512 077c32783540a0b430a84d2320322b136e9c327aca2af4f0588459c404e1814a064a6a448868fefb6d300575581e2546a24ed3eb917f9a6af93a7176642ea870
|
||||
35
media-libs/sdl3-mixer/metadata.xml
Normal file
35
media-libs/sdl3-mixer/metadata.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>games@gentoo.org</email>
|
||||
<name>Gentoo Games Project</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>kangie@gentoo.org</email>
|
||||
<name>Matt Jolly</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
A simple multi-channel audio mixer that supports 8 channels of 16 bit stereo audio, plus a single channel of music.
|
||||
It can load FLAC, MP3, Ogg, VOC, and WAV format audio.
|
||||
It can also load MIDI, MOD, and Opus audio, depending on build options.
|
||||
It is a part of the SDL project, and is used by many games and applications.
|
||||
</longdescription>
|
||||
<use>
|
||||
<flag name="drlibs">Use vendored dr_{flac,mp3} instead of <pkg>media-libs/flac</pkg> and/or <pkg>media-sound/mpg123-base</pkg> for those formats</flag>
|
||||
<flag name="fluidsynth">Use <pkg>media-sound/fluidsynth</pkg> for MIDI support</flag>
|
||||
<flag name="gme">Support additional music formats with <pkg>media-libs/game-music-emu</pkg></flag>
|
||||
<flag name="midi">Basic support for MIDI files</flag>
|
||||
<flag name="mod">Basic support for MOD files</flag>
|
||||
<flag name="modplug">Support MOD via <pkg>media-libs/libmodplug</pkg></flag>
|
||||
<flag name="playtools">Install playwave and playmus tools (useful for testing)</flag>
|
||||
<flag name="stb">Use <pkg>dev-libs/stb</pkg> instead of <pkg>media-libs/libvorbis</pkg> for OGG Vorbis support</flag>
|
||||
<flag name="tremor">Use <pkg>media-libs/tremor</pkg> instead of <pkg>media-libs/libvorbis</pkg> for OGG Vorbis support</flag>
|
||||
<flag name="wav">Support WAVE files</flag>
|
||||
<flag name="wavpack">Support WavPack files</flag>
|
||||
<flag name="xmp">Support MOD via <pkg>media-libs/libxmp</pkg></flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">libsdl-org/SDL_mixer</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
108
media-libs/sdl3-mixer/sdl3-mixer-3.0.0_pre20250404.ebuild
Normal file
108
media-libs/sdl3-mixer/sdl3-mixer-3.0.0_pre20250404.ebuild
Normal file
@@ -0,0 +1,108 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MY_COMMIT=68764f35899e133b402336843c046d75136eaf08
|
||||
inherit cmake-multilib
|
||||
|
||||
DESCRIPTION="Simple Direct Media Layer Mixer Library"
|
||||
HOMEPAGE="https://github.com/libsdl-org/SDL_mixer"
|
||||
SRC_URI="https://codeload.github.com/libsdl-org/SDL_mixer/tar.gz/${MY_COMMIT} -> ${P}.tar.gz"
|
||||
|
||||
S="${WORKDIR}/SDL_mixer-${MY_COMMIT}"
|
||||
|
||||
LICENSE="ZLIB"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="drlibs flac fluidsynth gme midi mod modplug mp3 opus playtools"
|
||||
IUSE+=" sndfile stb timidity tremor vorbis +wav wavpack xmp"
|
||||
REQUIRED_USE="
|
||||
drlibs? ( || ( flac mp3 ) )
|
||||
midi? ( || ( timidity fluidsynth ) )
|
||||
timidity? ( midi )
|
||||
fluidsynth? ( midi )
|
||||
|
||||
vorbis? ( ?? ( stb tremor ) )
|
||||
stb? ( vorbis )
|
||||
tremor? ( vorbis )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
media-libs/libsdl3[${MULTILIB_USEDEP}]
|
||||
!drlibs? (
|
||||
flac? ( media-libs/flac:=[${MULTILIB_USEDEP}] )
|
||||
mp3? ( media-sound/mpg123-base[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
gme? ( media-libs/game-music-emu[${MULTILIB_USEDEP}] )
|
||||
midi? (
|
||||
fluidsynth? ( media-sound/fluidsynth:=[${MULTILIB_USEDEP}] )
|
||||
timidity? ( media-sound/timidity++ )
|
||||
)
|
||||
mod? ( media-libs/libxmp[${MULTILIB_USEDEP}] )
|
||||
|
||||
opus? ( media-libs/opusfile[${MULTILIB_USEDEP}] )
|
||||
vorbis? (
|
||||
tremor? ( media-libs/tremor[${MULTILIB_USEDEP}] )
|
||||
!stb? ( !tremor? ( media-libs/libvorbis[${MULTILIB_USEDEP}] ) )
|
||||
)
|
||||
gme? ( media-libs/game-music-emu[${MULTILIB_USEDEP}] )
|
||||
wavpack? ( media-sound/wavpack[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DSDLMIXER_DEPS_SHARED=no # aka, no dlopen() (bug #950965)
|
||||
-DSDLMIXER_FLAC=$(usex flac)
|
||||
-DSDLMIXER_FLAC_LIBFLAC=$(usex flac $(usex drlibs no yes) no)
|
||||
-DSDLMIXER_FLAC_DRFLAC=$(usex drlibs)
|
||||
-DSDLMIXER_GME=$(usex gme)
|
||||
-DSDLMIXER_GME_SHARED=no
|
||||
-DSDLMIXER_INSTALL_MAN=yes
|
||||
-DSDLMIXER_MIDI=$(usex midi)
|
||||
-DSDLMIXER_MIDI_FLUIDSYNTH=$(usex fluidsynth)
|
||||
-DSDLMIXER_MIDI_FLUIDSYNTH_SHARED=no
|
||||
-DSDLMIXER_MIDI_TIMIDITY=$(usex timidity)
|
||||
-DSDLMIXER_MOD=$(usex mod)
|
||||
-DSDLMIXER_MOD_XMP=$(usex mod)
|
||||
-DSDLMIXER_MOD_XMP_LITE=no
|
||||
-DSDLMIXER_MOD_XMP_SHARED=no
|
||||
-DSDLMIXER_MP3=$(usex mp3)
|
||||
-DSDLMIXER_MP3_DRMP3=$(usex drlibs)
|
||||
-DSDLMIXER_MP3_MPG123=$(usex mp3 $(usex drlibs no yes) no)
|
||||
-DSDLMIXER_OPUS=$(usex opus)
|
||||
-DSDLMIXER_OPUS_SHARED=no
|
||||
-DSDLMIXER_SAMPLES=$(usex playtools)
|
||||
-DSDLMIXER_SAMPLES_INSTALL=$(usex playtools)
|
||||
-DSDLMIXER_SNDFILE=$(usex sndfile)
|
||||
-DSDLMIXER_SNDFILE_SHARED=no
|
||||
-DSDLMIXER_STRICT=yes # Fail when a dependency could not be found
|
||||
-DSDLMIXER_VENDORED=no # Use vendored third-party libraries
|
||||
-DSDLMIXER_VORBIS=$(usex vorbis $(usex stb STB $(usex tremor TREMOR VORBISFILE) ) no )
|
||||
-DSDLMIXER_WAVE=$(usex wav)
|
||||
-DSDLMIXER_WAVPACK=$(usex wavpack)
|
||||
-DSDLMIXER_WAVPACK_DSD=$(usex wavpack) # seems to be default-enabled in wavpack
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
dodoc {CHANGES,README}.txt
|
||||
rm -r "${ED}"/usr/share/licenses || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# bug #412035
|
||||
if use midi && use fluidsynth; then
|
||||
ewarn "FluidSynth support requires you to set the SDL_SOUNDFONTS"
|
||||
ewarn "environment variable to the location of a SoundFont file"
|
||||
ewarn "unless the game or application happens to do this for you."
|
||||
if use timidity; then
|
||||
ewarn "Failing to do so will result in Timidity being used instead."
|
||||
else
|
||||
ewarn "Failing to do so will result in silence."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user