diff options
-rw-r--r-- | mk/host-bottom.mk | 4 | ||||
-rw-r--r-- | package/sdl-image/Makefile | 21 | ||||
-rw-r--r-- | package/sdl-image/patches/patch-IMG_png_c | 160 | ||||
-rw-r--r-- | package/sdl-image/patches/patch-configure_in | 44 | ||||
-rw-r--r-- | package/sdl-image/patches/patch-ltmain_sh | 11 | ||||
-rw-r--r-- | package/sdl/Makefile | 6 | ||||
-rw-r--r-- | package/sdl/patches/patch-build-scripts_ltmain_sh | 11 | ||||
-rw-r--r-- | package/sdl/patches/patch-sdl-config_in | 16 | ||||
-rw-r--r-- | package/sdl/patches/patch-sdl_pc_in | 10 | ||||
-rw-r--r-- | package/sdl/patches/patch-src_video_x11_SDL_x11dyn_c | 39 | ||||
-rw-r--r-- | package/sdl/patches/patch-src_video_x11_SDL_x11sym_h | 15 |
11 files changed, 66 insertions, 271 deletions
diff --git a/mk/host-bottom.mk b/mk/host-bottom.mk index 1ca851d26..081e4d8b9 100644 --- a/mk/host-bottom.mk +++ b/mk/host-bottom.mk @@ -8,6 +8,10 @@ host-configure: ${_HOST_CONFIGURE_COOKIE}: ${_HOST_PATCH_COOKIE} @mkdir -p ${WRKBUILD} @$(CMD_TRACE) "host configuring... " +ifneq (,$(filter autogen,${AUTOTOOL_STYLE})) + @$(CMD_TRACE) "autotool configuring... " + @cd ${WRKSRC}; env ${AUTOTOOL_ENV} $(BASH) autogen.sh $(MAKE_TRACE) +endif ifneq (,$(filter autoreconf,${AUTOTOOL_STYLE})) cd ${WRKSRC}; env ${AUTOTOOL_ENV} autoreconf -if $(MAKE_TRACE) @rm -rf ${WRKSRC}/autom4te.cache diff --git a/package/sdl-image/Makefile b/package/sdl-image/Makefile index 8669aa606..e36151902 100644 --- a/package/sdl-image/Makefile +++ b/package/sdl-image/Makefile @@ -4,13 +4,14 @@ include $(ADK_TOPDIR)/rules.mk PKG_NAME:= sdl-image -PKG_VERSION:= 1.2.10 -PKG_RELEASE:= 2 -PKG_MD5SUM:= 6c06584b31559e2b59f2b982d0d1f628 +PKG_VERSION:= 1.2.12 +PKG_RELEASE:= 1 +PKG_MD5SUM:= a0f9098ebe5400f0bdc9b62e60797ecb PKG_DESCR:= simple directmedia layer image library PKG_SECTION:= libs/image PKG_DEPENDS:= libpng libtiff libjpeg-turbo libsdl libstdcxx PKG_BUILDDEP:= libpng libtiff libjpeg-turbo sdl +HOST_BUILDDEP+= libpng-host PKG_URL:= http://www.libsdl.org/ PKG_SITES:= http://www.libsdl.org/projects/SDL_image/release/ PKG_LIBNAME:= libsdl-image @@ -29,12 +30,20 @@ ifeq ($(ADK_HOST_DARWIN),y) LDFLAGS_FOR_BUILD+= -framework Cocoa endif +AUTOTOOL_STYLE:= autogen HOST_STYLE:= auto -HOST_CONFIGURE_ARGS+= --disable-png-shared -CONFIGURE_ARGS+= --enable-png \ +HOST_CONFIGURE_ARGS+= --with-sdl-prefix='${STAGING_HOST_DIR}/usr' \ + --enable-png \ + --disable-webp \ + --disable-jpg \ + --disable-tif \ + --disable-bmp +CONFIGURE_ARGS+= --with-sdl-prefix='${STAGING_TARGET_DIR}/usr' \ + --enable-png \ --enable-jpg \ --enable-bmp \ - --enable-tif + --enable-tif \ + --disable-webp libsdl-image-install: $(INSTALL_DIR) $(IDIR_LIBSDL_IMAGE)/usr/lib diff --git a/package/sdl-image/patches/patch-IMG_png_c b/package/sdl-image/patches/patch-IMG_png_c deleted file mode 100644 index 315c1f676..000000000 --- a/package/sdl-image/patches/patch-IMG_png_c +++ /dev/null @@ -1,160 +0,0 @@ ---- SDL_image-1.2.10.orig/IMG_png.c 2009-11-08 11:55:32.000000000 +0100 -+++ SDL_image-1.2.10/IMG_png.c 2011-04-01 20:26:38.981819248 +0200 -@@ -71,6 +71,10 @@ - #endif - #include <png.h> - -+/* Check for the older version of libpng */ -+#if (PNG_LIBPNG_VER_MAJOR == 1) && (PNG_LIBPNG_VER_MINOR < 4) -+#define LIBPNG_VERSION_12 -+#endif - - static struct { - int loaded; -@@ -80,6 +84,8 @@ static struct { - void (*png_destroy_read_struct) (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr); - png_uint_32 (*png_get_IHDR) (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method); - png_voidp (*png_get_io_ptr) (png_structp png_ptr); -+ png_byte (*png_get_channels) (png_structp png_ptr, png_infop info_ptr); -+ png_uint_32 (*png_get_PLTE) (png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette); - png_uint_32 (*png_get_tRNS) (png_structp png_ptr, png_infop info_ptr, png_bytep *trans, int *num_trans, png_color_16p *trans_values); - png_uint_32 (*png_get_valid) (png_structp png_ptr, png_infop info_ptr, png_uint_32 flag); - void (*png_read_image) (png_structp png_ptr, png_bytepp image); -@@ -91,6 +97,9 @@ static struct { - void (*png_set_read_fn) (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn); - void (*png_set_strip_16) (png_structp png_ptr); - int (*png_sig_cmp) (png_bytep sig, png_size_t start, png_size_t num_to_check); -+#ifndef LIBPNG_VERSION_12 -+ jmp_buf* (*png_set_longjmp_fn) (png_structp, png_longjmp_ptr, size_t); -+#endif - } lib; - - #ifdef LOAD_PNG_DYNAMIC -@@ -129,6 +138,13 @@ int IMG_InitPNG() - SDL_UnloadObject(lib.handle); - return -1; - } -+ lib.png_get_channels = -+ (png_byte (*) (png_structp, png_infop)) -+ SDL_LoadFunction(lib.handle, "png_get_channels"); -+ if ( lib.png_get_channels == NULL ) { -+ SDL_UnloadObject(lib.handle); -+ return -1; -+ } - lib.png_get_io_ptr = - (png_voidp (*) (png_structp)) - SDL_LoadFunction(lib.handle, "png_get_io_ptr"); -@@ -136,6 +152,13 @@ int IMG_InitPNG() - SDL_UnloadObject(lib.handle); - return -1; - } -+ lib.png_get_PLTE = -+ (png_uint_32 (*) (png_structp, png_infop, png_colorp *, int *)) -+ SDL_LoadFunction(lib.handle, "png_get_PLTE"); -+ if ( lib.png_get_PLTE == NULL ) { -+ SDL_UnloadObject(lib.handle); -+ return -1; -+ } - lib.png_get_tRNS = - (png_uint_32 (*) (png_structp, png_infop, png_bytep *, int *, png_color_16p *)) - SDL_LoadFunction(lib.handle, "png_get_tRNS"); -@@ -213,6 +236,15 @@ int IMG_InitPNG() - SDL_UnloadObject(lib.handle); - return -1; - } -+#ifndef LIBPNG_VERSION_12 -+ lib.png_set_longjmp_fn = -+ (jmp_buf * (*) (png_structp, png_longjmp_ptr, size_t)) -+ SDL_LoadFunction(lib.handle, "png_set_longjmp_fn"); -+ if ( lib.png_set_longjmp_fn == NULL ) { -+ SDL_UnloadObject(lib.handle); -+ return -1; -+ } -+#endif - } - ++lib.loaded; - -@@ -236,7 +268,9 @@ int IMG_InitPNG() - lib.png_create_read_struct = png_create_read_struct; - lib.png_destroy_read_struct = png_destroy_read_struct; - lib.png_get_IHDR = png_get_IHDR; -+ lib.png_get_channels = png_get_channels; - lib.png_get_io_ptr = png_get_io_ptr; -+ lib.png_get_PLTE = png_get_PLTE; - lib.png_get_tRNS = png_get_tRNS; - lib.png_get_valid = png_get_valid; - lib.png_read_image = png_read_image; -@@ -248,6 +282,9 @@ int IMG_InitPNG() - lib.png_set_read_fn = png_set_read_fn; - lib.png_set_strip_16 = png_set_strip_16; - lib.png_sig_cmp = png_sig_cmp; -+#ifndef LIBPNG_VERSION_12 -+ lib.png_set_longjmp_fn = png_set_longjmp_fn; -+#endif - } - ++lib.loaded; - -@@ -347,7 +384,12 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s - * the normal method of doing things with libpng). REQUIRED unless you - * set up your own error handlers in png_create_read_struct() earlier. - */ -- if ( setjmp(png_ptr->jmpbuf) ) { -+#ifndef LIBPNG_VERSION_12 -+ if ( setjmp(*lib.png_set_longjmp_fn(png_ptr, longjmp, sizeof (jmp_buf))) ) -+#else -+ if ( setjmp(png_ptr->jmpbuf) ) -+#endif -+ { - error = "Error reading the PNG file."; - goto done; - } -@@ -416,9 +458,9 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s - Rmask = 0x000000FF; - Gmask = 0x0000FF00; - Bmask = 0x00FF0000; -- Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0; -+ Amask = (lib.png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0; - } else { -- int s = (info_ptr->channels == 4) ? 0 : 8; -+ int s = (lib.png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8; - Rmask = 0xFF000000 >> s; - Gmask = 0x00FF0000 >> s; - Bmask = 0x0000FF00 >> s; -@@ -426,7 +468,7 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s - } - } - surface = SDL_AllocSurface(SDL_SWSURFACE, width, height, -- bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask); -+ bit_depth*lib.png_get_channels(png_ptr, info_ptr), Rmask,Gmask,Bmask,Amask); - if ( surface == NULL ) { - error = "Out of memory"; - goto done; -@@ -467,6 +509,9 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s - /* Load the palette, if any */ - palette = surface->format->palette; - if ( palette ) { -+ int png_num_palette; -+ png_colorp png_palette; -+ lib.png_get_PLTE(png_ptr, info_ptr, &png_palette, &png_num_palette); - if(color_type == PNG_COLOR_TYPE_GRAY) { - palette->ncolors = 256; - for(i = 0; i < 256; i++) { -@@ -474,12 +519,12 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s - palette->colors[i].g = i; - palette->colors[i].b = i; - } -- } else if (info_ptr->num_palette > 0 ) { -- palette->ncolors = info_ptr->num_palette; -- for( i=0; i<info_ptr->num_palette; ++i ) { -- palette->colors[i].b = info_ptr->palette[i].blue; -- palette->colors[i].g = info_ptr->palette[i].green; -- palette->colors[i].r = info_ptr->palette[i].red; -+ } else if (png_num_palette > 0 ) { -+ palette->ncolors = png_num_palette; -+ for( i=0; i<png_num_palette; ++i ) { -+ palette->colors[i].b = png_palette[i].blue; -+ palette->colors[i].g = png_palette[i].green; -+ palette->colors[i].r = png_palette[i].red; - } - } - } diff --git a/package/sdl-image/patches/patch-configure_in b/package/sdl-image/patches/patch-configure_in new file mode 100644 index 000000000..caad9fb54 --- /dev/null +++ b/package/sdl-image/patches/patch-configure_in @@ -0,0 +1,44 @@ +--- SDL_image-1.2.12.orig/configure.in 2012-01-21 02:51:33.000000000 +0100 ++++ SDL_image-1.2.12/configure.in 2014-06-30 16:37:34.153488935 +0200 +@@ -202,27 +202,6 @@ if test "x$enable_png" = xyes; then + ]) + if test x$have_png_hdr = xyes -a x$have_png_lib = xyes; then + AC_DEFINE([LOAD_PNG]) +- +- case "$host" in +- *-*-darwin*) +- png_lib=[`find_lib libpng.dylib`] +- ;; +- *-*-cygwin* | *-*-mingw32*) +- png_lib=[`find_lib "libpng*.dll"`] +- ;; +- *) +- png_lib=[`find_lib "libpng.so.[0-9]"`] +- if test x$png_lib = x; then +- png_lib=[`find_lib "libpng.so.[0-9]*"`] +- fi +- if test x$png_lib = x; then +- png_lib=[`find_lib "libpng*.so.[0-9]"`] +- fi +- if test x$png_lib = x; then +- png_lib=[`find_lib "libpng*.so.[0-9]*"`] +- fi +- ;; +- esac + else + AC_MSG_WARN([*** Unable to find PNG library (http://www.libpng.org/pub/png/libpng.html)]) + AC_MSG_WARN([PNG image loading disabled]) +@@ -359,12 +338,7 @@ if test x$enable_jpg = xyes -a x$have_jp + fi + fi + if test x$enable_png = xyes -a x$have_png_hdr = xyes -a x$have_png_lib = xyes; then +- if test x$enable_png_shared = xyes && test x$png_lib != x; then +- echo "-- dynamic libpng -> $png_lib" +- AC_DEFINE_UNQUOTED(LOAD_PNG_DYNAMIC, "$png_lib") +- else +- IMG_LIBS="-lpng -lz $IMG_LIBS" +- fi ++ IMG_LIBS="-lpng -lz $IMG_LIBS" + fi + + LIBS="$saved_LIBS" diff --git a/package/sdl-image/patches/patch-ltmain_sh b/package/sdl-image/patches/patch-ltmain_sh deleted file mode 100644 index a7eae68fe..000000000 --- a/package/sdl-image/patches/patch-ltmain_sh +++ /dev/null @@ -1,11 +0,0 @@ ---- SDL_image-1.2.10.orig/ltmain.sh 2009-10-13 01:06:51.000000000 +0200 -+++ SDL_image-1.2.10/ltmain.sh 2011-01-17 12:10:39.000000000 +0100 -@@ -4766,7 +4766,7 @@ func_mode_link () - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" diff --git a/package/sdl/Makefile b/package/sdl/Makefile index 20e56771b..249d5a05e 100644 --- a/package/sdl/Makefile +++ b/package/sdl/Makefile @@ -4,9 +4,9 @@ include $(ADK_TOPDIR)/rules.mk PKG_NAME:= sdl -PKG_VERSION:= 1.2.14 -PKG_RELEASE:= 3 -PKG_MD5SUM:= e52086d1b508fa0b76c52ee30b55bec4 +PKG_VERSION:= 1.2.15 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 9d96df8417572a2afb781a7c4c811a85 PKG_DESCR:= simple directmedia layer PKG_SECTION:= libs/misc PKG_DEPENDS:= libusb alsa-lib libpthread libx11 libxext diff --git a/package/sdl/patches/patch-build-scripts_ltmain_sh b/package/sdl/patches/patch-build-scripts_ltmain_sh deleted file mode 100644 index c2f950420..000000000 --- a/package/sdl/patches/patch-build-scripts_ltmain_sh +++ /dev/null @@ -1,11 +0,0 @@ ---- SDL-1.2.14.orig/build-scripts/ltmain.sh 2009-10-13 01:07:12.000000000 +0200 -+++ SDL-1.2.14/build-scripts/ltmain.sh 2011-01-14 23:31:20.000000000 +0100 -@@ -4766,7 +4766,7 @@ func_mode_link () - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" diff --git a/package/sdl/patches/patch-sdl-config_in b/package/sdl/patches/patch-sdl-config_in deleted file mode 100644 index 4d3de58ed..000000000 --- a/package/sdl/patches/patch-sdl-config_in +++ /dev/null @@ -1,16 +0,0 @@ ---- SDL-1.2.14.orig/sdl-config.in 2009-10-13 01:07:20.000000000 +0200 -+++ SDL-1.2.14/sdl-config.in 2011-01-12 21:46:41.000000000 +0100 -@@ -45,11 +45,11 @@ while test $# -gt 0; do - echo -I@includedir@/SDL @SDL_CFLAGS@ - ;; - @ENABLE_SHARED_TRUE@ --libs) --@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ -+@ENABLE_SHARED_TRUE@ echo @SDL_LIBS@ - @ENABLE_SHARED_TRUE@ ;; - @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) - @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs) --@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ -+@ENABLE_STATIC_TRUE@ echo @SDL_STATIC_LIBS@ - @ENABLE_STATIC_TRUE@ ;; - *) - echo "${usage}" 1>&2 diff --git a/package/sdl/patches/patch-sdl_pc_in b/package/sdl/patches/patch-sdl_pc_in deleted file mode 100644 index fd0ae8d52..000000000 --- a/package/sdl/patches/patch-sdl_pc_in +++ /dev/null @@ -1,10 +0,0 @@ ---- SDL-1.2.14.orig/sdl.pc.in 2009-10-13 01:07:20.000000000 +0200 -+++ SDL-1.2.14/sdl.pc.in 2011-01-12 21:54:44.000000000 +0100 -@@ -10,6 +10,6 @@ Description: Simple DirectMedia Layer is - Version: @SDL_VERSION@ - Requires: - Conflicts: --Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ -+Libs: @SDL_LIBS@ - Libs.private: @SDL_STATIC_LIBS@ - Cflags: -I${includedir}/SDL @SDL_CFLAGS@ diff --git a/package/sdl/patches/patch-src_video_x11_SDL_x11dyn_c b/package/sdl/patches/patch-src_video_x11_SDL_x11dyn_c deleted file mode 100644 index ed389a110..000000000 --- a/package/sdl/patches/patch-src_video_x11_SDL_x11dyn_c +++ /dev/null @@ -1,39 +0,0 @@ ---- SDL-1.2.14.orig/src/video/x11/SDL_x11dyn.c 2009-10-13 01:07:15.000000000 +0200 -+++ SDL-1.2.14/src/video/x11/SDL_x11dyn.c 2013-07-12 12:15:17.000000000 +0200 -@@ -108,6 +108,20 @@ char *(*pXGetICValues)(XIC, ...) = NULL; - #undef SDL_X11_MODULE - #undef SDL_X11_SYM - -+static void *SDL_XGetRequest_workaround(Display* dpy, CARD8 type, size_t len) -+{ -+ xReq *req; -+ WORD64ALIGN -+ if (dpy->bufptr + len > dpy->bufmax) -+ _XFlush(dpy); -+ dpy->last_req = dpy->bufptr; -+ req = (xReq*)dpy->bufptr; -+ req->reqType = type; -+ req->length = len / 4; -+ dpy->bufptr += len; -+ dpy->request++; -+ return req; -+} - - static int x11_load_refcount = 0; - -@@ -168,6 +182,15 @@ int SDL_X11_LoadSymbols(void) - X11_GetSym("XGetICValues",&SDL_X11_HAVE_UTF8,(void **)&pXGetICValues); - #endif - -+ /* -+ * In case we're built with newer Xlib headers, we need to make sure -+ * that _XGetRequest() is available, even on older systems. -+ * Otherwise, various Xlib macros we use will call a NULL pointer. -+ */ -+ if (!SDL_X11_HAVE_XGETREQUEST) { -+ p_XGetRequest = SDL_XGetRequest_workaround; -+ } -+ - if (SDL_X11_HAVE_BASEXLIB) { /* all required symbols loaded. */ - SDL_ClearError(); - } else { diff --git a/package/sdl/patches/patch-src_video_x11_SDL_x11sym_h b/package/sdl/patches/patch-src_video_x11_SDL_x11sym_h deleted file mode 100644 index 45f3de058..000000000 --- a/package/sdl/patches/patch-src_video_x11_SDL_x11sym_h +++ /dev/null @@ -1,15 +0,0 @@ ---- SDL-1.2.14.orig/src/video/x11/SDL_x11sym.h 2009-10-13 01:07:15.000000000 +0200 -+++ SDL-1.2.14/src/video/x11/SDL_x11sym.h 2013-07-12 12:16:08.000000000 +0200 -@@ -170,6 +170,12 @@ SDL_X11_SYM(void,_XRead32,(Display *dpy, - #endif - - /* -+ * libX11 1.4.99.1 added _XGetRequest, and macros use it behind the scenes. -+ */ -+SDL_X11_MODULE(XGETREQUEST) -+SDL_X11_SYM(void *,_XGetRequest,(Display* a,CARD8 b,size_t c),(a,b,c),return) -+ -+/* - * These only show up on some variants of Unix. - */ - #if defined(__osf__) |