changeset 896:5e1d76c5caf9

cleanup of the "boolean" and "INT32" fixes for package jpeg
author Volker Grabsch <vog@notjusthosting.com>
date Wed, 21 Apr 2010 13:42:44 +0200
parents 09113bc06d72
children 0379a09e0b7a
files src/jpeg-win32.patch src/jpeg.mk src/w32api.mk
diffstat 3 files changed, 35 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jpeg-win32.patch	Wed Apr 21 13:42:44 2010 +0200
@@ -0,0 +1,35 @@
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+diff -r 13edd7b348d4 jmorecfg.h
+--- a/jmorecfg.h	Wed Apr 21 10:15:34 2010 +0200
++++ b/jmorecfg.h	Wed Apr 21 11:36:07 2010 +0200
+@@ -10,6 +10,16 @@
+  * JPEG software for special applications or support machine-dependent
+  * optimizations.  Most users will not need to touch this file.
+  */
++
++
++/*
++ * Load standard definitions on Windows systems to ensure that these
++ * are defined when _building_ as well as _using_ the library.
++ */
++
++#ifdef _WIN32
++#include <windows.h>
++#endif
+ 
+ 
+ /*
+@@ -233,7 +243,11 @@
+  */
+ 
+ #ifndef HAVE_BOOLEAN
++#ifndef _RPCNDR_H_		/* Microsoft defines it in rpcndr.h */
++#ifndef _RPCNDR_H		/* MinGW is slightly different */
+ typedef int boolean;
++#endif
++#endif
+ #endif
+ #ifndef FALSE			/* in case these macros already exist */
+ #define FALSE	0		/* values of boolean */
--- a/src/jpeg.mk	Wed Apr 21 13:40:53 2010 +0200
+++ b/src/jpeg.mk	Wed Apr 21 13:42:44 2010 +0200
@@ -19,8 +19,6 @@
 endef
 
 define $(PKG)_BUILD
-    # avoid redefinition of INT32
-    $(SED) -i 's,typedef long INT32;,#include <basetsd.h>,' '$(1)/jmorecfg.h'
     cd '$(1)' && ./configure \
         --prefix='$(PREFIX)/$(TARGET)' \
         --host='$(TARGET)' \
--- a/src/w32api.mk	Wed Apr 21 13:40:53 2010 +0200
+++ b/src/w32api.mk	Wed Apr 21 13:42:44 2010 +0200
@@ -19,8 +19,6 @@
 endef
 
 define $(PKG)_BUILD
-    # fix incompatibilities with jpeg
-    $(SED) -i 's,typedef unsigned char boolean;,,'           '$(1)/include/rpcndr.h'
     $(INSTALL) -d '$(PREFIX)/$(TARGET)'
     cp -rpv '$(1)/include' '$(1)/lib' '$(PREFIX)/$(TARGET)'
 endef