kumquat-buildroot/package/sdl_mixer/sdl_mixer.mk
Rodrigo Rebello 770965edfc sdl_mixer: add patch to fix SDL_mixer.pc for static linking
A 'Libs.private' field needs to be present and properly defined in the
pkg-config file in order for static linking against SDL_mixer to work.

Besides adding the mentioned field, the included patch also modifies
configure.in so that EXTRA_LDFLAGS (which is now also used as the value
of 'Libs.private') no longer includes SDL_LIBS. This is done so as to
prevent libraries required by SDL from being listed twice when
'pkg-config --libs --static SDL_mixer' is run (they're already shown
because of the 'Requires: sdl' line in SDL_mixer.pc). Makefile.in is
adjusted accordingly as well.

Also enable autoreconf for this package since we're patching
configure.in.

Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-03-06 15:59:25 +01:00

43 lines
1.1 KiB
Makefile

################################################################################
#
# sdl_mixer
#
################################################################################
SDL_MIXER_VERSION = 1.2.12
SDL_MIXER_SOURCE = SDL_mixer-$(SDL_MIXER_VERSION).tar.gz
SDL_MIXER_SITE = http://www.libsdl.org/projects/SDL_mixer/release
SDL_MIXER_LICENSE = zlib
SDL_MIXER_LICENSE_FILES = COPYING
SDL_MIXER_INSTALL_STAGING = YES
SDL_MIXER_DEPENDENCIES = sdl
# We're patching configure.in, so we need to autoreconf
SDL_MIXER_AUTORECONF = YES
SDL_MIXER_AUTORECONF_OPTS = -Iacinclude
SDL_MIXER_CONF_OPTS = \
--without-x \
--with-sdl-prefix=$(STAGING_DIR)/usr \
--disable-music-midi \
--disable-music-mod \
--disable-music-mp3 \
--disable-music-flac # configure script fails when cross compiling
ifeq ($(BR2_PACKAGE_LIBMAD),y)
SDL_MIXER_CONF_OPTS += --enable-music-mp3-mad-gpl
SDL_MIXER_DEPENDENCIES += libmad
else
SDL_MIXER_CONF_OPTS += --disable-music-mp3-mad-gpl
endif
ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
SDL_MIXER_CONF_OPTS += --enable-music-ogg
SDL_MIXER_DEPENDENCIES += libvorbis
else
SDL_MIXER_CONF_OPTS += --disable-music-ogg
endif
$(eval $(autotools-package))