xref: /OK3568_Linux_fs/buildroot/package/sdl_mixer/sdl_mixer.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# sdl_mixer
4#
5################################################################################
6
7# The latest officially released version of SDL_mixer is 1.2.12, released in 2012.
8# Since then, there have been many bugfixes on master.
9#
10# This commit points to the SDL-1.2 branch from 15 Mar 2021.
11SDL_MIXER_VERSION = d1725fcb7c4e987aeb7ecdc94cb8b6375b702170
12SDL_MIXER_SITE = $(call github,libsdl-org,SDL_mixer,$(SDL_MIXER_VERSION))
13SDL_MIXER_LICENSE = Zlib
14SDL_MIXER_LICENSE_FILES = COPYING
15
16# Package does not build in parallel due to improper make rules
17SDL_MIXER_MAKE = $(MAKE1)
18
19SDL_MIXER_INSTALL_STAGING = YES
20SDL_MIXER_DEPENDENCIES = sdl
21
22# We're patching configure.in, so we need to autoreconf
23SDL_MIXER_AUTORECONF = YES
24
25SDL_MIXER_CONF_OPTS = \
26	--with-sdl-prefix=$(STAGING_DIR)/usr \
27	--disable-music-mod \
28	--disable-music-mp3 \
29	--disable-music-flac # configure script fails when cross compiling
30
31ifeq ($(BR2_PACKAGE_FLUIDSYNTH),y)
32SDL_MIXER_DEPENDENCIES += fluidsynth
33SDL_MIXER_CONF_OPTS += \
34	--enable-music-midi \
35	--enable-music-fluidsynth-midi
36SDL_MIXER_HAS_MIDI = YES
37endif
38
39ifeq ($(BR2_PACKAGE_SDL_MIXER_MIDI_TIMIDITY),y)
40SDL_MIXER_CONF_OPTS += \
41	--enable-music-midi \
42	--enable-music-timidity-midi
43SDL_MIXER_HAS_MIDI = YES
44endif
45
46ifneq ($(SDL_MIXER_HAS_MIDI),YES)
47SDL_MIXER_CONF_OPTS += --disable-music-midi
48endif
49
50ifeq ($(BR2_PACKAGE_LIBMAD),y)
51SDL_MIXER_CONF_OPTS += --enable-music-mp3-mad-gpl
52SDL_MIXER_DEPENDENCIES += libmad
53else
54SDL_MIXER_CONF_OPTS += --disable-music-mp3-mad-gpl
55endif
56
57ifeq ($(BR2_PACKAGE_LIBMODPLUG),y)
58SDL_MIXER_CONF_OPTS += --enable-music-mod-modplug
59SDL_MIXER_DEPENDENCIES += host-pkgconf libmodplug
60else
61SDL_MIXER_CONF_OPTS += --disable-music-mod-modplug
62endif
63
64ifeq ($(BR2_PACKAGE_TREMOR),y)
65SDL_MIXER_CONF_OPTS += --enable-music-ogg-tremor
66SDL_MIXER_DEPENDENCIES += tremor
67else ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
68SDL_MIXER_CONF_OPTS += --enable-music-ogg
69SDL_MIXER_DEPENDENCIES += libvorbis
70else
71SDL_MIXER_CONF_OPTS += --disable-music-ogg
72endif
73
74$(eval $(autotools-package))
75