lfcbase, lfcxml, cego : New packages
The packages are from http://www.lemke-it.com lfcbase - Lemke Foundation Class C++ base classes lfcxml - Lemke Foundation Class C++ xml library cego - Relational and transactional database system
This commit is contained in:
committed by
Bjoern Lemke
parent
f2575c7935
commit
6deff4ad13
@@ -1,64 +0,0 @@
|
||||
diff -rupN FreeImage/FreeImage.2008.vcproj FreeImage-new/FreeImage.2008.vcproj
|
||||
--- FreeImage/FreeImage.2008.vcproj 2014-01-16 00:27:04.000000000 +0100
|
||||
+++ FreeImage-new/FreeImage.2008.vcproj 2014-01-16 00:49:42.334523250 +0100
|
||||
@@ -832,10 +828,6 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
- RelativePath="Source\FreeImageToolkit\JPEGTransform.cpp"
|
||||
- >
|
||||
- </File>
|
||||
- <File
|
||||
RelativePath="Source\FreeImageToolkit\MultigridPoissonSolver.cpp"
|
||||
>
|
||||
</File>
|
||||
diff -rupN FreeImage/Source/FreeImage.h FreeImage-new/Source/FreeImage.h
|
||||
--- FreeImage/Source/FreeImage.h 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage.h 2014-01-16 00:49:42.338523316 +0100
|
||||
@@ -456,6 +461,10 @@ FI_ENUM(FREE_IMAGE_DITHER) {
|
||||
FID_BAYER16x16 = 6 // Bayer ordered dispersed dot dithering (order 4 dithering matrix)
|
||||
};
|
||||
|
||||
+/* The FreeImage_JPEGTransform functions are deliberately disabled in the
|
||||
+ Fedora build of FreeImage as they require that FreeImage uses a private copy
|
||||
+ of libjpeg which is a no no because of security reasons. */
|
||||
+#if 0
|
||||
/** Lossless JPEG transformations
|
||||
Constants used in FreeImage_JPEGTransform
|
||||
*/
|
||||
@@ -469,6 +478,7 @@ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
|
||||
FIJPEG_OP_ROTATE_180 = 6, // 180-degree rotation
|
||||
FIJPEG_OP_ROTATE_270 = 7 // 270-degree clockwise (or 90 ccw)
|
||||
};
|
||||
+#endif
|
||||
|
||||
/** Tone mapping operators.
|
||||
Constants used in FreeImage_ToneMapping.
|
||||
@@ -704,7 +714,6 @@ typedef void (DLL_CALLCONV *FI_InitProc)
|
||||
#define PNG_DEFAULT 0
|
||||
#define PNG_IGNOREGAMMA 1 //! loading: avoid gamma correction
|
||||
#define PNG_Z_BEST_SPEED 0x0001 //! save using ZLib level 1 compression flag (default value is 6)
|
||||
-#define PNG_Z_DEFAULT_COMPRESSION 0x0006 //! save using ZLib level 6 compression flag (default recommended value)
|
||||
#define PNG_Z_BEST_COMPRESSION 0x0009 //! save using ZLib level 9 compression flag (default value is 6)
|
||||
#define PNG_Z_NO_COMPRESSION 0x0100 //! save without ZLib compression
|
||||
#define PNG_INTERLACED 0x0200 //! save using Adam7 interlacing (use | to combine with other save flags)
|
||||
@@ -1048,14 +1057,19 @@ DLL_API FIBITMAP *DLL_CALLCONV FreeImage
|
||||
// JPEG lossless transformation routines
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
+/* The FreeImage_JPEGTransform functions are deliberately disabled in the
|
||||
+ Fedora build of FreeImage as they require that FreeImage uses a private copy
|
||||
+ of libjpeg which is a no no because of security reasons. */
|
||||
+#if 0
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom);
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCropU(const wchar_t *src_file, const wchar_t *dst_file, int left, int top, int right, int bottom);
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, fi_handle src_handle, FreeImageIO* dst_io, fi_handle dst_handle, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
|
||||
+#endif
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -1,405 +0,0 @@
|
||||
--- FreeImage/Makefile.fip.orig 2014-04-16 18:58:24.825800000 +0400
|
||||
+++ FreeImage/Makefile.fip 2014-04-16 19:12:58.956000000 +0400
|
||||
@@ -1,81 +1,97 @@
|
||||
-# Linux makefile for FreeImagePlus
|
||||
+# Mingw makefile for FreeImagePlus
|
||||
|
||||
# This file can be generated by ./genfipsrclist.sh
|
||||
include fipMakefile.srcs
|
||||
|
||||
-# General configuration variables:
|
||||
-DESTDIR ?= /
|
||||
-INCDIR ?= $(DESTDIR)/usr/include
|
||||
-INSTALLDIR ?= $(DESTDIR)/usr/lib
|
||||
-
|
||||
-# Converts cr/lf to just lf
|
||||
-DOS2UNIX = dos2unix
|
||||
-
|
||||
-LIBRARIES = -lstdc++
|
||||
-
|
||||
-MODULES = $(SRCS:.c=.o)
|
||||
-MODULES := $(MODULES:.cpp=.o)
|
||||
-CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden
|
||||
-# OpenJPEG
|
||||
-CFLAGS += -DOPJ_STATIC
|
||||
-# LibRaw
|
||||
-CFLAGS += -DNO_LCMS
|
||||
-# LibJXR
|
||||
-CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
|
||||
-CFLAGS += $(INCLUDE)
|
||||
-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
|
||||
-# LibJXR
|
||||
-CXXFLAGS += -D__ANSI__
|
||||
-CXXFLAGS += $(INCLUDE)
|
||||
-
|
||||
-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
|
||||
- CFLAGS += -fPIC
|
||||
- CXXFLAGS += -fPIC
|
||||
-endif
|
||||
+CC = $(MINGW_TARGET)-gcc
|
||||
+CXX = $(MINGW_TARGET)-g++
|
||||
+LD = $(MINGW_TARGET)-g++
|
||||
+AR = ar
|
||||
+DLLTOOL = dlltool
|
||||
+RC = windres
|
||||
+PKGCONFIG = pkg-config
|
||||
+
|
||||
+CP = cp
|
||||
+MD = mkdir
|
||||
+RM = rm
|
||||
+
|
||||
+# General configuration variables.
|
||||
+DESTDIR ?= $(SystemRoot)
|
||||
+INSTALLDIR ?= $(DESTDIR)/system32
|
||||
+DISTDIR ?= Dist
|
||||
+SRCDIR ?= Wrapper/FreeImagePlus/
|
||||
+HEADER = FreeImagePlus.h
|
||||
+RCFILE = Wrapper/FreeImagePlus/FreeImagePlus.rc
|
||||
+
|
||||
+# Uncomment this variable to make a static library. This may
|
||||
+# also be specified as an environment variable and can hold
|
||||
+# any of STATIC and SHARED and must be in uppercase letters.
|
||||
+# The FreeImage library type defaults to SHARED.
|
||||
+FREEIMAGE_LIBRARY_TYPE ?= SHARED
|
||||
+
|
||||
+WIN32_STATIC_FLAGS = -DFREEIMAGE_LIB
|
||||
+WIN32_SHARED_FLAGS = -DFIP_EXPORTS
|
||||
+
|
||||
+# Converts cr/lf to just lf
|
||||
+DOS2UNIX = dos2unix
|
||||
+
|
||||
+LIBRARIES = -lstdc++ -lfreeimage-$(VER_MAJOR).$(VER_MINOR) -L.
|
||||
+MODULES = $(SRCS:.c=.o)
|
||||
+MODULES := $(MODULES:.cpp=.o)
|
||||
+RESOURCE = $(RCFILE:.rc=.coff)
|
||||
+CFLAGS += -ISource $(INCLUDE) -DDISABLE_PERF_MEASUREMENT $(WIN32_$(FREEIMAGE_LIBRARY_TYPE)_FLAGS)
|
||||
+CXXFLAGS += -ISource $(INCLUDE) $(WIN32_$(FREEIMAGE_LIBRARY_TYPE)_FLAGS)
|
||||
+LDFLAGS += -shared -Wl,-soname,$(SOLIBNAME)
|
||||
+LDFLAGS += -LDist -lfreeimage -lgdi32
|
||||
|
||||
-TARGET = freeimageplus
|
||||
+TARGET = freeimageplus
|
||||
STATICLIB = lib$(TARGET).a
|
||||
-SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
|
||||
-LIBNAME = lib$(TARGET).so
|
||||
-VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
|
||||
-HEADER = Source/FreeImage.h
|
||||
-HEADERFIP = Wrapper/FreeImagePlus/FreeImagePlus.h
|
||||
+SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).dll
|
||||
+IMPORTLIB = lib$(TARGET).dll.a
|
||||
+EXPORTLIB = $(TARGET).exp
|
||||
+SOLIBNAME = $(SHAREDLIB)
|
||||
|
||||
+DISTSHARED = $(addprefix $(DISTDIR)/, $(SHAREDLIB) $(IMPORTLIB) $(HEADER))
|
||||
+DISTSTATIC = $(addprefix $(DISTDIR)/, $(STATICLIB) $(HEADER))
|
||||
|
||||
-default: all
|
||||
-
|
||||
-all: dist
|
||||
+TARGETLIB = $($(FREEIMAGE_LIBRARY_TYPE)LIB)
|
||||
+TARGETDIST = $(DIST$(FREEIMAGE_LIBRARY_TYPE))
|
||||
|
||||
-dist: FreeImage
|
||||
- cp *.a Dist
|
||||
- cp *.so Dist
|
||||
- cp Source/FreeImage.h Dist
|
||||
- cp Wrapper/FreeImagePlus/FreeImagePlus.h Dist
|
||||
+default: all
|
||||
|
||||
-dos2unix:
|
||||
- @$(DOS2UNIX) $(SRCS)
|
||||
+all: $(TARGETLIB) $(TARGETDIST)
|
||||
|
||||
-FreeImage: $(STATICLIB) $(SHAREDLIB)
|
||||
+rebuild: clean all
|
||||
|
||||
-.c.o:
|
||||
+%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
-.cpp.o:
|
||||
+%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
+%.coff: %.rc
|
||||
+ $(RC) $(RCFLAGS) -o $@ $<
|
||||
+
|
||||
+$(DISTDIR)/%: %
|
||||
+ $(CP) $< $@
|
||||
+
|
||||
+$(DISTDIR)/%: $(SRCDIR)/%
|
||||
+ $(CP) $< $@
|
||||
+
|
||||
$(STATICLIB): $(MODULES)
|
||||
- $(AR) r $@ $(MODULES)
|
||||
+ $(AR) rs $@ $(MODULES)
|
||||
+
|
||||
+$(IMPORTLIB) $(EXPORTLIB): $(MODULES)
|
||||
+ $(DLLTOOL) -e $(EXPORTLIB) -l $(IMPORTLIB) -D $(SHAREDLIB) $(DLLTOOLFLAGS) $(MODULES)
|
||||
+
|
||||
+$(SHAREDLIB): $(EXPORTLIB) $(RESOURCE)
|
||||
+ $(LD) -o $@ $(EXPORTLIB) $(MODULES) $(RESOURCE) $(LDFLAGS)
|
||||
|
||||
-$(SHAREDLIB): $(MODULES)
|
||||
- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
|
||||
+$(DISTDIR):
|
||||
+ $(MD) $(DISTDIR)
|
||||
|
||||
-install:
|
||||
- install -d $(INCDIR) $(INSTALLDIR)
|
||||
- install -m 644 -o root -g root $(HEADER) $(INCDIR)
|
||||
- install -m 644 -o root -g root $(HEADERFIP) $(INCDIR)
|
||||
- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
|
||||
- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
|
||||
+$(TARGETDIST): $(DISTDIR)
|
||||
|
||||
clean:
|
||||
- rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
|
||||
+ $(RM) -f core $(DISTDIR)/*.* $(MODULES) $(RESOURCE) $(STATICLIB) $(SHAREDLIB) $(IMPORTLIB) $(EXPORTLIB)
|
||||
|
||||
diff -rupN FreeImage/Makefile.gnu FreeImage-new/Makefile.gnu
|
||||
--- FreeImage/Makefile.gnu 2014-01-16 00:27:04.000000000 +0100
|
||||
+++ FreeImage-new/Makefile.gnu 2014-01-16 00:49:42.335523267 +0100
|
||||
@@ -11,7 +11,8 @@ INSTALLDIR ?= $(DESTDIR)/usr/lib
|
||||
# Converts cr/lf to just lf
|
||||
DOS2UNIX = dos2unix
|
||||
|
||||
-LIBRARIES = -lstdc++
|
||||
+INCLUDE += $(shell pkg-config --cflags libopenjp2 libpng libraw OpenEXR zlib libtiff-4 libwebp)
|
||||
+LIBRARIES = -lstdc++ $(shell pkg-config --libs libopenjp2 libpng libraw OpenEXR zlib libtiff-4 libwebp libwebpdecoder libwebpdemux libwebpmux) -ljpeg -lwebp
|
||||
|
||||
MODULES = $(SRCS:.c=.o)
|
||||
MODULES := $(MODULES:.cpp=.o)
|
||||
--- FreeImage/Makefile.mingw.orig 2014-03-15 22:52:28.000000000 +0400
|
||||
+++ FreeImage/Makefile.mingw 2014-04-16 19:12:32.030400000 +0400
|
||||
@@ -1,136 +1,94 @@
|
||||
-# MinGW makefile for FreeImage
|
||||
-
|
||||
-# This file can be generated by ./gensrclist.sh
|
||||
-include Makefile.srcs
|
||||
-
|
||||
-# General configuration variables.
|
||||
-DESTDIR ?= $(SystemRoot)
|
||||
-INSTALLDIR ?= $(DESTDIR)/system32
|
||||
-DISTDIR ?= Dist
|
||||
-SRCDIR ?= Source
|
||||
-HEADER = FreeImage.h
|
||||
-RCFILE = FreeImage.rc
|
||||
-
|
||||
-# Uncomment this variable to make a static library. This may
|
||||
-# also be specified as an environment variable and can hold
|
||||
-# any of STATIC and SHARED and must be in uppercase letters.
|
||||
-# Default: SHARED
|
||||
-#FREEIMAGE_LIBRARY_TYPE = STATIC
|
||||
-
|
||||
-# Redefine the compiler (CC defaults to ´cc´ for MinGW's make,
|
||||
-# however there's only ´gcc´ available with MinGW).
|
||||
-CC = gcc
|
||||
-
|
||||
-# Redefine the linker (we use ´g++´ for linking, since MinGW's
|
||||
-# command ´ld´ comes with wrong (Linux) standard library search
|
||||
-# paths).
|
||||
-LD = g++
|
||||
-
|
||||
-#Define the ´dlltool´ command.
|
||||
-DLLTOOL = dlltool
|
||||
-
|
||||
-#Define the resource compiler.
|
||||
-RC = windres
|
||||
-
|
||||
-# Define the ´copy´ command.
|
||||
-CP = cp
|
||||
-
|
||||
-# Define the ´mkdir´ command.
|
||||
-MD = mkdir
|
||||
-
|
||||
-# Define the ´remove´ command.
|
||||
-RM = rm
|
||||
-
|
||||
-# Define additional libraries needed.
|
||||
-# libstdc++ is included by default with MinGW, however for
|
||||
-# WIN32 based builds, LibRawLite needs the winsock libraries.
|
||||
-LIBRARIES = -lws2_32
|
||||
-
|
||||
-# Define some additional symboles needed for WIN32 based builds.
|
||||
-WIN32_CFLAGS = -DWINVER=0x0500 $(LIB_TYPE_FLAGS) -DOPJ_STATIC
|
||||
-WIN32_CXXFLAGS = $(WIN32_CFLAGS) -DLIBRAW_NODLL
|
||||
-
|
||||
-# Workaround for LibRawLite, which does not include C++ header
|
||||
-# file stdexcept, which is casually included with MSVC but not
|
||||
-# with MinGW. This can be removed after LibRawLite got control
|
||||
-# over its includes again.
|
||||
-WIN32_CXXFLAGS += -include stdexcept
|
||||
-
|
||||
-# Define DLL image header information flags for the linker.
|
||||
-WIN32_LDFLAGS = -Wl,--subsystem,windows:5.0,--major-os-version,5
|
||||
-
|
||||
-WIN32_STATIC_FLAGS = -DFREEIMAGE_LIB
|
||||
-WIN32_SHARED_FLAGS = -DFREEIMAGE_EXPORTS
|
||||
-
|
||||
-MODULES = $(SRCS:.c=.o)
|
||||
-MODULES := $(MODULES:.cpp=.o)
|
||||
-RESOURCE = $(RCFILE:.rc=.coff)
|
||||
-CFLAGS ?= -O3 -fexceptions -DNDEBUG -DDISABLE_PERF_MEASUREMENT $(WIN32_CFLAGS)
|
||||
-CFLAGS += $(INCLUDE)
|
||||
-CXXFLAGS ?= -O3 -fexceptions -Wno-ctor-dtor-privacy -DNDEBUG $(WIN32_CXXFLAGS)
|
||||
-CXXFLAGS += $(INCLUDE)
|
||||
-RCFLAGS ?= -DNDEBUG
|
||||
-LDFLAGS ?= -s -shared -static -Wl,-soname,$(SOLIBNAME) $(WIN32_LDFLAGS)
|
||||
-DLLTOOLFLAGS ?= --add-stdcall-underscore
|
||||
-
|
||||
-TARGET = FreeImage
|
||||
-STATICLIB = lib$(TARGET).a
|
||||
-SHAREDLIB = $(TARGET).dll
|
||||
-IMPORTLIB = $(TARGET).lib
|
||||
-EXPORTLIB = $(TARGET).exp
|
||||
-SOLIBNAME = $(SHAREDLIB).$(VER_MAJOR)
|
||||
-
|
||||
-DISTSHARED = $(addprefix $(DISTDIR)/, $(SHAREDLIB) $(IMPORTLIB) $(HEADER))
|
||||
-DISTSTATIC = $(addprefix $(DISTDIR)/, $(STATICLIB) $(HEADER))
|
||||
-
|
||||
-# The FreeImage library type defaults to SHARED.
|
||||
-FREEIMAGE_LIBRARY_TYPE ?= SHARED
|
||||
-
|
||||
-TARGETLIB = $($(FREEIMAGE_LIBRARY_TYPE)LIB)
|
||||
-TARGETDIST = $(DIST$(FREEIMAGE_LIBRARY_TYPE))
|
||||
-LIB_TYPE_FLAGS = $(WIN32_$(FREEIMAGE_LIBRARY_TYPE)_FLAGS)
|
||||
-
|
||||
-default: all
|
||||
-
|
||||
-all: mkdist
|
||||
-
|
||||
-rebuild: clean all
|
||||
-
|
||||
-mkdist: FreeImage $(TARGETDIST)
|
||||
-
|
||||
-FreeImage: $(TARGETLIB)
|
||||
-
|
||||
-%.o: %.c
|
||||
- $(CC) $(CFLAGS) -c $< -o $@
|
||||
-
|
||||
-%.o: %.cpp
|
||||
- $(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
-
|
||||
-%.coff: %.rc
|
||||
- $(RC) $(RCFLAGS) -o $@ $<
|
||||
-
|
||||
-$(DISTDIR)/%: %
|
||||
- $(CP) $< $@
|
||||
-
|
||||
-$(DISTDIR)/%: $(SRCDIR)/%
|
||||
- $(CP) $< $@
|
||||
-
|
||||
-$(STATICLIB): $(MODULES)
|
||||
- $(AR) rs $@ $(MODULES)
|
||||
-
|
||||
-$(IMPORTLIB) $(EXPORTLIB): $(MODULES)
|
||||
- $(DLLTOOL) -e $(EXPORTLIB) -l $(IMPORTLIB) -D $(SHAREDLIB) $(DLLTOOLFLAGS) $(MODULES)
|
||||
-
|
||||
-$(SHAREDLIB): $(EXPORTLIB) $(RESOURCE)
|
||||
- $(LD) $(LDFLAGS) -o $@ $(EXPORTLIB) $(MODULES) $(RESOURCE) $(LIBRARIES)
|
||||
-
|
||||
-$(DISTDIR):
|
||||
- $(MD) $(DISTDIR)
|
||||
-
|
||||
-$(TARGETDIST): $(DISTDIR)
|
||||
-
|
||||
-install:
|
||||
- $(CP) $(SHAREDLIB) $(INSTALLDIR)
|
||||
-
|
||||
-clean:
|
||||
- $(RM) -f core $(DISTDIR)/*.* $(MODULES) $(RESOURCE) $(STATICLIB) $(SHAREDLIB) $(IMPORTLIB) $(EXPORTLIB)
|
||||
+# MinGW makefile for FreeImage
|
||||
+
|
||||
+# This file can be generated by ./gensrclist.sh
|
||||
+include Makefile.srcs
|
||||
+
|
||||
+CC = gcc
|
||||
+CXX = g++
|
||||
+LD = g++
|
||||
+AR = ar
|
||||
+DLLTOOL = dlltool
|
||||
+RC = windres
|
||||
+PKGCONFIG = pkg-config
|
||||
+
|
||||
+CP = cp
|
||||
+MD = mkdir
|
||||
+RM = rm
|
||||
+
|
||||
+# General configuration variables.
|
||||
+DESTDIR ?= $(SystemRoot)
|
||||
+INSTALLDIR ?= $(DESTDIR)/system32
|
||||
+DISTDIR ?= Dist
|
||||
+SRCDIR ?= Source
|
||||
+HEADER = FreeImage.h
|
||||
+RCFILE = FreeImage.rc
|
||||
+
|
||||
+# Uncomment this variable to make a static library. This may
|
||||
+# also be specified as an environment variable and can hold
|
||||
+# any of STATIC and SHARED and must be in uppercase letters.
|
||||
+# The FreeImage library type defaults to SHARED.
|
||||
+FREEIMAGE_LIBRARY_TYPE ?= SHARED
|
||||
+
|
||||
+WIN32_STATIC_FLAGS = -DFREEIMAGE_LIB
|
||||
+WIN32_SHARED_FLAGS = -DFREEIMAGE_EXPORTS
|
||||
+
|
||||
+MODULES = $(SRCS:.c=.o)
|
||||
+MODULES := $(MODULES:.cpp=.o)
|
||||
+RESOURCE = $(RCFILE:.rc=.coff)
|
||||
+CFLAGS += $(INCLUDE) -DDISABLE_PERF_MEASUREMENT $(WIN32_$(FREEIMAGE_LIBRARY_TYPE)_FLAGS)
|
||||
+CFLAGS += $(shell $(PKGCONFIG) --cflags libopenjp2 OpenEXR libpng libraw zlib libtiff-4 libwebp)
|
||||
+CXXFLAGS += $(INCLUDE) $(WIN32_$(FREEIMAGE_LIBRARY_TYPE)_FLAGS)
|
||||
+CXXFLAGS += $(shell $(PKGCONFIG) --cflags libopenjp2 OpenEXR libpng libraw zlib libtiff-4 libwebp)
|
||||
+LDFLAGS += -shared -Wl,-soname,$(SOLIBNAME)
|
||||
+LDFLAGS += $(shell $(PKGCONFIG) --libs libopenjp2 OpenEXR libpng libraw zlib libtiff-4 libwebp libwebpdecoder libwebpdemux libwebpmux) -ljpeg
|
||||
+
|
||||
+TARGET = freeimage
|
||||
+STATICLIB = lib$(TARGET).a
|
||||
+SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).dll
|
||||
+IMPORTLIB = lib$(TARGET).dll.a
|
||||
+EXPORTLIB = $(TARGET).exp
|
||||
+SOLIBNAME = $(SHAREDLIB)
|
||||
+
|
||||
+DISTSHARED = $(addprefix $(DISTDIR)/, $(SHAREDLIB) $(IMPORTLIB) $(HEADER))
|
||||
+DISTSTATIC = $(addprefix $(DISTDIR)/, $(STATICLIB) $(HEADER))
|
||||
+
|
||||
+TARGETLIB = $($(FREEIMAGE_LIBRARY_TYPE)LIB)
|
||||
+TARGETDIST = $(DIST$(FREEIMAGE_LIBRARY_TYPE))
|
||||
+
|
||||
+default: all
|
||||
+
|
||||
+all: $(TARGETLIB) $(TARGETDIST)
|
||||
+
|
||||
+rebuild: clean all
|
||||
+
|
||||
+%.o: %.c
|
||||
+ $(CC) $(CFLAGS) -c $< -o $@
|
||||
+
|
||||
+%.o: %.cpp
|
||||
+ $(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
+
|
||||
+%.coff: %.rc
|
||||
+ $(RC) $(RCFLAGS) -o $@ $<
|
||||
+
|
||||
+$(DISTDIR)/%: %
|
||||
+ $(CP) $< $@
|
||||
+
|
||||
+$(DISTDIR)/%: $(SRCDIR)/%
|
||||
+ $(CP) $< $@
|
||||
+
|
||||
+$(STATICLIB): $(MODULES)
|
||||
+ $(AR) rs $@ $(MODULES)
|
||||
+
|
||||
+$(IMPORTLIB) $(EXPORTLIB): $(MODULES)
|
||||
+ $(DLLTOOL) -e $(EXPORTLIB) -l $(IMPORTLIB) -D $(SHAREDLIB) $(DLLTOOLFLAGS) $(MODULES)
|
||||
+
|
||||
+$(SHAREDLIB): $(EXPORTLIB) $(RESOURCE)
|
||||
+ $(LD) -o $@ $(EXPORTLIB) $(MODULES) $(RESOURCE) $(LDFLAGS)
|
||||
+
|
||||
+$(DISTDIR):
|
||||
+ $(MD) $(DISTDIR)
|
||||
+
|
||||
+$(TARGETDIST): $(DISTDIR)
|
||||
+
|
||||
+clean:
|
||||
+ $(RM) -f core $(DISTDIR)/*.* $(MODULES) $(RESOURCE) $(STATICLIB) $(SHAREDLIB) $(IMPORTLIB) $(EXPORTLIB)
|
||||
@@ -1,594 +0,0 @@
|
||||
diff -rupN FreeImage/genfipsrclist.sh FreeImage-new/genfipsrclist.sh
|
||||
--- FreeImage/genfipsrclist.sh 2014-01-16 00:27:04.000000000 +0100
|
||||
+++ FreeImage-new/genfipsrclist.sh 2014-01-16 00:49:42.334523250 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
-DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src Source/LibWebP Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib Wrapper/FreeImagePlus"
|
||||
+DIRLIST=" Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib Wrapper/FreeImagePlus"
|
||||
|
||||
|
||||
echo "VER_MAJOR = 3" > fipMakefile.srcs
|
||||
diff -rupN FreeImage/gensrclist.sh FreeImage-new/gensrclist.sh
|
||||
--- FreeImage/gensrclist.sh 2014-01-16 00:27:04.000000000 +0100
|
||||
+++ FreeImage-new/gensrclist.sh 2014-01-16 00:49:42.335523267 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
-DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src Source/LibWebP Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib"
|
||||
+DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib"
|
||||
|
||||
echo "VER_MAJOR = 3" > Makefile.srcs
|
||||
echo "VER_MINOR = 16.0" >> Makefile.srcs
|
||||
diff -rupN FreeImage/Source/FreeImage/J2KHelper.cpp FreeImage-new/Source/FreeImage/J2KHelper.cpp
|
||||
--- FreeImage/Source/FreeImage/J2KHelper.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/J2KHelper.cpp 2014-01-16 00:49:42.335523267 +0100
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
-#include "../LibOpenJPEG/openjpeg.h"
|
||||
+#include <openjpeg.h>
|
||||
#include "J2KHelper.h"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginEXR.cpp FreeImage-new/Source/FreeImage/PluginEXR.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginEXR.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginEXR.cpp 2014-01-16 00:49:42.336523283 +0100
|
||||
@@ -22,16 +22,16 @@
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfIO.h"
|
||||
-#include "../OpenEXR/Iex/Iex.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfOutputFile.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfInputFile.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfRgbaFile.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfChannelList.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfRgba.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfArray.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfPreviewImage.h"
|
||||
-#include "../OpenEXR/Half/half.h"
|
||||
+#include <OpenEXR/ImfIO.h>
|
||||
+#include <OpenEXR/Iex.h>
|
||||
+#include <OpenEXR/ImfOutputFile.h>
|
||||
+#include <OpenEXR/ImfInputFile.h>
|
||||
+#include <OpenEXR/ImfRgbaFile.h>
|
||||
+#include <OpenEXR/ImfChannelList.h>
|
||||
+#include <OpenEXR/ImfRgba.h>
|
||||
+#include <OpenEXR/ImfArray.h>
|
||||
+#include <OpenEXR/ImfPreviewImage.h>
|
||||
+#include <OpenEXR/half.h>
|
||||
|
||||
|
||||
// ==========================================================
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginJ2K.cpp FreeImage-new/Source/FreeImage/PluginJ2K.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginJ2K.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginJ2K.cpp 2014-01-16 00:49:42.336523283 +0100
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
-#include "../LibOpenJPEG/openjpeg.h"
|
||||
+#include <openjpeg.h>
|
||||
#include "J2KHelper.h"
|
||||
|
||||
// ==========================================================
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginJP2.cpp FreeImage-new/Source/FreeImage/PluginJP2.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginJP2.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginJP2.cpp 2014-01-16 00:49:42.336523283 +0100
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
-#include "../LibOpenJPEG/openjpeg.h"
|
||||
+#include <openjpeg.h>
|
||||
#include "J2KHelper.h"
|
||||
|
||||
// ==========================================================
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginJPEG.cpp FreeImage-new/Source/FreeImage/PluginJPEG.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginJPEG.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginJPEG.cpp 2014-01-16 00:49:42.336523283 +0100
|
||||
@@ -35,9 +35,9 @@ extern "C" {
|
||||
#undef FAR
|
||||
#include <setjmp.h>
|
||||
|
||||
-#include "../LibJPEG/jinclude.h"
|
||||
-#include "../LibJPEG/jpeglib.h"
|
||||
-#include "../LibJPEG/jerror.h"
|
||||
+#include <stdio.h>
|
||||
+#include <jpeglib.h>
|
||||
+#include <jerror.h>
|
||||
}
|
||||
|
||||
#include "FreeImage.h"
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginPNG.cpp FreeImage-new/Source/FreeImage/PluginPNG.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginPNG.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginPNG.cpp 2014-01-16 00:49:42.337523300 +0100
|
||||
@@ -37,8 +37,8 @@
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
-#include "../ZLib/zlib.h"
|
||||
-#include "../LibPNG/png.h"
|
||||
+#include <zlib.h>
|
||||
+#include <png.h>
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
@@ -106,7 +106,11 @@ ReadMetadata(png_structp png_ptr, png_in
|
||||
tag = FreeImage_CreateTag();
|
||||
if(!tag) return FALSE;
|
||||
|
||||
+#ifdef PNG_iTXt_SUPPORTED
|
||||
DWORD tag_length = (DWORD) MAX(text_ptr[i].text_length, text_ptr[i].itxt_length);
|
||||
+#else
|
||||
+ DWORD tag_length = text_ptr[i].text_length;
|
||||
+#endif
|
||||
|
||||
FreeImage_SetTagLength(tag, tag_length);
|
||||
FreeImage_SetTagCount(tag, tag_length);
|
||||
@@ -153,10 +157,11 @@ WriteMetadata(png_structp png_ptr, png_i
|
||||
text_metadata.key = (char*)FreeImage_GetTagKey(tag); // keyword, 1-79 character description of "text"
|
||||
text_metadata.text = (char*)FreeImage_GetTagValue(tag); // comment, may be an empty string (ie "")
|
||||
text_metadata.text_length = FreeImage_GetTagLength(tag);// length of the text string
|
||||
+#ifdef PNG_iTXt_SUPPORTED
|
||||
text_metadata.itxt_length = FreeImage_GetTagLength(tag);// length of the itxt string
|
||||
text_metadata.lang = 0; // language code, 0-79 characters or a NULL pointer
|
||||
text_metadata.lang_key = 0; // keyword translated UTF-8 string, 0 or more chars or a NULL pointer
|
||||
-
|
||||
+#endif
|
||||
// set the tag
|
||||
png_set_text(png_ptr, info_ptr, &text_metadata, 1);
|
||||
|
||||
@@ -175,10 +180,11 @@ WriteMetadata(png_structp png_ptr, png_i
|
||||
text_metadata.key = (char*)g_png_xmp_keyword; // keyword, 1-79 character description of "text"
|
||||
text_metadata.text = (char*)FreeImage_GetTagValue(tag); // comment, may be an empty string (ie "")
|
||||
text_metadata.text_length = FreeImage_GetTagLength(tag);// length of the text string
|
||||
+#ifdef PNG_iTXt_SUPPORTED
|
||||
text_metadata.itxt_length = FreeImage_GetTagLength(tag);// length of the itxt string
|
||||
text_metadata.lang = 0; // language code, 0-79 characters or a NULL pointer
|
||||
text_metadata.lang_key = 0; // keyword translated UTF-8 string, 0 or more chars or a NULL pointer
|
||||
-
|
||||
+#endif
|
||||
// set the tag
|
||||
png_set_text(png_ptr, info_ptr, &text_metadata, 1);
|
||||
bResult &= TRUE;
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginRAW.cpp FreeImage-new/Source/FreeImage/PluginRAW.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginRAW.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginRAW.cpp 2014-01-16 00:55:13.692904877 +0100
|
||||
@@ -19,7 +19,7 @@
|
||||
// Use at your own risk!
|
||||
// ==========================================================
|
||||
|
||||
-#include "../LibRawLite/libraw/libraw.h"
|
||||
+#include <libraw/libraw.h>
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginTIFF.cpp FreeImage-new/Source/FreeImage/PluginTIFF.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginTIFF.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginTIFF.cpp 2014-01-16 00:49:42.337523300 +0100
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
-#include "../LibTIFF4/tiffiop.h"
|
||||
+#include <tiffio.h>
|
||||
#include "../Metadata/FreeImageTag.h"
|
||||
-#include "../OpenEXR/Half/half.h"
|
||||
+#include <half.h>
|
||||
|
||||
#include "FreeImageIO.h"
|
||||
#include "PSDParser.h"
|
||||
@@ -202,27 +202,9 @@ TIFFFdOpen(thandle_t handle, const char
|
||||
_tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc,
|
||||
_tiffSizeProc, _tiffMapProc, _tiffUnmapProc);
|
||||
|
||||
- // Warning: tif_fd is declared as 'int' currently (see libTIFF),
|
||||
- // may result in incorrect file pointers inside libTIFF on
|
||||
- // 64bit machines (sizeof(int) != sizeof(long)).
|
||||
- // Needs to be fixed within libTIFF.
|
||||
- if (tif) {
|
||||
- tif->tif_fd = (long)handle;
|
||||
- }
|
||||
-
|
||||
return tif;
|
||||
}
|
||||
|
||||
-/**
|
||||
-Open a TIFF file for reading or writing
|
||||
-@param name
|
||||
-@param mode
|
||||
-*/
|
||||
-TIFF*
|
||||
-TIFFOpen(const char* name, const char* mode) {
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
// ----------------------------------------------------------
|
||||
// TIFF library FreeImage-specific routines.
|
||||
// ----------------------------------------------------------
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginG3.cpp FreeImage-new/Source/FreeImage/PluginG3.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginG3.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginG3.cpp 2014-01-16 00:49:42.336523283 +0100
|
||||
@@ -20,7 +20,7 @@
|
||||
// Use at your own risk!
|
||||
// ==========================================================
|
||||
|
||||
-#include "../LibTIFF4/tiffiop.h"
|
||||
+#include <tiffiop.h>
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginWebP.cpp FreeImage-new/Source/FreeImage/PluginWebP.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginWebP.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginWebP.cpp 2014-01-16 00:49:42.337523300 +0100
|
||||
@@ -37,10 +37,10 @@
|
||||
|
||||
#include "../Metadata/FreeImageTag.h"
|
||||
|
||||
-#include "../LibWebP/src/webp/decode.h"
|
||||
-#include "../LibWebP/src/webp/encode.h"
|
||||
-#include "../LibWebP/src/enc/vp8enci.h"
|
||||
-#include "../LibWebP/src/webp/mux.h"
|
||||
+#include <webp/decode.h>
|
||||
+#include <webp/encode.h>
|
||||
+//#include "../LibWebP/src/enc/vp8enci.h"
|
||||
+#include <webp/mux.h>
|
||||
|
||||
// ==========================================================
|
||||
// Plugin Interface
|
||||
diff -rupN FreeImage/Source/FreeImage/ZLibInterface.cpp FreeImage-new/Source/FreeImage/ZLibInterface.cpp
|
||||
--- FreeImage/Source/FreeImage/ZLibInterface.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/ZLibInterface.cpp 2014-01-16 00:49:42.338523316 +0100
|
||||
@@ -19,10 +19,9 @@
|
||||
// Use at your own risk!
|
||||
// ==========================================================
|
||||
|
||||
-#include "../ZLib/zlib.h"
|
||||
+#include <zlib.h>
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
-#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */
|
||||
|
||||
/**
|
||||
Compresses a source buffer into a target buffer, using the ZLib library.
|
||||
@@ -115,7 +114,7 @@ FreeImage_ZLibGZip(BYTE *target, DWORD t
|
||||
return 0;
|
||||
case Z_OK: {
|
||||
// patch header, setup crc and length (stolen from mod_trace_output)
|
||||
- BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code
|
||||
+ BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code (unix)
|
||||
crc = crc32(crc, source, source_size);
|
||||
memcpy(target + 4 + dest_len, &crc, 4);
|
||||
memcpy(target + 8 + dest_len, &source_size, 4);
|
||||
diff -rupN FreeImage/Source/Metadata/XTIFF.cpp FreeImage-new/Source/Metadata/XTIFF.cpp
|
||||
--- FreeImage/Source/Metadata/XTIFF.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/Metadata/XTIFF.cpp 2014-01-16 00:49:42.338523316 +0100
|
||||
@@ -29,13 +29,22 @@
|
||||
#pragma warning (disable : 4786) // identifier was truncated to 'number' characters
|
||||
#endif
|
||||
|
||||
-#include "../LibTIFF4/tiffiop.h"
|
||||
+#include <tiffiop.h>
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
#include "FreeImageTag.h"
|
||||
#include "FIRational.h"
|
||||
|
||||
+/*
|
||||
+ * Caveat emperor this is a private libtiff functions which we need,
|
||||
+ * there is no better solution I'm afraid.
|
||||
+ */
|
||||
+extern "C"
|
||||
+{
|
||||
+ int _TIFFDataSize(TIFFDataType type);
|
||||
+}
|
||||
+
|
||||
// ----------------------------------------------------------
|
||||
// Extended TIFF Directory GEO Tag Support
|
||||
// ----------------------------------------------------------
|
||||
@@ -205,7 +214,7 @@ tiff_write_geotiff_profile(TIFF *tif, FI
|
||||
Read a single exif tag
|
||||
*/
|
||||
static BOOL
|
||||
-tiff_read_exif_tag(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib, TagLib& tagLib, TIFFDirectory *td, uint32 tag) {
|
||||
+tiff_read_exif_tag(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib, TagLib& tagLib, uint32 tag) {
|
||||
const TIFFField *fip;
|
||||
uint32 value_count;
|
||||
int mem_alloc = 0;
|
||||
@@ -226,8 +235,8 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
- if(fip->field_passcount) { //<- "passcount" means "returns count"
|
||||
- if (fip->field_readcount != TIFF_VARIABLE2) { //<- TIFF_VARIABLE2 means "uses LONG count"
|
||||
+ if(TIFFFieldPassCount(fip)) { //<- "passcount" means "returns count"
|
||||
+ if (TIFFFieldReadCount(fip) != TIFF_VARIABLE2) { //<- TIFF_VARIABLE2 means "uses LONG count"
|
||||
|
||||
// assume TIFF_VARIABLE (uses SHORT count)
|
||||
uint16 value_count16;
|
||||
@@ -244,35 +253,37 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD
|
||||
|
||||
// determine count
|
||||
|
||||
- if (fip->field_readcount == TIFF_VARIABLE || fip->field_readcount == TIFF_VARIABLE2) {
|
||||
+ if (TIFFFieldReadCount(fip) == TIFF_VARIABLE || TIFFFieldReadCount(fip) == TIFF_VARIABLE2) {
|
||||
value_count = 1;
|
||||
- } else if (fip->field_readcount == TIFF_SPP) {
|
||||
- value_count = td->td_samplesperpixel;
|
||||
+ } else if (TIFFFieldReadCount(fip) == TIFF_SPP) {
|
||||
+ uint16 spp;
|
||||
+ TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &spp);
|
||||
+ value_count = spp;
|
||||
} else {
|
||||
- value_count = fip->field_readcount;
|
||||
+ value_count = TIFFFieldReadCount(fip);
|
||||
}
|
||||
|
||||
// access fields as pointers to data
|
||||
// (### determining this is NOT robust... and hardly can be. It is implemented looking the _TIFFVGetField code)
|
||||
|
||||
- if(fip->field_tag == TIFFTAG_TRANSFERFUNCTION) {
|
||||
+ if(TIFFFieldTag(fip) == TIFFTAG_TRANSFERFUNCTION) {
|
||||
// reading this tag cause a bug probably located somewhere inside libtiff
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
- if ((fip->field_type == TIFF_ASCII
|
||||
- || fip->field_readcount == TIFF_VARIABLE
|
||||
- || fip->field_readcount == TIFF_VARIABLE2
|
||||
- || fip->field_readcount == TIFF_SPP
|
||||
+ if ((TIFFFieldDataType(fip) == TIFF_ASCII
|
||||
+ || TIFFFieldReadCount(fip) == TIFF_VARIABLE
|
||||
+ || TIFFFieldReadCount(fip) == TIFF_VARIABLE2
|
||||
+ || TIFFFieldReadCount(fip) == TIFF_SPP
|
||||
|| value_count > 1)
|
||||
|
||||
- && fip->field_tag != TIFFTAG_PAGENUMBER
|
||||
- && fip->field_tag != TIFFTAG_HALFTONEHINTS
|
||||
- && fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
|
||||
- && fip->field_tag != TIFFTAG_DOTRANGE
|
||||
+ && TIFFFieldTag(fip) != TIFFTAG_PAGENUMBER
|
||||
+ && TIFFFieldTag(fip) != TIFFTAG_HALFTONEHINTS
|
||||
+ && TIFFFieldTag(fip) != TIFFTAG_YCBCRSUBSAMPLING
|
||||
+ && TIFFFieldTag(fip) != TIFFTAG_DOTRANGE
|
||||
|
||||
- && fip->field_tag != TIFFTAG_BITSPERSAMPLE //<- these two are tricky -
|
||||
- && fip->field_tag != TIFFTAG_COMPRESSION //<- they are defined as TIFF_VARIABLE but in reality return a single value
|
||||
+ && TIFFFieldTag(fip) != TIFFTAG_BITSPERSAMPLE //<- these two are tricky:
|
||||
+ && TIFFFieldTag(fip) != TIFFTAG_COMPRESSION //<- they are defined as TIFF_VARIABLE but in reality return a single value
|
||||
) {
|
||||
if(TIFFGetField(tif, tag, &raw_data) != 1) {
|
||||
return TRUE;
|
||||
@@ -281,7 +292,7 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD
|
||||
|
||||
// access fields as values
|
||||
|
||||
- const int value_size = _TIFFDataSize(fip->field_type);
|
||||
+ const int value_size = _TIFFDataSize((TIFFFieldDataType(fip)));
|
||||
raw_data = _TIFFmalloc(value_size * value_count);
|
||||
mem_alloc = 1;
|
||||
int ok = FALSE;
|
||||
@@ -302,7 +313,7 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD
|
||||
break;
|
||||
*/
|
||||
default:
|
||||
- FreeImage_OutputMessageProc(FIF_TIFF, "Unimplemented variable number of parameters for Tiff Tag %s", fip->field_name);
|
||||
+ FreeImage_OutputMessageProc(FIF_TIFF, "Unimplemented variable number of parameters for Tiff Tag %s", TIFFFieldName(fip));
|
||||
break;
|
||||
}
|
||||
if(ok != 1) {
|
||||
@@ -325,59 +336,59 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD
|
||||
FreeImage_SetTagID(fitag, (WORD)tag);
|
||||
FreeImage_SetTagKey(fitag, key);
|
||||
|
||||
- switch(fip->field_type) {
|
||||
+ switch(TIFFFieldDataType(fip)) {
|
||||
case TIFF_BYTE:
|
||||
FreeImage_SetTagType(fitag, FIDT_BYTE);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
|
||||
case TIFF_UNDEFINED:
|
||||
FreeImage_SetTagType(fitag, FIDT_UNDEFINED);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
|
||||
case TIFF_SBYTE:
|
||||
FreeImage_SetTagType(fitag, FIDT_SBYTE);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
|
||||
case TIFF_SHORT:
|
||||
FreeImage_SetTagType(fitag, FIDT_SHORT);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
|
||||
case TIFF_SSHORT:
|
||||
FreeImage_SetTagType(fitag, FIDT_SSHORT);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
|
||||
case TIFF_LONG:
|
||||
FreeImage_SetTagType(fitag, FIDT_LONG);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
|
||||
case TIFF_IFD:
|
||||
FreeImage_SetTagType(fitag, FIDT_IFD);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
|
||||
case TIFF_SLONG:
|
||||
FreeImage_SetTagType(fitag, FIDT_SLONG);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
@@ -392,7 +403,7 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD
|
||||
rvalue[2*i+1] = rational.getDenominator();
|
||||
}
|
||||
FreeImage_SetTagType(fitag, FIDT_RATIONAL);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, rvalue);
|
||||
free(rvalue);
|
||||
@@ -409,7 +420,7 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD
|
||||
rvalue[2*i+1] = rational.getDenominator();
|
||||
}
|
||||
FreeImage_SetTagType(fitag, FIDT_RATIONAL);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, rvalue);
|
||||
free(rvalue);
|
||||
@@ -418,35 +429,35 @@ tiff_read_exif_tag(TIFF *tif, TagLib::MD
|
||||
|
||||
case TIFF_FLOAT:
|
||||
FreeImage_SetTagType(fitag, FIDT_FLOAT);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
|
||||
case TIFF_DOUBLE:
|
||||
FreeImage_SetTagType(fitag, FIDT_DOUBLE);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
|
||||
case TIFF_LONG8: // BigTIFF 64-bit unsigned integer
|
||||
FreeImage_SetTagType(fitag, FIDT_LONG8);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
|
||||
case TIFF_IFD8: // BigTIFF 64-bit unsigned integer (offset)
|
||||
FreeImage_SetTagType(fitag, FIDT_IFD8);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
|
||||
case TIFF_SLONG8: // BigTIFF 64-bit signed integer
|
||||
FreeImage_SetTagType(fitag, FIDT_SLONG8);
|
||||
- FreeImage_SetTagLength(fitag, TIFFDataWidth(fip->field_type) * value_count);
|
||||
+ FreeImage_SetTagLength(fitag, TIFFDataWidth(TIFFFieldDataType(fip)) * value_count);
|
||||
FreeImage_SetTagCount(fitag, value_count);
|
||||
FreeImage_SetTagValue(fitag, raw_data);
|
||||
break;
|
||||
@@ -489,16 +500,16 @@ tiff_read_exif_tags(TIFF *tif, TagLib::M
|
||||
|
||||
TagLib& tagLib = TagLib::instance();
|
||||
|
||||
- TIFFDirectory *td = &tif->tif_dir;
|
||||
-
|
||||
count = (short) TIFFGetTagListCount(tif);
|
||||
for(i = 0; i < count; i++) {
|
||||
uint32 tag = TIFFGetTagListEntry(tif, i);
|
||||
// read the tag
|
||||
- if (!tiff_read_exif_tag(tif, md_model, dib, tagLib, td, tag))
|
||||
+ if (!tiff_read_exif_tag(tif, md_model, dib, tagLib, tag))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+/* Disabled for Fedora as it is using internal library structures. */
|
||||
+#if 0
|
||||
// we want to know values of standard tags too!!
|
||||
|
||||
// loop over all Core Directory Tags
|
||||
@@ -533,13 +544,14 @@ tiff_read_exif_tags(TIFF *tif, TagLib::M
|
||||
|
||||
// process *all* other tags (some will be ignored)
|
||||
|
||||
- tiff_read_exif_tag(tif, md_model, dib, tagLib, td, fld->field_tag);
|
||||
+ tiff_read_exif_tag(tif, md_model, dib, tagLib, fld->field_tag);
|
||||
|
||||
|
||||
lastTag = fld->field_tag;
|
||||
}
|
||||
|
||||
}
|
||||
+#endif
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -611,6 +623,10 @@ Write all known exif tags
|
||||
*/
|
||||
BOOL
|
||||
tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) {
|
||||
+/* Disabled for Fedora as it is using internal library structures. Siberia
|
||||
+ * winter on upstream developer! :-) */
|
||||
+ return FALSE;
|
||||
+#if 0
|
||||
char defaultKey[16];
|
||||
|
||||
// only EXIF_MAIN so far
|
||||
@@ -662,4 +678,5 @@ tiff_write_exif_tags(TIFF *tif, TagLib::
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
+#endif
|
||||
}
|
||||
diff -rupN FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp FreeImage-new/Source/FreeImageToolkit/JPEGTransform.cpp
|
||||
--- FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImageToolkit/JPEGTransform.cpp 2014-01-16 00:49:42.338523316 +0100
|
||||
@@ -26,10 +26,10 @@
|
||||
#undef FAR
|
||||
#include <setjmp.h>
|
||||
|
||||
-#include "../LibJPEG/jinclude.h"
|
||||
-#include "../LibJPEG/jpeglib.h"
|
||||
-#include "../LibJPEG/jerror.h"
|
||||
-#include "../LibJPEG/transupp.h"
|
||||
+#include <jinclude.h>
|
||||
+#include <jpeglib.h>
|
||||
+#include <jerror.h>
|
||||
+#include <transupp.h>
|
||||
}
|
||||
|
||||
#include "FreeImage.h"
|
||||
diff -rupN FreeImage/Source/LibJXR/image/sys/strcodec.c FreeImage-new/Source/LibJXR/image/sys/strcodec.c
|
||||
--- FreeImage/Source/LibJXR/image/sys/strcodec.c 2014-01-16 00:27:03.000000000 +0100
|
||||
+++ FreeImage-new/Source/LibJXR/image/sys/strcodec.c 2014-01-16 00:49:42.338523316 +0100
|
||||
@@ -664,7 +664,7 @@
|
||||
//================================================================
|
||||
// Memory access functions
|
||||
//================================================================
|
||||
-#if (defined(WIN32) && !defined(UNDER_CE) && !defined(__MINGW32__)) || (defined(UNDER_CE) && defined(_ARM_))
|
||||
+#if (defined(WIN32) && !defined(UNDER_CE)) || (defined(UNDER_CE) && defined(_ARM_))
|
||||
// WinCE ARM and Desktop x86
|
||||
#else
|
||||
// other platform
|
||||
216
mingw-w64-FreeImage/FreeImage-3.17.0_CVE-2015-0852.patch
Normal file
216
mingw-w64-FreeImage/FreeImage-3.17.0_CVE-2015-0852.patch
Normal file
@@ -0,0 +1,216 @@
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginPCX.cpp FreeImage-new/Source/FreeImage/PluginPCX.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginPCX.cpp 2015-03-02 02:07:08.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginPCX.cpp 2015-09-05 02:44:55.429436425 +0200
|
||||
@@ -30,7 +30,7 @@
|
||||
// Constants + headers
|
||||
// ----------------------------------------------------------
|
||||
|
||||
-#define IO_BUF_SIZE 2048
|
||||
+#define PCX_IO_BUF_SIZE 2048
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
@@ -120,17 +120,17 @@ readline(FreeImageIO &io, fi_handle hand
|
||||
|
||||
while (length--) {
|
||||
if (count == 0) {
|
||||
- if (*ReadPos >= IO_BUF_SIZE - 1 ) {
|
||||
- if (*ReadPos == IO_BUF_SIZE - 1) {
|
||||
+ if (*ReadPos >= PCX_IO_BUF_SIZE - 1 ) {
|
||||
+ if (*ReadPos == PCX_IO_BUF_SIZE - 1) {
|
||||
// we still have one BYTE, copy it to the start pos
|
||||
|
||||
- *ReadBuf = ReadBuf[IO_BUF_SIZE - 1];
|
||||
+ *ReadBuf = ReadBuf[PCX_IO_BUF_SIZE - 1];
|
||||
|
||||
- io.read_proc(ReadBuf + 1, 1, IO_BUF_SIZE - 1, handle);
|
||||
+ io.read_proc(ReadBuf + 1, 1, PCX_IO_BUF_SIZE - 1, handle);
|
||||
} else {
|
||||
// read the complete buffer
|
||||
|
||||
- io.read_proc(ReadBuf, 1, IO_BUF_SIZE, handle);
|
||||
+ io.read_proc(ReadBuf, 1, PCX_IO_BUF_SIZE, handle);
|
||||
}
|
||||
|
||||
*ReadPos = 0;
|
||||
@@ -346,19 +346,9 @@ Load(FreeImageIO *io, fi_handle handle,
|
||||
BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS;
|
||||
|
||||
try {
|
||||
- // check PCX identifier
|
||||
-
|
||||
- long start_pos = io->tell_proc(handle);
|
||||
- BOOL validated = pcx_validate(io, handle);
|
||||
- io->seek_proc(handle, start_pos, SEEK_SET);
|
||||
- if(!validated) {
|
||||
- throw FI_MSG_ERROR_MAGIC_NUMBER;
|
||||
- }
|
||||
-
|
||||
- // process the header
|
||||
-
|
||||
PCXHEADER header;
|
||||
|
||||
+ // process the header
|
||||
if(io->read_proc(&header, sizeof(PCXHEADER), 1, handle) != 1) {
|
||||
throw FI_MSG_ERROR_PARSING;
|
||||
}
|
||||
@@ -366,20 +356,38 @@ Load(FreeImageIO *io, fi_handle handle,
|
||||
SwapHeader(&header);
|
||||
#endif
|
||||
|
||||
- // allocate a new DIB
|
||||
+ // process the window
|
||||
+ const WORD *window = header.window; // left, upper, right,lower pixel coord.
|
||||
+ const int left = window[0];
|
||||
+ const int top = window[1];
|
||||
+ const int right = window[2];
|
||||
+ const int bottom = window[3];
|
||||
|
||||
- unsigned width = header.window[2] - header.window[0] + 1;
|
||||
- unsigned height = header.window[3] - header.window[1] + 1;
|
||||
- unsigned bitcount = header.bpp * header.planes;
|
||||
-
|
||||
- if (bitcount == 24) {
|
||||
- dib = FreeImage_AllocateHeader(header_only, width, height, bitcount, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK);
|
||||
- } else {
|
||||
- dib = FreeImage_AllocateHeader(header_only, width, height, bitcount);
|
||||
+ // check image size
|
||||
+ if((left >= right) || (top >= bottom)) {
|
||||
+ throw FI_MSG_ERROR_PARSING;
|
||||
}
|
||||
|
||||
- // if the dib couldn't be allocated, throw an error
|
||||
+ const unsigned width = right - left + 1;
|
||||
+ const unsigned height = bottom - top + 1;
|
||||
+ const unsigned bitcount = header.bpp * header.planes;
|
||||
|
||||
+ // allocate a new dib
|
||||
+ switch(bitcount) {
|
||||
+ case 1:
|
||||
+ case 4:
|
||||
+ case 8:
|
||||
+ dib = FreeImage_AllocateHeader(header_only, width, height, bitcount);
|
||||
+ break;
|
||||
+ case 24:
|
||||
+ dib = FreeImage_AllocateHeader(header_only, width, height, bitcount, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK);
|
||||
+ break;
|
||||
+ default:
|
||||
+ throw FI_MSG_ERROR_DIB_MEMORY;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ // if the dib couldn't be allocated, throw an error
|
||||
if (!dib) {
|
||||
throw FI_MSG_ERROR_DIB_MEMORY;
|
||||
}
|
||||
@@ -426,19 +434,23 @@ Load(FreeImageIO *io, fi_handle handle,
|
||||
|
||||
if (palette_id == 0x0C) {
|
||||
BYTE *cmap = (BYTE*)malloc(768 * sizeof(BYTE));
|
||||
- io->read_proc(cmap, 768, 1, handle);
|
||||
|
||||
- pal = FreeImage_GetPalette(dib);
|
||||
- BYTE *pColormap = &cmap[0];
|
||||
+ if(cmap) {
|
||||
+ io->read_proc(cmap, 768, 1, handle);
|
||||
|
||||
- for(int i = 0; i < 256; i++) {
|
||||
- pal[i].rgbRed = pColormap[0];
|
||||
- pal[i].rgbGreen = pColormap[1];
|
||||
- pal[i].rgbBlue = pColormap[2];
|
||||
- pColormap += 3;
|
||||
+ pal = FreeImage_GetPalette(dib);
|
||||
+ BYTE *pColormap = &cmap[0];
|
||||
+
|
||||
+ for(int i = 0; i < 256; i++) {
|
||||
+ pal[i].rgbRed = pColormap[0];
|
||||
+ pal[i].rgbGreen = pColormap[1];
|
||||
+ pal[i].rgbBlue = pColormap[2];
|
||||
+ pColormap += 3;
|
||||
+ }
|
||||
+
|
||||
+ free(cmap);
|
||||
}
|
||||
|
||||
- free(cmap);
|
||||
}
|
||||
|
||||
// wrong palette ID, perhaps a gray scale is needed ?
|
||||
@@ -463,12 +475,12 @@ Load(FreeImageIO *io, fi_handle handle,
|
||||
return dib;
|
||||
}
|
||||
|
||||
- // calculate the line length for the PCX and the DIB
|
||||
+ // calculate the line length for the PCX and the dib
|
||||
|
||||
// length of raster line in bytes
|
||||
- unsigned linelength = header.bytes_per_line * header.planes;
|
||||
- // length of DIB line (rounded to DWORD) in bytes
|
||||
- unsigned pitch = FreeImage_GetPitch(dib);
|
||||
+ const unsigned linelength = header.bytes_per_line * header.planes;
|
||||
+ // length of dib line (rounded to DWORD) in bytes
|
||||
+ const unsigned pitch = FreeImage_GetPitch(dib);
|
||||
|
||||
// run-length encoding ?
|
||||
|
||||
@@ -478,14 +490,18 @@ Load(FreeImageIO *io, fi_handle handle,
|
||||
// ---------------
|
||||
|
||||
line = (BYTE*)malloc(linelength * sizeof(BYTE));
|
||||
- if(!line) throw FI_MSG_ERROR_MEMORY;
|
||||
+ if(!line) {
|
||||
+ throw FI_MSG_ERROR_MEMORY;
|
||||
+ }
|
||||
|
||||
- ReadBuf = (BYTE*)malloc(IO_BUF_SIZE * sizeof(BYTE));
|
||||
- if(!ReadBuf) throw FI_MSG_ERROR_MEMORY;
|
||||
+ ReadBuf = (BYTE*)malloc(PCX_IO_BUF_SIZE * sizeof(BYTE));
|
||||
+ if(!ReadBuf) {
|
||||
+ throw FI_MSG_ERROR_MEMORY;
|
||||
+ }
|
||||
|
||||
bits = FreeImage_GetScanLine(dib, height - 1);
|
||||
|
||||
- int ReadPos = IO_BUF_SIZE;
|
||||
+ int ReadPos = PCX_IO_BUF_SIZE;
|
||||
|
||||
if ((header.planes == 1) && ((header.bpp == 1) || (header.bpp == 8))) {
|
||||
BYTE skip;
|
||||
@@ -497,7 +513,7 @@ Load(FreeImageIO *io, fi_handle handle,
|
||||
// skip trailing garbage at the end of the scanline
|
||||
|
||||
for (unsigned count = written; count < linelength; count++) {
|
||||
- if (ReadPos < IO_BUF_SIZE) {
|
||||
+ if (ReadPos < PCX_IO_BUF_SIZE) {
|
||||
ReadPos++;
|
||||
} else {
|
||||
io->read_proc(&skip, sizeof(BYTE), 1, handle);
|
||||
@@ -513,7 +529,9 @@ Load(FreeImageIO *io, fi_handle handle,
|
||||
unsigned x, y, written;
|
||||
|
||||
buffer = (BYTE*)malloc(width * sizeof(BYTE));
|
||||
- if(!buffer) throw FI_MSG_ERROR_MEMORY;
|
||||
+ if(!buffer) {
|
||||
+ throw FI_MSG_ERROR_MEMORY;
|
||||
+ }
|
||||
|
||||
for (y = 0; y < height; y++) {
|
||||
written = readline(*io, handle, line, linelength, bIsRLE, ReadBuf, &ReadPos);
|
||||
@@ -532,7 +550,7 @@ Load(FreeImageIO *io, fi_handle handle,
|
||||
}
|
||||
}
|
||||
|
||||
- // then write the DIB row
|
||||
+ // then write the dib row
|
||||
|
||||
for (x = 0; x < width / 2; x++) {
|
||||
bits[x] = (buffer[2*x] << 4) | buffer[2*x+1];
|
||||
@@ -541,7 +559,7 @@ Load(FreeImageIO *io, fi_handle handle,
|
||||
// skip trailing garbage at the end of the scanline
|
||||
|
||||
for (unsigned count = written; count < linelength; count++) {
|
||||
- if (ReadPos < IO_BUF_SIZE) {
|
||||
+ if (ReadPos < PCX_IO_BUF_SIZE) {
|
||||
ReadPos++;
|
||||
} else {
|
||||
io->read_proc(&skip, sizeof(BYTE), 1, handle);
|
||||
167
mingw-w64-FreeImage/FreeImage-3.17.0_mingw-makefiles.patch
Normal file
167
mingw-w64-FreeImage/FreeImage-3.17.0_mingw-makefiles.patch
Normal file
@@ -0,0 +1,167 @@
|
||||
diff -rupN FreeImage/Makefile.fip FreeImage-new/Makefile.fip
|
||||
--- FreeImage/Makefile.fip 2015-09-17 22:51:21.797196208 +0200
|
||||
+++ FreeImage-new/Makefile.fip 2015-09-24 01:18:01.576395215 +0200
|
||||
@@ -3,6 +3,14 @@
|
||||
# This file can be generated by ./genfipsrclist.sh
|
||||
include fipMakefile.srcs
|
||||
|
||||
+CC = gcc
|
||||
+CXX = g++
|
||||
+LD = g++
|
||||
+AR = ar
|
||||
+DLLTOOL = dlltool
|
||||
+RC = windres
|
||||
+PKGCONFIG = pkg-config
|
||||
+
|
||||
# General configuration variables:
|
||||
DESTDIR ?= /
|
||||
INCDIR ?= $(DESTDIR)/usr/include
|
||||
@@ -24,24 +32,21 @@ override CFLAGS += -DNO_LCMS
|
||||
override CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
|
||||
override CFLAGS += $(INCLUDE)
|
||||
CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
|
||||
+override CXXFLAGS += -DFIP_EXPORTS
|
||||
# LibJXR
|
||||
override CXXFLAGS += -D__ANSI__
|
||||
override CXXFLAGS += $(INCLUDE)
|
||||
LDFLAGS ?=
|
||||
-override LDFLAGS += -LDist -lfreeimage-$(VER_MAJOR).$(VER_MINOR)
|
||||
-
|
||||
-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
|
||||
- override CFLAGS += -fPIC
|
||||
- override CXXFLAGS += -fPIC
|
||||
-endif
|
||||
+override LDFLAGS += -LDist -lfreeimage-$(VER_MAJOR) -lgdi32
|
||||
|
||||
TARGET = freeimageplus
|
||||
STATICLIB = lib$(TARGET).a
|
||||
-SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
|
||||
-LIBNAME = lib$(TARGET).so
|
||||
-VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
|
||||
+SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).dll
|
||||
+IMPORTLIB = lib$(TARGET).dll.a
|
||||
+EXPORTLIB = lib$(TARGET).exp
|
||||
HEADER = Source/FreeImage.h
|
||||
HEADERFIP = Wrapper/FreeImagePlus/FreeImagePlus.h
|
||||
+RCFILE = Wrapper/FreeImagePlus/FreeImagePlus.rc
|
||||
|
||||
|
||||
default: all
|
||||
@@ -51,7 +56,8 @@ all: dist
|
||||
dist: FreeImage
|
||||
mkdir -p Dist
|
||||
cp *.a Dist/
|
||||
- cp *.so Dist/
|
||||
+ cp *.dll Dist/
|
||||
+ cp *.dll.a Dist/
|
||||
cp Source/FreeImage.h Dist/
|
||||
cp Wrapper/FreeImagePlus/FreeImagePlus.h Dist/
|
||||
|
||||
@@ -66,21 +72,14 @@ FreeImage: $(STATICLIB) $(SHAREDLIB)
|
||||
.cpp.o:
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
-$(STATICLIB): $(MODULES)
|
||||
- $(AR) r $@ $(MODULES)
|
||||
+%.coff: %.rc
|
||||
+ $(RC) $(RCFLAGS) -o $@ $<
|
||||
|
||||
-$(SHAREDLIB): $(MODULES)
|
||||
- $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
|
||||
-
|
||||
-install:
|
||||
- install -d $(INCDIR) $(INSTALLDIR)
|
||||
- install -m 644 -o root -g root $(HEADER) $(INCDIR)
|
||||
- install -m 644 -o root -g root $(HEADERFIP) $(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)
|
||||
+$(STATICLIB): $(MODULES)
|
||||
+ $(AR) rs $@ $(MODULES)
|
||||
|
||||
-clean:
|
||||
- rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
|
||||
+$(IMPORTLIB) $(EXPORTLIB): $(MODULES)
|
||||
+ $(DLLTOOL) -e $(EXPORTLIB) -l $(IMPORTLIB) -D $(SHAREDLIB) $(DLLTOOLFLAGS) $(MODULES)
|
||||
|
||||
+$(SHAREDLIB): $(EXPORTLIB) $(RESOURCE)
|
||||
+ $(LD) -shared -o $@ $(EXPORTLIB) $(MODULES) $(RESOURCE) $(LDFLAGS)
|
||||
diff -rupN FreeImage/Makefile.gnu FreeImage-new/Makefile.gnu
|
||||
--- FreeImage/Makefile.gnu 2015-09-17 22:51:21.798196232 +0200
|
||||
+++ FreeImage-new/Makefile.gnu 2015-09-24 01:24:52.381788259 +0200
|
||||
@@ -3,6 +3,14 @@
|
||||
# This file can be generated by ./gensrclist.sh
|
||||
include Makefile.srcs
|
||||
|
||||
+CC = gcc
|
||||
+CXX = g++
|
||||
+LD = g++
|
||||
+AR = ar
|
||||
+DLLTOOL = dlltool
|
||||
+RC = windres
|
||||
+PKGCONFIG = pkg-config
|
||||
+
|
||||
# General configuration variables:
|
||||
DESTDIR ?= /
|
||||
INCDIR ?= $(DESTDIR)/usr/include
|
||||
@@ -16,18 +24,14 @@ LIBRARIES = -lstdc++
|
||||
MODULES = $(SRCS:.c=.o)
|
||||
MODULES := $(MODULES:.cpp=.o)
|
||||
CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden
|
||||
-override CFLAGS += $(INCLUDE) -D__ANSI__ -I/usr/include/jxrlib $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp zlib)
|
||||
-override LDFLAGS += -ljpeg -ljpegxr $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp zlib)
|
||||
-
|
||||
-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
|
||||
- override CFLAGS += -fPIC
|
||||
-endif
|
||||
+override CFLAGS += $(INCLUDE) -D__ANSI__ -DFREEIMAGE_EXPORTS -I/mingw32/include/jxrlib -I/mingw64/include/jxrlib $(shell ${PKGCONFIG} --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib)
|
||||
+override LDFLAGS += -ljpeg -ljpegxr -ljxrglue $(shell ${PKGCONFIG} --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib)
|
||||
|
||||
TARGET = freeimage
|
||||
STATICLIB = lib$(TARGET).a
|
||||
-SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
|
||||
-LIBNAME = lib$(TARGET).so
|
||||
-VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
|
||||
+SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).dll
|
||||
+IMPORTLIB = lib$(TARGET).dll.a
|
||||
+EXPORTLIB = lib$(TARGET).exp
|
||||
HEADER = Source/FreeImage.h
|
||||
|
||||
|
||||
@@ -39,7 +43,8 @@ all: dist
|
||||
dist: FreeImage
|
||||
mkdir -p Dist
|
||||
cp *.a Dist/
|
||||
- cp *.so Dist/
|
||||
+ cp *.dll Dist/
|
||||
+ cp *.dll.a Dist/
|
||||
cp Source/FreeImage.h Dist/
|
||||
|
||||
dos2unix:
|
||||
@@ -54,20 +59,10 @@ FreeImage: $(STATICLIB) $(SHAREDLIB)
|
||||
$(CXX) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(STATICLIB): $(MODULES)
|
||||
- $(AR) r $@ $(MODULES)
|
||||
-
|
||||
-$(SHAREDLIB): $(MODULES)
|
||||
- $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
|
||||
-
|
||||
-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
|
||||
+ $(AR) rs $@ $(MODULES)
|
||||
|
||||
-clean:
|
||||
- rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
|
||||
+$(IMPORTLIB) $(EXPORTLIB): $(MODULES)
|
||||
+ $(DLLTOOL) -e $(EXPORTLIB) -l $(IMPORTLIB) -D $(SHAREDLIB) $(DLLTOOLFLAGS) $(MODULES)
|
||||
|
||||
+$(SHAREDLIB): $(EXPORTLIB) $(RESOURCE)
|
||||
+ $(LD) -shared -o $@ $(EXPORTLIB) $(MODULES) $(RESOURCE) $(LDFLAGS)
|
||||
548
mingw-w64-FreeImage/FreeImage-3.17.0_unbundle.patch
Normal file
548
mingw-w64-FreeImage/FreeImage-3.17.0_unbundle.patch
Normal file
@@ -0,0 +1,548 @@
|
||||
diff -rupN FreeImage/genfipsrclist.sh FreeImage-new/genfipsrclist.sh
|
||||
--- FreeImage/genfipsrclist.sh 2015-02-20 10:52:16.000000000 +0100
|
||||
+++ FreeImage-new/genfipsrclist.sh 2015-09-05 02:13:52.041353305 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
-DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/OpenEXR/IexMath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src Source/LibWebP Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib Wrapper/FreeImagePlus"
|
||||
+DIRLIST="Wrapper/FreeImagePlus"
|
||||
|
||||
|
||||
echo "VER_MAJOR = 3" > fipMakefile.srcs
|
||||
@@ -19,5 +19,6 @@ echo -n "INCLUDE =" >> fipMakefile.srcs
|
||||
for DIR in $DIRLIST; do
|
||||
echo -n " -I$DIR" >> fipMakefile.srcs
|
||||
done
|
||||
+echo -n " -IDist" >> fipMakefile.srcs
|
||||
echo >> fipMakefile.srcs
|
||||
|
||||
diff -rupN FreeImage/gensrclist.sh FreeImage-new/gensrclist.sh
|
||||
--- FreeImage/gensrclist.sh 2015-02-20 10:51:50.000000000 +0100
|
||||
+++ FreeImage-new/gensrclist.sh 2015-09-05 02:13:52.041353305 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
-DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/OpenEXR/IexMath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src Source/LibWebP Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib"
|
||||
+DIRLIST=". Source Source/Metadata Source/FreeImageToolkit"
|
||||
|
||||
echo "VER_MAJOR = 3" > Makefile.srcs
|
||||
echo "VER_MINOR = 17.0" >> Makefile.srcs
|
||||
diff -rupN FreeImage/Makefile.fip FreeImage-new/Makefile.fip
|
||||
--- FreeImage/Makefile.fip 2015-03-08 18:03:56.000000000 +0100
|
||||
+++ FreeImage-new/Makefile.fip 2015-09-05 02:14:09.212684028 +0200
|
||||
@@ -17,20 +17,22 @@ MODULES = $(SRCS:.c=.o)
|
||||
MODULES := $(MODULES:.cpp=.o)
|
||||
CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden
|
||||
# OpenJPEG
|
||||
-CFLAGS += -DOPJ_STATIC
|
||||
+override CFLAGS += -DOPJ_STATIC
|
||||
# LibRaw
|
||||
-CFLAGS += -DNO_LCMS
|
||||
+override CFLAGS += -DNO_LCMS
|
||||
# LibJXR
|
||||
-CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
|
||||
-CFLAGS += $(INCLUDE)
|
||||
+override CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
|
||||
+override CFLAGS += $(INCLUDE)
|
||||
CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
|
||||
# LibJXR
|
||||
-CXXFLAGS += -D__ANSI__
|
||||
-CXXFLAGS += $(INCLUDE)
|
||||
+override CXXFLAGS += -D__ANSI__
|
||||
+override CXXFLAGS += $(INCLUDE)
|
||||
+LDFLAGS ?=
|
||||
+override LDFLAGS += -LDist -lfreeimage-$(VER_MAJOR).$(VER_MINOR)
|
||||
|
||||
ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
|
||||
- CFLAGS += -fPIC
|
||||
- CXXFLAGS += -fPIC
|
||||
+ override CFLAGS += -fPIC
|
||||
+ override CXXFLAGS += -fPIC
|
||||
endif
|
||||
|
||||
TARGET = freeimageplus
|
||||
@@ -68,7 +70,7 @@ $(STATICLIB): $(MODULES)
|
||||
$(AR) r $@ $(MODULES)
|
||||
|
||||
$(SHAREDLIB): $(MODULES)
|
||||
- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
|
||||
+ $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
|
||||
|
||||
install:
|
||||
install -d $(INCDIR) $(INSTALLDIR)
|
||||
diff -rupN FreeImage/Makefile.gnu FreeImage-new/Makefile.gnu
|
||||
--- FreeImage/Makefile.gnu 2015-03-08 18:04:00.000000000 +0100
|
||||
+++ FreeImage-new/Makefile.gnu 2015-09-05 02:14:04.810599259 +0200
|
||||
@@ -16,21 +16,11 @@ LIBRARIES = -lstdc++
|
||||
MODULES = $(SRCS:.c=.o)
|
||||
MODULES := $(MODULES:.cpp=.o)
|
||||
CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden
|
||||
-# OpenJPEG
|
||||
-CFLAGS += -DOPJ_STATIC
|
||||
-# LibRaw
|
||||
-CFLAGS += -DNO_LCMS
|
||||
-# LibJXR
|
||||
-CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
|
||||
-CFLAGS += $(INCLUDE)
|
||||
-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
|
||||
-# LibJXR
|
||||
-CXXFLAGS += -D__ANSI__
|
||||
-CXXFLAGS += $(INCLUDE)
|
||||
+override CFLAGS += $(INCLUDE) -D__ANSI__ -I/usr/include/jxrlib $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp zlib)
|
||||
+override LDFLAGS += -ljpeg -ljpegxr $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp zlib)
|
||||
|
||||
ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
|
||||
- CFLAGS += -fPIC
|
||||
- CXXFLAGS += -fPIC
|
||||
+ override CFLAGS += -fPIC
|
||||
endif
|
||||
|
||||
TARGET = freeimage
|
||||
@@ -61,13 +51,13 @@ FreeImage: $(STATICLIB) $(SHAREDLIB)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
.cpp.o:
|
||||
- $(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
+ $(CXX) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(STATICLIB): $(MODULES)
|
||||
$(AR) r $@ $(MODULES)
|
||||
|
||||
$(SHAREDLIB): $(MODULES)
|
||||
- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
|
||||
+ $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
|
||||
|
||||
install:
|
||||
install -d $(INCDIR) $(INSTALLDIR)
|
||||
diff -rupN FreeImage/Source/FreeImage/J2KHelper.cpp FreeImage-new/Source/FreeImage/J2KHelper.cpp
|
||||
--- FreeImage/Source/FreeImage/J2KHelper.cpp 2015-03-02 02:07:08.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/J2KHelper.cpp 2015-09-05 02:13:52.042353324 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
-#include "../LibOpenJPEG/openjpeg.h"
|
||||
+#include <openjpeg.h>
|
||||
#include "J2KHelper.h"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
diff -rupN FreeImage/Source/FreeImage/Plugin.cpp FreeImage-new/Source/FreeImage/Plugin.cpp
|
||||
--- FreeImage/Source/FreeImage/Plugin.cpp 2015-03-02 02:07:08.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/Plugin.cpp 2015-09-05 02:13:52.042353324 +0200
|
||||
@@ -263,7 +263,12 @@ FreeImage_Initialise(BOOL load_local_plu
|
||||
s_plugins->AddNode(InitDDS);
|
||||
s_plugins->AddNode(InitGIF);
|
||||
s_plugins->AddNode(InitHDR);
|
||||
- s_plugins->AddNode(InitG3);
|
||||
+/* The G3 fax format plugin is deliberately disabled in the Fedora build of
|
||||
+ FreeImage as it requires that FreeImage uses a private copy of libtiff
|
||||
+ which is a no no because of security reasons. */
|
||||
+#if 0
|
||||
+ s_plugins->AddNode(InitG3);
|
||||
+#endif
|
||||
s_plugins->AddNode(InitSGI);
|
||||
s_plugins->AddNode(InitEXR);
|
||||
s_plugins->AddNode(InitJ2K);
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginEXR.cpp FreeImage-new/Source/FreeImage/PluginEXR.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginEXR.cpp 2015-03-02 02:07:08.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginEXR.cpp 2015-09-05 02:13:52.042353324 +0200
|
||||
@@ -28,16 +28,16 @@
|
||||
#pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning)
|
||||
#endif
|
||||
|
||||
-#include "../OpenEXR/IlmImf/ImfIO.h"
|
||||
-#include "../OpenEXR/Iex/Iex.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfOutputFile.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfInputFile.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfRgbaFile.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfChannelList.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfRgba.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfArray.h"
|
||||
-#include "../OpenEXR/IlmImf/ImfPreviewImage.h"
|
||||
-#include "../OpenEXR/Half/half.h"
|
||||
+#include <OpenEXR/ImfIO.h>
|
||||
+#include <OpenEXR/Iex.h>
|
||||
+#include <OpenEXR/ImfOutputFile.h>
|
||||
+#include <OpenEXR/ImfInputFile.h>
|
||||
+#include <OpenEXR/ImfRgbaFile.h>
|
||||
+#include <OpenEXR/ImfChannelList.h>
|
||||
+#include <OpenEXR/ImfRgba.h>
|
||||
+#include <OpenEXR/ImfArray.h>
|
||||
+#include <OpenEXR/ImfPreviewImage.h>
|
||||
+#include <OpenEXR/half.h>
|
||||
|
||||
|
||||
// ==========================================================
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginJ2K.cpp FreeImage-new/Source/FreeImage/PluginJ2K.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginJ2K.cpp 2015-03-02 02:07:08.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginJ2K.cpp 2015-09-05 02:13:52.043353343 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
-#include "../LibOpenJPEG/openjpeg.h"
|
||||
+#include <openjpeg.h>
|
||||
#include "J2KHelper.h"
|
||||
|
||||
// ==========================================================
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginJP2.cpp FreeImage-new/Source/FreeImage/PluginJP2.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginJP2.cpp 2015-03-02 02:07:08.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginJP2.cpp 2015-09-05 02:13:52.043353343 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
-#include "../LibOpenJPEG/openjpeg.h"
|
||||
+#include <openjpeg.h>
|
||||
#include "J2KHelper.h"
|
||||
|
||||
// ==========================================================
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginJPEG.cpp FreeImage-new/Source/FreeImage/PluginJPEG.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginJPEG.cpp 2015-03-02 02:07:08.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginJPEG.cpp 2015-09-05 02:13:52.043353343 +0200
|
||||
@@ -35,9 +35,9 @@ extern "C" {
|
||||
#undef FAR
|
||||
#include <setjmp.h>
|
||||
|
||||
-#include "../LibJPEG/jinclude.h"
|
||||
-#include "../LibJPEG/jpeglib.h"
|
||||
-#include "../LibJPEG/jerror.h"
|
||||
+#include <stdio.h>
|
||||
+#include <jpeglib.h>
|
||||
+#include <jerror.h>
|
||||
}
|
||||
|
||||
#include "FreeImage.h"
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginJXR.cpp FreeImage-new/Source/FreeImage/PluginJXR.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginJXR.cpp 2015-03-02 02:07:08.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginJXR.cpp 2015-09-05 02:13:52.043353343 +0200
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "Utilities.h"
|
||||
#include "../Metadata/FreeImageTag.h"
|
||||
|
||||
-#include "../LibJXR/jxrgluelib/JXRGlue.h"
|
||||
+#include <JXRGlue.h>
|
||||
|
||||
// ==========================================================
|
||||
// Plugin Interface
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginPNG.cpp FreeImage-new/Source/FreeImage/PluginPNG.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginPNG.cpp 2015-03-10 20:16:12.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginPNG.cpp 2015-09-05 02:13:52.044353363 +0200
|
||||
@@ -40,8 +40,8 @@
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
-#include "../ZLib/zlib.h"
|
||||
-#include "../LibPNG/png.h"
|
||||
+#include <zlib.h>
|
||||
+#include <png.h>
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginRAW.cpp FreeImage-new/Source/FreeImage/PluginRAW.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginRAW.cpp 2015-03-08 20:12:04.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginRAW.cpp 2015-09-05 02:13:52.044353363 +0200
|
||||
@@ -19,7 +19,7 @@
|
||||
// Use at your own risk!
|
||||
// ==========================================================
|
||||
|
||||
-#include "../LibRawLite/libraw/libraw.h"
|
||||
+#include <libraw/libraw.h>
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginTIFF.cpp FreeImage-new/Source/FreeImage/PluginTIFF.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginTIFF.cpp 2015-03-02 02:07:08.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginTIFF.cpp 2015-09-05 02:13:52.044353363 +0200
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
-#include "../LibTIFF4/tiffiop.h"
|
||||
+#include <tiffio.h>
|
||||
#include "../Metadata/FreeImageTag.h"
|
||||
-#include "../OpenEXR/Half/half.h"
|
||||
+#include <OpenEXR/half.h>
|
||||
|
||||
#include "FreeImageIO.h"
|
||||
#include "PSDParser.h"
|
||||
@@ -194,16 +194,6 @@ TIFFFdOpen(thandle_t handle, const char
|
||||
return tif;
|
||||
}
|
||||
|
||||
-/**
|
||||
-Open a TIFF file for reading or writing
|
||||
-@param name
|
||||
-@param mode
|
||||
-*/
|
||||
-TIFF*
|
||||
-TIFFOpen(const char* name, const char* mode) {
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
// ----------------------------------------------------------
|
||||
// TIFF library FreeImage-specific routines.
|
||||
// ----------------------------------------------------------
|
||||
diff -rupN FreeImage/Source/FreeImage/PluginWebP.cpp FreeImage-new/Source/FreeImage/PluginWebP.cpp
|
||||
--- FreeImage/Source/FreeImage/PluginWebP.cpp 2015-03-02 02:07:08.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/PluginWebP.cpp 2015-09-05 02:13:52.044353363 +0200
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
#include "../Metadata/FreeImageTag.h"
|
||||
|
||||
-#include "../LibWebP/src/webp/decode.h"
|
||||
-#include "../LibWebP/src/webp/encode.h"
|
||||
-#include "../LibWebP/src/enc/vp8enci.h"
|
||||
-#include "../LibWebP/src/webp/mux.h"
|
||||
+#include <webp/decode.h>
|
||||
+#include <webp/encode.h>
|
||||
+// #include "../LibWebP/src/enc/vp8enci.h"
|
||||
+#include <webp/mux.h>
|
||||
|
||||
// ==========================================================
|
||||
// Plugin Interface
|
||||
diff -rupN FreeImage/Source/FreeImage/ZLibInterface.cpp FreeImage-new/Source/FreeImage/ZLibInterface.cpp
|
||||
--- FreeImage/Source/FreeImage/ZLibInterface.cpp 2015-03-02 02:07:10.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage/ZLibInterface.cpp 2015-09-05 02:13:52.044353363 +0200
|
||||
@@ -19,10 +19,9 @@
|
||||
// Use at your own risk!
|
||||
// ==========================================================
|
||||
|
||||
-#include "../ZLib/zlib.h"
|
||||
+#include <zlib.h>
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
-#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */
|
||||
|
||||
/**
|
||||
Compresses a source buffer into a target buffer, using the ZLib library.
|
||||
@@ -115,7 +114,7 @@ FreeImage_ZLibGZip(BYTE *target, DWORD t
|
||||
return 0;
|
||||
case Z_OK: {
|
||||
// patch header, setup crc and length (stolen from mod_trace_output)
|
||||
- BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code
|
||||
+ BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code (unix)
|
||||
crc = crc32(crc, source, source_size);
|
||||
memcpy(target + 4 + dest_len, &crc, 4);
|
||||
memcpy(target + 8 + dest_len, &source_size, 4);
|
||||
diff -rupN FreeImage/Source/FreeImage.h FreeImage-new/Source/FreeImage.h
|
||||
--- FreeImage/Source/FreeImage.h 2015-03-04 02:17:54.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImage.h 2015-09-05 02:13:52.045353382 +0200
|
||||
@@ -155,8 +155,11 @@ typedef uint8_t BYTE;
|
||||
typedef uint16_t WORD;
|
||||
typedef uint32_t DWORD;
|
||||
typedef int32_t LONG;
|
||||
+// Disable these, they conflict with the (wrong) ones of libraw
|
||||
+#if 0
|
||||
typedef int64_t INT64;
|
||||
typedef uint64_t UINT64;
|
||||
+#endif
|
||||
#else
|
||||
// MS is not C99 ISO compliant
|
||||
typedef long BOOL;
|
||||
@@ -410,7 +413,12 @@ FI_ENUM(FREE_IMAGE_FORMAT) {
|
||||
FIF_DDS = 24,
|
||||
FIF_GIF = 25,
|
||||
FIF_HDR = 26,
|
||||
- FIF_FAXG3 = 27,
|
||||
+/* The G3 fax format plugin is deliberately disabled in the Fedora build of
|
||||
+ FreeImage as it requires that FreeImage uses a private copy of libtiff
|
||||
+ which is a no no because of security reasons. */
|
||||
+#if 0
|
||||
+ FIF_FAXG3 = 27,
|
||||
+#endif
|
||||
FIF_SGI = 28,
|
||||
FIF_EXR = 29,
|
||||
FIF_J2K = 30,
|
||||
@@ -473,6 +481,10 @@ FI_ENUM(FREE_IMAGE_DITHER) {
|
||||
FID_BAYER16x16 = 6 //! Bayer ordered dispersed dot dithering (order 4 dithering matrix)
|
||||
};
|
||||
|
||||
+/* The FreeImage_JPEGTransform functions are deliberately disabled in the
|
||||
+ Fedora build of FreeImage as they require that FreeImage uses a private copy
|
||||
+ of libjpeg which is a no no because of security reasons. */
|
||||
+#if 0
|
||||
/** Lossless JPEG transformations
|
||||
Constants used in FreeImage_JPEGTransform
|
||||
*/
|
||||
@@ -486,6 +498,7 @@ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
|
||||
FIJPEG_OP_ROTATE_180 = 6, //! 180-degree rotation
|
||||
FIJPEG_OP_ROTATE_270 = 7 //! 270-degree clockwise (or 90 ccw)
|
||||
};
|
||||
+#endif
|
||||
|
||||
/** Tone mapping operators.
|
||||
Constants used in FreeImage_ToneMapping.
|
||||
@@ -1076,7 +1089,10 @@ DLL_API const char* DLL_CALLCONV FreeIma
|
||||
// --------------------------------------------------------------------------
|
||||
// JPEG lossless transformation routines
|
||||
// --------------------------------------------------------------------------
|
||||
-
|
||||
+/* The FreeImage_JPEGTransform functions are deliberately disabled in the
|
||||
++ Fedora build of FreeImage as they require that FreeImage uses a private copy
|
||||
++ of libjpeg which is a no no because of security reasons. */
|
||||
+#if 0
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom);
|
||||
@@ -1085,6 +1101,7 @@ DLL_API BOOL DLL_CALLCONV FreeImage_JPEG
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
|
||||
DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
|
||||
+#endif
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
diff -rupN FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp FreeImage-new/Source/FreeImageToolkit/JPEGTransform.cpp
|
||||
--- FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp 2015-03-02 02:07:10.000000000 +0100
|
||||
+++ FreeImage-new/Source/FreeImageToolkit/JPEGTransform.cpp 2015-09-05 02:13:52.045353382 +0200
|
||||
@@ -26,10 +26,10 @@ extern "C" {
|
||||
#undef FAR
|
||||
#include <setjmp.h>
|
||||
|
||||
-#include "../LibJPEG/jinclude.h"
|
||||
-#include "../LibJPEG/jpeglib.h"
|
||||
-#include "../LibJPEG/jerror.h"
|
||||
-#include "../LibJPEG/transupp.h"
|
||||
+#include <jinclude.h>
|
||||
+#include <jpeglib.h>
|
||||
+#include <jerror.h>
|
||||
+#include <transupp.h>
|
||||
}
|
||||
|
||||
#include "FreeImage.h"
|
||||
diff -rupN FreeImage/Source/Metadata/TagConversion.cpp FreeImage-new/Source/Metadata/TagConversion.cpp
|
||||
--- FreeImage/Source/Metadata/TagConversion.cpp 2015-03-02 02:07:10.000000000 +0100
|
||||
+++ FreeImage-new/Source/Metadata/TagConversion.cpp 2015-09-05 02:13:52.045353382 +0200
|
||||
@@ -30,6 +30,11 @@
|
||||
|
||||
#define MAX_TEXT_EXTENT 512
|
||||
|
||||
+// These were in FreeImage.h, but are moved here to avoid conflicts (see note in FreeImage.h)
|
||||
+typedef int64_t INT64;
|
||||
+typedef uint64_t UINT64;
|
||||
+
|
||||
+
|
||||
/**
|
||||
Convert a tag to a C string
|
||||
*/
|
||||
diff -rupN FreeImage/Source/Metadata/XTIFF.cpp FreeImage-new/Source/Metadata/XTIFF.cpp
|
||||
--- FreeImage/Source/Metadata/XTIFF.cpp 2015-03-02 02:07:10.000000000 +0100
|
||||
+++ FreeImage-new/Source/Metadata/XTIFF.cpp 2015-09-05 02:13:52.045353382 +0200
|
||||
@@ -29,13 +29,18 @@
|
||||
#pragma warning (disable : 4786) // identifier was truncated to 'number' characters
|
||||
#endif
|
||||
|
||||
-#include "../LibTIFF4/tiffiop.h"
|
||||
+#include <tiffio.h>
|
||||
|
||||
#include "FreeImage.h"
|
||||
#include "Utilities.h"
|
||||
#include "FreeImageTag.h"
|
||||
#include "FIRational.h"
|
||||
|
||||
+extern "C"
|
||||
+{
|
||||
+ int _TIFFDataSize(TIFFDataType type);
|
||||
+}
|
||||
+
|
||||
// ----------------------------------------------------------
|
||||
// Extended TIFF Directory GEO Tag Support
|
||||
// ----------------------------------------------------------
|
||||
@@ -224,6 +229,33 @@ tiff_write_geotiff_profile(TIFF *tif, FI
|
||||
// TIFF EXIF tag reading & writing
|
||||
// ----------------------------------------------------------
|
||||
|
||||
+static uint32 exif_tag_ids[] = {
|
||||
+ EXIFTAG_EXPOSURETIME, EXIFTAG_FNUMBER, EXIFTAG_EXPOSUREPROGRAM,
|
||||
+ EXIFTAG_SPECTRALSENSITIVITY, EXIFTAG_ISOSPEEDRATINGS, EXIFTAG_OECF,
|
||||
+ EXIFTAG_EXIFVERSION, EXIFTAG_DATETIMEORIGINAL, EXIFTAG_DATETIMEDIGITIZED,
|
||||
+ EXIFTAG_COMPONENTSCONFIGURATION, EXIFTAG_COMPRESSEDBITSPERPIXEL,
|
||||
+ EXIFTAG_SHUTTERSPEEDVALUE, EXIFTAG_APERTUREVALUE,
|
||||
+ EXIFTAG_BRIGHTNESSVALUE, EXIFTAG_EXPOSUREBIASVALUE,
|
||||
+ EXIFTAG_MAXAPERTUREVALUE, EXIFTAG_SUBJECTDISTANCE, EXIFTAG_METERINGMODE,
|
||||
+ EXIFTAG_LIGHTSOURCE, EXIFTAG_FLASH, EXIFTAG_FOCALLENGTH,
|
||||
+ EXIFTAG_SUBJECTAREA, EXIFTAG_MAKERNOTE, EXIFTAG_USERCOMMENT,
|
||||
+ EXIFTAG_SUBSECTIME, EXIFTAG_SUBSECTIMEORIGINAL,
|
||||
+ EXIFTAG_SUBSECTIMEDIGITIZED, EXIFTAG_FLASHPIXVERSION, EXIFTAG_COLORSPACE,
|
||||
+ EXIFTAG_PIXELXDIMENSION, EXIFTAG_PIXELYDIMENSION,
|
||||
+ EXIFTAG_RELATEDSOUNDFILE, EXIFTAG_FLASHENERGY,
|
||||
+ EXIFTAG_SPATIALFREQUENCYRESPONSE, EXIFTAG_FOCALPLANEXRESOLUTION,
|
||||
+ EXIFTAG_FOCALPLANEYRESOLUTION, EXIFTAG_FOCALPLANERESOLUTIONUNIT,
|
||||
+ EXIFTAG_SUBJECTLOCATION, EXIFTAG_EXPOSUREINDEX, EXIFTAG_SENSINGMETHOD,
|
||||
+ EXIFTAG_FILESOURCE, EXIFTAG_SCENETYPE, EXIFTAG_CFAPATTERN,
|
||||
+ EXIFTAG_CUSTOMRENDERED, EXIFTAG_EXPOSUREMODE, EXIFTAG_WHITEBALANCE,
|
||||
+ EXIFTAG_DIGITALZOOMRATIO, EXIFTAG_FOCALLENGTHIN35MMFILM,
|
||||
+ EXIFTAG_SCENECAPTURETYPE, EXIFTAG_GAINCONTROL, EXIFTAG_CONTRAST,
|
||||
+ EXIFTAG_SATURATION, EXIFTAG_SHARPNESS, EXIFTAG_DEVICESETTINGDESCRIPTION,
|
||||
+ EXIFTAG_SUBJECTDISTANCERANGE, EXIFTAG_GAINCONTROL, EXIFTAG_GAINCONTROL,
|
||||
+ EXIFTAG_IMAGEUNIQUEID
|
||||
+};
|
||||
+static int nExifTags = sizeof(exif_tag_ids) / sizeof(exif_tag_ids[0]);
|
||||
+
|
||||
/**
|
||||
Read a single Exif tag
|
||||
|
||||
@@ -575,45 +607,11 @@ tiff_read_exif_tags(TIFF *tif, TagLib::M
|
||||
|
||||
// loop over all Core Directory Tags
|
||||
// ### uses private data, but there is no other way
|
||||
+ // -> Fedora: Best we can do without private headers is to hard-code a list of known EXIF tags and read those
|
||||
if(md_model == TagLib::EXIF_MAIN) {
|
||||
- const TIFFDirectory *td = &tif->tif_dir;
|
||||
-
|
||||
- uint32 lastTag = 0; //<- used to prevent reading some tags twice (as stored in tif_fieldinfo)
|
||||
-
|
||||
- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) {
|
||||
- const TIFFField *fld = tif->tif_fields[fi];
|
||||
-
|
||||
- const uint32 tag_id = TIFFFieldTag(fld);
|
||||
-
|
||||
- if(tag_id == lastTag) {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- // test if tag value is set
|
||||
- // (lifted directly from LibTiff _TIFFWriteDirectory)
|
||||
-
|
||||
- if( fld->field_bit == FIELD_CUSTOM ) {
|
||||
- int is_set = FALSE;
|
||||
-
|
||||
- for(int ci = 0; ci < td->td_customValueCount; ci++ ) {
|
||||
- is_set |= (td->td_customValues[ci].info == fld);
|
||||
- }
|
||||
-
|
||||
- if( !is_set ) {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- } else if(!TIFFFieldSet(tif, fld->field_bit)) {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- // process *all* other tags (some will be ignored)
|
||||
-
|
||||
- tiff_read_exif_tag(tif, tag_id, dib, md_model);
|
||||
-
|
||||
- lastTag = tag_id;
|
||||
+ for (int i = 0; i < nExifTags; ++i) {
|
||||
+ tiff_read_exif_tag(tif, exif_tag_ids[i], dib, md_model);
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -723,10 +721,9 @@ tiff_write_exif_tags(TIFF *tif, TagLib::
|
||||
|
||||
TagLib& tag_lib = TagLib::instance();
|
||||
|
||||
- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) {
|
||||
- const TIFFField *fld = tif->tif_fields[fi];
|
||||
-
|
||||
- const uint32 tag_id = TIFFFieldTag(fld);
|
||||
+ for (int fi = 0; fi < nExifTags; fi++) {
|
||||
+ const uint32 tag_id = exif_tag_ids[fi];
|
||||
+ const TIFFField *fld = TIFFFieldWithTag(tif, tag_id);
|
||||
|
||||
if(skip_write_field(tif, tag_id)) {
|
||||
// skip tags that are already handled by the LibTIFF writing process
|
||||
@@ -1,64 +1,58 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=FreeImage
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=3.16.0
|
||||
pkgrel=7
|
||||
pkgver=3.17.0
|
||||
pkgrel=1
|
||||
pkgdesc="Library project for developers who would like to support popular graphics image formats (mingw-w64)."
|
||||
arch=('any')
|
||||
license=('GPL' 'custom:FIPL')
|
||||
url="http://freeimage.sourceforge.net/"
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
||||
"${MINGW_PACKAGE_PREFIX}-libjpeg-turbo"
|
||||
"${MINGW_PACKAGE_PREFIX}-libpng"
|
||||
"${MINGW_PACKAGE_PREFIX}-libtiff"
|
||||
"${MINGW_PACKAGE_PREFIX}-LibRaw"
|
||||
"${MINGW_PACKAGE_PREFIX}-openjpeg2"
|
||||
"${MINGW_PACKAGE_PREFIX}-openexr"
|
||||
"${MINGW_PACKAGE_PREFIX}-libwebp")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config")
|
||||
"${MINGW_PACKAGE_PREFIX}-jxrlib"
|
||||
"${MINGW_PACKAGE_PREFIX}-libjpeg-turbo"
|
||||
"${MINGW_PACKAGE_PREFIX}-libpng"
|
||||
"${MINGW_PACKAGE_PREFIX}-libtiff"
|
||||
"${MINGW_PACKAGE_PREFIX}-LibRaw"
|
||||
"${MINGW_PACKAGE_PREFIX}-libwebp"
|
||||
"${MINGW_PACKAGE_PREFIX}-openjpeg2"
|
||||
"${MINGW_PACKAGE_PREFIX}-openexr")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
|
||||
"${MINGW_PACKAGE_PREFIX}-iconv"
|
||||
"${MINGW_PACKAGE_PREFIX}-pkg-config"
|
||||
"dos2unix" "make")
|
||||
options=('strip' 'staticlibs' '!buildflags')
|
||||
source=("http://downloads.sourceforge.net/sourceforge/freeimage/FreeImage${pkgver//./}.zip"
|
||||
'FreeImage-3.16.0_mingw-makefiles.patch'
|
||||
'FreeImage-3.16.0_unbundle.patch'
|
||||
'FreeImage-3.16.0_disable-some-plugins.patch')
|
||||
md5sums=('1a2d1fff6204adbd479cc98818892fc1'
|
||||
'20a0a9f7257df79bbcbdec62ed2446d9'
|
||||
'824115841c4a5be8aa98a7b31ce07d79'
|
||||
'ffd4a31d2d1c2cf19af3a1e6232f8fd6')
|
||||
'FreeImage-3.17.0_mingw-makefiles.patch'
|
||||
'FreeImage-3.17.0_unbundle.patch'
|
||||
'FreeImage-3.17.0_CVE-2015-0852.patch')
|
||||
md5sums=('459e15f0ec75d6efa3c7bd63277ead86'
|
||||
'6510a7f7c715acf7bd182cd888d4787d'
|
||||
'b81acf43a202d03573932e1f98d63a60'
|
||||
'b21385e2da5dcdf4aa4e98d11150115d')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/FreeImage
|
||||
|
||||
# Convert to utf-8
|
||||
#iconv -f ISO-8859-15 -t UTF-8 Whatsnew.txt
|
||||
#iconv -f WINDOWS-1252 -t UTF-8 license-gplv3.txt
|
||||
#iconv -f ISO-8859-15 -t UTF-8 -o Whatsnew.txt.new Whatsnew.txt && \
|
||||
# touch -r Whatsnew.txt Whatsnew.txt.new && \
|
||||
# mv Whatsnew.txt.new Whatsnew.txt
|
||||
patch -p1 -i ${srcdir}/FreeImage-3.17.0_unbundle.patch
|
||||
patch -p1 -i ${srcdir}/FreeImage-3.17.0_mingw-makefiles.patch
|
||||
patch -p1 -i ${srcdir}/FreeImage-3.17.0_CVE-2015-0852.patch
|
||||
|
||||
#iconv -f WINDOWS-1252 -t UTF-8 -o license-gplv3.txt.new license-gplv3.txt && \
|
||||
# touch -r license-gplv3.txt license-gplv3.txt.new && \
|
||||
# mv license-gplv3.txt.new license-gplv3.txt
|
||||
|
||||
patch -p1 -i ${srcdir}/FreeImage-3.16.0_mingw-makefiles.patch
|
||||
patch -p1 -i ${srcdir}/FreeImage-3.16.0_unbundle.patch
|
||||
patch -p1 -i ${srcdir}/FreeImage-3.16.0_disable-some-plugins.patch
|
||||
|
||||
# Remove bundled libraries
|
||||
rm -rf Source/OpenEXR
|
||||
rm -rf Source/LibMNG
|
||||
rm -rf Source/LibOpenJPEG
|
||||
rm -rf Source/LibPNG
|
||||
rm -rf Source/LibRawLite
|
||||
rm -rf Source/LibTIFF
|
||||
rm -rf Source/LibJPEG
|
||||
rm -rf Source/LibTIFF4
|
||||
rm -rf Source/ZLib
|
||||
rm -rf Source/LibWebP
|
||||
|
||||
# Mingw-w64 has its own header
|
||||
rm -rf Source/LibJXR/common/include/guiddef.h
|
||||
# remove all included libs to make sure these don't get used during compile
|
||||
rm -r Source/Lib* Source/ZLib Source/OpenEXR
|
||||
|
||||
# clear files which cannot be built due to dependencies on private headers
|
||||
# (see also unbundle patch)
|
||||
> Source/FreeImage/PluginG3.cpp
|
||||
> Source/FreeImageToolkit/JPEGTransform.cpp
|
||||
|
||||
# sanitize encodings / line endings
|
||||
for file in `find . -type f -name '*.c' -or -name '*.cpp' -or -name '*.h' -or -name '*.txt' -or -name Makefile`; do
|
||||
${MINGW_PREFIX}/bin/iconv -f ISO-8859-15 -t UTF-8 ${file} > ${file}.new && \
|
||||
sed -i 's|\r||g' ${file}.new && \
|
||||
touch -r ${file} ${file}.new && mv ${file}.new ${file}
|
||||
done
|
||||
|
||||
#cp -f ${srcdir}/Makefile.mingw-w64 ${srcdir}/FreeImage/Makefile.mingw-w64
|
||||
|
||||
@@ -70,32 +64,17 @@ prepare() {
|
||||
build() {
|
||||
cd ${srcdir}/FreeImage
|
||||
|
||||
mkdir -p ${srcdir}/build-{shared,static}-${CARCH}
|
||||
lndir ${srcdir}/FreeImage ${srcdir}/build-shared-${CARCH}
|
||||
lndir ${srcdir}/FreeImage ${srcdir}/build-static-${CARCH}
|
||||
mkdir -p ${srcdir}/build-${CARCH}
|
||||
lndir ${srcdir}/FreeImage ${srcdir}/build-${CARCH}
|
||||
|
||||
plain "Build shared version..."
|
||||
cd ${srcdir}/build-shared-${CARCH}
|
||||
cd ${srcdir}/build-${CARCH}
|
||||
make \
|
||||
MINGW_TARGET=${MINGW_CHOST} \
|
||||
FREEIMAGE_LIBRARY_TYPE="SHARED" \
|
||||
-f Makefile.mingw
|
||||
-f Makefile.gnu
|
||||
|
||||
make \
|
||||
MINGW_TARGET=${MINGW_CHOST} \
|
||||
FREEIMAGE_LIBRARY_TYPE="SHARED" \
|
||||
-f Makefile.fip
|
||||
|
||||
plain "Build static version..."
|
||||
cd ${srcdir}/build-static-${CARCH}
|
||||
make \
|
||||
MINGW_TARGET=${MINGW_CHOST} \
|
||||
FREEIMAGE_LIBRARY_TYPE="STATIC" \
|
||||
-f Makefile.mingw
|
||||
|
||||
make \
|
||||
MINGW_TARGET=${MINGW_CHOST} \
|
||||
FREEIMAGE_LIBRARY_TYPE="STATIC" \
|
||||
-f Makefile.fip
|
||||
}
|
||||
|
||||
@@ -105,7 +84,7 @@ package() {
|
||||
install -d "${pkgdir}${MINGW_PREFIX}"/include
|
||||
install -d "${pkgdir}${MINGW_PREFIX}"/share/doc/FreeImage
|
||||
|
||||
cd ${srcdir}/build-shared-${CARCH}
|
||||
cd ${srcdir}/build-${CARCH}
|
||||
install -m755 Dist/libfreeimage-*.dll "${pkgdir}${MINGW_PREFIX}"/bin/
|
||||
install -m644 Dist/libfreeimage.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/
|
||||
install -m755 Dist/libfreeimageplus-*.dll "${pkgdir}${MINGW_PREFIX}"/bin/
|
||||
@@ -118,7 +97,6 @@ package() {
|
||||
install -m644 license-gplv2.txt "${pkgdir}${MINGW_PREFIX}"/share/doc/FreeImage/
|
||||
install -m644 license-gplv3.txt "${pkgdir}${MINGW_PREFIX}"/share/doc/FreeImage/
|
||||
|
||||
cd ${srcdir}/build-static-${CARCH}
|
||||
install -m644 Dist/libfreeimage.a "${pkgdir}${MINGW_PREFIX}"/lib/
|
||||
install -m644 Dist/libfreeimageplus.a "${pkgdir}${MINGW_PREFIX}"/lib/
|
||||
}
|
||||
|
||||
48
mingw-w64-cego/PKGBUILD
Normal file
48
mingw-w64-cego/PKGBUILD
Normal file
@@ -0,0 +1,48 @@
|
||||
# Maintainer: Bjoern Lemke <lemke@lemke-it.com>
|
||||
|
||||
_realname=cego
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=2.28.0
|
||||
pkgrel=1
|
||||
pkgdesc="Cego database system (mingw-w64)"
|
||||
arch=('any')
|
||||
url='http://www.lemke-it.com/'
|
||||
license=('GPL3')
|
||||
validpgpkeys=('gpg_KEY')
|
||||
source=("http://www.lemke-it.com/${_realname}-${pkgver}.tar.gz")
|
||||
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-lfcbase")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-lfcxml")
|
||||
|
||||
sha256sums=("66b1a5259a518f3ed95ccbedf08380f02314ca3e12fab1b9feb36bd52a3d6f58")
|
||||
|
||||
prepare() {
|
||||
cd $srcdir/${_realname}-${pkgver}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/${_realname}-${pkgver}
|
||||
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
|
||||
mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH}
|
||||
../${_realname}-${pkgver}/configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--build=${MINGW_CHOST} \
|
||||
--host=${MINGW_CHOST} \
|
||||
--target=${MINGW_CHOST} \
|
||||
--enable-static \
|
||||
--enable-shared
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
make install DESTDIR="${pkgdir}"
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ pkgbase=mingw-w64-${_realname}-git
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=9.0.305.ge7e7ce9
|
||||
pkgver=9.0.313.gc621cd8
|
||||
pkgrel=1
|
||||
pkgdesc="Open-source, cross platform IDE for the C/C++ programming languages (mingw-w64)"
|
||||
arch=('any')
|
||||
@@ -29,14 +29,18 @@ source=("${_realname}::git+https://github.com/eranif/codelite.git"
|
||||
use-gnu-extensions.patch
|
||||
windows-headers-conflict.patch
|
||||
fix-sqlite3-find-and-build.patch
|
||||
clStandardPaths-missing-member.patch)
|
||||
clStandardPaths-missing-member.patch
|
||||
mingw-posix-layout-fix.patch
|
||||
proper-libraries-names-mingw.patch)
|
||||
md5sums=('SKIP'
|
||||
'926c4848932586577192bd950ffc604b'
|
||||
'b18e62316a10dac7c274e2faccd86180'
|
||||
'f7ce106c3565835c019fbcda0f9bea56'
|
||||
'1ae47bc9b913d425f98533c237b45ceb'
|
||||
'2eacbaa07493512a66f8f2e434433a9f'
|
||||
'84bc65336879f9ca6d3dd9eed21b8215')
|
||||
'e6ad6fec1b50070f68ea65bab4ec93a2'
|
||||
'84bc65336879f9ca6d3dd9eed21b8215'
|
||||
'47ab3dc498add139293f136c96925efa'
|
||||
'a53dd1fdbd27970d6ce1a51ffad2eb35')
|
||||
|
||||
pkgver() {
|
||||
cd "${_realname}"
|
||||
@@ -51,9 +55,11 @@ prepare() {
|
||||
patch -p1 -i ${srcdir}/windows-headers-conflict.patch
|
||||
patch -p1 -i ${srcdir}/fix-sqlite3-find-and-build.patch
|
||||
patch -p1 -i ${srcdir}/clStandardPaths-missing-member.patch
|
||||
patch -p1 -i ${srcdir}/mingw-posix-layout-fix.patch
|
||||
patch -p1 -i ${srcdir}/proper-libraries-names-mingw.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
package() {
|
||||
local -a extra_config
|
||||
|
||||
if check_option "debug" "y"; then
|
||||
@@ -62,8 +68,9 @@ build() {
|
||||
extra_config+=( -DCMAKE_BUILD_TYPE=Release )
|
||||
fi
|
||||
|
||||
cd ${srcdir}/${_realname}
|
||||
#MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=;-DPREFIX="
|
||||
mkdir -p build-${MINGW_CHOST}
|
||||
cd build-${MINGW_CHOST}
|
||||
#cd ${srcdir}/${_realname}
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-Wno-dev \
|
||||
-G"MSYS Makefiles" \
|
||||
@@ -73,13 +80,9 @@ build() {
|
||||
-DwxWidgets_CONFIG_EXECUTABLE=${MINGW_PREFIX}/bin/wx-config \
|
||||
-DwxWidgets_wxrc_EXECUTABLE=${MINGW_PREFIX}/bin/wxrc-3.0 \
|
||||
"${extra_config[@]}" \
|
||||
.
|
||||
../${_realname}
|
||||
|
||||
make # -j1 VERBOSE=1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_realname}"
|
||||
make install
|
||||
|
||||
rm -f ${pkgdir}${MINGW_PREFIX}/lib/codelite/*.a
|
||||
|
||||
@@ -24,37 +24,104 @@
|
||||
add_dependencies(wxshapeframework wxsqlite3)
|
||||
--- codelite/cmake/Modules/FindSqlite3.cmake.orig 2015-12-24 15:02:52.639852500 +0300
|
||||
+++ codelite/cmake/Modules/FindSqlite3.cmake 2015-12-24 15:07:28.933929700 +0300
|
||||
@@ -1,18 +1,21 @@
|
||||
@@ -1,27 +1,76 @@
|
||||
-if(UNIX AND NOT APPLE)
|
||||
+# Try to find Sqlite3
|
||||
+# Once done this will define
|
||||
+#
|
||||
+# SQLITE3_FOUND - system has Sqlite3
|
||||
+# SQLITE3_INCLUDE_DIRS - the Sqlite3 include directory
|
||||
+# SQLITE3_LIBRARIES - Link these to use Sqlite3
|
||||
+# SQLITE3_DEFINITIONS - Compiler switches required for using Sqlite3
|
||||
+#
|
||||
+
|
||||
+if(NOT APPLE)
|
||||
+ if (SQLITE3_LIBRARIES AND SQLITE3_INCLUDE_DIRS)
|
||||
+ # in cache already
|
||||
+ set(SQLITE3_FOUND TRUE)
|
||||
+ else()
|
||||
+ # use pkg-config to get the directories and then use these values
|
||||
+ # in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
+ find_package(PkgConfig)
|
||||
+ if(PKG_CONFIG_FOUND)
|
||||
+ pkg_check_modules(_SQLITE3 sqlite3)
|
||||
+ endif()
|
||||
+ find_path(SQLITE3_INCLUDE_DIR
|
||||
+ NAMES
|
||||
+ sqlite3.h
|
||||
+ HINTS
|
||||
+ ${_SQLITE3_INCLUDE_DIRS}
|
||||
+ $ENV{SQLITE3DIR}/include
|
||||
+ /usr/include
|
||||
+ /usr/include/sqlite3
|
||||
+ /usr/local/include
|
||||
+ /opt/local/include
|
||||
+ )
|
||||
+
|
||||
find_library(SQLITE3_LIBRARY
|
||||
- NAMES libsqlite3.so
|
||||
+ NAMES libsqlite3.so sqlite3
|
||||
HINTS
|
||||
- HINTS
|
||||
- /usr/local/lib
|
||||
- /usr/lib
|
||||
- /usr/lib/x86_64-linux-gnu
|
||||
- /usr/lib/i386-linux-gnu
|
||||
+ ENV SQLITE3DIR
|
||||
+ PATH_SUFFIXES lib lib/x86_64-linux-gnu lib/i386-linux-gnu
|
||||
+ PATHS
|
||||
+ /usr/local
|
||||
+ /usr
|
||||
)
|
||||
|
||||
find_path(SQLITE3_INCLUDE_DIR NAMES sqlite3.h
|
||||
HINTS
|
||||
- )
|
||||
-
|
||||
- find_path(SQLITE3_INCLUDE_DIR NAMES sqlite3.h
|
||||
- HINTS
|
||||
- /usr/local/include
|
||||
- /usr/include
|
||||
- /usr/include/sqlite3
|
||||
+ ENV SQLITE3DIR
|
||||
+ PATH_SUFFIXES include/sqlite3 include
|
||||
+ PATHS
|
||||
+ /usr/local
|
||||
+ /usr
|
||||
)
|
||||
if (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY)
|
||||
- )
|
||||
- if (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY)
|
||||
+ NAMES
|
||||
+ sqlite3
|
||||
+ HINTS
|
||||
+ ${_SQLITE3_LIBRARY_DIRS}
|
||||
+ $ENV{SQLITE3DIR}/lib
|
||||
+ /usr/lib
|
||||
+ /usr/lib/x86_64-linux-gnu
|
||||
+ /usr/lib/i386-linux-gnu
|
||||
+ /usr/local/lib
|
||||
+ /opt/local/lib
|
||||
+ )
|
||||
+
|
||||
+ if(SQLITE3_LIBRARY)
|
||||
+ set(SQLITE3_FOUND TRUE)
|
||||
+ endif()
|
||||
+
|
||||
+ set(SQLITE3_INCLUDE_DIRS
|
||||
+ ${SQLITE3_INCLUDE_DIR}
|
||||
+ )
|
||||
+
|
||||
+ if(SQLITE3_FOUND)
|
||||
+ set(SQLITE3_LIBRARIES
|
||||
+ ${SQLITE3_LIBRARIES}
|
||||
+ ${SQLITE3_LIBRARY}
|
||||
+ )
|
||||
+ endif()
|
||||
+
|
||||
+ if(SQLITE3_INCLUDE_DIRS AND SQLITE3_LIBRARIES)
|
||||
set(SQLITE3_FOUND TRUE)
|
||||
endif()
|
||||
-
|
||||
- if(NOT SQLITE3_FOUND)
|
||||
- message(FATAL_ERROR " **** Could not find Sqlite3. Please install libsqlite3-dev package **** ")
|
||||
+
|
||||
+ if(SQLITE3_FOUND)
|
||||
+ message("-- SQLITE3_INCLUDE_DIR: " ${SQLITE3_INCLUDE_DIR})
|
||||
+ message("-- SQLITE3_LIBRARY: " ${SQLITE3_LIBRARY})
|
||||
else()
|
||||
- message("-- SQLITE3_INCLUDE_DIR: " ${SQLITE3_INCLUDE_DIR})
|
||||
- message("-- SQLITE3_LIBRARY: " ${SQLITE3_LIBRARY})
|
||||
+ message(-- "Could not find system Sqlite3. Using bundled sqlite3")
|
||||
endif()
|
||||
+
|
||||
+ # show the SQLITE3_INCLUDE_DIRS and SQLITE3_LIBRARIES variables only in the advanced view
|
||||
+ mark_as_advanced(SQLITE3_INCLUDE_DIRS SQLITE3_LIBRARIES)
|
||||
+
|
||||
+ endif ()
|
||||
endif()
|
||||
--- codelite/sdk/databaselayer/CMakeLists.txt.orig 2015-12-24 15:15:22.810929700 +0300
|
||||
+++ codelite/sdk/databaselayer/CMakeLists.txt 2015-12-24 15:16:23.103929700 +0300
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
282
mingw-w64-codelite-git/mingw-posix-layout-fix.patch
Normal file
282
mingw-w64-codelite-git/mingw-posix-layout-fix.patch
Normal file
@@ -0,0 +1,282 @@
|
||||
diff -Naur codelite-orig/CodeLite/cl_defs.h codelite/CodeLite/cl_defs.h
|
||||
--- codelite-orig/CodeLite/cl_defs.h 2015-12-28 09:14:07.384041000 +0300
|
||||
+++ codelite/CodeLite/cl_defs.h 2015-12-28 10:17:06.738122000 +0300
|
||||
@@ -48,13 +48,13 @@
|
||||
#else
|
||||
#ifdef USE_POSIX_LAYOUT
|
||||
#ifndef PLUGINS_DIR
|
||||
-#define PLUGINS_DIR "/lib/codelite"
|
||||
+#define PLUGINS_DIR "\\lib\\codelite"
|
||||
#endif
|
||||
#ifndef INSTALL_DIR
|
||||
-#define INSTALL_DIR "/share/codelite"
|
||||
+#define INSTALL_DIR "\\share\\codelite"
|
||||
#endif
|
||||
#ifndef CFGDIR
|
||||
-#define CFGDIR "/share/codelite/config/cfg"
|
||||
+#define CFGDIR "\\share\\codelite\\config\\cfg"
|
||||
#endif
|
||||
#endif
|
||||
// MSW / OSX and the rest of the world
|
||||
diff -Naur codelite-orig/CodeLite/cl_standard_paths.cpp codelite/CodeLite/cl_standard_paths.cpp
|
||||
--- codelite-orig/CodeLite/cl_standard_paths.cpp 2015-12-28 09:14:23.533041000 +0300
|
||||
+++ codelite/CodeLite/cl_standard_paths.cpp 2015-12-28 10:50:22.132984200 +0300
|
||||
@@ -74,7 +74,7 @@
|
||||
wxString pluginsDir = PLUGINS_DIR;
|
||||
#else
|
||||
#ifdef USE_POSIX_LAYOUT
|
||||
- wxFileName path(GetDataDir() + wxT(PLUGINS_DIR), "");
|
||||
+ wxFileName path(GetInstallDir() + wxT(PLUGINS_DIR), "");
|
||||
#else
|
||||
wxFileName path(GetDataDir(), "");
|
||||
path.AppendDir("plugins");
|
||||
@@ -84,7 +84,15 @@
|
||||
return pluginsDir;
|
||||
}
|
||||
|
||||
-wxString clStandardPaths::GetDataDir() const { return wxStandardPaths::Get().GetDataDir(); }
|
||||
+wxString clStandardPaths::GetDataDir() const
|
||||
+{
|
||||
+#ifdef USE_POSIX_LAYOUT
|
||||
+ wxFileName path(wxStandardPaths::Get().GetDataDir() + wxT(INSTALL_DIR), "");
|
||||
+ return path.GetPath();
|
||||
+#else
|
||||
+ return wxStandardPaths::Get().GetDataDir();
|
||||
+#endif
|
||||
+}
|
||||
|
||||
wxString clStandardPaths::GetBinFolder() const
|
||||
{
|
||||
@@ -104,22 +112,14 @@
|
||||
|
||||
wxString clStandardPaths::GetLexersDir() const
|
||||
{
|
||||
-#ifdef USE_POSIX_LAYOUT
|
||||
- wxFileName fn(GetDataDir() + wxT(INSTALL_DIR), "");
|
||||
-#else
|
||||
wxFileName fn(GetDataDir(), "");
|
||||
-#endif
|
||||
fn.AppendDir("lexers");
|
||||
return fn.GetPath();
|
||||
}
|
||||
|
||||
wxString clStandardPaths::GetProjectTemplatesDir() const
|
||||
{
|
||||
-#ifdef USE_POSIX_LAYOUT
|
||||
- wxFileName fn(GetDataDir() + wxT(INSTALL_DIR), "");
|
||||
-#else
|
||||
wxFileName fn(GetDataDir(), "");
|
||||
-#endif
|
||||
fn.AppendDir("templates");
|
||||
fn.AppendDir("projects");
|
||||
return fn.GetPath();
|
||||
@@ -134,11 +134,7 @@
|
||||
|
||||
wxString clStandardPaths::GetUserProjectTemplatesDir() const
|
||||
{
|
||||
-#ifdef USE_POSIX_LAYOUT
|
||||
- wxFileName fn(GetUserDataDir() + wxT(INSTALL_DIR), "");
|
||||
-#else
|
||||
wxFileName fn(GetUserDataDir(), "");
|
||||
-#endif
|
||||
fn.AppendDir("templates");
|
||||
fn.AppendDir("projects");
|
||||
return fn.GetPath();
|
||||
@@ -163,6 +159,20 @@
|
||||
return path;
|
||||
}
|
||||
|
||||
+wxString clStandardPaths::GetInstallDir() const
|
||||
+{
|
||||
+#ifdef __WXGTK__
|
||||
+ return GetBinFolder();
|
||||
+#else
|
||||
+#ifdef USE_POSIX_LAYOUT
|
||||
+ wxFileName path(wxStandardPaths::Get().GetDataDir(), "");
|
||||
+ return path.GetPath();
|
||||
+#else
|
||||
+ return GetBinFolder();
|
||||
+#endif
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
void clStandardPaths::IgnoreAppSubDir(const wxString & subdirPattern)
|
||||
{
|
||||
#ifdef USE_POSIX_LAYOUT
|
||||
diff -Naur codelite-orig/CodeLite/cl_standard_paths.h codelite/CodeLite/cl_standard_paths.h
|
||||
--- codelite-orig/CodeLite/cl_standard_paths.h 2015-12-28 09:14:23.150041000 +0300
|
||||
+++ codelite/CodeLite/cl_standard_paths.h 2015-12-28 10:45:39.783044500 +0300
|
||||
@@ -119,6 +119,11 @@
|
||||
*/
|
||||
wxString GetDocumentsDir() const;
|
||||
|
||||
+ /**
|
||||
+ * @brief return the installation directory.
|
||||
+ */
|
||||
+ wxString GetInstallDir() const;
|
||||
+
|
||||
void IgnoreAppSubDir(const wxString & subdirPattern);
|
||||
};
|
||||
|
||||
diff -Naur codelite-orig/CodeLite/macros.h codelite/CodeLite/macros.h
|
||||
--- codelite-orig/CodeLite/macros.h 2015-12-28 09:14:07.436041000 +0300
|
||||
+++ codelite/CodeLite/macros.h 2015-12-28 11:10:10.351039900 +0300
|
||||
@@ -114,10 +114,8 @@
|
||||
const wxString TERMINAL_CMD = wxT("");
|
||||
#endif
|
||||
|
||||
-#if defined(__WXMSW__) && !defined(USE_POSIX_LAYOUT)
|
||||
+#if defined(__WXMSW__)
|
||||
#define PATH_SEP wxT("\\")
|
||||
-#else
|
||||
-#define PATH_SEP wxT("/")
|
||||
#endif
|
||||
|
||||
#define ID_MENU_CUSTOM_TARGET_FIRST 15000
|
||||
diff -Naur codelite-orig/codelitephp/PHPParser/php_utils.cpp codelite/codelitephp/PHPParser/php_utils.cpp
|
||||
--- codelite-orig/codelitephp/PHPParser/php_utils.cpp 2015-12-28 09:14:12.524041000 +0300
|
||||
+++ codelite/codelitephp/PHPParser/php_utils.cpp 2015-12-28 10:30:14.036438700 +0300
|
||||
@@ -82,7 +82,7 @@
|
||||
fn.AppendDir("resources");
|
||||
#else
|
||||
#ifdef USE_POSIX_LAYOUT
|
||||
- fn = wxFileName(clStandardPaths::Get().GetDataDir() + wxT(PLUGINS_DIR));
|
||||
+ fn = wxFileName(clStandardPaths::Get().GetPluginsDirectory());
|
||||
#else
|
||||
fn = wxFileName(clStandardPaths::Get().GetExecutablePath());
|
||||
fn.AppendDir("plugins");
|
||||
diff -Naur codelite-orig/Interfaces/plugin.h codelite/Interfaces/plugin.h
|
||||
--- codelite-orig/Interfaces/plugin.h 2015-12-28 09:14:07.724041000 +0300
|
||||
+++ codelite/Interfaces/plugin.h 2015-12-28 10:38:29.711044500 +0300
|
||||
@@ -162,7 +162,7 @@
|
||||
wxString pluginsDir = clStandardPaths::Get().GetDataDir();
|
||||
#else
|
||||
#ifdef USE_POSIX_LAYOUT
|
||||
- wxString pluginsDir(clStandardPaths::Get().GetDataDir() + wxT(PLUGINS_DIR));
|
||||
+ wxString pluginsDir(clStandardPaths::Get().GetDataDir());
|
||||
#else
|
||||
wxString pluginsDir(m_mgr->GetInstallDirectory() + wxT("/plugins"));
|
||||
#endif
|
||||
diff -Naur codelite-orig/LiteEditor/app.cpp codelite/LiteEditor/app.cpp
|
||||
--- codelite-orig/LiteEditor/app.cpp 2015-12-28 09:14:07.841041000 +0300
|
||||
+++ codelite/LiteEditor/app.cpp 2015-12-28 10:54:34.309806000 +0300
|
||||
@@ -328,10 +328,6 @@
|
||||
// EnableDebugPriv();
|
||||
#endif
|
||||
|
||||
-#ifdef USE_POSIX_LAYOUT
|
||||
- clStandardPaths::Get().IgnoreAppSubDir("bin");
|
||||
-#endif
|
||||
-
|
||||
// Init resources and add the PNG handler
|
||||
wxSystemOptions::SetOption(_T("msw.remap"), 0);
|
||||
wxSystemOptions::SetOption("msw.notebook.themed-background", 1);
|
||||
@@ -486,7 +482,7 @@
|
||||
#else //__WXMSW__
|
||||
if(homeDir.IsEmpty()) { // did we got a basedir from user?
|
||||
#ifdef USE_POSIX_LAYOUT
|
||||
- homeDir = clStandardPaths::Get().GetDataDir() + wxT(INSTALL_DIR);
|
||||
+ homeDir = clStandardPaths::Get().GetDataDir();
|
||||
#else
|
||||
homeDir = ::wxGetCwd();
|
||||
#endif
|
||||
@@ -642,7 +638,7 @@
|
||||
|
||||
#elif defined(__WXMSW__)
|
||||
#ifdef USE_POSIX_LAYOUT
|
||||
- wxLocale::AddCatalogLookupPathPrefix(clStandardPaths::Get().GetDataDir() + wxT("/share/locale"));
|
||||
+ wxLocale::AddCatalogLookupPathPrefix(clStandardPaths::Get().GetInstallDir() + wxT("\\share\\locale"));
|
||||
#else
|
||||
wxLocale::AddCatalogLookupPathPrefix(ManagerST::Get()->GetInstallDir() + wxT("\\locale"));
|
||||
#endif
|
||||
@@ -933,13 +929,8 @@
|
||||
#ifdef __WXGTK__
|
||||
printersInstallDir = wxFileName(wxString(INSTALL_DIR, wxConvUTF8), "gdb_printers");
|
||||
#else
|
||||
-#ifdef USE_POSIX_LAYOUT
|
||||
- wxString commdir(clStandardPaths::Get().GetDataDir() + wxT(INSTALL_DIR));
|
||||
- printersInstallDir = wxFileName(commdir, "gdb_printers");
|
||||
-#else
|
||||
printersInstallDir = wxFileName(clStandardPaths::Get().GetDataDir(), "gdb_printers");
|
||||
#endif
|
||||
-#endif
|
||||
|
||||
// copy the files to ~/.codelite/gdb_printers
|
||||
wxLogNull nolog;
|
||||
diff -Naur codelite-orig/LiteEditor/frame.cpp codelite/LiteEditor/frame.cpp
|
||||
--- codelite-orig/LiteEditor/frame.cpp 2015-12-28 09:14:08.030041000 +0300
|
||||
+++ codelite/LiteEditor/frame.cpp 2015-12-28 10:53:38.446392900 +0300
|
||||
@@ -3661,7 +3661,7 @@
|
||||
|
||||
// Load debuggers (*must* be after the plugins)
|
||||
#ifdef USE_POSIX_LAYOUT
|
||||
- wxString plugdir(clStandardPaths::Get().GetDataDir() + wxT(PLUGINS_DIR));
|
||||
+ wxString plugdir(clStandardPaths::Get().GetPluginsDirectory());
|
||||
DebuggerMgr::Get().Initialize(this, EnvironmentConfig::Instance(), plugdir);
|
||||
#else
|
||||
DebuggerMgr::Get().Initialize(this, EnvironmentConfig::Instance(), ManagerST::Get()->GetInstallDir());
|
||||
diff -Naur codelite-orig/Plugin/bitmap_loader.cpp codelite/Plugin/bitmap_loader.cpp
|
||||
--- codelite-orig/Plugin/bitmap_loader.cpp 2015-12-28 09:14:08.426041000 +0300
|
||||
+++ codelite/Plugin/bitmap_loader.cpp 2015-12-28 10:56:16.813554600 +0300
|
||||
@@ -64,13 +64,8 @@
|
||||
wxString bitmapPath = wxString(INSTALL_DIR, wxConvUTF8);
|
||||
fn = wxFileName(bitmapPath, zipname);
|
||||
#else
|
||||
-#ifdef USE_POSIX_LAYOUT
|
||||
- wxString bitmapPath(clStandardPaths::Get().GetDataDir() + wxT(INSTALL_DIR));
|
||||
- fn = wxFileName(bitmapPath, zipname);
|
||||
-#else
|
||||
fn = wxFileName(clStandardPaths::Get().GetDataDir(), zipname);
|
||||
#endif
|
||||
-#endif
|
||||
|
||||
if(m_manifest.empty() || m_toolbarsBitmaps.empty()) {
|
||||
m_zipPath = fn;
|
||||
diff -Naur codelite-orig/Plugin/ColoursAndFontsManager.cpp codelite/Plugin/ColoursAndFontsManager.cpp
|
||||
--- codelite-orig/Plugin/ColoursAndFontsManager.cpp 2015-12-28 09:14:08.351041000 +0300
|
||||
+++ codelite/Plugin/ColoursAndFontsManager.cpp 2015-12-28 10:57:09.064051300 +0300
|
||||
@@ -543,12 +543,9 @@
|
||||
wxFileName fnUserLexers(clStandardPaths::Get().GetUserDataDir(), "lexers.json");
|
||||
fnUserLexers.AppendDir("lexers");
|
||||
|
||||
-// Default installation lexers
|
||||
-#ifdef USE_POSIX_LAYOUT
|
||||
- wxFileName defaultLexersFileName(clStandardPaths::Get().GetDataDir() + wxT(INSTALL_DIR), "");
|
||||
-#else
|
||||
+ // Default installation lexers
|
||||
wxFileName defaultLexersFileName(clStandardPaths::Get().GetDataDir(), "");
|
||||
-#endif
|
||||
+
|
||||
defaultLexersFileName.AppendDir("lexers");
|
||||
defaultLexersFileName.SetFullName("lexers.json");
|
||||
|
||||
diff -Naur codelite-orig/Plugin/debuggermanager.cpp codelite/Plugin/debuggermanager.cpp
|
||||
--- codelite-orig/Plugin/debuggermanager.cpp 2015-12-28 09:14:08.516041000 +0300
|
||||
+++ codelite/Plugin/debuggermanager.cpp 2015-12-28 11:04:22.364565400 +0300
|
||||
@@ -103,7 +103,11 @@
|
||||
wxString debuggersPath(PLUGINS_DIR, wxConvUTF8);
|
||||
debuggersPath += wxT("/debuggers");
|
||||
#elif defined(__WXMSW__)
|
||||
+#ifdef USE_POSIX_LAYOUT
|
||||
+ wxString debuggersPath(clStandardPaths::Get().GetPluginsDirectory() + wxT("/debuggers"));
|
||||
+#else
|
||||
wxString debuggersPath(m_baseDir + wxT("/debuggers"));
|
||||
+#endif
|
||||
#else
|
||||
// OSX
|
||||
wxFileName debuggersFolder(clStandardPaths::Get().GetDataDir(), "");
|
||||
diff -Naur codelite-orig/SpellChecker/spellcheckeroptions.cpp codelite/SpellChecker/spellcheckeroptions.cpp
|
||||
--- codelite-orig/SpellChecker/spellcheckeroptions.cpp 2015-12-28 09:14:09.378041000 +0300
|
||||
+++ codelite/SpellChecker/spellcheckeroptions.cpp 2015-12-28 11:06:19.093039900 +0300
|
||||
@@ -46,11 +46,7 @@
|
||||
m_scanD2 = false;
|
||||
|
||||
wxString defaultDicsDir;
|
||||
-#ifdef USE_POSIX_LAYOUT
|
||||
- defaultDicsDir << clStandardPaths::Get().GetDataDir() << wxT(INSTALL_DIR) << wxFILE_SEP_PATH << "dics";
|
||||
-#else
|
||||
defaultDicsDir << clStandardPaths::Get().GetDataDir() << wxFILE_SEP_PATH << "dics";
|
||||
-#endif
|
||||
m_dictionaryPath = defaultDicsDir;
|
||||
}
|
||||
|
||||
33
mingw-w64-codelite-git/proper-libraries-names-mingw.patch
Normal file
33
mingw-w64-codelite-git/proper-libraries-names-mingw.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
--- codelite/CodeLite/CMakeLists.txt.orig 2015-12-28 12:14:44.681944700 +0300
|
||||
+++ codelite/CodeLite/CMakeLists.txt 2015-12-28 12:20:55.582697000 +0300
|
||||
@@ -121,6 +121,15 @@
|
||||
-lz -lcrypto)
|
||||
endif ( UNIX AND NOT APPLE )
|
||||
|
||||
+if(MINGW)
|
||||
+ set_target_properties(libcodelite
|
||||
+ PROPERTIES
|
||||
+ PREFIX ""
|
||||
+ OUTPUT_NAME codelite
|
||||
+ RUNTIME_OUTPUT_NAME libcodelite
|
||||
+ ARCHIVE_OUTPUT_NAME codelite)
|
||||
+endif()
|
||||
+
|
||||
if (NOT MINGW)
|
||||
if(APPLE)
|
||||
install(TARGETS libcodelite DESTINATION ${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS/)
|
||||
--- scodelite/sdk/databaselayer/CMakeLists.txt.orig 2015-12-28 12:24:47.723314900 +0300
|
||||
+++ codelite/sdk/databaselayer/CMakeLists.txt 2015-12-28 12:26:06.692417200 +0300
|
||||
@@ -62,6 +62,12 @@
|
||||
add_library(databaselayersqlite SHARED ${SRCS} ${MYSQL_SRCS})
|
||||
target_link_libraries(databaselayersqlite ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} -L"${CL_LIBPATH}" ${SQLITE3_LIBRARY})
|
||||
|
||||
+if(MINGW)
|
||||
+ set_target_properties(databaselayersqlite
|
||||
+ PROPERTIES
|
||||
+ PREFIX "")
|
||||
+endif()
|
||||
+
|
||||
if(APPLE)
|
||||
install(TARGETS databaselayersqlite DESTINATION ${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS/)
|
||||
CL_INSTALL_NAME_TOOL_STD(${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS/libdatabaselayersqlite.dylib)
|
||||
@@ -1,151 +0,0 @@
|
||||
From 635e1b2f08c3c5fced849e45c59453be7b131e88 Mon Sep 17 00:00:00 2001
|
||||
From: vehre <vehre@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Fri, 17 Jul 2015 10:16:21 +0000
|
||||
Subject: [PATCH] gcc/fortran/ChangeLog:
|
||||
|
||||
2015-07-17 Andre Vehreschild <vehre@gcc.gnu.org>
|
||||
|
||||
PR fortran/66035
|
||||
* trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
|
||||
Compute the size to allocate for class and derived type objects
|
||||
correclty.
|
||||
(gfc_trans_subcomponent_assign): Only allocate memory for a
|
||||
component when the object to assign is not an allocatable class
|
||||
object (the memory is already present for allocatable class objects).
|
||||
Furthermore use copy_class_to_class for assigning the rhs to the
|
||||
component (may happen for dummy class objects on the rhs).
|
||||
|
||||
|
||||
gcc/testsuite/ChangeLog:
|
||||
|
||||
2015-07-17 Andre Vehreschild <vehre@gcc.gnu.org>
|
||||
|
||||
PR fortran/66035
|
||||
* gfortran.dg/structure_constructor_13.f03: New test.
|
||||
|
||||
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225928 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
gcc/fortran/ChangeLog | 12 ++++++++++
|
||||
gcc/fortran/trans-expr.c | 26 +++++++++++++++++++-
|
||||
gcc/testsuite/ChangeLog | 5 ++++
|
||||
.../gfortran.dg/structure_constructor_13.f03 | 28 ++++++++++++++++++++++
|
||||
4 files changed, 70 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gfortran.dg/structure_constructor_13.f03
|
||||
|
||||
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
|
||||
index af81bd5..33b8cbb 100644
|
||||
--- a/gcc/fortran/ChangeLog
|
||||
+++ b/gcc/fortran/ChangeLog
|
||||
@@ -1,3 +1,15 @@
|
||||
+2015-07-17 Andre Vehreschild <vehre@gcc.gnu.org>
|
||||
+
|
||||
+ PR fortran/66035
|
||||
+ * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
|
||||
+ Compute the size to allocate for class and derived type objects
|
||||
+ correclty.
|
||||
+ (gfc_trans_subcomponent_assign): Only allocate memory for a
|
||||
+ component when the object to assign is not an allocatable class
|
||||
+ object (the memory is already present for allocatable class objects).
|
||||
+ Furthermore use copy_class_to_class for assigning the rhs to the
|
||||
+ component (may happen for dummy class objects on the rhs).
|
||||
+
|
||||
2015-07-17 Mikael Morin <mikael@gcc.gnu.org>
|
||||
Dominique d'Humieres <dominiq@lps.ens.fr>
|
||||
|
||||
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
|
||||
index caafe76..89b4dfd 100644
|
||||
--- a/gcc/fortran/trans-expr.c
|
||||
+++ b/gcc/fortran/trans-expr.c
|
||||
@@ -6969,6 +6969,29 @@ alloc_scalar_allocatable_for_subcomponent_assignment (stmtblock_t *block,
|
||||
TREE_TYPE (tmp), tmp,
|
||||
fold_convert (TREE_TYPE (tmp), size));
|
||||
}
|
||||
+ else if (cm->ts.type == BT_CLASS)
|
||||
+ {
|
||||
+ gcc_assert (expr2->ts.type == BT_CLASS || expr2->ts.type == BT_DERIVED);
|
||||
+ if (expr2->ts.type == BT_DERIVED)
|
||||
+ {
|
||||
+ tmp = gfc_get_symbol_decl (expr2->ts.u.derived);
|
||||
+ size = TYPE_SIZE_UNIT (tmp);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ gfc_expr *e2vtab;
|
||||
+ gfc_se se;
|
||||
+ e2vtab = gfc_find_and_cut_at_last_class_ref (expr2);
|
||||
+ gfc_add_vptr_component (e2vtab);
|
||||
+ gfc_add_size_component (e2vtab);
|
||||
+ gfc_init_se (&se, NULL);
|
||||
+ gfc_conv_expr (&se, e2vtab);
|
||||
+ gfc_add_block_to_block (block, &se.pre);
|
||||
+ size = fold_convert (size_type_node, se.expr);
|
||||
+ gfc_free_expr (e2vtab);
|
||||
+ }
|
||||
+ size_in_bytes = size;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
/* Otherwise use the length in bytes of the rhs. */
|
||||
@@ -7096,7 +7119,8 @@ gfc_trans_subcomponent_assign (tree dest, gfc_component * cm, gfc_expr * expr,
|
||||
gfc_add_expr_to_block (&block, tmp);
|
||||
}
|
||||
else if (init && (cm->attr.allocatable
|
||||
- || (cm->ts.type == BT_CLASS && CLASS_DATA (cm)->attr.allocatable)))
|
||||
+ || (cm->ts.type == BT_CLASS && CLASS_DATA (cm)->attr.allocatable
|
||||
+ && expr->ts.type != BT_CLASS)))
|
||||
{
|
||||
/* Take care about non-array allocatable components here. The alloc_*
|
||||
routine below is motivated by the alloc_scalar_allocatable_for_
|
||||
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
|
||||
index ccba51f..1311bf2 100644
|
||||
--- a/gcc/testsuite/ChangeLog
|
||||
+++ b/gcc/testsuite/ChangeLog
|
||||
@@ -1,3 +1,8 @@
|
||||
+2015-07-17 Andre Vehreschild <vehre@gcc.gnu.org>
|
||||
+
|
||||
+ PR fortran/66035
|
||||
+ * gfortran.dg/structure_constructor_13.f03: New test.
|
||||
+
|
||||
2015-07-17 Mikael Morin <mikael@gcc.gnu.org>
|
||||
|
||||
PR fortran/61831
|
||||
diff --git a/gcc/testsuite/gfortran.dg/structure_constructor_13.f03 b/gcc/testsuite/gfortran.dg/structure_constructor_13.f03
|
||||
new file mode 100644
|
||||
index 0000000..c74e325
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gfortran.dg/structure_constructor_13.f03
|
||||
@@ -0,0 +1,28 @@
|
||||
+! { dg-do run }
|
||||
+!
|
||||
+! Contributed by Melven Roehrig-Zoellner <Melven.Roehrig-Zoellner@DLR.de>
|
||||
+! PR fortran/66035
|
||||
+
|
||||
+program test_pr66035
|
||||
+ type t
|
||||
+ end type t
|
||||
+ type w
|
||||
+ class(t), allocatable :: c
|
||||
+ end type w
|
||||
+
|
||||
+ type(t) :: o
|
||||
+
|
||||
+ call test(o)
|
||||
+contains
|
||||
+ subroutine test(o)
|
||||
+ class(t), intent(inout) :: o
|
||||
+ type(w), dimension(:), allocatable :: list
|
||||
+
|
||||
+ select type (o)
|
||||
+ class is (t)
|
||||
+ list = [w(o)] ! This caused an ICE
|
||||
+ class default
|
||||
+ call abort()
|
||||
+ end select
|
||||
+ end subroutine
|
||||
+end program
|
||||
--
|
||||
2.5.0
|
||||
|
||||
@@ -11,8 +11,8 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
"${MINGW_PACKAGE_PREFIX}-${_realname}-fortran"
|
||||
"${MINGW_PACKAGE_PREFIX}-${_realname}-ada"
|
||||
"${MINGW_PACKAGE_PREFIX}-${_realname}-objc")
|
||||
pkgver=5.2.0
|
||||
pkgrel=4
|
||||
pkgver=5.3.0
|
||||
pkgrel=1
|
||||
pkgdesc="GCC for the MinGW-w64"
|
||||
arch=('any')
|
||||
url="http://gcc.gnu.org"
|
||||
@@ -56,9 +56,8 @@ source=("ftp://gcc.gnu.org/pub/gcc/releases/${_realname}-${pkgver}/${_realname}-
|
||||
'port-sanitizer-to-mingw.all.patch'
|
||||
'enable-shared-gnat-implib.mingw.patch'
|
||||
'955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch'
|
||||
'pr66035.patch'
|
||||
'0022-clone_function_name_1-Retain-any-stdcall-suffix.patch')
|
||||
md5sums=('a51bcfeb3da7dd4c623e27207ed43467'
|
||||
md5sums=('c9616fd448f980259c31de613e575719'
|
||||
'41635a40493dc79416db6627b2826b21'
|
||||
'f6b5fb08ff06a7d60ee3280e14240bb2'
|
||||
'71cdb550528efcf2a5c9112464bfbabc'
|
||||
@@ -80,7 +79,6 @@ md5sums=('a51bcfeb3da7dd4c623e27207ed43467'
|
||||
'52592c1d7c6031ff601ecfdf3942b940'
|
||||
'62cc23251ae746b5f39c2c7aef121e8f'
|
||||
'393ce6bf124d5b1ca0e38cbe0fc6eb51'
|
||||
'5b980076cd5fcbc3aff6014f306282dd'
|
||||
'6d0a782eef0077ddbffd130f806529fa')
|
||||
|
||||
_threads="posix"
|
||||
@@ -146,9 +144,6 @@ prepare() {
|
||||
|
||||
patch -p1 -i ${srcdir}/955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch
|
||||
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66035
|
||||
patch -p1 -i ${srcdir}/pr66035.patch
|
||||
|
||||
patch -p1 -i ${srcdir}/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch
|
||||
|
||||
#if check_option "debug" "y"; then
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
--- a/gcc/fortran/trans-expr.c
|
||||
+++ a/gcc/fortran/trans-expr.c
|
||||
@@ -6897,6 +6897,30 @@ alloc_scalar_allocatable_for_subcomponent_assignment (stmtblock_t *block,
|
||||
TREE_TYPE (tmp), tmp,
|
||||
fold_convert (TREE_TYPE (tmp), size));
|
||||
}
|
||||
+ else if (cm->ts.type == BT_CLASS)
|
||||
+ {
|
||||
+ gcc_assert (expr2->ts.type == BT_CLASS || expr2->ts.type == BT_DERIVED);
|
||||
+ if (expr2->ts.type == BT_DERIVED)
|
||||
+ {
|
||||
+ tmp = gfc_get_symbol_decl (gfc_find_vtab (&expr2->ts));
|
||||
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
|
||||
+ size = fold_convert (size_type_node, gfc_vptr_size_get (tmp));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ gfc_expr *e2vtab;
|
||||
+ gfc_se se;
|
||||
+ e2vtab = gfc_find_and_cut_at_last_class_ref (expr2);
|
||||
+ gfc_add_vptr_component (e2vtab);
|
||||
+ gfc_add_size_component (e2vtab);
|
||||
+ gfc_init_se (&se, NULL);
|
||||
+ gfc_conv_expr (&se, e2vtab);
|
||||
+ gfc_add_block_to_block (block, &se.pre);
|
||||
+ size = fold_convert (size_type_node, se.expr);
|
||||
+ gfc_free_expr (e2vtab);
|
||||
+ }
|
||||
+ size_in_bytes = size;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
/* Otherwise use the length in bytes of the rhs. */
|
||||
@@ -7068,6 +7092,14 @@ gfc_trans_subcomponent_assign (tree dest, gfc_component * cm, gfc_expr * expr,
|
||||
tmp = gfc_build_memcpy_call (tmp, se.expr, size);
|
||||
gfc_add_expr_to_block (&block, tmp);
|
||||
}
|
||||
+ else if (cm->ts.type == BT_CLASS && expr->ts.type == BT_CLASS)
|
||||
+ {
|
||||
+ tmp = gfc_copy_class_to_class (se.expr, dest, integer_one_node,
|
||||
+ CLASS_DATA (cm)->attr.unlimited_polymorphic);
|
||||
+ gfc_add_expr_to_block (&block, tmp);
|
||||
+ gfc_add_modify (&block, gfc_class_vptr_get (dest),
|
||||
+ gfc_class_vptr_get (se.expr));
|
||||
+ }
|
||||
else
|
||||
gfc_add_modify (&block, tmp,
|
||||
fold_convert (TREE_TYPE (tmp), se.expr));
|
||||
@@ -2,12 +2,12 @@
|
||||
# Contributor: Ray Donnelly <mingw.android@gmail.com>
|
||||
|
||||
_realname=gdb
|
||||
_gcc_ver=5.2.0
|
||||
_gcc_ver=5.3.0
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
# Until https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62279 is
|
||||
# fixed, we will stick with 7.6.2 which hasn't got this bug..
|
||||
pkgver=7.10
|
||||
pkgver=7.10.1
|
||||
pkgrel=1
|
||||
pkgdesc="GNU Debugger (mingw-w64)"
|
||||
arch=('any')
|
||||
@@ -31,7 +31,7 @@ source=(http://ftp.gnu.org/gnu/gdb/${_realname}-${pkgver}.tar.xz{,.sig}
|
||||
'gdb-7.6.2-mingw-gcc-4.7.patch'
|
||||
'gdb-perfomance.patch'
|
||||
'gdb-fix-using-gnu-print.patch')
|
||||
md5sums=('2a35bac41fa8e10bf04f3a0dd7f7f363'
|
||||
md5sums=('39e654460c9cdd80200a29ac020cfe11'
|
||||
'SKIP'
|
||||
'be1c16674d98189a6f18dc0f5922c739'
|
||||
'e48292d553379a9765c82e80e618ffd2'
|
||||
|
||||
22
mingw-w64-gnutls/0002-gnutls-3.4.7-socket.patch
Normal file
22
mingw-w64-gnutls/0002-gnutls-3.4.7-socket.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/src/socket.c 2015-11-08 02:31:10.000000000 -0600
|
||||
+++ b/src/socket.c 2015-11-25 10:04:39.287828945 -0600
|
||||
@@ -263,7 +263,9 @@
|
||||
if (s != NULL) {
|
||||
return s->s_port;
|
||||
}
|
||||
+#ifndef _WIN32
|
||||
endservent();
|
||||
+#endif
|
||||
|
||||
return 443;
|
||||
}
|
||||
@@ -278,7 +280,9 @@
|
||||
if (s != NULL) {
|
||||
return s->s_name;
|
||||
}
|
||||
+#ifndef _WIN32
|
||||
endservent();
|
||||
+#endif
|
||||
|
||||
return "443";
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/extra/Makefile.in.orig 2013-02-03 19:40:27.000000000 -0600
|
||||
+++ b/extra/Makefile.in 2013-02-06 23:08:54.619176090 -0600
|
||||
@@ -76,7 +76,7 @@
|
||||
@ENABLE_MINITASN1_TRUE@am__append_1 = -I$(srcdir)/../lib/minitasn1
|
||||
@ENABLE_OPENSSL_TRUE@am__append_2 = -version-info $(LT_SSL_CURRENT):$(LT_SSL_REVISION):$(LT_SSL_AGE)
|
||||
@ENABLE_MINITASN1_TRUE@@ENABLE_OPENSSL_TRUE@am__append_3 = ../lib/minitasn1/libminitasn1.la
|
||||
-@ENABLE_MINITASN1_FALSE@@ENABLE_OPENSSL_TRUE@am__append_4 = $(LTLIBTASN1)
|
||||
+@ENABLE_MINITASN1_FALSE@@ENABLE_OPENSSL_TRUE@am__append_4 = $(LIBTASN1_LIBS)
|
||||
@ENABLE_OPENSSL_TRUE@@HAVE_LD_OUTPUT_DEF_TRUE@am__append_5 = \
|
||||
@ENABLE_OPENSSL_TRUE@@HAVE_LD_OUTPUT_DEF_TRUE@ -Wl,--output-def,libgnutls-openssl-$(DLL_VERSION).def
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
_realname=gnutls
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=3.4.5
|
||||
pkgver=3.4.7
|
||||
pkgrel=1
|
||||
pkgdesc="A library which provides a secure layer over a reliable transport layer (mingw-w64)"
|
||||
arch=('any')
|
||||
@@ -23,15 +23,21 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
|
||||
# Need remove "autogen" package before building.
|
||||
source=(ftp://ftp.gnutls.org/gcrypt/gnutls/v${pkgver%.*}/${_realname}-${pkgver}.tar.xz{,.sig}
|
||||
0001-add-missing-define.patch)
|
||||
md5sums=('f5dae0e0ecda28aab12386e6c0705d4c'
|
||||
0001-add-missing-define.patch
|
||||
0002-gnutls-3.4.7-socket.patch
|
||||
0003-gnutls-fix-external-libtasn1-detection.patch)
|
||||
md5sums=('e7556cec73c8b34fd2ff0b591e24e44c'
|
||||
'SKIP'
|
||||
'807a79513358a9f4123f62111f1eed59')
|
||||
'807a79513358a9f4123f62111f1eed59'
|
||||
'f23446753bbf74305257fa5aa594ec7f'
|
||||
'92acc314feaa91e32d69a1a5bf0e279c')
|
||||
validpgpkeys=('0424D4EE81A0E3D119C6F835EDA21E94B565716F')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -p1 -i ${srcdir}/0001-add-missing-define.patch
|
||||
patch -p1 -i ${srcdir}/0002-gnutls-3.4.7-socket.patch
|
||||
patch -p1 -i ${srcdir}/0003-gnutls-fix-external-libtasn1-detection.patch
|
||||
|
||||
WANT_AUTOMAKE=latest autoreconf -fi -I m4
|
||||
}
|
||||
@@ -51,7 +57,7 @@ build() {
|
||||
--host=${MINGW_CHOST} \
|
||||
--target=${MINGW_CHOST} \
|
||||
--with-zlib \
|
||||
--enable-shared --disable-static \
|
||||
--enable-shared --enable-static \
|
||||
--enable-cxx \
|
||||
--enable-nls \
|
||||
--disable-rpath \
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=isl
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=0.14.1
|
||||
pkgrel=2
|
||||
pkgdesc="Library for manipulating sets and relations of integer points bounded by linear constraints"
|
||||
pkgver=0.15
|
||||
pkgrel=1
|
||||
pkgdesc="Library for manipulating sets and relations of integer points bounded by linear constraints (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://isl.gforge.inria.fr/"
|
||||
#depends=("${MINGW_PACKAGE_PREFIX}-gmp")
|
||||
@@ -13,7 +14,7 @@ options=('staticlibs')
|
||||
license=('MIT')
|
||||
source=("http://isl.gforge.inria.fr/${_realname}-${pkgver}.tar.xz"
|
||||
isl-0.14.1-no-undefined.patch)
|
||||
md5sums=('94fcd11e0b1c79250ae341affb1845ea'
|
||||
md5sums=('626d0452f3c9a36aeb3c225ff5e7c642'
|
||||
'38c67a10e197acb83217be17075070f9')
|
||||
|
||||
prepare() {
|
||||
|
||||
92
mingw-w64-jxrlib/CMakeLists.txt
Normal file
92
mingw-w64-jxrlib/CMakeLists.txt
Normal file
@@ -0,0 +1,92 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(jxrlib C)
|
||||
|
||||
set(JXRLIB_MAJOR 0)
|
||||
set(JXRLIB_MINOR 0)
|
||||
|
||||
set(JXRLIB_LIB_VERSION ${JXRLIB_MAJOR}.${JXRLIB_MINOR}.0)
|
||||
set(JXRLIB_SO_VERSION ${JXRLIB_MAJOR})
|
||||
|
||||
include(TestBigEndian)
|
||||
test_big_endian(ISBIGENDIAN)
|
||||
if(ISBIGENDIAN)
|
||||
set(DEF_ENDIAN -D_BIG__ENDIAN_)
|
||||
endif()
|
||||
|
||||
add_definitions(-D__ANSI__ -DDISABLE_PERF_MEASUREMENT ${DEF_ENDIAN})
|
||||
|
||||
include_directories(
|
||||
common/include
|
||||
image/sys
|
||||
jxrgluelib
|
||||
jxrtestlib
|
||||
)
|
||||
|
||||
# JXR Library
|
||||
file(GLOB jpegxr_SRC image/sys/*.c image/decode/*.c image/encode/*.c)
|
||||
file(GLOB jpegxr_HDR image/sys/*.h image/decode/*.h image/encode/*.h)
|
||||
|
||||
add_library(jpegxr_obj OBJECT ${jpegxr_SRC} ${jpegxr_HDR})
|
||||
|
||||
add_library(jpegxr SHARED $<TARGET_OBJECTS:jpegxr_obj>)
|
||||
set_target_properties(jpegxr PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION})
|
||||
|
||||
add_library(jpegxr_static STATIC $<TARGET_OBJECTS:jpegxr_obj>)
|
||||
set_target_properties(jpegxr_static PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION} OUTPUT_NAME jpegxr RUNTIME_OUTPUT_NAME jpegxr ARCHIVE_OUTPUT_NAME jpegxr)
|
||||
|
||||
install(TARGETS jpegxr
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
)
|
||||
|
||||
install(TARGETS jpegxr_static
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
)
|
||||
|
||||
|
||||
# JXR-GLUE Library
|
||||
file(GLOB jxrglue_SRC jxrgluelib/*.c jxrtestlib/*.c)
|
||||
file(GLOB jxrglue_HDR jxrgluelib/*.h jxrtestlib/*.h)
|
||||
|
||||
add_library(jxr_obj OBJECT ${jxrglue_SRC} ${jxrglue_HDR})
|
||||
|
||||
add_library(jxrglue SHARED $<TARGET_OBJECTS:jxr_obj>)
|
||||
set_target_properties(jxrglue PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION})
|
||||
target_link_libraries(jxrglue jpegxr m)
|
||||
|
||||
add_library(jxrglue_static STATIC $<TARGET_OBJECTS:jxr_obj>)
|
||||
set_target_properties(jxrglue_static PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION} OUTPUT_NAME jxrglue RUNTIME_OUTPUT_NAME jxrglue ARCHIVE_OUTPUT_NAME jxrglue)
|
||||
target_link_libraries(jxrglue_static jpegxr_static m)
|
||||
|
||||
install(TARGETS jxrglue
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
)
|
||||
|
||||
install(TARGETS jxrglue_static
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
)
|
||||
|
||||
# JxrEncApp Executable
|
||||
add_executable(JxrEncApp jxrencoderdecoder/JxrEncApp.c)
|
||||
target_link_libraries(JxrEncApp jxrglue)
|
||||
install(TARGETS JxrEncApp RUNTIME DESTINATION bin)
|
||||
|
||||
# JxrDecApp Executable
|
||||
add_executable(JxrDecApp jxrencoderdecoder/JxrDecApp.c)
|
||||
target_link_libraries(JxrDecApp jxrglue)
|
||||
install(TARGETS JxrDecApp RUNTIME DESTINATION bin)
|
||||
|
||||
# Headers
|
||||
install(FILES jxrgluelib/JXRGlue.h jxrgluelib/JXRMeta.h jxrtestlib/JXRTest.h image/sys/windowsmediaphoto.h
|
||||
DESTINATION include/jxrlib
|
||||
)
|
||||
install(DIRECTORY common/include/ DESTINATION include/jxrlib
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
||||
71
mingw-w64-jxrlib/PKGBUILD
Normal file
71
mingw-w64-jxrlib/PKGBUILD
Normal file
@@ -0,0 +1,71 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=jxrlib
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=1.1
|
||||
pkgrel=1
|
||||
pkgdesc="Open source implementation of jpegxr (mingw-w64)"
|
||||
arch=('any')
|
||||
url="https://jxrlib.codeplex.com/"
|
||||
license=('BSD')
|
||||
validpgpkeys=('gpg_KEY')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-gcc"
|
||||
"${MINGW_PACKAGE_PREFIX}-iconv")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
|
||||
options=('strip' 'staticlibs')
|
||||
source=(#jxrlib_${pkgver//./_}.tar.gz::http://jxrlib.codeplex.com/downloads/get/685250
|
||||
http://jxrlib.codeplex.com/downloads/get/685250#/jxrlib_${pkgver//./_}.tar.gz
|
||||
"CMakeLists.txt"
|
||||
"jxrlib_warnings.patch"
|
||||
"jxrlib_mingw.patch")
|
||||
md5sums=('c0a6a4529cb687d127cf52b52f5ec848'
|
||||
'31c0666ddd914e0683a458c3b6aa3b0e'
|
||||
'8ee3a08fbba3c74ea394e91d562c8be8'
|
||||
'e72528f9e35f5c52a3287b4fd31a0e44')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"/${_realname}
|
||||
|
||||
# Sanitize charset and line endings
|
||||
for file in `find . -type f -name '*.c' -or -name '*.h' -or -name '*.txt'`; do
|
||||
${MINGW_PREFIX}/bin/iconv -f ISO-8859-15 -t UTF-8 ${file} > ${file}.new && \
|
||||
sed -i 's|\r||g' ${file}.new && \
|
||||
touch -r ${file} ${file}.new && mv ${file}.new ${file}
|
||||
done
|
||||
|
||||
# Remove file which already exists as part of the mingw headers
|
||||
rm -f common/include/guiddef.h
|
||||
|
||||
cp -f ${srcdir}/CMakeLists.txt .
|
||||
|
||||
patch -p1 -i ${srcdir}/jxrlib_warnings.patch
|
||||
patch -p1 -i ${srcdir}/jxrlib_mingw.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
|
||||
mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH}
|
||||
|
||||
declare -a extra_config
|
||||
if check_option "debug" "n"; then
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
|
||||
else
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
|
||||
fi
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-G'MSYS Makefiles' \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
"${extra_config[@]}" \
|
||||
../${_realname}
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
make DESTDIR=${pkgdir} install
|
||||
}
|
||||
93
mingw-w64-jxrlib/jxrlib_mingw.patch
Normal file
93
mingw-w64-jxrlib/jxrlib_mingw.patch
Normal file
@@ -0,0 +1,93 @@
|
||||
diff -rupN jxrlib/common/include/wmspecstring.h jxrlib-new/common/include/wmspecstring.h
|
||||
--- jxrlib/common/include/wmspecstring.h 2013-03-21 18:58:18.000000000 +0100
|
||||
+++ jxrlib-new/common/include/wmspecstring.h 2015-09-06 21:10:53.943039237 +0200
|
||||
@@ -334,7 +334,7 @@ void __pfx_assume(int, const char *);
|
||||
|
||||
// Some CE versions don't have specstrings.h, some have very old version without
|
||||
// __specstrings defined. So we handle CE separately in wmasalce.h
|
||||
-#if defined(UNDER_CE) || defined(NO_WINDOWS)
|
||||
+#if defined(UNDER_CE) || defined(NO_WINDOWS) || defined(MINGW)
|
||||
#include "wmspecstringce.h"
|
||||
#endif
|
||||
|
||||
diff -rupN jxrlib/image/sys/ansi.h jxrlib-new/image/sys/ansi.h
|
||||
--- jxrlib/image/sys/ansi.h 2013-03-28 18:34:06.000000000 +0100
|
||||
+++ jxrlib-new/image/sys/ansi.h 2015-09-06 21:18:54.051637086 +0200
|
||||
@@ -44,13 +44,8 @@
|
||||
//================================
|
||||
#define FORCE_INLINE
|
||||
#define CDECL
|
||||
-#if __LP64__
|
||||
-#define UINTPTR_T unsigned long long
|
||||
-#define INTPTR_T long long
|
||||
-#else
|
||||
-#define UINTPTR_T unsigned int
|
||||
-#define INTPTR_T int
|
||||
-#endif
|
||||
+#define UINTPTR_T uintptr_t
|
||||
+#define INTPTR_T intptr_t
|
||||
|
||||
|
||||
//================================
|
||||
diff -rupN jxrlib/image/sys/strcodec.h jxrlib-new/image/sys/strcodec.h
|
||||
--- jxrlib/image/sys/strcodec.h 2015-09-06 02:21:20.337316724 +0200
|
||||
+++ jxrlib-new/image/sys/strcodec.h 2015-09-06 21:18:44.335483326 +0200
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
//================================================================
|
||||
#ifdef ENABLE_OPTIMIZATIONS
|
||||
-#if defined(WIN32) && !defined(_WIN64)
|
||||
+#if defined(_MSC_VER) && !defined(_WIN64)
|
||||
#define WMP_OPT_SSE2
|
||||
|
||||
#define WMP_OPT_CC_ENC
|
||||
@@ -57,9 +57,9 @@
|
||||
|
||||
//================================================================
|
||||
//#ifdef WIN32
|
||||
-#if defined(WIN32) && !defined(UNDER_CE) // WIN32 seems to be defined always in VS2005 for ARM platform
|
||||
+#if defined(_MSC_VER) && !defined(UNDER_CE) // WIN32 seems to be defined always in VS2005 for ARM platform
|
||||
#define PLATFORM_X86
|
||||
-#include "..\x86\x86.h"
|
||||
+#include "../x86/x86.h"
|
||||
#endif
|
||||
|
||||
#ifndef UNREFERENCED_PARAMETER
|
||||
@@ -89,6 +89,7 @@ typedef unsigned __int64 U64;
|
||||
|
||||
// The following macros depend on UINTPTR_T and INTPTR_T being properly defined
|
||||
// so that they are equal to pointer width. Confirm and fail if our assumptions are wrong.
|
||||
+
|
||||
CT_ASSERT(sizeof(UINTPTR_T) == sizeof(void*), strcodec1);
|
||||
CT_ASSERT(sizeof(INTPTR_T) == sizeof(void*), strcodec2);
|
||||
|
||||
@@ -450,7 +451,7 @@ typedef struct CWMImageStrCodec {
|
||||
|
||||
struct WMPStream ** ppWStream;
|
||||
|
||||
-#ifdef WIN32
|
||||
+#ifdef _MSC_VER
|
||||
TCHAR **ppTempFile;
|
||||
#else
|
||||
char **ppTempFile;
|
||||
diff -rupN jxrlib/jxrgluelib/JXRMeta.h jxrlib-new/jxrgluelib/JXRMeta.h
|
||||
--- jxrlib/jxrgluelib/JXRMeta.h 2015-09-06 02:21:20.340316728 +0200
|
||||
+++ jxrlib-new/jxrgluelib/JXRMeta.h 2015-09-06 21:10:53.944039253 +0200
|
||||
@@ -28,7 +28,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <windowsmediaphoto.h>
|
||||
-#ifndef WIN32
|
||||
+#ifndef _MSC_VER
|
||||
#include <wmspecstring.h>
|
||||
#endif
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
#define WMP_valWMPhotoID WMP_valCompression
|
||||
|
||||
|
||||
-#ifdef WIN32
|
||||
+#ifdef _MSC_VER
|
||||
#define __in_win __in
|
||||
#define __out_win __out
|
||||
#endif
|
||||
193
mingw-w64-jxrlib/jxrlib_warnings.patch
Normal file
193
mingw-w64-jxrlib/jxrlib_warnings.patch
Normal file
@@ -0,0 +1,193 @@
|
||||
diff -rupN jxrlib/image/sys/common.h jxrlib-new/image/sys/common.h
|
||||
--- jxrlib/image/sys/common.h 2013-03-21 17:30:54.000000000 +0100
|
||||
+++ jxrlib-new/image/sys/common.h 2015-09-03 10:31:06.528657911 +0200
|
||||
@@ -124,8 +124,8 @@ Void Adapt (CAdaptiveHuffman *pAdHuff, B
|
||||
Void AdaptFixed (CAdaptiveHuffman *pAdHuff);
|
||||
Void AdaptDiscriminant (CAdaptiveHuffman *pAdHuff);
|
||||
|
||||
-#ifndef _PREFAST_
|
||||
-#pragma warning(disable:4068)
|
||||
-#endif
|
||||
+// #ifndef _PREFAST_
|
||||
+// #pragma warning(disable:4068)
|
||||
+// #endif
|
||||
|
||||
#endif // WMI_COMMON_H
|
||||
diff -rupN jxrlib/image/sys/strcodec.c jxrlib-new/image/sys/strcodec.c
|
||||
--- jxrlib/image/sys/strcodec.c 2013-03-20 19:16:21.000000000 +0100
|
||||
+++ jxrlib-new/image/sys/strcodec.c 2015-09-03 10:30:31.018971760 +0200
|
||||
@@ -668,9 +668,7 @@ ERR detach_SB(SimpleBitIO* pSB)
|
||||
// WinCE ARM and Desktop x86
|
||||
#else
|
||||
// other platform
|
||||
-#ifdef _BIG__ENDIAN_
|
||||
-#define _byteswap_ulong(x) (x)
|
||||
-#else // _BIG__ENDIAN_
|
||||
+#ifndef _BIG__ENDIAN_
|
||||
U32 _byteswap_ulong(U32 bits)
|
||||
{
|
||||
U32 r = (bits & 0xffu) << 24;
|
||||
diff -rupN jxrlib/image/sys/strcodec.h jxrlib-new/image/sys/strcodec.h
|
||||
--- jxrlib/image/sys/strcodec.h 2013-03-21 19:22:34.000000000 +0100
|
||||
+++ jxrlib-new/image/sys/strcodec.h 2015-09-03 10:30:31.019971779 +0200
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
#ifndef UNREFERENCED_PARAMETER
|
||||
#define UNREFERENCED_PARAMETER(P) { (P) = (P); }
|
||||
-#endif UNREFERENCED_PARAMETER
|
||||
+#endif // UNREFERENCED_PARAMETER
|
||||
|
||||
#ifdef UNDER_CE
|
||||
#define PLATFORM_WCE
|
||||
@@ -673,6 +673,16 @@ void flushToByte(BitIOInfo* pIO);
|
||||
pIO->cBitsUsed &= 16 - 1;\
|
||||
pIO->uiAccumulator = LOAD16(pIO->pbCurrent) << pIO->cBitsUsed;\
|
||||
return 0;
|
||||
-// pIO->uiAccumulator = LOAD16(pIO->pbCurrent) & ((U32)(-1) >> pIO->cBitsUsed);\
|
||||
|
||||
void OutputPerfTimerReport(CWMImageStrCodec *pState);
|
||||
+
|
||||
+#if (defined(WIN32) && !defined(UNDER_CE)) || (defined(UNDER_CE) && defined(_ARM_))
|
||||
+// WinCE ARM and Desktop x86
|
||||
+#else
|
||||
+// other platform
|
||||
+#ifdef _BIG__ENDIAN_
|
||||
+#define _byteswap_ulong(x) (x)
|
||||
+#else // _BIG__ENDIAN_
|
||||
+U32 _byteswap_ulong(U32 bits);
|
||||
+#endif // _BIG__ENDIAN_
|
||||
+#endif
|
||||
\ No newline at end of file
|
||||
diff -rupN jxrlib/jxrencoderdecoder/JxrDecApp.c jxrlib-new/jxrencoderdecoder/JxrDecApp.c
|
||||
--- jxrlib/jxrencoderdecoder/JxrDecApp.c 2013-05-08 18:45:08.000000000 +0200
|
||||
+++ jxrlib-new/jxrencoderdecoder/JxrDecApp.c 2015-09-03 10:30:31.019971779 +0200
|
||||
@@ -423,7 +423,7 @@ ERR WmpDecAppCreateEncoderFromExt(
|
||||
Call(GetTestEncodeIID(szExt, &pIID));
|
||||
|
||||
// Create encoder
|
||||
- Call(PKTestFactory_CreateCodec(pIID, ppIE));
|
||||
+ Call(PKTestFactory_CreateCodec(pIID, (void**)ppIE));
|
||||
|
||||
Cleanup:
|
||||
return err;
|
||||
diff -rupN jxrlib/jxrencoderdecoder/JxrEncApp.c jxrlib-new/jxrencoderdecoder/JxrEncApp.c
|
||||
--- jxrlib/jxrencoderdecoder/JxrEncApp.c 2013-05-28 20:58:22.000000000 +0200
|
||||
+++ jxrlib-new/jxrencoderdecoder/JxrEncApp.c 2015-09-03 10:30:31.020971798 +0200
|
||||
@@ -578,7 +578,7 @@ main(int argc, char* argv[])
|
||||
|
||||
//================================
|
||||
Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION));
|
||||
- Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, &pEncoder));
|
||||
+ Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, (void**)&pEncoder));
|
||||
|
||||
//----------------------------------------------------------------
|
||||
Call(PKCreateTestFactory(&pTestFactory, WMP_SDK_VERSION));
|
||||
diff -rupN jxrlib/jxrgluelib/JXRGlueJxr.c jxrlib-new/jxrgluelib/JXRGlueJxr.c
|
||||
--- jxrlib/jxrgluelib/JXRGlueJxr.c 2013-03-20 20:01:13.000000000 +0100
|
||||
+++ jxrlib-new/jxrgluelib/JXRGlueJxr.c 2015-09-03 10:30:31.021971818 +0200
|
||||
@@ -28,6 +28,7 @@
|
||||
//*@@@---@@@@******************************************************************
|
||||
#include <limits.h>
|
||||
#include <JXRGlue.h>
|
||||
+#include <wchar.h>
|
||||
|
||||
|
||||
static const char szHDPhotoFormat[] = "<dc:format>image/vnd.ms-photo</dc:format>";
|
||||
diff -rupN jxrlib/jxrgluelib/JXRMeta.h jxrlib-new/jxrgluelib/JXRMeta.h
|
||||
--- jxrlib/jxrgluelib/JXRMeta.h 2013-03-20 19:06:24.000000000 +0100
|
||||
+++ jxrlib-new/jxrgluelib/JXRMeta.h 2015-09-03 10:30:31.021971818 +0200
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#ifndef UNREFERENCED_PARAMETER
|
||||
#define UNREFERENCED_PARAMETER(P) { (P) = (P); }
|
||||
-#endif UNREFERENCED_PARAMETER
|
||||
+#endif // UNREFERENCED_PARAMETER
|
||||
|
||||
//================================================================
|
||||
// Container
|
||||
diff -rupN jxrlib/jxrtestlib/JXRTest.c jxrlib-new/jxrtestlib/JXRTest.c
|
||||
--- jxrlib/jxrtestlib/JXRTest.c 2013-03-19 20:06:18.000000000 +0100
|
||||
+++ jxrlib-new/jxrtestlib/JXRTest.c 2015-09-03 10:30:31.022971837 +0200
|
||||
@@ -198,7 +198,7 @@ ERR PKTestFactory_CreateDecoderFromFile(
|
||||
ERR err = WMP_errSuccess;
|
||||
|
||||
char *pExt = NULL;
|
||||
- PKIID* pIID = NULL;
|
||||
+ const PKIID* pIID = NULL;
|
||||
|
||||
struct WMPStream* pStream = NULL;
|
||||
PKImageDecode* pDecoder = NULL;
|
||||
@@ -214,7 +214,7 @@ ERR PKTestFactory_CreateDecoderFromFile(
|
||||
Call(CreateWS_File(&pStream, szFilename, "rb"));
|
||||
|
||||
// Create decoder
|
||||
- Call(PKTestFactory_CreateCodec(pIID, ppDecoder));
|
||||
+ Call(PKTestFactory_CreateCodec(pIID, (void**)ppDecoder));
|
||||
pDecoder = *ppDecoder;
|
||||
|
||||
// attach stream to decoder
|
||||
@@ -232,7 +232,7 @@ ERR PKCreateTestFactory(PKCodecFactory**
|
||||
|
||||
UNREFERENCED_PARAMETER( uVersion );
|
||||
|
||||
- Call(PKAlloc(ppCFactory, sizeof(**ppCFactory)));
|
||||
+ Call(PKAlloc((void**)ppCFactory, sizeof(**ppCFactory)));
|
||||
pCFactory = *ppCFactory;
|
||||
|
||||
pCFactory->CreateCodec = PKTestFactory_CreateCodec;
|
||||
@@ -287,7 +287,7 @@ ERR PKTestDecode_Release(
|
||||
|
||||
pID->fStreamOwner && pID->pStream->Close(&pID->pStream);
|
||||
|
||||
- return PKFree(ppID);
|
||||
+ return PKFree((void**)ppID);
|
||||
}
|
||||
|
||||
ERR PKTestDecode_Create(
|
||||
@@ -296,7 +296,7 @@ ERR PKTestDecode_Create(
|
||||
ERR err = WMP_errSuccess;
|
||||
PKTestDecode* pID = NULL;
|
||||
|
||||
- Call(PKAlloc(ppID, sizeof(**ppID)));
|
||||
+ Call(PKAlloc((void**)ppID, sizeof(**ppID)));
|
||||
|
||||
pID = *ppID;
|
||||
pID->Initialize = PKTestDecode_Initialize;
|
||||
diff -rupN jxrlib/jxrtestlib/JXRTestHdr.c jxrlib-new/jxrtestlib/JXRTestHdr.c
|
||||
--- jxrlib/jxrtestlib/JXRTestHdr.c 2013-03-20 17:40:08.000000000 +0100
|
||||
+++ jxrlib-new/jxrtestlib/JXRTestHdr.c 2015-09-03 10:30:31.022971837 +0200
|
||||
@@ -27,7 +27,7 @@
|
||||
//*@@@---@@@@******************************************************************
|
||||
#ifndef ANSI
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
-#endif ANSI
|
||||
+#endif // ANSI
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
diff -rupN jxrlib/jxrtestlib/JXRTestPnm.c jxrlib-new/jxrtestlib/JXRTestPnm.c
|
||||
--- jxrlib/jxrtestlib/JXRTestPnm.c 2013-03-19 22:43:44.000000000 +0100
|
||||
+++ jxrlib-new/jxrtestlib/JXRTestPnm.c 2015-09-03 10:30:31.023971856 +0200
|
||||
@@ -27,7 +27,7 @@
|
||||
//*@@@---@@@@******************************************************************
|
||||
#ifndef ANSI
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
-#endif ANSI
|
||||
+#endif // ANSI
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
diff -rupN jxrlib/jxrtestlib/JXRTestTif.c jxrlib-new/jxrtestlib/JXRTestTif.c
|
||||
--- jxrlib/jxrtestlib/JXRTestTif.c 2013-03-19 20:17:12.000000000 +0100
|
||||
+++ jxrlib-new/jxrtestlib/JXRTestTif.c 2015-09-03 10:30:31.023971856 +0200
|
||||
@@ -909,8 +909,8 @@ ERR PKImageDecode_Release_TIF(PKTestDeco
|
||||
|
||||
PKTestDecode *pID = *ppID;
|
||||
|
||||
- Call(WMPFree(&pID->EXT.TIF.uStripOffsets));
|
||||
- Call(WMPFree(&pID->EXT.TIF.uStripByteCounts));
|
||||
+ Call(WMPFree((void**)&pID->EXT.TIF.uStripOffsets));
|
||||
+ Call(WMPFree((void**)&pID->EXT.TIF.uStripByteCounts));
|
||||
|
||||
Call(PKTestDecode_Release(ppID));
|
||||
|
||||
44
mingw-w64-lfcbase/PKGBUILD
Normal file
44
mingw-w64-lfcbase/PKGBUILD
Normal file
@@ -0,0 +1,44 @@
|
||||
# Maintainer: Björn Lemke <lemke@lemke-it.com>
|
||||
|
||||
_realname=lfcbase
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=1.7.0
|
||||
pkgrel=1
|
||||
pkgdesc="LFC C++ base classes (mingw-w64)"
|
||||
arch=('any')
|
||||
url='http://www.lemke-it.com/'
|
||||
license=('GPL3')
|
||||
validpgpkeys=('gpg_KEY')
|
||||
source=("http://www.lemke-it.com/${_realname}-${pkgver}.tar.gz")
|
||||
|
||||
sha256sums=("79d2b07d8d2a76b811e7ce2a80bc717c58b77e8751d97bb3c8b1d7f397b6ffd1")
|
||||
|
||||
prepare() {
|
||||
cd $srcdir/${_realname}-${pkgver}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/${_realname}-${pkgver}
|
||||
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
|
||||
mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH}
|
||||
../${_realname}-${pkgver}/configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--build=${MINGW_CHOST} \
|
||||
--host=${MINGW_CHOST} \
|
||||
--target=${MINGW_CHOST} \
|
||||
--enable-static \
|
||||
--enable-shared
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
make install DESTDIR="${pkgdir}"
|
||||
}
|
||||
48
mingw-w64-lfcxml/PKGBUILD
Normal file
48
mingw-w64-lfcxml/PKGBUILD
Normal file
@@ -0,0 +1,48 @@
|
||||
# Maintainer: Björn Lemke <lemke@lemke-it.com>
|
||||
|
||||
_realname=lfcxml
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=1.2.0
|
||||
pkgrel=1
|
||||
pkgdesc="LFC C++ xml classes (mingw-w64)"
|
||||
arch=('any')
|
||||
url='http://www.lemke-it.com/'
|
||||
license=('GPL3')
|
||||
validpgpkeys=('gpg_KEY')
|
||||
source=("http://www.lemke-it.com/${_realname}-${pkgver}.tar.gz")
|
||||
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-lfcbase")
|
||||
validpgpkeys=('gpg_KEY')
|
||||
source=("http://www.lemke-it.com/${_realname}-${pkgver}.tar.gz")
|
||||
|
||||
sha246sums=("578f73560ea074f64b359c0009bbd3779c81fde2853249d52abe61588ba41ff4")
|
||||
|
||||
prepare() {
|
||||
cd $srcdir/${_realname}-${pkgver}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/${_realname}-${pkgver}
|
||||
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
|
||||
mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH}
|
||||
../${_realname}-${pkgver}/configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--build=${MINGW_CHOST} \
|
||||
--host=${MINGW_CHOST} \
|
||||
--target=${MINGW_CHOST} \
|
||||
--enable-static \
|
||||
--enable-shared
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
make install DESTDIR="${pkgdir}"
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=librevenge
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=0.0.2
|
||||
pkgrel=2
|
||||
pkgver=0.0.3
|
||||
pkgrel=1
|
||||
pkgdesc="Library for REVerses ENGineered formats filters (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://sf.net/p/libwpd/librevenge/"
|
||||
@@ -18,7 +19,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
||||
checkdepends=("${MINGW_PACKAGE_PREFIX}-cppunit")
|
||||
options=(staticlibs strip)
|
||||
source=("http://sourceforge.net/projects/libwpd/files/librevenge/${_realname}-${pkgver}/${_realname}-${pkgver}.tar.xz")
|
||||
md5sums=('4ee55a80ee32af6752dd8c56eb1b1b5e')
|
||||
md5sums=('b777d64bbe13830627c7bda69e5f3e31')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/${_realname}-${pkgver}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=libwebp
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=0.4.3
|
||||
pkgrel=2
|
||||
pkgver=0.5.0
|
||||
pkgrel=1
|
||||
pkgdesc="the WebP library. Includes conversion tools (mingw-w64)"
|
||||
arch=('any')
|
||||
url="https://developers.google.com/speed/webp/"
|
||||
@@ -14,7 +15,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-giflib"
|
||||
"${MINGW_PACKAGE_PREFIX}-libtiff")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
|
||||
source=(http://downloads.webmproject.org/releases/webp/${_realname}-${pkgver}.tar.gz{,.asc})
|
||||
md5sums=('08813525eeeffe7e305b4cbfade8ae9b'
|
||||
md5sums=('ba81eb9bf23e3c69a2f5cc8dcdb5938f'
|
||||
'SKIP')
|
||||
|
||||
prepare() {
|
||||
@@ -34,7 +35,8 @@ build() {
|
||||
--enable-libwebpmux \
|
||||
--enable-libwebpdemux \
|
||||
--enable-libwebpdecoder
|
||||
make
|
||||
|
||||
make -j1
|
||||
}
|
||||
|
||||
package() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
_realname=OpenSceneGraph
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug")
|
||||
_pkgver=3.4.0
|
||||
_pkgver=3.5.1
|
||||
pkgver=${_pkgver//-/}
|
||||
pkgrel=1
|
||||
pkgdesc="Open source high performance 3D graphics toolkit (mingw-w64)"
|
||||
@@ -44,13 +44,15 @@ source=(http://trac.openscenegraph.org/downloads/developer_releases/${_realname}
|
||||
find-ffmpeg.patch
|
||||
find-freetype.patch
|
||||
additional-gl-header.patch
|
||||
fix-cast-error.patch)
|
||||
md5sums=('a5e762c64373a46932e444f6f7332496'
|
||||
fix-cast-error.patch
|
||||
add-gstreamer-cflags.patch)
|
||||
md5sums=('71b97b18f11b6c361631fc3e34fb4b67'
|
||||
'18ce956c1889babc6515828b8200e864'
|
||||
'a3b612082a47d6a7b4b41f8c576fda7e'
|
||||
'9ab69e1cd26826196fac5b3f01e6cb95'
|
||||
'e889e10100a1f3e07212c01603712594'
|
||||
'5599204490bf9f03cdd5871b938e3338')
|
||||
'5599204490bf9f03cdd5871b938e3338'
|
||||
'347e2d4d74a3b4a6a24e4264b27e2798')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${_pkgver}"
|
||||
@@ -59,6 +61,7 @@ prepare() {
|
||||
patch -p1 -i ${srcdir}/find-freetype.patch
|
||||
patch -p1 -i ${srcdir}/additional-gl-header.patch
|
||||
patch -p1 -i ${srcdir}/fix-cast-error.patch
|
||||
patch -p1 -i ${srcdir}/add-gstreamer-cflags.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
@@ -70,10 +73,8 @@ build() {
|
||||
pushd ${builddir}
|
||||
[[ "${builddir%-${MINGW_CHOST}}" == "Release" ]] && {
|
||||
local _opts="-DBUILD_OSG_EXAMPLES:BOOL=ON"
|
||||
local _postfix=
|
||||
} || {
|
||||
local _opts="-DBUILD_OSG_EXAMPLES:BOOL=OFF -DBUILD_OSG_APPLICATIONS=OFF"
|
||||
local _postfix="-debug"
|
||||
}
|
||||
|
||||
msg "Building ${builddir%-${MINGW_CHOST}} version..."
|
||||
@@ -82,7 +83,7 @@ build() {
|
||||
COLLADA_DIR=${MINGW_PREFIX} \
|
||||
${MINGW_PREFIX}/bin/cmake.exe \
|
||||
-G"MSYS Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX=${_postfix}${MINGW_PREFIX} \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
-DCMAKE_BUILD_TYPE=${builddir%-${MINGW_CHOST}} \
|
||||
${_opts} \
|
||||
../${_realname}-${_pkgver}
|
||||
|
||||
32
mingw-w64-openscenegraph/add-gstreamer-cflags.patch
Normal file
32
mingw-w64-openscenegraph/add-gstreamer-cflags.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
--- OpenSceneGraph-3.5.1/CMakeLists.txt.orig 2015-11-09 18:52:06.000000000 +0300
|
||||
+++ OpenSceneGraph-3.5.1/CMakeLists.txt 2015-11-11 14:14:03.911230800 +0300
|
||||
@@ -668,6 +668,9 @@
|
||||
FIND_PACKAGE(OurDCMTK)
|
||||
FIND_PACKAGE(FFmpeg)
|
||||
FIND_PACKAGE(GStreamer COMPONENTS app pbutils)
|
||||
+ IF(GStreamer_FOUND)
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GStreamer_CFLAGS}")
|
||||
+ ENDIF()
|
||||
FIND_PACKAGE(GLIB COMPONENTS gobject)
|
||||
FIND_PACKAGE(DirectShow)
|
||||
FIND_PACKAGE(SDL2)
|
||||
--- OpenSceneGraph-3.5.1/CMakeModules/FindGStreamer.cmake.orig 2015-11-11 14:26:56.738940300 +0300
|
||||
+++ OpenSceneGraph-3.5.1/CMakeModules/FindGStreamer.cmake 2015-11-11 14:27:12.773336700 +0300
|
||||
@@ -65,7 +65,7 @@
|
||||
# )
|
||||
#endmacro()
|
||||
|
||||
-if (WIN32)
|
||||
+if (WIN32 AND NOT MINGW)
|
||||
macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
|
||||
find_path(${_component_prefix}_INCLUDE_DIRS
|
||||
NAMES ${_header}
|
||||
@@ -83,7 +83,7 @@
|
||||
find_package(PkgConfig)
|
||||
|
||||
macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
|
||||
- pkg_check_modules(${_component_prefix} QUIET ${_pkgconfig_name})
|
||||
+ pkg_check_modules(${_component_prefix} ${_pkgconfig_name})
|
||||
|
||||
# find_path(${_component_prefix}_INCLUDE_DIRS
|
||||
# NAMES ${_header}
|
||||
@@ -1,12 +1,11 @@
|
||||
diff -Naur Python-2.7.9-orig/setup.py Python-2.7.9/setup.py
|
||||
--- Python-2.7.9-orig/setup.py 2014-12-11 13:51:17.891000000 +0300
|
||||
+++ Python-2.7.9/setup.py 2014-12-11 13:51:18.015800000 +0300
|
||||
@@ -272,6 +272,9 @@
|
||||
@@ -272,6 +272,8 @@
|
||||
args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
|
||||
self.compiler.set_executables(**args)
|
||||
|
||||
+ if host_platform not in ['mingw', 'win32']:
|
||||
+ self.compiler.library_dirs.insert(0, '.')
|
||||
+ self.compiler.library_dirs.insert(0, '.')
|
||||
+
|
||||
build_ext.build_extensions(self)
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
--- Python-2.7.10/setup.py.orig 2015-12-28 12:34:14.075841800 +0000
|
||||
+++ Python-2.7.10/setup.py 2015-12-28 15:47:57.770679100 +0000
|
||||
@@ -1731,6 +1731,23 @@
|
||||
if '_tkinter' not in [e.name for e in self.extensions]:
|
||||
missing.append('_tkinter')
|
||||
|
||||
+ # Remove any extensions.library_dirs that are also in compiler.library_dirs
|
||||
+ # Rationale: It's wrong. Ok, better. The compiler.library_dirs appear first
|
||||
+ # in the link command line and (finally, not yet) include "." which
|
||||
+ # causes the build dir to be searched in for -lpython2.7 before
|
||||
+ # $sysroot/lib. This is necessary as otherwise the old python import
|
||||
+ # library is used instead of the new one. This affects sqlite (and
|
||||
+ # some others). I could go into fixing these individually .. but I
|
||||
+ # worry I'll be back here in 6 months fixing the same bug again if
|
||||
+ # I do for some other module(s) in Python 2.7.12. In our case,
|
||||
+ # C:/msys64/mingw64/lib was turning up as that's where libsqlite was
|
||||
+ # and this prevented me from switching from an installed release to
|
||||
+ # an new debug Python. We should be building in clean sysroots but
|
||||
+ # that's another matter really.
|
||||
+ for ext in self.extensions:
|
||||
+ ext.library_dirs = [dir for dir in ext.library_dirs
|
||||
+ if dir not in self.compiler.library_dirs]
|
||||
+
|
||||
## # Uncomment these lines if you want to play with xxmodule.c
|
||||
## ext = Extension('xx', ['xxmodule.c'])
|
||||
## self.extensions.append(ext)
|
||||
@@ -1,11 +1,11 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
# Contributor: Ray Donnelly <mingw.android@gmail.com>
|
||||
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
|
||||
# Contributor: Saul Ibarra Corretge <saghul@gmail.com>
|
||||
|
||||
_realname=python2
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=2.7.10
|
||||
pkgrel=5
|
||||
pkgrel=6
|
||||
_pybasever=${pkgver%.*}
|
||||
pkgdesc="A high-level scripting language (mingw-w64)"
|
||||
arch=('any')
|
||||
@@ -24,7 +24,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
||||
"${MINGW_PACKAGE_PREFIX}-zlib"
|
||||
)
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config")
|
||||
options=('!makeflags' 'staticlibs' 'strip' '!debug')
|
||||
options=('!makeflags') # 'debug' '!strip')
|
||||
source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz"
|
||||
0000-make-_sysconfigdata.py-relocatable.patch
|
||||
0100-MINGW-BASE-use-NT-thread-model.patch
|
||||
@@ -93,6 +93,7 @@ source=("http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz"
|
||||
0820-mingw-reorder-bininstall-ln-symlink-creation.patch
|
||||
0830-add-build-sysroot-config-option.patch
|
||||
0840-add-builddir-to-library_dirs.patch
|
||||
0845-Remove-compiler-lib-dirs-from-extension-lib-dirs.patch
|
||||
0850-cross-PYTHON_FOR_BUILD-gteq-276-and-fullpath-it.patch
|
||||
0855-mingw-fix-ssl-dont-use-enum_certificates.patch
|
||||
0860-mingw-build-optimized-ext.patch
|
||||
@@ -187,6 +188,7 @@ prepare() {
|
||||
patch -p1 -i "${srcdir}"/0820-mingw-reorder-bininstall-ln-symlink-creation.patch
|
||||
patch -p1 -i "${srcdir}"/0830-add-build-sysroot-config-option.patch
|
||||
patch -p1 -i "${srcdir}"/0840-add-builddir-to-library_dirs.patch
|
||||
patch -p1 -i "${srcdir}"/0845-Remove-compiler-lib-dirs-from-extension-lib-dirs.patch
|
||||
patch -p1 -i "${srcdir}"/0850-cross-PYTHON_FOR_BUILD-gteq-276-and-fullpath-it.patch
|
||||
patch -p1 -i "${srcdir}"/0855-mingw-fix-ssl-dont-use-enum_certificates.patch
|
||||
patch -p1 -i "${srcdir}"/0860-mingw-build-optimized-ext.patch
|
||||
@@ -235,6 +237,7 @@ prepare() {
|
||||
}
|
||||
|
||||
build() {
|
||||
declare -a extra_config
|
||||
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
||||
|
||||
CFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 "
|
||||
@@ -244,15 +247,16 @@ build() {
|
||||
if check_option "strip" "y"; then
|
||||
LDFLAGS+=" -s "
|
||||
fi
|
||||
|
||||
# Most of this is unnecessary, perhaps just
|
||||
# the extra_config bit?
|
||||
if check_option "debug" "n"; then
|
||||
CFLAGS+=" -DNDEBUG "
|
||||
CXXFLAGS+=" -DNDEBUG "
|
||||
else
|
||||
plain " -DDEBUG -DPy_DEBUG -D_DEBUG does not work unfortunately .."
|
||||
# CFLAGS+=" -DDEBUG -DPy_DEBUG -D_DEBUG "
|
||||
# CXXFLAGS+=" -DDEBUG -DPy_DEBUG -D_DEBUG "
|
||||
CFLAGS+=" -O0 -ggdb"
|
||||
CXXFLAGS+=" -O0 -ggdb"
|
||||
CFLAGS+=" -DDEBUG -DPy_DEBUG -D_DEBUG "
|
||||
CXXFLAGS+=" -DDEBUG -DPy_DEBUG -D_DEBUG "
|
||||
extra_config+=("--with-pydebug")
|
||||
fi
|
||||
|
||||
local LIBFFI_INC=`${MINGW_PREFIX}/bin/pkg-config libffi --cflags-only-I | sed "s|\-I||g"`
|
||||
@@ -272,15 +276,16 @@ build() {
|
||||
--with-threads \
|
||||
--with-system-expat \
|
||||
--with-system-ffi \
|
||||
"${extra_config[@]}" \
|
||||
OPT=""
|
||||
#--with-dbmliborder='gdbm:ndbm'
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/build-${CARCH}"
|
||||
make test
|
||||
}
|
||||
#check() {
|
||||
# cd "${srcdir}/build-${CARCH}"
|
||||
# make test
|
||||
#}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/build-${CARCH}"
|
||||
@@ -288,18 +293,19 @@ package() {
|
||||
|
||||
MSYSTEM=MINGW \
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
make install DESTDIR="$pkgdir"
|
||||
make install DESTDIR="${pkgdir}"
|
||||
|
||||
mv "${pkgdir}${MINGW_PREFIX}"/bin/smtpd.py "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/
|
||||
|
||||
# gdb pretty printers for debugging Python itself; to use:
|
||||
# gdb support for debugging Python itself (needs options='debug',
|
||||
# *may* work better on i686 due to frame pointer always being available) to use:
|
||||
# python
|
||||
# sys.path.append('C:/msys64/mingw64/share/gdb/python2')
|
||||
# import python-gdb
|
||||
# reload(python-gdb)
|
||||
# import python_gdb
|
||||
# reload(python_gdb)
|
||||
# end
|
||||
[[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python2/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python2/
|
||||
cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python2/python-gdb.py
|
||||
cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python2/python_gdb.py
|
||||
|
||||
# Copy python import library to $prefix/lib because some programs can't find it in other locations
|
||||
cp -f "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config/libpython${_pybasever}.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/libpython${_pybasever}.dll.a
|
||||
@@ -420,7 +426,8 @@ sha1sums=('ee5a50c5562e7448f037d35fdedc18d95c748b9e'
|
||||
'23c0bcdb082006d6bde3eb9fc72044272c7a08f3'
|
||||
'fbefe2d0d2d4c9f995c9c49a66c93071587b7045'
|
||||
'15e055c4cce32a0c1940953062fd2db7c22364c4'
|
||||
'f0f5efb98c610d0caf3ccbf0850460af49f92c96'
|
||||
'731ac1d1e54af3906d836a6595cb3a76ce165260'
|
||||
'415ae19daf7dddc8db20009f2c708b900822e6b4'
|
||||
'78b039f8ab595750b2f7aee3e2fc6d7a466a5c9c'
|
||||
'aa295dd8c4f60b70c61753fc4be9c8ff50101577'
|
||||
'de01d87f5070992f305d5375da1deb69f80ea8bb'
|
||||
|
||||
Reference in New Issue
Block a user