3rdparty/SDL_image: build in build/ dir + configure patch
This commit is contained in:
parent
5a651ed285
commit
94ce9e4ac8
15
3rdparty/Makefile
vendored
15
3rdparty/Makefile
vendored
@ -41,7 +41,9 @@ SDLIMAGEPATCHES = SDL_image-1.2.12.XCF_infinite_loop.patch \
|
||||
SDL_image_XCF_v11_load_level.patch \
|
||||
SDL_image-1.2.12-png1.6.patch \
|
||||
SDL_image-1.2.12-png_const_colorp.patch \
|
||||
SDL_image-1.2.12-png_const_fix.patch
|
||||
SDL_image-1.2.12-png_const_fix.patch \
|
||||
SDL_image-1.2.12-configure_update.patch \
|
||||
SDL_image-1.2.12-configure_libpng.patch
|
||||
SDLTTF=SDL_ttf-2.0.11
|
||||
SDLTTFARCH=$(SDLTTF).tar.gz
|
||||
SDLTTFURL=https://www.libsdl.org/projects/SDL_ttf/release/$(SDLTTFARCH)
|
||||
@ -382,13 +384,14 @@ $(PREFIX)/lib/libSDL_image.a: $(PREFIX)/lib/libpng.a
|
||||
$(PREFIX)/lib/libSDL_image.a: $(PREFIX)/lib/libSDLmain.a
|
||||
|
||||
$(PREFIX)/lib/libSDL_image.a: $(SDLIMAGE)/.ok
|
||||
cd $(SDLIMAGE) && CC="$(CC) $(LDFLAGS)" CPPFLAGS=-I$(PREFIX)/include \
|
||||
LDFLAGS="-L$(PREFIX)/lib $(ADDLDFLAGS)" LIBPNG_CFLAGS= LIBPNG_LIBS=-lpng \
|
||||
./configure --prefix=$(PREFIX) --with-sdl-prefix=$(PREFIX) --host=$(HOST) \
|
||||
$(MKDIR) $(SDLIMAGE)/build
|
||||
cd $(SDLIMAGE)/build && CC="$(CC) $(LDFLAGS)" CPPFLAGS=-I$(PREFIX)/include \
|
||||
LDFLAGS="-L$(PREFIX)/lib $(ADDLDFLAGS)" \
|
||||
../configure --prefix=$(PREFIX) --with-sdl-prefix=$(PREFIX) --host=$(HOST) \
|
||||
--disable-webp --disable-imageio --disable-sdltest \
|
||||
--disable-jpg-shared --disable-png-shared --disable-tif-shared
|
||||
cd $(SDLIMAGE) && $(MAKE)
|
||||
cd $(SDLIMAGE) && $(MAKE) install
|
||||
cd $(SDLIMAGE)/build && $(MAKE)
|
||||
cd $(SDLIMAGE)/build && $(MAKE) install
|
||||
ifdef WIN32
|
||||
$(MKDIR) ../bin && $(CP) $(PREFIX)/bin/SDL_image.dll ../bin && $(STRIP) ../bin/SDL_image.dll
|
||||
endif
|
||||
|
||||
231
3rdparty/SDL_image-1.2.12-configure_libpng.patch
vendored
Normal file
231
3rdparty/SDL_image-1.2.12-configure_libpng.patch
vendored
Normal file
@ -0,0 +1,231 @@
|
||||
# HG changeset patch
|
||||
# User Ozkan Sezer <sezeroz@gmail.com>
|
||||
# Date 1539435355 -10800
|
||||
# Sat Oct 13 15:55:55 2018 +0300
|
||||
# Branch SDL-1.2
|
||||
# Node ID 12758bec1240d03adb85e8960a2bc7598a3c78f4
|
||||
# Parent 85d1fcc58846ee8cd50d98de3dc1160faeb5f9ce
|
||||
backport fix for linking with libpng installed in a non-standard location
|
||||
|
||||
(default 2.0 branch commit: 4088a517f9a5)
|
||||
|
||||
diff -r 85d1fcc58846 -r 12758bec1240 configure
|
||||
--- a/configure Sat Oct 13 11:11:02 2018 +0300
|
||||
+++ b/configure Sat Oct 13 15:55:55 2018 +0300
|
||||
@@ -14084,7 +14084,10 @@
|
||||
|
||||
fi
|
||||
if test "x$ac_cv_header_png_h" = x""yes; then
|
||||
- have_png_hdr=yes
|
||||
+
|
||||
+ have_png_hdr=yes
|
||||
+ LIBPNG_CFLAGS=""
|
||||
+
|
||||
fi
|
||||
|
||||
|
||||
@@ -14154,7 +14157,10 @@
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_create_read_struct" >&5
|
||||
$as_echo "$ac_cv_lib_png_png_create_read_struct" >&6; }
|
||||
if test "x$ac_cv_lib_png_png_create_read_struct" = x""yes; then
|
||||
- have_png_lib=yes
|
||||
+
|
||||
+ have_png_lib=yes
|
||||
+ LIBPNG_LIBS="-lpng -lz"
|
||||
+
|
||||
fi
|
||||
|
||||
|
||||
@@ -14287,7 +14293,10 @@
|
||||
|
||||
fi
|
||||
if test "x$ac_cv_header_png_h" = x""yes; then
|
||||
- have_png_hdr=yes
|
||||
+
|
||||
+ have_png_hdr=yes
|
||||
+ LIBPNG_CFLAGS=""
|
||||
+
|
||||
fi
|
||||
|
||||
|
||||
@@ -14357,7 +14366,10 @@
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_create_read_struct" >&5
|
||||
$as_echo "$ac_cv_lib_png_png_create_read_struct" >&6; }
|
||||
if test "x$ac_cv_lib_png_png_create_read_struct" = x""yes; then
|
||||
- have_png_lib=yes
|
||||
+
|
||||
+ have_png_lib=yes
|
||||
+ LIBPNG_LIBS="-lpng -lz"
|
||||
+
|
||||
fi
|
||||
|
||||
|
||||
@@ -14367,7 +14379,6 @@
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
have_png_hdr=yes
|
||||
- CFLAGS="$LIBPNG_CFLAGS $CFLAGS"
|
||||
have_png_lib=yes
|
||||
|
||||
fi
|
||||
@@ -14825,7 +14836,10 @@
|
||||
|
||||
fi
|
||||
if test "x$ac_cv_header_webp_decode_h" = x""yes; then
|
||||
- have_webp_hdr=yes
|
||||
+
|
||||
+ have_webp_hdr=yes
|
||||
+ LIBWEBP_CFLAGS=""
|
||||
+
|
||||
fi
|
||||
|
||||
|
||||
@@ -14895,7 +14909,10 @@
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_webp_WebPGetDecoderVersion" >&5
|
||||
$as_echo "$ac_cv_lib_webp_WebPGetDecoderVersion" >&6; }
|
||||
if test "x$ac_cv_lib_webp_WebPGetDecoderVersion" = x""yes; then
|
||||
- have_webp_lib=yes
|
||||
+
|
||||
+ have_webp_lib=yes
|
||||
+ LIBWEBP_LIBS="-lwebp"
|
||||
+
|
||||
fi
|
||||
|
||||
|
||||
@@ -15028,7 +15045,10 @@
|
||||
|
||||
fi
|
||||
if test "x$ac_cv_header_webp_decode_h" = x""yes; then
|
||||
- have_webp_hdr=yes
|
||||
+
|
||||
+ have_webp_hdr=yes
|
||||
+ LIBWEBP_CFLAGS=""
|
||||
+
|
||||
fi
|
||||
|
||||
|
||||
@@ -15098,7 +15118,10 @@
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_webp_WebPGetDecoderVersion" >&5
|
||||
$as_echo "$ac_cv_lib_webp_WebPGetDecoderVersion" >&6; }
|
||||
if test "x$ac_cv_lib_webp_WebPGetDecoderVersion" = x""yes; then
|
||||
- have_webp_lib=yes
|
||||
+
|
||||
+ have_webp_lib=yes
|
||||
+ LIBWEBP_LIBS="-lwebp"
|
||||
+
|
||||
fi
|
||||
|
||||
|
||||
@@ -15108,7 +15131,6 @@
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
have_webp_hdr=yes
|
||||
- CFLAGS="$LIBWEBP_CFLAGS $CFLAGS"
|
||||
have_webp_lib=yes
|
||||
|
||||
fi
|
||||
@@ -15210,6 +15232,7 @@
|
||||
fi
|
||||
|
||||
if test x$enable_webp = xyes -a x$have_webp_hdr = xyes -a x$have_webp_lib = xyes; then
|
||||
+ CFLAGS="$LIBWEBP_CFLAGS $CFLAGS"
|
||||
if test x$enable_webp_shared = xyes && test x$webp_lib != x; then
|
||||
echo "-- dynamic libwebp -> $webp_lib"
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -15217,7 +15240,7 @@
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
- IMG_LIBS="-lwebp $IMG_LIBS"
|
||||
+ IMG_LIBS="$LIBWEBP_LIBS $IMG_LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -15248,6 +15271,7 @@
|
||||
fi
|
||||
fi
|
||||
if test x$enable_png = xyes -a x$have_png_hdr = xyes -a x$have_png_lib = xyes; then
|
||||
+ CFLAGS="$LIBPNG_CFLAGS $CFLAGS"
|
||||
if test x$enable_png_shared = xyes && test x$png_lib != x; then
|
||||
echo "-- dynamic libpng -> $png_lib"
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -15255,7 +15279,7 @@
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
- IMG_LIBS="-lpng -lz $IMG_LIBS"
|
||||
+ IMG_LIBS="$LIBPNG_LIBS $IMG_LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
diff -r 85d1fcc58846 -r 12758bec1240 configure.in
|
||||
--- a/configure.in Sat Oct 13 11:11:02 2018 +0300
|
||||
+++ b/configure.in Sat Oct 13 15:55:55 2018 +0300
|
||||
@@ -194,11 +194,16 @@
|
||||
if test "x$enable_png" = xyes; then
|
||||
PKG_CHECK_MODULES([LIBPNG], [libpng], [dnl
|
||||
have_png_hdr=yes
|
||||
- CFLAGS="$LIBPNG_CFLAGS $CFLAGS"
|
||||
have_png_lib=yes
|
||||
], [dnl
|
||||
- AC_CHECK_HEADER([png.h], [have_png_hdr=yes])
|
||||
- AC_CHECK_LIB([png], [png_create_read_struct], [have_png_lib=yes], [], [-lz])
|
||||
+ AC_CHECK_HEADER([png.h], [
|
||||
+ have_png_hdr=yes
|
||||
+ LIBPNG_CFLAGS=""
|
||||
+ ])
|
||||
+ AC_CHECK_LIB([png], [png_create_read_struct], [
|
||||
+ have_png_lib=yes
|
||||
+ LIBPNG_LIBS="-lpng -lz"
|
||||
+ ], [], [-lz])
|
||||
])
|
||||
if test x$have_png_hdr = xyes -a x$have_png_lib = xyes; then
|
||||
AC_DEFINE([LOAD_PNG])
|
||||
@@ -258,11 +263,16 @@
|
||||
if test x$enable_webp = xyes; then
|
||||
PKG_CHECK_MODULES([LIBWEBP], [libwebp], [dnl
|
||||
have_webp_hdr=yes
|
||||
- CFLAGS="$LIBWEBP_CFLAGS $CFLAGS"
|
||||
have_webp_lib=yes
|
||||
], [dnl
|
||||
- AC_CHECK_HEADER([webp/decode.h], [have_webp_hdr=yes])
|
||||
- AC_CHECK_LIB([webp], [WebPGetDecoderVersion], [have_webp_lib=yes], [], [-lm])
|
||||
+ AC_CHECK_HEADER([webp/decode.h], [
|
||||
+ have_webp_hdr=yes
|
||||
+ LIBWEBP_CFLAGS=""
|
||||
+ ])
|
||||
+ AC_CHECK_LIB([webp], [WebPGetDecoderVersion], [
|
||||
+ have_webp_lib=yes
|
||||
+ LIBWEBP_LIBS="-lwebp"
|
||||
+ ], [], [-lm])
|
||||
])
|
||||
if test x$have_webp_hdr = xyes -a x$have_webp_lib = xyes; then
|
||||
AC_DEFINE([LOAD_WEBP])
|
||||
@@ -330,11 +340,12 @@
|
||||
fi
|
||||
|
||||
if test x$enable_webp = xyes -a x$have_webp_hdr = xyes -a x$have_webp_lib = xyes; then
|
||||
+ CFLAGS="$LIBWEBP_CFLAGS $CFLAGS"
|
||||
if test x$enable_webp_shared = xyes && test x$webp_lib != x; then
|
||||
echo "-- dynamic libwebp -> $webp_lib"
|
||||
AC_DEFINE_UNQUOTED(LOAD_WEBP_DYNAMIC, "$webp_lib")
|
||||
else
|
||||
- IMG_LIBS="-lwebp $IMG_LIBS"
|
||||
+ IMG_LIBS="$LIBWEBP_LIBS $IMG_LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -359,11 +370,12 @@
|
||||
fi
|
||||
fi
|
||||
if test x$enable_png = xyes -a x$have_png_hdr = xyes -a x$have_png_lib = xyes; then
|
||||
+ CFLAGS="$LIBPNG_CFLAGS $CFLAGS"
|
||||
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"
|
||||
+ IMG_LIBS="$LIBPNG_LIBS $IMG_LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
13894
3rdparty/SDL_image-1.2.12-configure_update.patch
vendored
Normal file
13894
3rdparty/SDL_image-1.2.12-configure_update.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user