Skip to content

Commit

Permalink
[linux] Ensure wxWidgets would use system libpng and not builtin
Browse files Browse the repository at this point in the history
wxWidgets and webkit must use same libpng version, and webkit is
compiled against system headers so wxWidgets has to use system libpng
too.
  • Loading branch information
tea committed Oct 29, 2010
1 parent e43ba0b commit 5fea67a
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
2 changes: 1 addition & 1 deletion external/build_externals_linux.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ popd
# wxwidgets # wxwidgets
pushd wxwidgets pushd wxwidgets
./configure --prefix=$output --enable-monolithic=yes --enable-shared=no --enable-unicode --enable-ffile \ ./configure --prefix=$output --enable-monolithic=yes --enable-shared=no --enable-unicode --enable-ffile \
--without-libtiff --enable-graphics_ctx $cfg_switches \ --without-libtiff --with-libpng=sys --enable-graphics_ctx $cfg_switches \
--disable-largefile CPPFLAGS="$CPPCFLAGS $WXWIDGETS_EXTRA_CFLAGS" && --disable-largefile CPPFLAGS="$CPPCFLAGS $WXWIDGETS_EXTRA_CFLAGS" &&
make clean && make clean &&
make && make &&
Expand Down
1 change: 1 addition & 0 deletions external/get_externals_linux.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ _extract_and_patch()
patch tinyxml/tinyxml.h < patches/tinyxml/tinyxml.h.patch patch tinyxml/tinyxml.h < patches/tinyxml/tinyxml.h.patch
echo "---- Applying wxwidget patches ----" echo "---- Applying wxwidget patches ----"
patch -Np1 -d wxwidgets < patches/wxWidgets-gsock.patch patch -Np1 -d wxwidgets < patches/wxWidgets-gsock.patch
patch -Np1 -d wxwidgets < patches/wxWidgets-r63137.patch
echo "---- Applying webkit patches ----" echo "---- Applying webkit patches ----"
patch -Np1 -d webkit < patches/webkit/webkit_688833_to_git_trunk.diff patch -Np1 -d webkit < patches/webkit/webkit_688833_to_git_trunk.diff
patch -Np1 -d webkit < patches/webkit/fully-static.patch patch -Np1 -d webkit < patches/webkit/fully-static.patch
Expand Down
66 changes: 66 additions & 0 deletions external/patches/wxWidgets-r63137.patch
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,66 @@
--- wxWidgets/configure.in 2009/12/27 19:40:15 62997
+++ wxWidgets/configure.in 2010/01/12 15:47:16 63137
@@ -2519,7 +2519,7 @@
AC_CHECK_HEADER(png.h,,, [ ])

if test "$ac_cv_header_png_h" = "yes"; then
- AC_CHECK_LIB(png, png_check_sig, PNG_LINK=" -lpng -lz", , [-lz -lm])
+ AC_CHECK_LIB(png, png_sig_cmp, PNG_LINK=" -lpng -lz", , [-lz -lm])
fi

if test "x$PNG_LINK" = "x" ; then
--- wxwidgets.orig/configure 2010-10-29 23:29:29.812000315 +0400
+++ wxwidgets/configure 2010-10-29 23:30:08.681000043 +0400
@@ -26379,9 +26379,9 @@


if test "$ac_cv_header_png_h" = "yes"; then
- echo "$as_me:$LINENO: checking for png_check_sig in -lpng" >&5
-echo $ECHO_N "checking for png_check_sig in -lpng... $ECHO_C" >&6
-if test "${ac_cv_lib_png_png_check_sig+set}" = set; then
+ echo "$as_me:$LINENO: checking for png_sig_cmp in -lpng" >&5
+echo $ECHO_N "checking for png_sig_cmp in -lpng... $ECHO_C" >&6
+if test "${ac_cv_lib_png_png_sig_cmp+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -26399,11 +26399,11 @@
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char png_check_sig ();
+char png_sig_cmp ();
int
main ()
{
-png_check_sig ();
+png_sig_cmp ();
;
return 0;
}
@@ -26429,20 +26429,20 @@
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_png_png_check_sig=yes
+ ac_cv_lib_png_png_sig_cmp=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

-ac_cv_lib_png_png_check_sig=no
+ac_cv_lib_png_png_sig_cmp=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_check_sig" >&5
-echo "${ECHO_T}$ac_cv_lib_png_png_check_sig" >&6
-if test $ac_cv_lib_png_png_check_sig = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_sig_cmp" >&5
+echo "${ECHO_T}$ac_cv_lib_png_png_sig_cmp" >&6
+if test $ac_cv_lib_png_png_sig_cmp = yes; then
PNG_LINK=" -lpng -lz"
fi

0 comments on commit 5fea67a

Please sign in to comment.