new package sdl2 (release candidate)

This commit is contained in:
Martin Gerhardy 2013-07-27 10:46:58 +02:00
parent fa1f7d8082
commit 79064fa1e3
2 changed files with 40 additions and 0 deletions

View File

@ -1971,6 +1971,10 @@ USE_OSGPLUGIN(<plugin2>)
<td class="package">sdl_ttf</td>
<td class="website"><a href="http://www.libsdl.org/projects/SDL_ttf/">SDL_ttf</a></td>
</tr>
<tr>
<td class="package">sdl2</td>
<td class="website"><a href="http://www.libsdl.org/">SDL2</a></td>
</tr>
<tr>
<td class="package">sfml</td>
<td class="website"><a href="http://www.sfml-dev.org/">SFML</a></td>

36
src/sdl2.mk Normal file
View File

@ -0,0 +1,36 @@
# This file is part of MXE.
# See index.html for further information.
PKG := sdl2
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.0.0
$(PKG)_CHECKSUM := 84e5fdc67f5c1dffe82775ce6a266141be2eda53
$(PKG)_SUBDIR := SDL2-$($(PKG)_VERSION)
$(PKG)_FILE := SDL2-$($(PKG)_VERSION).tar.gz
#$(PKG)_URL := http://www.libsdl.org/release/$($(PKG)_FILE)
$(PKG)_URL := http://www.libsdl.org/tmp/release/$($(PKG)_FILE)
$(PKG)_DEPS := gcc libiconv
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://hg.libsdl.org/SDL/tags' | \
$(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
$(SED) -i 's,-mwindows,-lwinmm -mwindows,' '$(1)/configure'
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)' \
--enable-threads \
--enable-directx
$(SED) -i 's,defined(__MINGW64_VERSION_MAJOR),defined(__MINGW64_VERSION_MAJOR) \&\& defined(_WIN64),' '$(1)/include/SDL_cpuinfo.h'
$(SED) -i 's,-XCClinker,,' '$(1)/sdl2.pc'
$(SED) -i 's,-XCClinker,,' '$(1)/sdl2-config'
$(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
ln -sf '$(PREFIX)/$(TARGET)/bin/sdl2-config' '$(PREFIX)/bin/$(TARGET)-sdl2-config'
endef
$(PKG)_BUILD_i686-pc-mingw32 =