pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/freeimage freeimage: Update to 3.18.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dc8069014465
branches:  trunk
changeset: 347464:dc8069014465
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat Jan 11 14:40:44 2020 +0000

description:
freeimage: Update to 3.18.0

Release 3.18.0 is a maintenance release that mainly brings updates of its third party libraries.
The library has been updated with the new ZLib (1.2.11), LibJPEG (9c), LibPNG (1.6.35), LibTIFF (4.0.9), LibRaw (0.19.0), LibWebP (1.0.0), OpenEXR (2.2.1).
Other significant improvements concern better support for JPEG saving (when using 32-bit CMYK images) and PSD saving.
Lastly, the library contains many bug fixes provided by our users (will concern especially plugins PCX, TIFF, XPM, GIF, TARGA, PSD, BMP, DDS, PNG, HDR).
As usual, check the changes log for full details (especially for bug fixes) and check also the updated FreeImage documentation.

diffstat:

 graphics/freeimage/Makefile                                                          |    7 +-
 graphics/freeimage/distinfo                                                          |   18 +-
 graphics/freeimage/patches/patch-Makefile                                            |    4 +-
 graphics/freeimage/patches/patch-Makefile.fip                                        |    4 +-
 graphics/freeimage/patches/patch-Source_FreeImage_PluginPCX.cpp                      |  220 ----------
 graphics/freeimage/patches/patch-Source_FreeImage_PluginXPM.cpp                      |   33 -
 graphics/freeimage/patches/patch-Source_LibWebP_src_dsp_dsp.upsampling_mips_dsp_r2.c |   44 --
 graphics/freeimage/patches/patch-Source_LibWebP_src_dsp_dsp.yuv_mips_dsp_r2.c        |   24 -
 8 files changed, 16 insertions(+), 338 deletions(-)

diffs (truncated from 400 to 300 lines):

diff -r 07bf33b3d344 -r dc8069014465 graphics/freeimage/Makefile
--- a/graphics/freeimage/Makefile       Sat Jan 11 14:37:18 2020 +0000
+++ b/graphics/freeimage/Makefile       Sat Jan 11 14:40:44 2020 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2019/11/02 22:37:56 rillig Exp $
+# $NetBSD: Makefile,v 1.9 2020/01/11 14:40:44 nia Exp $
 
-DISTNAME=      FreeImage3170
-PKGNAME=       freeimage-3.17.0
-PKGREVISION=   3
+DISTNAME=      FreeImage3180
+PKGNAME=       freeimage-3.18.0
 CATEGORIES=    devel graphics
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=freeimage/}
 EXTRACT_SUFX=  .zip
diff -r 07bf33b3d344 -r dc8069014465 graphics/freeimage/distinfo
--- a/graphics/freeimage/distinfo       Sat Jan 11 14:37:18 2020 +0000
+++ b/graphics/freeimage/distinfo       Sat Jan 11 14:40:44 2020 +0000
@@ -1,13 +1,9 @@
-$NetBSD: distinfo,v 1.6 2017/12/26 11:55:01 he Exp $
+$NetBSD: distinfo,v 1.7 2020/01/11 14:40:44 nia Exp $
 
-SHA1 (FreeImage3170.zip) = 6752c83798c2f81dee71a2e8bb11657068672669
-RMD160 (FreeImage3170.zip) = c4e87846098327ee346c49ae81b6036f6d9ab36d
-SHA512 (FreeImage3170.zip) = 703c2626c0bcfe73eb40d720f45745208ca9650a7730759680a2b38ad3f6c719a43008477032bc70b76a95761f7d4b6f901b961359d36b54ace906dd78fb391b
-Size (FreeImage3170.zip) = 7020636 bytes
-SHA1 (patch-Makefile) = 196331f954913d5b49ae1e2464fb356a26212168
-SHA1 (patch-Makefile.fip) = c12dd636f83f774a11c91c4e3373176fd27e562d
-SHA1 (patch-Source_FreeImage_PluginPCX.cpp) = 26853626d1dc6a52804f946fd0576269de380512
-SHA1 (patch-Source_FreeImage_PluginXPM.cpp) = eac7be24c3d64593feebdb548df8a404db66c113
+SHA1 (FreeImage3180.zip) = 38daa9d8f1bca2330a2eaa42ec66fbe6ede7dce9
+RMD160 (FreeImage3180.zip) = b791715fccf49355a3cb27b6250d8ed809c2454e
+SHA512 (FreeImage3180.zip) = 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818
+Size (FreeImage3180.zip) = 7415716 bytes
+SHA1 (patch-Makefile) = d453337cb2a34f4480d1bd3c2115cb93715170b8
+SHA1 (patch-Makefile.fip) = 466b82e70d06f9552a73d86a742aa1bd3450f881
 SHA1 (patch-Source_LibOpenJPEG_opj__malloc.h) = 7e8b65d17cf1f0ed295964d477b96acac56bd927
-SHA1 (patch-Source_LibWebP_src_dsp_dsp.upsampling_mips_dsp_r2.c) = 9725fa20d545e6482f4396487b70c104ddb37ce6
-SHA1 (patch-Source_LibWebP_src_dsp_dsp.yuv_mips_dsp_r2.c) = bd569e2b2fa7b79a3651f53352fc8e5d26d0b2d3
diff -r 07bf33b3d344 -r dc8069014465 graphics/freeimage/patches/patch-Makefile
--- a/graphics/freeimage/patches/patch-Makefile Sat Jan 11 14:37:18 2020 +0000
+++ b/graphics/freeimage/patches/patch-Makefile Sat Jan 11 14:40:44 2020 +0000
@@ -1,5 +1,7 @@
-$NetBSD: patch-Makefile,v 1.2 2017/07/08 08:08:25 nros Exp $
+$NetBSD: patch-Makefile,v 1.3 2020/01/11 14:40:44 nia Exp $
+
 * use c++ for linking instead of linking with stdc++
+
 --- Makefile.gnu.orig  2015-03-08 17:04:00.000000000 +0000
 +++ Makefile.gnu
 @@ -5,8 +5,8 @@ include Makefile.srcs
diff -r 07bf33b3d344 -r dc8069014465 graphics/freeimage/patches/patch-Makefile.fip
--- a/graphics/freeimage/patches/patch-Makefile.fip     Sat Jan 11 14:37:18 2020 +0000
+++ b/graphics/freeimage/patches/patch-Makefile.fip     Sat Jan 11 14:40:44 2020 +0000
@@ -1,5 +1,7 @@
-$NetBSD: patch-Makefile.fip,v 1.2 2017/07/08 08:08:25 nros Exp $
+$NetBSD: patch-Makefile.fip,v 1.3 2020/01/11 14:40:44 nia Exp $
+
 * use c++ for linking instead of linking with stdc++
+
 --- Makefile.fip.orig  2015-03-08 17:03:56.000000000 +0000
 +++ Makefile.fip
 @@ -5,8 +5,8 @@ include fipMakefile.srcs
diff -r 07bf33b3d344 -r dc8069014465 graphics/freeimage/patches/patch-Source_FreeImage_PluginPCX.cpp
--- a/graphics/freeimage/patches/patch-Source_FreeImage_PluginPCX.cpp   Sat Jan 11 14:37:18 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +0,0 @@
-$NetBSD: patch-Source_FreeImage_PluginPCX.cpp,v 1.1 2017/02/20 08:00:42 snj Exp $
-
-Fix CVE-2015-0852.
-
-http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginPCX.cpp?r1=1.17&r2=1.18&pathrev=MAIN
-
---- Source/FreeImage/PluginPCX.cpp.orig        2015-03-02 02:07:08.000000000 -0800
-+++ Source/FreeImage/PluginPCX.cpp     2017-02-19 23:39:07.000000000 -0800
-@@ -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;
-+              // check image size
-+              if((left >= right) || (top >= bottom)) {
-+                      throw FI_MSG_ERROR_PARSING;
-+              }
- 
--              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);                   
-+              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);
diff -r 07bf33b3d344 -r dc8069014465 graphics/freeimage/patches/patch-Source_FreeImage_PluginXPM.cpp
--- a/graphics/freeimage/patches/patch-Source_FreeImage_PluginXPM.cpp   Sat Jan 11 14:37:18 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-$NetBSD: patch-Source_FreeImage_PluginXPM.cpp,v 1.1 2017/02/20 08:00:42 snj Exp $
-
-Fix CVE-2016-5684.
-
-http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginXPM.cpp?r1=1.17&r2=1.18
-
-and
-
-http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginXPM.cpp?r1=1.18&r2=1.19



Home | Main Index | Thread Index | Old Index