mirror of https://git.wownero.com/dsc/mxe.git
don't remove the "-mno-cygwin" flag, but provide clean bugfixes instead for packages fltk and xvidcore
This commit is contained in:
parent
b99e3d4766
commit
dbed610cc7
|
@ -0,0 +1,102 @@
|
|||
This file is part of mingw-cross-env.
|
||||
See doc/index.html for further information.
|
||||
|
||||
Contains ad hoc patches for cross building.
|
||||
|
||||
From b3ddcfa1b97e4dc570626b9fce010646aa5cff9d Mon Sep 17 00:00:00 2001
|
||||
From: mingw-cross-env
|
||||
Date: Sun, 27 Mar 2011 22:48:31 +0200
|
||||
Subject: [PATCH 1/2] fix png: http://www.fltk.org/strfiles/2542/libpng-1.5.diff
|
||||
|
||||
|
||||
diff --git a/src/Fl_PNG_Image.cxx b/src/Fl_PNG_Image.cxx
|
||||
index 5c7d5d2..9da2a82 100644
|
||||
--- a/src/Fl_PNG_Image.cxx
|
||||
+++ b/src/Fl_PNG_Image.cxx
|
||||
@@ -66,6 +66,7 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read
|
||||
png_structp pp; // PNG read pointer
|
||||
png_infop info; // PNG info pointers
|
||||
png_bytep *rows; // PNG row pointers
|
||||
+ int num_trans = 0; // PNG # of transp. colors
|
||||
|
||||
|
||||
// Open the PNG file...
|
||||
@@ -75,7 +76,7 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read
|
||||
pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||
info = png_create_info_struct(pp);
|
||||
|
||||
- if (setjmp(pp->jmpbuf))
|
||||
+ if (setjmp(png_jmpbuf(pp)))
|
||||
{
|
||||
Fl::warning("PNG file \"%s\" contains errors!\n", png);
|
||||
return;
|
||||
@@ -87,27 +88,28 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read
|
||||
// Get the image dimensions and convert to grayscale or RGB...
|
||||
png_read_info(pp, info);
|
||||
|
||||
- if (info->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
+ if (png_get_color_type(pp, info) == PNG_COLOR_TYPE_PALETTE)
|
||||
png_set_expand(pp);
|
||||
|
||||
- if (info->color_type & PNG_COLOR_MASK_COLOR)
|
||||
+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
|
||||
channels = 3;
|
||||
else
|
||||
channels = 1;
|
||||
|
||||
- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
|
||||
+ png_get_tRNS(pp, info, 0, &num_trans, 0);
|
||||
+ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
|
||||
channels ++;
|
||||
|
||||
- w((int)(info->width));
|
||||
- h((int)(info->height));
|
||||
+ w((int)(png_get_image_width(pp, info)));
|
||||
+ h((int)(png_get_image_height(pp, info)));
|
||||
d(channels);
|
||||
|
||||
- if (info->bit_depth < 8)
|
||||
+ if (png_get_bit_depth(pp, info) < 8)
|
||||
{
|
||||
png_set_packing(pp);
|
||||
png_set_expand(pp);
|
||||
}
|
||||
- else if (info->bit_depth == 16)
|
||||
+ else if (png_get_bit_depth(pp, info) == 16)
|
||||
png_set_strip_16(pp);
|
||||
|
||||
# if defined(HAVE_PNG_GET_VALID) && defined(HAVE_PNG_SET_TRNS_TO_ALPHA)
|
||||
--
|
||||
1.7.4.1
|
||||
|
||||
|
||||
From 45b72f8c1af18bc8d98dc2358c01a2257b7074bc Mon Sep 17 00:00:00 2001
|
||||
From: mingw-cross-env
|
||||
Date: Sun, 27 Mar 2011 22:50:54 +0200
|
||||
Subject: [PATCH 2/2] remove obsolete -mno-cygwin
|
||||
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 739c234..ab8a652 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -72,16 +72,6 @@ case $uname in
|
||||
CYGWIN* | MINGW*)
|
||||
# Handle Cygwin option *first*, before all other tests.
|
||||
AC_ARG_ENABLE(cygwin, [ --enable-cygwin use the CygWin libraries [default=no]])
|
||||
- if test x$enable_cygwin != xyes; then
|
||||
- # NOTE: We can't use ARCHFLAGS for this, since it does not work
|
||||
- # with some of the function tests - Cygwin uses a
|
||||
- # different C library...
|
||||
- CFLAGS="$CFLAGS -mno-cygwin"
|
||||
- CPPFLAGS="$CPPFLAGS -mno-cygwin"
|
||||
- CXXFLAGS="$CXXFLAGS -mno-cygwin"
|
||||
- LDFLAGS="$LDFLAGS -mno-cygwin"
|
||||
- DSOFLAGS="$DSOFLAGS -mno-cygwin"
|
||||
- fi
|
||||
;;
|
||||
Darwin*)
|
||||
# Starting with 10.6 (Snow Leopard), OS X does not support
|
||||
--
|
||||
1.7.4.1
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
This file is part of mingw-cross-env.
|
||||
See doc/index.html for further information.
|
||||
|
||||
http://www.fltk.org/strfiles/2542/libpng-1.5.diff
|
||||
Index: src/Fl_PNG_Image.cxx
|
||||
===================================================================
|
||||
--- a/src/Fl_PNG_Image.cxx (Revision 8485)
|
||||
+++ b/src/Fl_PNG_Image.cxx (Arbeitskopie)
|
||||
@@ -66,6 +66,7 @@
|
||||
png_structp pp; // PNG read pointer
|
||||
png_infop info; // PNG info pointers
|
||||
png_bytep *rows; // PNG row pointers
|
||||
+ int num_trans = 0; // PNG # of transp. colors
|
||||
|
||||
|
||||
// Open the PNG file...
|
||||
@@ -75,7 +76,7 @@
|
||||
pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||
info = png_create_info_struct(pp);
|
||||
|
||||
- if (setjmp(pp->jmpbuf))
|
||||
+ if (setjmp(png_jmpbuf(pp)))
|
||||
{
|
||||
Fl::warning("PNG file \"%s\" contains errors!\n", png);
|
||||
return;
|
||||
@@ -87,27 +88,28 @@
|
||||
// Get the image dimensions and convert to grayscale or RGB...
|
||||
png_read_info(pp, info);
|
||||
|
||||
- if (info->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
+ if (png_get_color_type(pp, info) == PNG_COLOR_TYPE_PALETTE)
|
||||
png_set_expand(pp);
|
||||
|
||||
- if (info->color_type & PNG_COLOR_MASK_COLOR)
|
||||
+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
|
||||
channels = 3;
|
||||
else
|
||||
channels = 1;
|
||||
|
||||
- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
|
||||
+ png_get_tRNS(pp, info, 0, &num_trans, 0);
|
||||
+ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
|
||||
channels ++;
|
||||
|
||||
- w((int)(info->width));
|
||||
- h((int)(info->height));
|
||||
+ w((int)(png_get_image_width(pp, info)));
|
||||
+ h((int)(png_get_image_height(pp, info)));
|
||||
d(channels);
|
||||
|
||||
- if (info->bit_depth < 8)
|
||||
+ if (png_get_bit_depth(pp, info) < 8)
|
||||
{
|
||||
png_set_packing(pp);
|
||||
png_set_expand(pp);
|
||||
}
|
||||
- else if (info->bit_depth == 16)
|
||||
+ else if (png_get_bit_depth(pp, info) == 16)
|
||||
png_set_strip_16(pp);
|
||||
|
||||
# if defined(HAVE_PNG_GET_VALID) && defined(HAVE_PNG_SET_TRNS_TO_ALPHA)
|
|
@ -19,10 +19,10 @@ define $(PKG)_UPDATE
|
|||
endef
|
||||
|
||||
define $(PKG)_BUILD
|
||||
cd '$(1)' && autoconf
|
||||
$(SED) -i 's,\$$uname,MINGW,g' '$(1)/configure'
|
||||
# wine confuses the cross-compiling detection, so set it explicitly
|
||||
$(SED) -i 's,cross_compiling=no,cross_compiling=yes,' '$(1)/configure'
|
||||
$(SED) -i 's,-mno-cygwin,,' '$(1)/configure'
|
||||
cd '$(1)' && ./configure \
|
||||
--host='$(TARGET)' \
|
||||
--disable-shared \
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
This file is part of mingw-cross-env.
|
||||
See doc/index.html for further information.
|
||||
|
||||
Contains ad hoc patches for cross building.
|
||||
|
||||
From dce4564d204160aee0da5107e69cbdefe2bec921 Mon Sep 17 00:00:00 2001
|
||||
From: mingw-cross-env
|
||||
Date: Mon, 28 Mar 2011 00:00:51 +0200
|
||||
Subject: [PATCH] remove obsolete -mno-cygwin
|
||||
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 0536fe1..b954a10 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -286,8 +286,8 @@ case "$target_os" in
|
||||
AC_MSG_RESULT([ok])
|
||||
STATIC_LIB="xvidcore.\$(STATIC_EXTENSION)"
|
||||
SHARED_LIB="xvidcore.\$(SHARED_EXTENSION)"
|
||||
- SPECIFIC_LDFLAGS="-mno-cygwin -shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def"
|
||||
- SPECIFIC_CFLAGS="-mno-cygwin"
|
||||
+ SPECIFIC_LDFLAGS="-shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def"
|
||||
+ SPECIFIC_CFLAGS=""
|
||||
;;
|
||||
darwin*|raphsody*)
|
||||
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"
|
||||
--
|
||||
1.7.4.1
|
||||
|
|
@ -19,9 +19,9 @@ define $(PKG)_UPDATE
|
|||
endef
|
||||
|
||||
define $(PKG)_BUILD
|
||||
cd '$(1)' && autoconf
|
||||
# wine confuses the cross-compiling detection, so set it explicitly
|
||||
$(SED) -i 's,cross_compiling=no,cross_compiling=yes,' '$(1)/configure'
|
||||
$(SED) -i 's,-mno-cygwin,,' '$(1)/configure'
|
||||
cd '$(1)' && ./configure \
|
||||
--host='$(TARGET)' \
|
||||
--prefix='$(PREFIX)/$(TARGET)'
|
||||
|
|
Loading…
Reference in New Issue