summaryrefslogtreecommitdiffstats
path: root/src/freeimage-1-fixes.patch
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2012-04-12 15:23:12 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2012-04-12 15:23:12 (GMT)
commit1f86817ee82b162a1a5bd495886183ca81a68ba7 (patch)
tree3116df65f83174295af8c6315a36583f460fe9e0 /src/freeimage-1-fixes.patch
parent0f01e5e88f720fe5073c88f5cf1803d5c283904d (diff)
parente513258770cdc39c0d6a904437f191aa61b3175c (diff)
downloadmxe-2.22.zip
mxe-2.22.tar.gz
mxe-2.22.tar.bz2
Merge all well-tested changes into the stable branchv2.22
Diffstat (limited to 'src/freeimage-1-fixes.patch')
-rw-r--r--src/freeimage-1-fixes.patch118
1 files changed, 118 insertions, 0 deletions
diff --git a/src/freeimage-1-fixes.patch b/src/freeimage-1-fixes.patch
new file mode 100644
index 0000000..9b1ede4
--- /dev/null
+++ b/src/freeimage-1-fixes.patch
@@ -0,0 +1,118 @@
+This file is part of MXE.
+See index.html for further information.
+
+Contains ad hoc patches for cross building.
+
+From 7b90b53e9d48aa13aaa42d60b060fb3ff9a5f11c Mon Sep 17 00:00:00 2001
+From: MXE
+Date: Mon, 20 Feb 2012 09:02:05 +0100
+Subject: [PATCH 1/3] add missing header for mingw
+
+taken from
+https://sourceforge.net/tracker/?func=detail&aid=3489514&group_id=11504&atid=311504
+---
+ .../Source/LibRawLite/src/libraw_datastream.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/Source/LibRawLite/src/libraw_datastream.cpp b/Source/LibRawLite/src/libraw_datastream.cpp
+index 33a81b9..c5d57f6 100644
+--- a/Source/LibRawLite/src/libraw_datastream.cpp
++++ b/Source/LibRawLite/src/libraw_datastream.cpp
+@@ -8,7 +8,10 @@
+ #else
+ #define NO_JASPER
+ #endif
+-
++#ifdef __MINGW32__
++#include <stdexcept>
++#include <winbase.h>
++#endif
+
+ LibRaw_byte_buffer::LibRaw_byte_buffer(unsigned sz)
+ {
+--
+1.7.9.2
+
+From fa251a7e33ac1c73992a5825a1f1f2fa888af93c Mon Sep 17 00:00:00 2001
+From: MXE
+Date: Mon, 20 Feb 2012 08:58:53 +0100
+Subject: [PATCH 2/3] makefile workarounds (MXE)
+
+---
+ FreeImage/Makefile.gnu | 13 ++++---------
+ 1 file changed, 4 insertions(+), 9 deletions(-)
+
+diff --git a/Makefile.gnu b/Makefile.gnu
+index e6007ae..631eb82 100644
+--- a/Makefile.gnu
++++ b/Makefile.gnu
+@@ -9,7 +9,7 @@ INCDIR ?= $(DESTDIR)/usr/include
+ INSTALLDIR ?= $(DESTDIR)/usr/lib
+
+ # Converts cr/lf to just lf
+-DOS2UNIX = dos2unix
++DOS2UNIX = echo 'dos2unix not needed '
+
+ LIBRARIES = -lstdc++
+
+@@ -40,13 +40,12 @@ all: dist
+
+ dist: FreeImage
+ cp *.a Dist
+- cp *.so Dist
+ cp Source/FreeImage.h Dist
+
+ dos2unix:
+ @$(DOS2UNIX) $(SRCS) $(INCLS)
+
+-FreeImage: $(STATICLIB) $(SHAREDLIB)
++FreeImage: $(STATICLIB)
+
+ .c.o:
+ $(CC) $(CFLAGS) -c $< -o $@
+@@ -62,12 +61,8 @@ $(SHAREDLIB): $(MODULES)
+
+ install:
+ install -d $(INCDIR) $(INSTALLDIR)
+- install -m 644 -o root -g root $(HEADER) $(INCDIR)
+- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
+- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
+- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
+- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
+-# ldconfig
++ install -m 644 $(HEADER) $(INCDIR)
++ install -m 644 $(STATICLIB) $(INSTALLDIR)
+
+ clean:
+ rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
+--
+1.7.9.2
+
+From 5f52e869fdcc5a18592a6b87b83ce1f6c15a3ac0 Mon Sep 17 00:00:00 2001
+From: MXE
+Date: Mon, 20 Feb 2012 09:47:08 +0100
+Subject: [PATCH 3/3] required win version (MXE)
+
+---
+ FreeImage/Makefile.gnu | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.gnu b/Makefile.gnu
+index 631eb82..1809017 100644
+--- a/Makefile.gnu
++++ b/Makefile.gnu
+@@ -15,9 +15,9 @@ LIBRARIES = -lstdc++
+
+ MODULES = $(SRCS:.c=.o)
+ MODULES := $(MODULES:.cpp=.o)
+-CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
++CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS -DWINVER=0x0501
+ CFLAGS += $(INCLUDE)
+-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
++CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -DWINVER=0x0501
+ CXXFLAGS += $(INCLUDE)
+
+ ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
+--
+1.7.9.2
+