pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/netpbm Add upstream patch to fix build with n...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/09da6b3d2e82
branches:  trunk
changeset: 564089:09da6b3d2e82
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Thu Aug 27 09:18:06 2009 +0000

description:
Add upstream patch to fix build with new jpeg. Thanks to obache@ for
tracking it down. Fixes PR 41947.

diffstat:

 graphics/netpbm/distinfo         |   3 +-
 graphics/netpbm/patches/patch-ba |  61 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 1 deletions(-)

diffs (82 lines):

diff -r 4b91ba4ffd32 -r 09da6b3d2e82 graphics/netpbm/distinfo
--- a/graphics/netpbm/distinfo  Wed Aug 26 22:33:29 2009 +0000
+++ b/graphics/netpbm/distinfo  Thu Aug 27 09:18:06 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.70 2009/07/21 12:40:54 tnn Exp $
+$NetBSD: distinfo,v 1.71 2009/08/27 09:18:06 dholland Exp $
 
 SHA1 (netpbm-10.34.tgz) = 530458871f9d3dc763a1bf82f227eeb79098c601
 RMD160 (netpbm-10.34.tgz) = 57a596efa6cacb981135d554a72cbaffc4cfe72c
@@ -29,6 +29,7 @@
 SHA1 (patch-ax) = d50e56191192b4caf423ed081581868bb1a63de8
 SHA1 (patch-ay) = 60ab532de6d6ec498ada140f795bba327a562e13
 SHA1 (patch-az) = 587cf5443099d31e20132d10aa3f330668097d6f
+SHA1 (patch-ba) = 775c2903bd030776c6f8c55f83c317e9d1751401
 SHA1 (patch-ca) = b63be9bd38dd182949edf3b892608b72d13c1fa0
 SHA1 (patch-cb) = b1be33ae6acfe57bf2f407cd48a6b140c3ddea85
 SHA1 (patch-da) = 37b30f7b6674150685d406570802a7250dce51a6
diff -r 4b91ba4ffd32 -r 09da6b3d2e82 graphics/netpbm/patches/patch-ba
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/netpbm/patches/patch-ba  Thu Aug 27 09:18:06 2009 +0000
@@ -0,0 +1,61 @@
+$NetBSD: patch-ba,v 1.5 2009/08/27 09:18:06 dholland Exp $
+
+Upstream patch to fix build with jpeg 7.
+
+--- converter/ppm/ppmtompeg/jpeg.c     2009/07/24 02:59:59     959
++++ converter/ppm/ppmtompeg/jpeg.c     2009/07/31 02:21:47     960
+@@ -53,6 +53,17 @@
+ #define HEADER_SIZE 607   /*JFIF header size used on output images*/
+ 
+ 
++static int
++minDctVScaledSize(struct jpeg_decompress_struct const cinfo) {
++
++#if JPEG_LIB_VERSION >= 70
++    return cinfo.min_DCT_v_scaled_size;
++#else
++    return cinfo.min_DCT_scaled_size;
++#endif
++}
++
++
+ 
+ /*=======================================================================*
+  *                                                                       *
+@@ -417,11 +428,7 @@
+      */
+   
+     /* set parameters for decompression */
+-#ifdef JPEG4
+-    cinfo.want_raw_output = TRUE;
+-#else
+     cinfo.raw_data_out = TRUE;
+-#endif
+     cinfo.out_color_space = JCS_YCbCr;
+   
+     /* calculate image output dimensions */
+@@ -467,11 +474,7 @@
+     /* Make an 8-row-high sample array that will go away when done
+        with image
+     */
+-#ifdef JPEG4
+-    buffer_height = 8;  /* could be 2, 4,8 rows high */
+-#else
+-    buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_scaled_size;
+-#endif
++    buffer_height = cinfo.max_v_samp_factor * minDctVScaledSize(cinfo);
+   
+     for(cp=0,compptr = cinfo.comp_info;cp<cinfo.num_components;
+         cp++,compptr++) {
+@@ -495,11 +498,7 @@
+ 
+     while (cinfo.output_scanline < cinfo.output_height) {
+ 
+-#ifdef JPEG4
+-        (void) jpeg_read_raw_scanlines(&cinfo, scanarray, buffer_height);
+-#else
+         (void) jpeg_read_raw_data(&cinfo, scanarray, buffer_height);
+-#endif
+ 
+         /* alter subsample ratio's if neccessary */
+         if ((h_samp[0]==2) && (h_samp[1]==1) && (h_samp[2]==1) &&



Home | Main Index | Thread Index | Old Index