comparison src/freeimage-1-fixes.patch @ 2250:2c79af54c1ed

update package freeimage
author Mark Brand <mabrand@mabrand.nl>
date Mon, 20 Feb 2012 10:01:09 +0100
parents
children 742861a24bd2
comparison
equal deleted inserted replaced
2249:324718887993 2250:2c79af54c1ed
1 This file is part of mingw-cross-env.
2 See doc/index.html for further information.
3
4 Contains ad hoc patches for cross building.
5
6 From 53dfe1821165131a85bbe5db1f238b14843bba2c Mon Sep 17 00:00:00 2001
7 From: mingw-cross-env
8 Date: Mon, 20 Feb 2012 09:02:05 +0100
9 Subject: [PATCH 1/3] add missing header for mingw
10
11 taken from
12 https://sourceforge.net/tracker/?func=detail&aid=3489514&group_id=11504&atid=311504
13
14 diff --git a/Source/LibRawLite/src/libraw_datastream.cpp b/Source/LibRawLite/src/libraw_datastream.cpp
15 index 33a81b9..c5d57f6 100644
16 --- a/Source/LibRawLite/src/libraw_datastream.cpp
17 +++ b/Source/LibRawLite/src/libraw_datastream.cpp
18 @@ -8,7 +8,10 @@
19 #else
20 #define NO_JASPER
21 #endif
22 -
23 +#ifdef __MINGW32__
24 +#include <stdexcept>
25 +#include <winbase.h>
26 +#endif
27
28 LibRaw_byte_buffer::LibRaw_byte_buffer(unsigned sz)
29 {
30 --
31 1.7.9
32
33
34 From 395b4a4ea08a39596b32bee790ccad6bcadd4995 Mon Sep 17 00:00:00 2001
35 From: mingw-cross-env
36 Date: Mon, 20 Feb 2012 08:58:53 +0100
37 Subject: [PATCH 2/3] makefile workarounds (mingw-cross-env)
38
39
40 diff --git a/Makefile.gnu b/Makefile.gnu
41 index 58f596d..631eb82 100644
42 --- a/Makefile.gnu
43 +++ b/Makefile.gnu
44 @@ -9,7 +9,7 @@ INCDIR ?= $(DESTDIR)/usr/include
45 INSTALLDIR ?= $(DESTDIR)/usr/lib
46
47 # Converts cr/lf to just lf
48 -DOS2UNIX = dos2unix
49 +DOS2UNIX = echo 'dos2unix not needed '
50
51 LIBRARIES = -lstdc++
52
53 @@ -40,13 +40,12 @@ all: dist
54
55 dist: FreeImage
56 cp *.a Dist
57 - cp *.so Dist
58 cp Source/FreeImage.h Dist
59
60 dos2unix:
61 @$(DOS2UNIX) $(SRCS) $(INCLS)
62
63 -FreeImage: $(STATICLIB) $(SHAREDLIB)
64 +FreeImage: $(STATICLIB)
65
66 .c.o:
67 $(CC) $(CFLAGS) -c $< -o $@
68 @@ -62,12 +61,8 @@ $(SHAREDLIB): $(MODULES)
69
70 install:
71 install -d $(INCDIR) $(INSTALLDIR)
72 - install -m 644 -o root -g root $(HEADER) $(INCDIR)
73 - install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
74 - install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
75 - ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
76 - ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
77 - ldconfig
78 + install -m 644 $(HEADER) $(INCDIR)
79 + install -m 644 $(STATICLIB) $(INSTALLDIR)
80
81 clean:
82 rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
83 --
84 1.7.9
85
86
87 From 363c6de7d01bdc2c6504483307f30131e0fbfeed Mon Sep 17 00:00:00 2001
88 From: mingw-cross-env
89 Date: Mon, 20 Feb 2012 09:47:08 +0100
90 Subject: [PATCH 3/3] required win version (mingw-cross-env)
91
92
93 diff --git a/Makefile.gnu b/Makefile.gnu
94 index 631eb82..1809017 100644
95 --- a/Makefile.gnu
96 +++ b/Makefile.gnu
97 @@ -15,9 +15,9 @@ LIBRARIES = -lstdc++
98
99 MODULES = $(SRCS:.c=.o)
100 MODULES := $(MODULES:.cpp=.o)
101 -CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
102 +CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS -DWINVER=0x0501
103 CFLAGS += $(INCLUDE)
104 -CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
105 +CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -DWINVER=0x0501
106 CXXFLAGS += $(INCLUDE)
107
108 ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
109 --
110 1.7.9
111