From b28ec826a343da53f7947d7b1188697064d8918b Mon Sep 17 00:00:00 2001 From: Sylvain Beucler Date: Sun, 16 Dec 2012 21:12:55 +0100 Subject: Add build file for SDL_gfx - Build against latest stable release - _UPDATE rule implemented - Test case included Coded while hacking GNU FreeDink :) --- index.html | 5 +++++ src/sdl_gfx-test.c | 25 +++++++++++++++++++++++++ src/sdl_gfx.mk | 31 +++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 src/sdl_gfx-test.c create mode 100644 src/sdl_gfx.mk diff --git a/index.html b/index.html index a658523..880200c 100644 --- a/index.html +++ b/index.html @@ -1912,6 +1912,11 @@ USE_OSGPLUGIN(<plugin2>) SDL + sdl_gfx + 2.0.24 + SDL_gfx + + sdl_image 1.2.12 SDL_image diff --git a/src/sdl_gfx-test.c b/src/sdl_gfx-test.c new file mode 100644 index 0000000..3a092f0 --- /dev/null +++ b/src/sdl_gfx-test.c @@ -0,0 +1,25 @@ +/* + * This file is part of MXE. + * See index.html for further information. + */ + +#include +#include "SDL_rotozoom.h" +#include "SDL_framerate.h" + +int main(int argc, char* argv[]) +{ + FPSmanager framerate_manager; + + (void)argc; + (void)argv; + + if (SDL_Init(SDL_INIT_EVERYTHING) < 0) return 1; + + SDL_initFramerate(&framerate_manager); + SDL_setFramerate(&framerate_manager, 60); + SDL_framerateDelay(&framerate_manager); + + SDL_Quit(); + return 0; +} diff --git a/src/sdl_gfx.mk b/src/sdl_gfx.mk new file mode 100644 index 0000000..e3ff8ff --- /dev/null +++ b/src/sdl_gfx.mk @@ -0,0 +1,31 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := sdl_gfx +$(PKG)_IGNORE := +$(PKG)_CHECKSUM := 34e8963188e4845557468a496066a8fa60d5f563 +$(PKG)_SUBDIR := SDL_gfx-$($(PKG)_VERSION) +$(PKG)_FILE := SDL_gfx-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := http://www.ferzkopp.net/Software/SDL_gfx-2.0/$($(PKG)_FILE) +$(PKG)_DEPS := gcc sdl + +define $(PKG)_UPDATE +# thanks debian/watch for the inspiration! + wget -q -O- 'http://www.ferzkopp.net/joomla/content/view/19/14/' | \ + $(SED) -n 's,.*/joomla/\.\./Software/SDL_gfx\-2\.0/SDL_gfx-\([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)' + $(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-sdl_gfx.exe' \ + `'$(TARGET)-pkg-config' SDL_gfx --cflags --libs` +endef -- cgit v0.12