freebsd-ports/audio/sdl2_mixer/Makefile
2023-04-25 17:17:15 +02:00

85 lines
2.2 KiB
Makefile

PORTNAME= sdl2_mixer
DISTVERSIONPREFIX= release-
DISTVERSION= 2.6.3
PORTREVISION= 1
CATEGORIES= audio
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Sample multi-channel audio mixer library
WWW= https://github.com/libsdl-org/SDL_mixer
LICENSE= ZLIB
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
USES= cmake sdl
USE_GITHUB= yes
GH_ACCOUNT= libsdl-org
GH_PROJECT= SDL_mixer
USE_SDL= sdl2
CMAKE_OFF= SDL2MIXER_SAMPLES \
SDL2MIXER_DEPS_SHARED \
SDL2MIXER_FLAC_LIBFLAC_SHARED \
SDL2MIXER_MOD_MODPLUG_SHARED \
SDL2MIXER_MOD_XMP_SHARED \
SDL2MIXER_MP3_MPG123_SHARED \
SDL2MIXER_MIDI_FLUIDSYNTH_SHARED \
SDL2MIXER_OPUS_SHARED \
SDL2MIXER_VORBIS_TREMOR_SHARED \
SDL2MIXER_VORBIS_VORBISFILE_SHARED \
SDL2MIXER_FLAC_DRFLAC \
SDL2MIXER_MP3_DRMP3 \
SDL2MIXER_MIDI_TIMIDITY
CMAKE_ARGS= -DSDL2MIXER_DEBUG_POSTFIX:STRING=
USE_LDCONFIG= yes
OPTIONS_DEFINE= FLAC OPUS MPG123 FLUIDSYNTH
OPTIONS_RADIO= MOD OGG
OPTIONS_RADIO_MOD= MODPLUG XMP
OPTIONS_RADIO_OGG= VORBIS TREMOR
OPTIONS_DEFAULT= FLUIDSYNTH MODPLUG FLAC OPUS MPG123
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Msoftfp}
OPTIONS_DEFAULT+= TREMOR
.else
OPTIONS_DEFAULT+= VORBIS
.endif
MOD_DESC= Tracker music support
MODPLUG_LIB_DEPENDS= libmodplug.so:audio/libmodplug
MODPLUG_CMAKE_BOOL= SDL2MIXER_MOD_MODPLUG
XMP_DESC= MOD music via libxmp
XMP_LIB_DEPENDS= libxmp.so:audio/libxmp
XMP_CMAKE_BOOL= SDL2MIXER_MOD_XMP
FLUIDSYNTH_LIB_DEPENDS= libfluidsynth.so:audio/fluidsynth
FLUIDSYNTH_CMAKE_BOOL= SDL2MIXER_MIDI SDL2MIXER_MIDI_FLUIDSYNTH
# TODO: add timidity?
VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis
VORBIS_CMAKE_ON= -DSDL2MIXER_VORBIS="VORBISFILE"
TREMOR_LIB_DEPENDS= libvorbisidec.so:audio/libtremor
TREMOR_CMAKE_ON= -DSDL2MIXER_VORBIS="TREMOR"
MPG123_LIB_DEPENDS= libmpg123.so:audio/mpg123
MPG123_CMAKE_BOOL= SDL2MIXER_MP3 SDL2MIXER_MP3_MPG123
FLAC_LIB_DEPENDS= libFLAC.so:audio/flac
FLAC_CMAKE_BOOL= SDL2MIXER_FLAC SDL2MIXER_FLAC_LIBFLAC
OPUS_LIB_DEPENDS= libopusfile.so:audio/opusfile
OPUS_CMAKE_BOOL= SDL2MIXER_OPUS
.include <bsd.port.options.mk>
.if !${PORT_OPTIONS:MXMP} && !${PORT_OPTIONS:MMODPLUG}
CMAKE_OFF+= SDL2MIXER_MOD
.endif
.if !${PORT_OPTIONS:MVORBIS} && !${PORT_OPTIONS:MTREMOR}
CMAKE_ARGS+= -DSDL2MIXER_VORBIS=""
.endif
.include <bsd.port.mk>