diff --git a/srcpkgs/freeimage/patches/disable_arm_neon.patch b/srcpkgs/freeimage/patches/disable_arm_neon.patch index 4ecac0d410e..7130c4e41a1 100644 --- a/srcpkgs/freeimage/patches/disable_arm_neon.patch +++ b/srcpkgs/freeimage/patches/disable_arm_neon.patch @@ -1,15 +1,5 @@ ---- fi/Source/LibPNG/pngpriv.h.orig 2018-07-16 11:58:00.000000000 +0200 -+++ fi/Source/LibPNG/pngpriv.h 2018-08-07 10:15:53.827327997 +0200 -@@ -107,6 +107,7 @@ - * this in $(CC), e.g. "CC=gcc -mfpu=neon", but people who build libpng rarely - * do this. - */ -+#define PNG_ARM_NEON_OPT 0 - #ifndef PNG_ARM_NEON_OPT - /* ARM NEON optimizations are being controlled by the compiler settings, - * typically the target FPU. If the FPU has been set to NEON (-mfpu=neon ---- fip/Source/LibPNG/pngpriv.h.orig 2018-07-16 11:58:00.000000000 +0200 -+++ fip/Source/LibPNG/pngpriv.h 2018-08-07 10:15:53.827327997 +0200 +--- Source/LibPNG/pngpriv.h.orig 2018-07-16 11:58:00.000000000 +0200 ++++ Source/LibPNG/pngpriv.h 2018-08-07 10:15:53.827327997 +0200 @@ -107,6 +107,7 @@ * this in $(CC), e.g. "CC=gcc -mfpu=neon", but people who build libpng rarely * do this. diff --git a/srcpkgs/freeimage/patches/ftbfs-big-endian.patch b/srcpkgs/freeimage/patches/ftbfs-big-endian.patch new file mode 100644 index 00000000000..fb748f9f631 --- /dev/null +++ b/srcpkgs/freeimage/patches/ftbfs-big-endian.patch @@ -0,0 +1,56 @@ +Fixes BE build failure. + +--- Source/FreeImage/PluginDDS.cpp ++++ Source/FreeImage/PluginDDS.cpp +@@ -356,14 +356,14 @@ SwapHeader(DDSHEADER *header) { + for(int i=0; i<11; i++) { + SwapLong(&header->surfaceDesc.dwReserved1[i]); + } +- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwSize); +- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwFlags); +- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwFourCC); +- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRGBBitCount); +- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRBitMask); +- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwGBitMask); +- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwBBitMask); +- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRGBAlphaBitMask); ++ SwapLong(&header->surfaceDesc.ddspf.dwSize); ++ SwapLong(&header->surfaceDesc.ddspf.dwFlags); ++ SwapLong(&header->surfaceDesc.ddspf.dwFourCC); ++ SwapLong(&header->surfaceDesc.ddspf.dwRGBBitCount); ++ SwapLong(&header->surfaceDesc.ddspf.dwRBitMask); ++ SwapLong(&header->surfaceDesc.ddspf.dwGBitMask); ++ SwapLong(&header->surfaceDesc.ddspf.dwBBitMask); ++ SwapLong(&header->surfaceDesc.ddspf.dwRGBAlphaBitMask); + SwapLong(&header->surfaceDesc.ddsCaps.dwCaps1); + SwapLong(&header->surfaceDesc.ddsCaps.dwCaps2); + SwapLong(&header->surfaceDesc.ddsCaps.dwReserved[0]); +--- Source/FreeImage/PluginBMP.cpp ++++ Source/FreeImage/PluginBMP.cpp +@@ -1419,7 +1419,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void + + free(buffer); + #ifdef FREEIMAGE_BIGENDIAN +- } else if (bpp == 16) { ++ } else if (dst_bpp == 16) { + int padding = dst_pitch - dst_width * sizeof(WORD); + WORD pad = 0; + WORD pixel; +@@ -1440,7 +1440,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void + } + #endif + #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB +- } else if (bpp == 24) { ++ } else if (dst_bpp == 24) { + int padding = dst_pitch - dst_width * sizeof(FILE_BGR); + DWORD pad = 0; + FILE_BGR bgr; +@@ -1461,7 +1461,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void + } + } + } +- } else if (bpp == 32) { ++ } else if (dst_bpp == 32) { + FILE_BGRA bgra; + for(unsigned y = 0; y < dst_height; y++) { + BYTE *line = FreeImage_GetScanLine(dib, y); diff --git a/srcpkgs/freeimage/template b/srcpkgs/freeimage/template index 8b4b25aef29..d06403bfd74 100644 --- a/srcpkgs/freeimage/template +++ b/srcpkgs/freeimage/template @@ -16,7 +16,7 @@ CFLAGS="-fPIC -DPIC -fexceptions -fvisibility=hidden -DPNG_POWERPC_VSX_OPT=0" CXXFLAGS="${CFLAGS} -Wno-ctor-dtor-privacy" subpackages="freeimage-plus freeimage-devel freeimage-plus-devel" -post_extract() { +post_patch() { mkdir /tmp/fi mv ${wrksrc}/* /tmp/fi cp -a /tmp/fi ${wrksrc}/fip