2016-08-22 20:52:34 +01:00
|
|
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
2010-10-01 11:39:03 +01:00
|
|
|
|
|
|
|
PKG := sdl_sound
|
2017-03-05 03:41:39 +00:00
|
|
|
$(PKG)_WEBSITE := https://icculus.org/SDL_sound/
|
2016-12-18 05:43:56 +00:00
|
|
|
$(PKG)_DESCR := SDL_sound
|
2010-10-01 11:39:03 +01:00
|
|
|
$(PKG)_IGNORE :=
|
2013-07-21 22:26:40 +01:00
|
|
|
$(PKG)_VERSION := 1.0.3
|
2015-09-23 09:32:58 +01:00
|
|
|
$(PKG)_CHECKSUM := 3999fd0bbb485289a52be14b2f68b571cb84e380cc43387eadf778f64c79e6df
|
2010-10-01 11:39:03 +01:00
|
|
|
$(PKG)_SUBDIR := SDL_sound-$($(PKG)_VERSION)
|
|
|
|
$(PKG)_FILE := SDL_sound-$($(PKG)_VERSION).tar.gz
|
2017-03-05 03:41:39 +00:00
|
|
|
$(PKG)_URL := https://icculus.org/SDL_sound/downloads/$($(PKG)_FILE)
|
2017-11-25 13:36:07 +00:00
|
|
|
$(PKG)_DEPS := cc flac libmikmod ogg sdl speex vorbis
|
2010-10-01 11:39:03 +01:00
|
|
|
|
|
|
|
define $(PKG)_UPDATE
|
2017-03-05 03:41:39 +00:00
|
|
|
$(WGET) -q -O- 'https://hg.icculus.org/icculus/SDL_sound/tags' | \
|
2010-10-04 02:23:07 +01:00
|
|
|
$(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \
|
2010-10-02 15:03:57 +01:00
|
|
|
head -1
|
2010-10-01 11:39:03 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(PKG)_BUILD
|
2017-11-26 07:19:42 +00:00
|
|
|
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
|
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
2010-10-01 11:39:03 +01:00
|
|
|
--with-sdl-prefix='$(PREFIX)/$(TARGET)' \
|
|
|
|
--disable-sdltest \
|
2010-10-10 11:08:28 +01:00
|
|
|
--enable-voc \
|
|
|
|
--enable-wav \
|
|
|
|
--enable-raw \
|
|
|
|
--enable-aiff \
|
|
|
|
--enable-au \
|
|
|
|
--enable-shn \
|
|
|
|
--enable-midi \
|
2010-10-10 13:07:52 +01:00
|
|
|
--disable-smpeg \
|
2010-10-10 11:08:28 +01:00
|
|
|
--enable-mpglib \
|
2017-11-26 07:19:42 +00:00
|
|
|
--$(if $(BUILD_STATIC),en,dis)able-mikmod \
|
2010-10-10 13:07:52 +01:00
|
|
|
--disable-modplug \
|
2010-10-10 11:08:28 +01:00
|
|
|
--enable-ogg \
|
|
|
|
--enable-flac \
|
|
|
|
--enable-speex \
|
2010-10-10 13:07:52 +01:00
|
|
|
--disable-physfs \
|
2010-10-10 11:08:28 +01:00
|
|
|
--disable-altcvt \
|
2010-10-10 13:43:35 +01:00
|
|
|
CFLAGS='-g -O2 -fno-inline' \
|
|
|
|
LIBS="`'$(TARGET)-pkg-config' vorbisfile flac speex --libs` `'$(PREFIX)/$(TARGET)/bin/libmikmod-config' --libs`"
|
2017-11-26 07:19:42 +00:00
|
|
|
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS)
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_PROGRAMS)
|
2010-10-10 13:07:52 +01:00
|
|
|
|
2014-10-09 09:36:49 +01:00
|
|
|
# create pkg-config file
|
|
|
|
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
|
|
|
|
(echo 'Name: $(PKG)'; \
|
|
|
|
echo 'Version: $($(PKG)_VERSION)'; \
|
|
|
|
echo 'Description: $(PKG)'; \
|
2017-11-26 07:19:42 +00:00
|
|
|
echo 'Requires: sdl vorbisfile flac speex ogg vorbis'; \
|
2014-10-09 09:36:49 +01:00
|
|
|
echo 'Libs: -lSDL_sound'; \
|
|
|
|
echo "Libs.private: `'$(PREFIX)/$(TARGET)/bin/libmikmod-config' --libs`";) \
|
2014-10-09 14:48:23 +01:00
|
|
|
> '$(PREFIX)/$(TARGET)/lib/pkgconfig/SDL_sound.pc'
|
2014-10-09 09:36:49 +01:00
|
|
|
|
2017-11-26 07:19:42 +00:00
|
|
|
$(if $(BUILD_SHARED),\
|
|
|
|
rm -f '$(PREFIX)/$(TARGET)/lib/libSDL_sound.a' && \
|
|
|
|
$(MAKE_SHARED_FROM_STATIC) '$(BUILD_DIR)/.libs/libSDL_sound.a' \
|
|
|
|
`$(TARGET)-pkg-config SDL_sound --libs-only-l | $(SED) 's/-lSDL_sound//'`)
|
|
|
|
|
2010-10-02 21:18:58 +01:00
|
|
|
'$(TARGET)-gcc' \
|
|
|
|
-W -Wall -Werror -std=c99 -pedantic \
|
2016-07-30 20:14:38 +01:00
|
|
|
'$(PWD)/src/$(PKG)-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_sound.exe' \
|
2014-10-11 02:09:28 +01:00
|
|
|
`'$(TARGET)-pkg-config' SDL_sound --cflags --libs`
|
2014-10-29 10:09:07 +00:00
|
|
|
|
2017-11-26 07:19:42 +00:00
|
|
|
mkdir -p '$(BUILD_DIR).cmake-build-test'
|
|
|
|
cp '$(PWD)/src/$(PKG)-test-CMakeLists.txt' '$(BUILD_DIR).cmake-build-test/CMakeLists.txt'
|
|
|
|
cp '$(PWD)/src/$(PKG)-test.c' '$(BUILD_DIR).cmake-build-test/'
|
|
|
|
cd '$(BUILD_DIR).cmake-build-test' && '$(TARGET)-cmake' .
|
|
|
|
$(MAKE) -C '$(BUILD_DIR).cmake-build-test' -j '$(JOBS)'
|
2010-10-01 11:39:03 +01:00
|
|
|
endef
|