changeset 4179:6409a12147fd

bzip2: use aff patch * src/bzip2.mk: remove SED mods to source * src/bzip2-1-fixes.patch: new file * dist-files.mk: add bzip2-1-fixes.patch
author John Donoghue <john.donoghue@ieee.org>
date Tue, 26 Jul 2016 05:59:06 -0400
parents a7e6025bcb39
children 3fc30cd416ac
files dist-files.mk src/bzip2-1-fixes.patch src/bzip2.mk
diffstat 3 files changed, 59 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Tue Jul 26 11:15:06 2016 -0400
+++ b/dist-files.mk	Tue Jul 26 05:59:06 2016 -0400
@@ -40,6 +40,7 @@
   build-texinfo.mk \
   build-xz.mk \
   build-yasm.mk \
+  bzip2-1-fixes.patch \
   bzip2.mk \
   cairo-2-static-init.patch \
   cairo.mk \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/bzip2-1-fixes.patch	Tue Jul 26 05:59:06 2016 -0400
@@ -0,0 +1,54 @@
+This file is part of MXE.
+See index.html for further information.
+
+diff -uNr bzip2-1.0.6.orig/bzip2.c bzip2-1.0.6/bzip2.c
+--- bzip2-1.0.6.orig/bzip2.c	2010-09-11 01:04:53.000000000 +0200
++++ bzip2-1.0.6/bzip2.c	2013-01-30 16:24:00.170396872 +0100
+@@ -128,7 +128,7 @@
+ #if BZ_LCCWIN32
+ #   include <io.h>
+ #   include <fcntl.h>
+-#   include <sys\stat.h>
++#   include <sys/stat.h>
+ 
+ #   define NORETURN       /**/
+ #   define PATH_SEP       '\\'
+diff -uNr bzip2-1.0.6.orig/bzlib.h bzip2-1.0.6/bzlib.h
+--- bzip2-1.0.6.orig/bzlib.h	2010-09-11 01:08:42.000000000 +0200
++++ bzip2-1.0.6/bzlib.h	2013-01-30 16:22:10.514401460 +0100
+@@ -75,7 +75,7 @@
+ #include <stdio.h>
+ #endif
+ 
+-#ifdef _WIN32
++#if 0
+ #   include <windows.h>
+ #   ifdef small
+       /* windows.h define small to char */
+@@ -116,7 +116,7 @@
+ BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( 
+       bz_stream *strm, 
+       int       verbosity, 
+-      int       small
++      int       small_
+    );
+ 
+ BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( 
+@@ -140,7 +140,7 @@
+       int*  bzerror,   
+       FILE* f, 
+       int   verbosity, 
+-      int   small,
++      int   small_,
+       void* unused,    
+       int   nUnused 
+    );
+@@ -216,7 +216,7 @@
+       unsigned int* destLen,
+       char*         source, 
+       unsigned int  sourceLen,
+-      int           small, 
++      int           small_, 
+       int           verbosity 
+    );
+ 
--- a/src/bzip2.mk	Tue Jul 26 11:15:06 2016 -0400
+++ b/src/bzip2.mk	Tue Jul 26 05:59:06 2016 -0400
@@ -19,8 +19,8 @@
 
 ifneq ($(filter mingw msvc,$(MXE_SYSTEM)),)
 define $(PKG)_BUILD
-    $(SED) -i 's,sys\\stat\.h,sys/stat.h,g' '$(1)/bzip2.c'
-    $(SED) -i 's,WINAPI,,g'                 '$(1)/bzlib.h'
+    #$(SED) -i 's,sys\\stat\.h,sys/stat.h,g' '$(1)/bzip2.c'
+    #$(SED) -i 's,WINAPI,,g'                 '$(1)/bzlib.h'
     $(MAKE) -C '$(1)' -j '$(JOBS)' libbz2.a bzip2 \
         PREFIX='$(HOST_PREFIX)' \
         CC='$(MXE_CC)' \
@@ -43,8 +43,8 @@
 endef
 else
 define $(PKG)_BUILD
-    $(SED) -i 's,sys\\stat\.h,sys/stat.h,g' '$(1)/bzip2.c'
-    $(SED) -i 's,WINAPI,,g'                 '$(1)/bzlib.h'
+    #$(SED) -i 's,sys\\stat\.h,sys/stat.h,g' '$(1)/bzip2.c'
+    #$(SED) -i 's,WINAPI,,g'                 '$(1)/bzlib.h'
     $(MAKE) -C '$(1)' -j '$(JOBS)' -f Makefile-libbz2_so \
         PREFIX='$(HOST_PREFIX)' \
         CC='$(MXE_CC)' \