diff options
author | linimon <linimon@FreeBSD.org> | 2018-10-28 19:26:05 +0800 |
---|---|---|
committer | linimon <linimon@FreeBSD.org> | 2018-10-28 19:26:05 +0800 |
commit | f09e77b13ca0b3582b4913128444d04cb48dd2a8 (patch) | |
tree | 6903f3da547af4b7c7aadcea5387f198998eee5f /graphics | |
parent | e815d64068fb660ac62ba6ce279a301796aa42cd (diff) | |
download | freebsd-ports-gnome-f09e77b13ca0b3582b4913128444d04cb48dd2a8.tar.gz freebsd-ports-gnome-f09e77b13ca0b3582b4913128444d04cb48dd2a8.tar.zst freebsd-ports-gnome-f09e77b13ca0b3582b4913128444d04cb48dd2a8.zip |
Fix build on GCC-based architectures.
PR: 232381
Submitted by: Piotr Kubaj
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/freeimage/Makefile | 4 | ||||
-rw-r--r-- | graphics/freeimage/files/patch-Source_FreeImage_PluginBMP.cpp | 29 |
2 files changed, 32 insertions, 1 deletions
diff --git a/graphics/freeimage/Makefile b/graphics/freeimage/Makefile index 3024d0d3dbb2..fff066667952 100644 --- a/graphics/freeimage/Makefile +++ b/graphics/freeimage/Makefile @@ -26,7 +26,9 @@ USES= dos2unix gmake zip USE_LDCONFIG= yes DOS2UNIX_FILES= Source/LibOpenJPEG/opj_malloc.h \ Source/LibRawLite/dcraw/dcraw.c \ - Source/LibRawLite/internal/dcraw_common.cpp + Source/LibRawLite/internal/dcraw_common.cpp \ + Source/FreeImage/PluginBMP.cpp \ + Source/FreeImage/PluginDDS.cpp WRKSRC= ${WRKDIR}/FreeImage MAKE_ARGS= CC="${CC}" CPP="${CPP}" CXX="${CXX}" diff --git a/graphics/freeimage/files/patch-Source_FreeImage_PluginBMP.cpp b/graphics/freeimage/files/patch-Source_FreeImage_PluginBMP.cpp new file mode 100644 index 000000000000..2f1584b3d6cc --- /dev/null +++ b/graphics/freeimage/files/patch-Source_FreeImage_PluginBMP.cpp @@ -0,0 +1,29 @@ +--- Source/FreeImage/PluginBMP.cpp.orig 2018-10-18 12:56:26 UTC ++++ Source/FreeImage/PluginBMP.cpp +@@ -1419,7 +1419,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, + + 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, + } + #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, + } + } + } +- } 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); |