From 189c356fcb5ffd95b0b4ff76cf9ffa372c7792df Mon Sep 17 00:00:00 2001 From: Martin Gerhardy Date: Tue, 25 Jun 2013 11:17:30 +0200 Subject: [PATCH] * added sdl2_net --- index.html | 5 +++++ src/sdl2_net-test.c | 19 +++++++++++++++++++ src/sdl2_net.mk | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 src/sdl2_net-test.c create mode 100644 src/sdl2_net.mk diff --git a/index.html b/index.html index e83879f2..8d5ec9f6 100644 --- a/index.html +++ b/index.html @@ -2112,6 +2112,11 @@ aptitude -t squeeze-backports install cmake yasm 2.0.0 SDL2_mixer + + sdl2_net + 2.0.0 + sdl2_net + sdl2_ttf 2.0.12 diff --git a/src/sdl2_net-test.c b/src/sdl2_net-test.c new file mode 100644 index 00000000..c5204a56 --- /dev/null +++ b/src/sdl2_net-test.c @@ -0,0 +1,19 @@ +/* + * This file is part of MXE. + * See index.html for further information. + */ + +#include + +int main(int argc, char *argv[]) +{ + (void)argc; + (void)argv; + + if (SDL_Init(SDL_INIT_EVERYTHING) < 0) return 1; + if (SDLNet_Init() < 0) return 1; + + SDLNet_Quit(); + SDL_Quit(); + return 0; +} diff --git a/src/sdl2_net.mk b/src/sdl2_net.mk new file mode 100644 index 00000000..e7e2d30f --- /dev/null +++ b/src/sdl2_net.mk @@ -0,0 +1,33 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := sdl2_net +$(PKG)_IGNORE := +$(PKG)_CHECKSUM := 15ba4f41d05cbc05ae26b217965db6bf30cf8c60 +$(PKG)_SUBDIR := SDL2_net-$($(PKG)_VERSION) +$(PKG)_FILE := SDL2_net-$($(PKG)_VERSION).tar.gz +#$(PKG)_URL := http://www.libsdl.org/projects/SDL_net/release/$($(PKG)_FILE) +$(PKG)_URL := http://www.libsdl.org/tmp/SDL_net/release/$($(PKG)_FILE) +$(PKG)_DEPS := gcc sdl + +define $(PKG)_UPDATE + $(WGET) -q -O- 'http://www.libsdl.org/projects/SDL_net/release/?C=M;O=D' | \ + $(SED) -n 's,.*SDL_net-\([0-9][^>]*\)\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + --host='$(TARGET)' \ + --disable-shared \ + --prefix='$(PREFIX)/$(TARGET)' \ + --with-sdl-prefix='$(PREFIX)/$(TARGET)' \ + --disable-sdltest \ + --disable-gui + $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl2_net.exe' \ + `'$(TARGET)-pkg-config' SDL2_net --cflags --libs` +endef