>From db7c0b0d795e982ee163a338b21f87d420911f49 Mon Sep 17 00:00:00 2001
From: Martin Gerhardy
Date: Sat, 27 Jul 2013 10:46:58 +0200
Subject: [PATCH 1/6] new package sdl2 (release candidate)
---
index.html | 4 ++++
src/sdl2.mk | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 src/sdl2.mk
diff --git a/index.html b/index.html
index 85a7bc8..6dde184 100644
--- a/index.html
+++ b/index.html
@@ -1968,6 +1968,10 @@ USE_OSGPLUGIN(<plugin2>)
SDL_ttf |
+ sdl2 |
+ SDL2 |
+
+
sfml |
SFML |
diff --git a/src/sdl2.mk b/src/sdl2.mk
new file mode 100644
index 0000000..8697507
--- /dev/null
+++ b/src/sdl2.mk
@@ -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 := 28e7602484b393f638df05852e705045027d2b9e
+$(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 =
--
1.8.1.2