diff options
Diffstat (limited to 'tools/depends/target/libsdl')
-rw-r--r-- | tools/depends/target/libsdl/01-SDL_SetWidthHeight.patch | 33 | ||||
-rw-r--r-- | tools/depends/target/libsdl/02-mmx.patch | 12 | ||||
-rw-r--r-- | tools/depends/target/libsdl/Makefile | 40 |
3 files changed, 85 insertions, 0 deletions
diff --git a/tools/depends/target/libsdl/01-SDL_SetWidthHeight.patch b/tools/depends/target/libsdl/01-SDL_SetWidthHeight.patch new file mode 100644 index 0000000000..0e26023554 --- /dev/null +++ b/tools/depends/target/libsdl/01-SDL_SetWidthHeight.patch @@ -0,0 +1,33 @@ +Index: include/SDL_video.h +=================================================================== +--- include/SDL_video.h (revision 4116) ++++ include/SDL_video.h (working copy) +@@ -324,6 +324,11 @@ + extern DECLSPEC SDL_Rect ** SDLCALL SDL_ListModes(SDL_PixelFormat *format, Uint32 flags); + + /** ++* Alter the width and height of the current surface to the given sizes. ++*/ ++extern DECLSPEC void SDLCALL SDL_SetWidthHeight(int width, int height); ++ ++/** + * Set up a video mode with the specified width, height and bits-per-pixel. + * + * If 'bpp' is 0, it is treated as the current display bits per pixel. + +Index: src/video/SDL_video.c +=================================================================== +--- src/video/SDL_video.c (revision 4116) ++++ src/video/SDL_video.c (working copy) +@@ -1956,3 +1956,11 @@ + return(0); + } + } ++ ++void SDL_SetWidthHeight(int width, int height) ++{ ++ if (current_video != NULL && current_video->screen != NULL) { ++ current_video->screen->w = width; ++ current_video->screen->h = height; ++ } ++} diff --git a/tools/depends/target/libsdl/02-mmx.patch b/tools/depends/target/libsdl/02-mmx.patch new file mode 100644 index 0000000000..82f51aa787 --- /dev/null +++ b/tools/depends/target/libsdl/02-mmx.patch @@ -0,0 +1,12 @@ +--- src/video/mmx.h Mon Feb 06 08:28:51 2006 +0000 ++++ src/video/mmx.h Sun Jan 30 13:38:57 2011 -0800 +@@ -355,7 +355,7 @@ + + #define mmx_r2m(op, reg, mem) \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ +- : "=X" (mem) \ ++ : "=m" (mem) \ + : /* nothing */ ) + + #define mmx_r2r(op, regs, regd) \ + diff --git a/tools/depends/target/libsdl/Makefile b/tools/depends/target/libsdl/Makefile new file mode 100644 index 0000000000..8ac8b22eeb --- /dev/null +++ b/tools/depends/target/libsdl/Makefile @@ -0,0 +1,40 @@ +include ../../Makefile.include +DEPS= ../../Makefile.include 01-SDL_SetWidthHeight.patch 02-mmx.patch Makefile + +# lib name, version +LIBNAME=SDL +VERSION=1.2.14 +SOURCE=$(LIBNAME)-$(VERSION) +ARCHIVE=$(SOURCE).tar.gz + +# configuration settings +CONFIGURE=./configure --prefix=$(PREFIX) \ + --without-x --disable-video-x11 --disable-video-directfb + +LIBDYLIB=$(PLATFORM)/build/.libs/lib$(LIBNAME).so + +all: .installed-$(PLATFORM) + +$(TARBALLS_LOCATION)/$(ARCHIVE): + cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + +$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) + rm -rf $(PLATFORM); mkdir -p $(PLATFORM) + cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + cd $(PLATFORM); patch -p0 < ../01-SDL_SetWidthHeight.patch + cd $(PLATFORM); patch -p0 < ../02-mmx.patch + cd $(PLATFORM); $(CONFIGURE) + +$(LIBDYLIB): $(PLATFORM) + $(MAKE) -j 1 -C $(PLATFORM) + +.installed-$(PLATFORM): $(LIBDYLIB) + $(MAKE) -C $(PLATFORM) install + touch $@ + +clean: + $(MAKE) -C $(PLATFORM) clean + rm -f .installed-$(PLATFORM) + +distclean:: + rm -rf $(PLATFORM) .installed-$(PLATFORM) |