diff options
Diffstat (limited to 'gnu/packages/patches/freeimage-unbundle.patch')
-rw-r--r-- | gnu/packages/patches/freeimage-unbundle.patch | 167 |
1 files changed, 132 insertions, 35 deletions
diff --git a/gnu/packages/patches/freeimage-unbundle.patch b/gnu/packages/patches/freeimage-unbundle.patch index ca907d3276..4d9b8e25c9 100644 --- a/gnu/packages/patches/freeimage-unbundle.patch +++ b/gnu/packages/patches/freeimage-unbundle.patch @@ -1,4 +1,4 @@ -https://src.fedoraproject.org/cgit/rpms/freeimage.git/tree/FreeImage-3.17.0_unbundle.patch +https://src.fedoraproject.org/cgit/rpms/freeimage.git/tree/FreeImage_unbundle.patch diff -rupN FreeImage/genfipsrclist.sh FreeImage-new/genfipsrclist.sh --- FreeImage/genfipsrclist.sh 2015-02-20 10:52:16.000000000 +0100 @@ -25,10 +25,10 @@ diff -rupN FreeImage/gensrclist.sh FreeImage-new/gensrclist.sh #!/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 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 + echo "VER_MINOR = 18.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 @@ -90,8 +90,8 @@ diff -rupN FreeImage/Makefile.gnu FreeImage-new/Makefile.gnu -# LibJXR -CXXFLAGS += -D__ANSI__ -CXXFLAGS += $(INCLUDE) -+override CFLAGS += $(INCLUDE) -D__ANSI__ $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) -+override LDFLAGS += -ljpeg $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ++override CFLAGS += $(INCLUDE) -D__ANSI__ -I/usr/include/jxrlib $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ++override LDFLAGS += -ljpeg -ljpegxr -ljxrglue $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) - CFLAGS += -fPIC @@ -215,6 +215,18 @@ diff -rupN FreeImage/Source/FreeImage/PluginJPEG.cpp FreeImage-new/Source/FreeIm } #include "FreeImage.h" +diff -rupN FreeImage/Source/FreeImage/PluginJXR.cpp FreeImage-new/Source/FreeImage/PluginJXR.cpp +--- FreeImage/Source/FreeImage/PluginJXR.cpp 2015-03-03 23:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginJXR.cpp 2018-07-31 23:37:58.561953201 +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 @@ -241,38 +253,39 @@ diff -rupN FreeImage/Source/FreeImage/PluginRAW.cpp FreeImage-new/Source/FreeIma #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. - // ---------------------------------------------------------- + + #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 *name, const char *mode) { + 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 @@ -282,15 +295,81 @@ diff -rupN FreeImage/Source/FreeImage/PluginWebP.cpp FreeImage-new/Source/FreeIm -#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/PSDParser.cpp FreeImage-new/Source/FreeImage/PSDParser.cpp +--- FreeImage/Source/FreeImage/PSDParser.cpp 2016-02-11 03:18:02.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PSDParser.cpp 2018-08-01 00:17:18.323822675 +0200 +@@ -133,8 +133,8 @@ public: + template <> + class PSDGetValue<8> { + public: +- static inline UINT64 get(const BYTE * iprBuffer) { +- UINT64 v = ((const UINT64*)iprBuffer)[0]; ++ static inline uint64_t get(const BYTE * iprBuffer) { ++ uint64_t v = ((const uint64_t*)iprBuffer)[0]; + #ifndef FREEIMAGE_BIGENDIAN + SwapInt64(&v); + #endif +@@ -147,7 +147,7 @@ public: + + // -------------------------------------------------------------------------- + +-static UINT64 ++static uint64_t + psdReadSize(FreeImageIO *io, fi_handle handle, const psdHeaderInfo& header) { + if(header._Version == 1) { + BYTE Length[4]; +@@ -199,11 +199,11 @@ public: + template <> + class PSDSetValue<8> { + public: +- static inline void set(const BYTE * iprBuffer, UINT64 v) { ++ static inline void set(const BYTE * iprBuffer, uint64_t v) { + #ifndef FREEIMAGE_BIGENDIAN + SwapInt64(&v); + #endif +- ((UINT64*)iprBuffer)[0] = v; ++ ((uint64_t*)iprBuffer)[0] = v; + } + }; + +@@ -213,7 +213,7 @@ public: + // -------------------------------------------------------------------------- + + static inline bool +-psdWriteSize(FreeImageIO *io, fi_handle handle, const psdHeaderInfo& header, UINT64 v) { ++psdWriteSize(FreeImageIO *io, fi_handle handle, const psdHeaderInfo& header, uint64_t v) { + if(header._Version == 1) { + BYTE Length[4]; + psdSetLongValue(Length, sizeof(Length), (DWORD)v); +@@ -1063,10 +1063,10 @@ unsigned psdParser::GetChannelOffset(FIB + bool psdParser::ReadLayerAndMaskInfoSection(FreeImageIO *io, fi_handle handle) { + bool bSuccess = true; + +- UINT64 nTotalBytes = psdReadSize(io, handle, _headerInfo); ++ uint64_t nTotalBytes = psdReadSize(io, handle, _headerInfo); + + // Hack to handle large PSB files without using fseeko(). +- if (sizeof(long) < sizeof(UINT64)) { ++ if (sizeof(long) < sizeof(uint64_t)) { + const long offset = 0x10000000; + while (nTotalBytes > offset) { + if (io->seek_proc(handle, offset, SEEK_CUR) != 0) { +@@ -1672,7 +1672,7 @@ bool psdParser::WriteLayerAndMaskInfoSec + // Short section with no layers. + BYTE IntValue[4]; + +- UINT64 size; ++ uint64_t size; + if(_headerInfo._Version == 1) { + size = 8; + } else { 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 @@ -536,3 +615,21 @@ diff -rupN FreeImage/Source/Metadata/XTIFF.cpp FreeImage-new/Source/Metadata/XTI if(skip_write_field(tif, tag_id)) { // skip tags that are already handled by the LibTIFF writing process +diff -rupN FreeImage/Source/Utilities.h FreeImage-new/Source/Utilities.h +--- FreeImage/Source/Utilities.h 2016-04-11 15:15:32.000000000 +0200 ++++ FreeImage-new/Source/Utilities.h 2018-08-01 00:16:29.826825358 +0200 +@@ -446,12 +446,12 @@ SwapLong(DWORD *lp) { + } + + inline void +-SwapInt64(UINT64 *arg) { ++SwapInt64(uint64_t *arg) { + #if defined(_MSC_VER) && _MSC_VER >= 1310 + *arg = _byteswap_uint64(*arg); + #else + union Swap { +- UINT64 sv; ++ uint64_t sv; + DWORD ul[2]; + } tmp, result; + tmp.sv = *arg; |