* [gentoo-commits] repo/gentoo:master commit in: x11-libs/gdk-pixbuf/, x11-libs/gdk-pixbuf/files/
@ 2015-09-01 5:15 Alexandre Rostovtsev
0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Rostovtsev @ 2015-09-01 5:15 UTC (permalink / raw
To: gentoo-commits
commit: 084b0771c60902525706033d8d1ef2ac489954e1
Author: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 1 04:28:13 2015 +0000
Commit: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
CommitDate: Tue Sep 1 05:15:38 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=084b0771
x11-libs/gdk-pixbuf: more DoS fixes (CVE-2015-4491)
Really fix the overflows this time.
Gentoo-Bug: 556314
Upstream-Bug-url: https://bugzilla.gnome.org/show_bug.cgi?id=752297
Upstream-Bug-url: https://bugzilla.gnome.org/show_bug.cgi?id=753908
Upstream-Bug-url: https://bugzilla.gnome.org/show_bug.cgi?id=734556
Upstream-Bug-url: https://bugzilla.gnome.org/show_bug.cgi?id=753569
Package-Manager: portage-2.2.20.1
.../gdk-pixbuf-2.31.1-pixops-no-scaling.patch | 129 ++++++++++++++++
.../files/gdk-pixbuf-2.31.5-pixops-overflow.patch | 38 +++++
.../gdk-pixbuf-2.31.6-alpha-overflow-rebased.patch | 79 ++++++++++
.../files/gdk-pixbuf-2.31.6-jpeg-overflow.patch | 35 +++++
.../gdk-pixbuf-2.31.6-pixops-gcc-optimizer.patch | 46 ++++++
...gdk-pixbuf-2.31.6-pixops-overflow-rebased.patch | 162 +++++++++++++++++++++
.../gdk-pixbuf-2.31.6-pixops-variable-type.patch | 37 +++++
.../files/gdk-pixbuf-2.31.6-png-overflow.patch | 72 +++++++++
.../files/gdk-pixbuf-2.31.6-rotate-overflow.patch | 27 ++++
x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8-r2.ebuild | 134 +++++++++++++++++
10 files changed, 759 insertions(+)
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.1-pixops-no-scaling.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.1-pixops-no-scaling.patch
new file mode 100644
index 0000000..a8587fc
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.1-pixops-no-scaling.patch
@@ -0,0 +1,129 @@
+From cc5fce6315dcc1127a3e2106223305ff763be815 Mon Sep 17 00:00:00 2001
+From: Hans Petter Jansson <hpj@copyleft.no>
+Date: Thu, 10 Nov 2005 19:13:00 +0000
+Subject: [PATCH] pixops: Special-case compositing/copying with no scaling
+
+When there is no scaling involved, make gdk_pixbuf_composite_color()
+faster by avoiding the scaling code path.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=80927
+---
+ gdk-pixbuf/pixops/pixops.c | 95 +++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 90 insertions(+), 5 deletions(-)
+
+diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
+index 993223e..29a1c14 100644
+--- a/gdk-pixbuf/pixops/pixops.c
++++ b/gdk-pixbuf/pixops/pixops.c
+@@ -421,6 +421,86 @@ pixops_composite_nearest (guchar *dest_buf,
+ }
+
+ static void
++pixops_composite_nearest_noscale (guchar *dest_buf,
++ int render_x0,
++ int render_y0,
++ int render_x1,
++ int render_y1,
++ int dest_rowstride,
++ int dest_channels,
++ gboolean dest_has_alpha,
++ const guchar *src_buf,
++ int src_width,
++ int src_height,
++ int src_rowstride,
++ int src_channels,
++ gboolean src_has_alpha,
++ int overall_alpha)
++{
++ int i, j;
++ int x;
++
++ for (i = 0; i < (render_y1 - render_y0); i++)
++ {
++ const guchar *src = src_buf + (i + render_y0) * src_rowstride;
++ guchar *dest = dest_buf + i * dest_rowstride;
++
++ x = render_x0 * src_channels;
++
++ for (j=0; j < (render_x1 - render_x0); j++)
++ {
++ const guchar *p = src + x;
++ unsigned int a0;
++
++ if (src_has_alpha)
++ a0 = (p[3] * overall_alpha) / 0xff;
++ else
++ a0 = overall_alpha;
++
++ switch (a0)
++ {
++ case 0:
++ break;
++ case 255:
++ dest[0] = p[0];
++ dest[1] = p[1];
++ dest[2] = p[2];
++ if (dest_has_alpha)
++ dest[3] = 0xff;
++ break;
++ default:
++ if (dest_has_alpha)
++ {
++ unsigned int w0 = 0xff * a0;
++ unsigned int w1 = (0xff - a0) * dest[3];
++ unsigned int w = w0 + w1;
++
++ dest[0] = (w0 * p[0] + w1 * dest[0]) / w;
++ dest[1] = (w0 * p[1] + w1 * dest[1]) / w;
++ dest[2] = (w0 * p[2] + w1 * dest[2]) / w;
++ dest[3] = w / 0xff;
++ }
++ else
++ {
++ unsigned int a1 = 0xff - a0;
++ unsigned int tmp;
++
++ tmp = a0 * p[0] + a1 * dest[0] + 0x80;
++ dest[0] = (tmp + (tmp >> 8)) >> 8;
++ tmp = a0 * p[1] + a1 * dest[1] + 0x80;
++ dest[1] = (tmp + (tmp >> 8)) >> 8;
++ tmp = a0 * p[2] + a1 * dest[2] + 0x80;
++ dest[2] = (tmp + (tmp >> 8)) >> 8;
++ }
++ break;
++ }
++ dest += dest_channels;
++ x += src_channels;
++ }
++ }
++}
++
++static void
+ pixops_composite_color_nearest (guchar *dest_buf,
+ int render_x0,
+ int render_y0,
+@@ -1781,11 +1861,16 @@ _pixops_composite_real (guchar *dest_buf,
+
+ if (interp_type == PIXOPS_INTERP_NEAREST)
+ {
+- pixops_composite_nearest (dest_buf, render_x0, render_y0, render_x1,
+- render_y1, dest_rowstride, dest_channels,
+- dest_has_alpha, src_buf, src_width, src_height,
+- src_rowstride, src_channels, src_has_alpha,
+- scale_x, scale_y, overall_alpha);
++ if (scale_x == 1.0 && scale_y == 1.0)
++ pixops_composite_nearest_noscale (dest_buf, render_x0, render_y0, render_x1, render_y1,
++ dest_rowstride, dest_channels, dest_has_alpha,
++ src_buf, src_width, src_height, src_rowstride, src_channels,
++ src_has_alpha, overall_alpha);
++ else
++ pixops_composite_nearest (dest_buf, render_x0, render_y0, render_x1, render_y1,
++ dest_rowstride, dest_channels, dest_has_alpha,
++ src_buf, src_width, src_height, src_rowstride, src_channels,
++ src_has_alpha, scale_x, scale_y, overall_alpha);
+ return;
+ }
+
+--
+2.5.1
+
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.5-pixops-overflow.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.5-pixops-overflow.patch
new file mode 100644
index 0000000..6f28dfd
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.5-pixops-overflow.patch
@@ -0,0 +1,38 @@
+From 8dba67cb4f38d62a47757741ad41e3f245b4a32a Mon Sep 17 00:00:00 2001
+From: Benjamin Otte <otte@redhat.com>
+Date: Mon, 17 Aug 2015 18:52:47 +0200
+Subject: [PATCH] pixops: Fix oversight for CVE-2015-4491
+
+The n_x variable could be made large enough to overflow, too.
+
+Also included are various testcases for this vulnerability:
+- The original exploit (adapted for the testsuite)
+- Causing overflow by making both X and Y variables large
+- Causing overflow using only the X variable
+- Causing overflow using only the Y variable
+
+https://bugzilla.gnome.org/show_bug.cgi?id=752297
+---
+ gdk-pixbuf/pixops/pixops.c | 6 ++-
+ 1 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
+index ce51745..7f2cbff 100644
+--- a/gdk-pixbuf/pixops/pixops.c
++++ b/gdk-pixbuf/pixops/pixops.c
+@@ -1275,7 +1275,11 @@ make_filter_table (PixopsFilter *filter)
+ gsize n_weights;
+ int *weights;
+
+- n_weights = SUBSAMPLE * SUBSAMPLE * n_x * n_y;
++ n_weights = SUBSAMPLE * SUBSAMPLE * n_x;
++ if (n_weights / (SUBSAMPLE * SUBSAMPLE) != n_x)
++ return NULL; /* overflow, bail */
++
++ n_weights *= n_y;
+ if (n_weights / (SUBSAMPLE * SUBSAMPLE * n_x) != n_y)
+ return NULL; /* overflow, bail */
+
+--
+2.5.1
+
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-alpha-overflow-rebased.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-alpha-overflow-rebased.patch
new file mode 100644
index 0000000..647dd59
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-alpha-overflow-rebased.patch
@@ -0,0 +1,79 @@
+From 2937faff06629e224f113a9af73eba59f65c3845 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Mon, 24 Aug 2015 15:20:08 -0400
+Subject: [PATCH] Avoid integer overflow in gdk_pixbuf_add_alpha
+
+Same as before: don't do ptr = base + y * rowstride if y and
+rowstride are integers.
+
+This should fix http://bugzilla.gnome/org/753569
+---
+ gdk-pixbuf/gdk-pixbuf-util.c | 23 +++++++++++++++--------
+ 1 file changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/gdk-pixbuf/gdk-pixbuf-util.c b/gdk-pixbuf/gdk-pixbuf-util.c
+index 6fbaa8e..6eea4c3 100644
+--- a/gdk-pixbuf/gdk-pixbuf-util.c
++++ b/gdk-pixbuf/gdk-pixbuf-util.c
+@@ -65,12 +65,18 @@ gdk_pixbuf_add_alpha (const GdkPixbuf *pixbuf,
+ {
+ GdkPixbuf *new_pixbuf;
+ int x, y;
++ const guint8 *src_pixels;
++ guint8 *ret_pixels;
++ const guchar *src;
++ guchar *dest;
+
+ g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
+ g_return_val_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB, NULL);
+ g_return_val_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4, NULL);
+ g_return_val_if_fail (pixbuf->bits_per_sample == 8, NULL);
+
++ src_pixels = pixbuf->pixels;
++
+ if (pixbuf->has_alpha) {
+ new_pixbuf = gdk_pixbuf_copy (pixbuf);
+ if (!new_pixbuf)
+@@ -81,17 +87,18 @@ gdk_pixbuf_add_alpha (const GdkPixbuf *pixbuf,
+ } else {
+ new_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, pixbuf->width, pixbuf->height);
+ }
+-
++
+ if (!new_pixbuf)
+ return NULL;
+
+- for (y = 0; y < pixbuf->height; y++) {
+- guchar *src, *dest;
++ ret_pixels = new_pixbuf->pixels;
++
++ for (y = 0; y < pixbuf->height; y++, src_pixels += pixbuf->rowstride, ret_pixels += new_pixbuf->rowstride) {
+ guchar tr, tg, tb;
+
+- src = pixbuf->pixels + y * pixbuf->rowstride;
+- dest = new_pixbuf->pixels + y * new_pixbuf->rowstride;
+-
++ src = src_pixels;
++ dest = ret_pixels;
++
+ if (pixbuf->has_alpha) {
+ /* Just subst color, we already copied everything else */
+ for (x = 0; x < pixbuf->width; x++) {
+@@ -100,12 +107,12 @@ gdk_pixbuf_add_alpha (const GdkPixbuf *pixbuf,
+ src += 4;
+ dest += 4;
+ }
+- } else {
++ } else {
+ for (x = 0; x < pixbuf->width; x++) {
+ tr = *dest++ = *src++;
+ tg = *dest++ = *src++;
+ tb = *dest++ = *src++;
+-
++
+ if (substitute_color && tr == r && tg == g && tb == b)
+ *dest++ = 0;
+ else
+--
+2.5.1
+
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-jpeg-overflow.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-jpeg-overflow.patch
new file mode 100644
index 0000000..ebec196
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-jpeg-overflow.patch
@@ -0,0 +1,35 @@
+From fde8d1d12a32740770253e97ddc9602654e16865 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Mon, 24 Aug 2015 15:48:51 -0400
+Subject: [PATCH] jpeg: Fix some integer overflows
+
+Similar to the previous commit.
+---
+ gdk-pixbuf/io-jpeg.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
+index fa6bec1..eb48aed 100644
+--- a/gdk-pixbuf/io-jpeg.c
++++ b/gdk-pixbuf/io-jpeg.c
+@@ -886,7 +886,7 @@ gdk_pixbuf__jpeg_image_load_lines (JpegProgContext *context,
+ return FALSE;
+ }
+
+- context->dptr += nlines * context->pixbuf->rowstride;
++ context->dptr += (gsize)nlines * context->pixbuf->rowstride;
+
+ /* send updated signal */
+ if (context->updated_func)
+@@ -1494,7 +1494,7 @@ real_save_jpeg (GdkPixbuf *pixbuf,
+ while (cinfo.next_scanline < cinfo.image_height) {
+ /* convert scanline from ARGB to RGB packed */
+ for (j = 0; j < w; j++)
+- memcpy (&(buf[j*3]), &(ptr[i*rowstride + j*n_channels]), 3);
++ memcpy (&(buf[j*3]), &(ptr[(gsize)i*rowstride + j*n_channels]), 3);
+
+ /* write scanline */
+ jbuf = (JSAMPROW *)(&buf);
+--
+2.5.1
+
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-pixops-gcc-optimizer.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-pixops-gcc-optimizer.patch
new file mode 100644
index 0000000..bd957b7
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-pixops-gcc-optimizer.patch
@@ -0,0 +1,46 @@
+From dd4b061c27dc0865c8f8987d294de6e04b321c18 Mon Sep 17 00:00:00 2001
+From: Benjamin Otte <otte@redhat.com>
+Date: Sat, 22 Aug 2015 23:06:23 +0200
+Subject: [PATCH] pixops: Be smarter than gcc's optimizer
+
+gcc realizes that the overflow checks aren't necessary. Why not?
+
+Well, if an int overflows, the behavior is undefined. And turning on
+-fomit-instructions is valid behavior in an undefined situation.
+---
+ gdk-pixbuf/pixops/pixops.c | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
+index b7951c7..5564a40 100644
+--- a/gdk-pixbuf/pixops/pixops.c
++++ b/gdk-pixbuf/pixops/pixops.c
+@@ -1272,18 +1272,17 @@ make_filter_table (PixopsFilter *filter)
+ int i_offset, j_offset;
+ int n_x = filter->x.n;
+ int n_y = filter->y.n;
+- int n_weights;
+ int *weights;
+
+- n_weights = SUBSAMPLE * SUBSAMPLE * n_x;
+- if (n_weights / (SUBSAMPLE * SUBSAMPLE) != n_x)
+- return NULL; /* overflow, bail */
++ /* check n_x doesn't overflow */
++ if (G_MAXINT / (SUBSAMPLE * SUBSAMPLE) < n_x)
++ return NULL;
+
+- n_weights *= n_y;
+- if (n_weights / (SUBSAMPLE * SUBSAMPLE * n_x) != n_y)
+- return NULL; /* overflow, bail */
++ /* check n_y doesn't overflow */
++ if (G_MAXINT / (SUBSAMPLE * SUBSAMPLE * n_x) < n_y)
++ return NULL;
+
+- weights = g_try_new (int, n_weights);
++ weights = g_try_new (int, SUBSAMPLE * SUBSAMPLE * n_x * n_y);
+ if (!weights)
+ return NULL; /* overflow, bail */
+
+--
+2.5.1
+
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-pixops-overflow-rebased.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-pixops-overflow-rebased.patch
new file mode 100644
index 0000000..cb94784
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-pixops-overflow-rebased.patch
@@ -0,0 +1,162 @@
+From 6df428ba24d8f244d08c4a205053e26b28cee0a9 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Mon, 24 Aug 2015 14:44:50 -0400
+Subject: [PATCH] Fix some more integer overflows
+
+The scaling code had a similar problem to the one fixed in the
+previous commit: Expressions like ptr = base + y * rowstride are
+prone to overflow if y and rowstride are (possibly large) integers.
+---
+ gdk-pixbuf/pixops/pixops.c | 44 ++++++++++++++++++++++----------------------
+ 1 file changed, 22 insertions(+), 22 deletions(-)
+
+diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
+index 993223e..33aa32e 100644
+--- a/gdk-pixbuf/pixops/pixops.c
++++ b/gdk-pixbuf/pixops/pixops.c
+@@ -304,8 +304,8 @@ pixops_scale_nearest (guchar *dest_buf,
+ guchar *dest;
+ y_pos = ((i + render_y0) * y_step + y_step / 2) >> SCALE_SHIFT;
+ y_pos = CLAMP (y_pos, 0, src_height - 1);
+- src = src_buf + y_pos * src_rowstride;
+- dest = dest_buf + i * dest_rowstride;
++ src = src_buf + (gsize)y_pos * src_rowstride;
++ dest = dest_buf + (gsize)i * dest_rowstride;
+
+ x = render_x0 * x_step + x_step / 2;
+
+@@ -368,8 +368,8 @@ pixops_composite_nearest (guchar *dest_buf,
+ guchar *dest;
+ y_pos = ((i + render_y0) * y_step + y_step / 2) >> SCALE_SHIFT;
+ y_pos = CLAMP (y_pos, 0, src_height - 1);
+- src = src_buf + y_pos * src_rowstride;
+- dest = dest_buf + i * dest_rowstride;
++ src = src_buf + (gsize)y_pos * src_rowstride;
++ dest = dest_buf + (gsize)i * dest_rowstride;
+
+ x = render_x0 * x_step + x_step / 2;
+
+@@ -460,8 +460,8 @@ pixops_composite_color_nearest (guchar *dest_buf,
+ guchar *dest;
+ y_pos = ((i + render_y0) * y_step + y_step / 2) >> SCALE_SHIFT;
+ y_pos = CLAMP (y_pos, 0, src_height - 1);
+- src = src_buf + y_pos * src_rowstride;
+- dest = dest_buf + i * dest_rowstride;
++ src = src_buf + (gsize)y_pos * src_rowstride;
++ dest = dest_buf + (gsize)i * dest_rowstride;
+
+ x = render_x0 * x_step + x_step / 2;
+
+@@ -1303,7 +1303,7 @@ pixops_process (guchar *dest_buf,
+ guchar *new_outbuf;
+ guint32 tcolor1, tcolor2;
+
+- guchar *outbuf = dest_buf + dest_rowstride * i;
++ guchar *outbuf = dest_buf + (gsize)dest_rowstride * i;
+ guchar *outbuf_end = outbuf + dest_channels * (render_x1 - render_x0);
+
+ if (((i + check_y) >> check_shift) & 1)
+@@ -1322,9 +1322,9 @@ pixops_process (guchar *dest_buf,
+ if (y_start < 0)
+ line_bufs[j] = (guchar *)src_buf;
+ else if (y_start < src_height)
+- line_bufs[j] = (guchar *)src_buf + src_rowstride * y_start;
++ line_bufs[j] = (guchar *)src_buf + (gsize)src_rowstride * y_start;
+ else
+- line_bufs[j] = (guchar *)src_buf + src_rowstride * (src_height - 1);
++ line_bufs[j] = (guchar *)src_buf + (gsize)src_rowstride * (src_height - 1);
+
+ y_start++;
+ }
+@@ -1348,7 +1348,7 @@ pixops_process (guchar *dest_buf,
+ }
+
+ new_outbuf = (*line_func) (run_weights, filter->x.n, filter->y.n,
+- outbuf, dest_x, dest_buf + dest_rowstride *
++ outbuf, dest_x, dest_buf + (gsize)dest_rowstride *
+ i + run_end_index * dest_channels,
+ dest_channels, dest_has_alpha,
+ line_bufs, src_channels, src_has_alpha,
+@@ -1866,7 +1866,7 @@ _pixops_composite (guchar *dest_buf,
+ return;
+ #endif
+
+- new_dest_buf = dest_buf + dest_y * dest_rowstride + dest_x * dest_channels;
++ new_dest_buf = dest_buf + (gsize)dest_y * dest_rowstride + (gsize)dest_x * dest_channels;
+ render_x0 = dest_x - offset_x;
+ render_y0 = dest_y - offset_y;
+ render_x1 = dest_x + dest_region_width - offset_x;
+@@ -2026,7 +2026,7 @@ pixops_medialib_composite (guchar *dest_buf,
+ if (!use_medialib)
+ {
+ /* Use non-mediaLib version */
+- _pixops_composite_real (dest_buf + dest_y * dest_rowstride + dest_x *
++ _pixops_composite_real (dest_buf + (gsize)dest_y * dest_rowstride + (gsize)dest_x *
+ dest_channels, dest_x - offset_x, dest_y -
+ offset_y, dest_x + dest_region_width - offset_x,
+ dest_y + dest_region_height - offset_y,
+@@ -2068,8 +2068,8 @@ pixops_medialib_composite (guchar *dest_buf,
+ }
+ else
+ {
+- mlib_u8 *data = dest_buf + (dest_y * dest_rowstride) +
+- (dest_x * dest_channels);
++ mlib_u8 *data = dest_buf + (gsize)dest_y * dest_rowstride +
++ (gsize)dest_x * dest_channels;
+
+ mlib_ImageSetStruct (&img_dest, MLIB_BYTE, dest_channels,
+ dest_region_width, dest_region_height,
+@@ -2136,8 +2136,8 @@ pixops_medialib_composite (guchar *dest_buf,
+ else
+ {
+ /* Should not happen - Use non-mediaLib version */
+- _pixops_composite_real (dest_buf + dest_y * dest_rowstride +
+- dest_x * dest_channels,
++ _pixops_composite_real (dest_buf + (gsize)dest_y * dest_rowstride +
++ (gsize)dest_x * dest_channels,
+ dest_x - offset_x, dest_y - offset_y,
+ dest_x + dest_region_width - offset_x,
+ dest_y + dest_region_height - offset_y,
+@@ -2260,7 +2260,7 @@ _pixops_scale (guchar *dest_buf,
+ return;
+ #endif
+
+- new_dest_buf = dest_buf + dest_y * dest_rowstride + dest_x * dest_channels;
++ new_dest_buf = dest_buf + (gsize)dest_y * dest_rowstride + (gsize)dest_x * dest_channels;
+ render_x0 = dest_x - offset_x;
+ render_y0 = dest_y - offset_y;
+ render_x1 = dest_x + dest_region_width - offset_x;
+@@ -2314,8 +2314,8 @@ pixops_medialib_scale (guchar *dest_buf,
+ */
+ if (!use_medialib)
+ {
+- _pixops_scale_real (dest_buf + dest_y * dest_rowstride + dest_x *
+- dest_channels, dest_x - offset_x, dest_y - offset_y,
++ _pixops_scale_real (dest_buf + (gsize)dest_y * dest_rowstride + (gsize)dest_x *
++ dest_channels, dest_x - offset_x, dest_y - offset_y,
+ dest_x + dest_region_width - offset_x,
+ dest_y + dest_region_height - offset_y,
+ dest_rowstride, dest_channels, dest_has_alpha,
+@@ -2343,8 +2343,8 @@ pixops_medialib_scale (guchar *dest_buf,
+ }
+ else
+ {
+- mlib_u8 *data = dest_buf + (dest_y * dest_rowstride) +
+- (dest_x * dest_channels);
++ mlib_u8 *data = dest_buf + (gsize)dest_y * dest_rowstride +
++ (gsize)dest_x * dest_channels;
+
+ mlib_ImageSetStruct (&img_dest, MLIB_BYTE, dest_channels,
+ dest_region_width, dest_region_height,
+@@ -2379,7 +2379,7 @@ pixops_medialib_scale (guchar *dest_buf,
+ int channels = 3;
+ int rowstride = (channels * src_width + 3) & ~3;
+
+- tmp_buf = g_malloc (src_rowstride * src_height);
++ tmp_buf = g_malloc_n (src_rowstride, src_height);
+
+ if (src_buf != NULL)
+ {
+--
+2.5.1
+
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-pixops-variable-type.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-pixops-variable-type.patch
new file mode 100644
index 0000000..a83535f
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-pixops-variable-type.patch
@@ -0,0 +1,37 @@
+From 3df91dc6c6f8d1421e9c8756959280de792af77a Mon Sep 17 00:00:00 2001
+From: Benjamin Otte <otte@redhat.com>
+Date: Sat, 22 Aug 2015 17:57:23 +0200
+Subject: [PATCH] pixops: Chane variable type
+
+n_weights is used to do overflow checks. So by reducing the size to 32
+bits signed we overflow earlier. This is necessary because further down
+the code lots of code uses int variables to iterate over this variable
+and we don't want those to overflow.
+
+The correct fix would be to make all those variables gsize too, but
+that's way more invasive and requires different checks in different
+places so I'm not gonna do that now.
+And as long as scale factors are not expected to reach G_MAXINT it's not
+really necessary to do this change anyway.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=753908
+---
+ gdk-pixbuf/pixops/pixops.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
+index 7f2cbff..b7951c7 100644
+--- a/gdk-pixbuf/pixops/pixops.c
++++ b/gdk-pixbuf/pixops/pixops.c
+@@ -1272,7 +1272,7 @@ make_filter_table (PixopsFilter *filter)
+ int i_offset, j_offset;
+ int n_x = filter->x.n;
+ int n_y = filter->y.n;
+- gsize n_weights;
++ int n_weights;
+ int *weights;
+
+ n_weights = SUBSAMPLE * SUBSAMPLE * n_x;
+--
+2.5.1
+
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-png-overflow.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-png-overflow.patch
new file mode 100644
index 0000000..83c67b5
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-png-overflow.patch
@@ -0,0 +1,72 @@
+From 8714ab407c54d5989d15a78eb15550c2d52d95b8 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Mon, 24 Aug 2015 14:13:37 -0400
+Subject: [PATCH] png: Fix some integer overflows
+
+The png loader was not careful enough in some places. Width * height
+can overflow an integer.
+
+This should fix http://bugzilla.gnome.org/734556.
+---
+ gdk-pixbuf/io-png.c | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c
+index 3336b1e..5690875 100644
+--- a/gdk-pixbuf/io-png.c
++++ b/gdk-pixbuf/io-png.c
+@@ -267,6 +267,7 @@ gdk_pixbuf__png_image_load (FILE *f, GError **error)
+ gchar *density_str;
+ guint32 retval;
+ gint compression_type;
++ gpointer ptr;
+
+ #ifdef PNG_USER_MEM_SUPPORTED
+ png_ptr = png_create_read_struct_2 (PNG_LIBPNG_VER_STRING,
+@@ -326,8 +327,8 @@ gdk_pixbuf__png_image_load (FILE *f, GError **error)
+
+ rows = g_new (png_bytep, h);
+
+- for (i = 0; i < h; i++)
+- rows[i] = pixbuf->pixels + i * pixbuf->rowstride;
++ for (i = 0, ptr = pixbuf->pixels; i < h; i++, ptr += pixbuf->rowstride)
++ rows[i] = ptr;
+
+ png_read_image (png_ptr, rows);
+ png_read_end (png_ptr, info_ptr);
+@@ -745,6 +746,7 @@ png_row_callback (png_structp png_read_ptr,
+ {
+ LoadContext* lc;
+ guchar* old_row = NULL;
++ gsize rowstride;
+
+ lc = png_get_progressive_ptr(png_read_ptr);
+
+@@ -770,8 +772,9 @@ png_row_callback (png_structp png_read_ptr,
+ lc->max_row_seen_in_chunk = MAX(lc->max_row_seen_in_chunk, ((gint)row_num));
+ lc->last_row_seen_in_chunk = row_num;
+ lc->last_pass_seen_in_chunk = pass_num;
+-
+- old_row = lc->pixbuf->pixels + (row_num * lc->pixbuf->rowstride);
++
++ rowstride = lc->pixbuf->rowstride;
++ old_row = lc->pixbuf->pixels + (row_num * rowstride);
+
+ png_progressive_combine_row(lc->png_read_ptr, old_row, new_row);
+ }
+@@ -1123,11 +1126,9 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
+ png_set_shift (png_ptr, &sig_bit);
+ png_set_packing (png_ptr);
+
+- ptr = pixels;
+- for (y = 0; y < h; y++) {
++ for (y = 0, ptr = pixels; y < h; y++, ptr += rowstride) {
+ row_ptr = (png_bytep)ptr;
+ png_write_rows (png_ptr, &row_ptr, 1);
+- ptr += rowstride;
+ }
+
+ png_write_end (png_ptr, info_ptr);
+--
+2.5.1
+
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-rotate-overflow.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-rotate-overflow.patch
new file mode 100644
index 0000000..fa6b90c
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.6-rotate-overflow.patch
@@ -0,0 +1,27 @@
+From 4f68cb78a5277f169b9531e6998c00c7976594e4 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Mon, 24 Aug 2015 15:29:36 -0400
+Subject: [PATCH] Avoid integer overflow in gdk_pixbuf_rotate_simple
+
+Same as before: don't do ptr = base + y * rowstride if y and
+rowstride are integers.
+---
+ gdk-pixbuf/gdk-pixbuf-scale.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdk-pixbuf/gdk-pixbuf-scale.c b/gdk-pixbuf/gdk-pixbuf-scale.c
+index 4288c65..475126a 100644
+--- a/gdk-pixbuf/gdk-pixbuf-scale.c
++++ b/gdk-pixbuf/gdk-pixbuf-scale.c
+@@ -396,7 +396,7 @@ gdk_pixbuf_composite_color_simple (const GdkPixbuf *src,
+ return dest;
+ }
+
+-#define OFFSET(pb, x, y) ((x) * (pb)->n_channels + (y) * (pb)->rowstride)
++#define OFFSET(pb, x, y) ((x) * (pb)->n_channels + (gsize)(y) * (pb)->rowstride)
+
+ /**
+ * gdk_pixbuf_rotate_simple:
+--
+2.5.1
+
diff --git a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8-r2.ebuild b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8-r2.ebuild
new file mode 100644
index 0000000..eb578ac
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.30.8-r2.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit eutils flag-o-matic gnome2 multilib libtool multilib-minimal
+
+DESCRIPTION="Image loading library for GTK+"
+HOMEPAGE="http://www.gtk.org/"
+
+LICENSE="LGPL-2+"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+X debug +introspection jpeg jpeg2k tiff test"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
+ >=media-libs/libpng-1.4:0=[${MULTILIB_USEDEP}]
+ introspection? ( >=dev-libs/gobject-introspection-0.9.3 )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ jpeg2k? ( media-libs/jasper:=[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-3.9.2:0=[${MULTILIB_USEDEP}] )
+ X? ( x11-libs/libX11[${MULTILIB_USEDEP}] )
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/gtk-doc-am-1.20
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+"
+# librsvg blocker is for the new pixbuf loader API, you lose icons otherwise
+RDEPEND="${COMMON_DEPEND}
+ !<gnome-base/gail-1000
+ !<gnome-base/librsvg-2.31.0
+ !<x11-libs/gtk+-2.21.3:2
+ !<x11-libs/gtk+-2.90.4:3
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-gtklibs-20131008-r2
+ !app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)]
+ )
+"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gdk-pixbuf-query-loaders
+)
+
+src_prepare() {
+ # Upstream patches from 2.31.x
+ epatch "${FILESDIR}"/${PN}-2.30.8-divide-by-zero.patch \
+ "${FILESDIR}"/${PN}-2.30.8-pixops-overflow.patch \
+ "${FILESDIR}"/${PN}-2.31.5-pixops-overflow.patch \
+ "${FILESDIR}"/${PN}-2.31.6-pixops-variable-type.patch \
+ "${FILESDIR}"/${PN}-2.31.6-pixops-gcc-optimizer.patch \
+ "${FILESDIR}"/${PN}-2.31.6-png-overflow.patch \
+ "${FILESDIR}"/${PN}-2.31.6-jpeg-overflow.patch \
+ "${FILESDIR}"/${PN}-2.31.6-pixops-overflow-rebased.patch \
+ "${FILESDIR}"/${PN}-2.31.6-alpha-overflow-rebased.patch \
+ "${FILESDIR}"/${PN}-2.31.6-rotate-overflow.patch #556314
+
+ # This will avoid polluting the pkg-config file with versioned libpng,
+ # which is causing problems with libpng14 -> libpng15 upgrade
+ # See upstream bug #667068
+ # First check that the pattern is present, to catch upstream changes on bumps,
+ # because sed doesn't return failure code if it doesn't do any replacements
+ grep -q 'l in libpng16' configure || die "libpng check order has changed upstream"
+ sed -e 's:l in libpng16:l in libpng libpng16:' -i configure || die
+ [[ ${CHOST} == *-solaris* ]] && append-libs intl
+
+ gnome2_src_prepare
+}
+
+multilib_src_configure() {
+ # png always on to display icons
+ ECONF_SOURCE="${S}" \
+ gnome2_src_configure \
+ $(usex debug --enable-debug=yes "") \
+ $(use_with jpeg libjpeg) \
+ $(use_with jpeg2k libjasper) \
+ $(use_with tiff libtiff) \
+ $(multilib_native_use_enable introspection) \
+ $(use_with X x11) \
+ --with-libpng
+
+ # work-around gtk-doc out-of-source brokedness
+ if multilib_is_native_abi; then
+ ln -s "${S}"/docs/reference/${PN}/html docs/reference/${PN}/html || die
+ fi
+}
+
+multilib_src_install() {
+ # Parallel install fails when no gdk-pixbuf is already installed, bug #481372
+ MAKEOPTS="${MAKEOPTS} -j1" gnome2_src_install
+}
+
+pkg_preinst() {
+ gnome2_pkg_preinst
+
+ multilib_pkg_preinst() {
+ # Make sure loaders.cache belongs to gdk-pixbuf alone
+ local cache="usr/$(get_libdir)/${PN}-2.0/2.10.0/loaders.cache"
+
+ if [[ -e ${EROOT}${cache} ]]; then
+ cp "${EROOT}"${cache} "${ED}"/${cache} || die
+ else
+ touch "${ED}"/${cache} || die
+ fi
+ }
+
+ multilib_foreach_abi multilib_pkg_preinst
+}
+
+pkg_postinst() {
+ # causes segfault if set, see bug 375615
+ unset __GL_NO_DSO_FINALIZER
+
+ multilib_foreach_abi gnome2_pkg_postinst
+
+ # Migration snippet for when this was handled by gtk+
+ if [ -e "${EROOT}"usr/lib/gtk-2.0/2.*/loaders ]; then
+ elog "You need to rebuild ebuilds that installed into" "${EROOT}"usr/lib/gtk-2.0/2.*/loaders
+ elog "to do that you can use qfile from portage-utils:"
+ elog "emerge -va1 \$(qfile -qC ${EPREFIX}/usr/lib/gtk-2.0/2.*/loaders)"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+
+ if [[ -z ${REPLACED_BY_VERSIONS} ]]; then
+ rm -f "${EROOT}"usr/lib*/${PN}-2.0/2.10.0/loaders.cache
+ fi
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/gdk-pixbuf/, x11-libs/gdk-pixbuf/files/
@ 2015-10-12 23:33 Alexandre Rostovtsev
0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Rostovtsev @ 2015-10-12 23:33 UTC (permalink / raw
To: gentoo-commits
commit: 1dfb62b200770993df34d207358805fba6612605
Author: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 12 23:19:17 2015 +0000
Commit: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
CommitDate: Mon Oct 12 23:33:34 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dfb62b2
x11-libs/gdk-pixbuf: bump to 2.32.1, fixes heap overflows
Fixes multiple heap overflows (CVE-2015-7673, CVE-2015-7674).
Drops support for wbmp, ras, pcx formats.
Fixes support for icns and 256x256 ico formats.
Gentoo-Bug: 562878, 562880
Reported-by: Agostino Sarubbo
x11-libs/gdk-pixbuf/Manifest | 1 +
.../gdk-pixbuf-2.32.1-gint64-shift-overflow.patch | 81 +++++++++++++
x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.1.ebuild | 129 +++++++++++++++++++++
3 files changed, 211 insertions(+)
diff --git a/x11-libs/gdk-pixbuf/Manifest b/x11-libs/gdk-pixbuf/Manifest
index 3bbc8ef..a6dadd3 100644
--- a/x11-libs/gdk-pixbuf/Manifest
+++ b/x11-libs/gdk-pixbuf/Manifest
@@ -1 +1,2 @@
DIST gdk-pixbuf-2.30.8.tar.xz 1336788 SHA256 4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be SHA512 2888cf035b70330e8d3ac87af54b69b2c990440fd59922464088d2a685e90022ad39c83d1ce1ccccfac3872b55ce9445ec4a3e9c7ab6371e20b19e20df7f261d WHIRLPOOL e7f69807ed629c5703750a91cc7a95ee2b3aa178a74c9197c20f863648436a023d140cf1274ba38369e8da3d77216bb1fcc66bae5b612ee8ee33ee4b42e11d65
+DIST gdk-pixbuf-2.32.1.tar.xz 2427908 SHA256 4432b74f25538c7d6bcb3ca51adabdd666168955f25812a2568dc9637697f3bc SHA512 4c744f166e86c17cafebe0db9434794666b64850a60597e34675cf9b902e48e89c3ff45032a10899944ae59b6c0db63c1ff33c4d2c50846393e77bad3a3adec2 WHIRLPOOL 566b73752c1e478fdf7011c3d2222ea39eb13052741c70a0dffd6a0800e892e951207856b90e0d20c352981565682dec28c51fc4951f2236767e97c838d239a2
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.32.1-gint64-shift-overflow.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.32.1-gint64-shift-overflow.patch
new file mode 100644
index 0000000..273956e
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.32.1-gint64-shift-overflow.patch
@@ -0,0 +1,81 @@
+From 2fb6bce8b3fdae67b8cdd93f253dad3743fc01b8 Mon Sep 17 00:00:00 2001
+From: Mike Gorse <mgorse@suse.com>
+Date: Tue, 6 Oct 2015 11:46:24 -0500
+Subject: [PATCH] pixops: use gint64 in more places to avoid overflow when
+ shifting
+
+---
+ gdk-pixbuf/pixops/pixops.c | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
+index b0abecd..6a4a096 100644
+--- a/gdk-pixbuf/pixops/pixops.c
++++ b/gdk-pixbuf/pixops/pixops.c
+@@ -354,11 +354,11 @@ pixops_composite_nearest (guchar *dest_buf,
+ double scale_y,
+ int overall_alpha)
+ {
+- int i;
+- int x;
+- int x_step = (1 << SCALE_SHIFT) / scale_x;
+- int y_step = (1 << SCALE_SHIFT) / scale_y;
+- int xmax, xstart, xstop, x_pos, y_pos;
++ gint64 i;
++ gint64 x;
++ gint64 x_step = (1 << SCALE_SHIFT) / scale_x;
++ gint64 y_step = (1 << SCALE_SHIFT) / scale_y;
++ gint64 xmax, xstart, xstop, x_pos, y_pos;
+ const guchar *p;
+ unsigned int a0;
+
+@@ -524,13 +524,13 @@ pixops_composite_color_nearest (guchar *dest_buf,
+ guint32 color1,
+ guint32 color2)
+ {
+- int i, j;
+- int x;
+- int x_step = (1 << SCALE_SHIFT) / scale_x;
+- int y_step = (1 << SCALE_SHIFT) / scale_y;
++ gint64 i, j;
++ gint64 x;
++ gint64 x_step = (1 << SCALE_SHIFT) / scale_x;
++ gint64 y_step = (1 << SCALE_SHIFT) / scale_y;
+ int r1, g1, b1, r2, g2, b2;
+ int check_shift = get_check_shift (check_size);
+- int xmax, xstart, xstop, x_pos, y_pos;
++ gint64 xmax, xstart, xstop, x_pos, y_pos;
+ const guchar *p;
+ unsigned int a0;
+
+@@ -1338,20 +1338,20 @@ pixops_process (guchar *dest_buf,
+ PixopsLineFunc line_func,
+ PixopsPixelFunc pixel_func)
+ {
+- int i, j;
+- int x, y; /* X and Y position in source (fixed_point) */
++ gint64 i, j;
++ gint64 x, y; /* X and Y position in source (fixed_point) */
+
+ guchar **line_bufs;
+ int *filter_weights;
+
+- int x_step;
+- int y_step;
++ gint64 x_step;
++ gint64 y_step;
+
+ int check_shift;
+- int scaled_x_offset;
++ gint64 scaled_x_offset;
+
+- int run_end_x;
+- int run_end_index;
++ gint64 run_end_x;
++ gint64 run_end_index;
+
+ x_step = (1 << SCALE_SHIFT) / scale_x; /* X step in source (fixed point) */
+ y_step = (1 << SCALE_SHIFT) / scale_y; /* Y step in source (fixed point) */
+--
+2.6.1
+
diff --git a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.1.ebuild b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.1.ebuild
new file mode 100644
index 0000000..a0ddb14
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit eutils flag-o-matic gnome2 multilib libtool multilib-minimal
+
+DESCRIPTION="Image loading library for GTK+"
+HOMEPAGE="http://www.gtk.org/"
+
+LICENSE="LGPL-2+"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+X debug +introspection jpeg jpeg2k tiff test"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
+ >=media-libs/libpng-1.4:0=[${MULTILIB_USEDEP}]
+ introspection? ( >=dev-libs/gobject-introspection-0.9.3 )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ jpeg2k? ( media-libs/jasper:=[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-3.9.2:0=[${MULTILIB_USEDEP}] )
+ X? ( x11-libs/libX11[${MULTILIB_USEDEP}] )
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/gtk-doc-am-1.20
+ >=sys-devel/gettext-0.19
+ virtual/pkgconfig
+"
+# librsvg blocker is for the new pixbuf loader API, you lose icons otherwise
+RDEPEND="${COMMON_DEPEND}
+ !<gnome-base/gail-1000
+ !<gnome-base/librsvg-2.31.0
+ !<x11-libs/gtk+-2.21.3:2
+ !<x11-libs/gtk+-2.90.4:3
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-gtklibs-20131008-r2
+ !app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)]
+ )
+"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gdk-pixbuf-query-loaders
+)
+
+src_prepare() {
+ # Upstream patches from 2.32.x
+ epatch "${FILESDIR}"/${P}-gint64-shift-overflow.patch
+
+ # ERROR: cve-2015-4491 - missing test plan
+ # FIXME - check if this works in 2.31.7
+ # $sed -e 's/cve-2015-4491$(EXEEXT)//' -i tests/Makefile.in || die
+
+ # This will avoid polluting the pkg-config file with versioned libpng,
+ # which is causing problems with libpng14 -> libpng15 upgrade
+ # See upstream bug #667068
+ # First check that the pattern is present, to catch upstream changes on bumps,
+ # because sed doesn't return failure code if it doesn't do any replacements
+ grep -q 'l in libpng16' configure || die "libpng check order has changed upstream"
+ sed -e 's:l in libpng16:l in libpng libpng16:' -i configure || die
+ [[ ${CHOST} == *-solaris* ]] && append-libs intl
+
+ gnome2_src_prepare
+}
+
+multilib_src_configure() {
+ # png always on to display icons
+ ECONF_SOURCE="${S}" \
+ gnome2_src_configure \
+ $(usex debug --enable-debug=yes "") \
+ $(use_with jpeg libjpeg) \
+ $(use_with jpeg2k libjasper) \
+ $(use_with tiff libtiff) \
+ $(multilib_native_use_enable introspection) \
+ $(use_with X x11) \
+ --with-libpng
+
+ # work-around gtk-doc out-of-source brokedness
+ if multilib_is_native_abi; then
+ ln -s "${S}"/docs/reference/${PN}/html docs/reference/${PN}/html || die
+ fi
+}
+
+multilib_src_install() {
+ # Parallel install fails when no gdk-pixbuf is already installed, bug #481372
+ MAKEOPTS="${MAKEOPTS} -j1" gnome2_src_install
+}
+
+pkg_preinst() {
+ gnome2_pkg_preinst
+
+ multilib_pkg_preinst() {
+ # Make sure loaders.cache belongs to gdk-pixbuf alone
+ local cache="usr/$(get_libdir)/${PN}-2.0/2.10.0/loaders.cache"
+
+ if [[ -e ${EROOT}${cache} ]]; then
+ cp "${EROOT}"${cache} "${ED}"/${cache} || die
+ else
+ touch "${ED}"/${cache} || die
+ fi
+ }
+
+ multilib_foreach_abi multilib_pkg_preinst
+}
+
+pkg_postinst() {
+ # causes segfault if set, see bug 375615
+ unset __GL_NO_DSO_FINALIZER
+
+ multilib_foreach_abi gnome2_pkg_postinst
+
+ # Migration snippet for when this was handled by gtk+
+ if [ -e "${EROOT}"usr/lib/gtk-2.0/2.*/loaders ]; then
+ elog "You need to rebuild ebuilds that installed into" "${EROOT}"usr/lib/gtk-2.0/2.*/loaders
+ elog "to do that you can use qfile from portage-utils:"
+ elog "emerge -va1 \$(qfile -qC ${EPREFIX}/usr/lib/gtk-2.0/2.*/loaders)"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+
+ if [[ -z ${REPLACED_BY_VERSIONS} ]]; then
+ rm -f "${EROOT}"usr/lib*/${PN}-2.0/2.10.0/loaders.cache
+ fi
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/gdk-pixbuf/, x11-libs/gdk-pixbuf/files/
@ 2015-10-14 12:45 Alexandre Rostovtsev
0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Rostovtsev @ 2015-10-14 12:45 UTC (permalink / raw
To: gentoo-commits
commit: 91c97a5dae6ab5ca1fead8aacba2c5e058f38212
Author: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 14 12:39:32 2015 +0000
Commit: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
CommitDate: Wed Oct 14 12:44:56 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91c97a5d
x11-libs/gdk-pixbuf: run glibc-specific test only on glibc
Gentoo-Bug: 563052
Reported-by: Anthony Basile
.../gdk-pixbuf-2.32.1-lowmem-test-glibc.patch | 60 ++++++++++++++++++++++
x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.1.ebuild | 4 +-
2 files changed, 63 insertions(+), 1 deletion(-)
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.32.1-lowmem-test-glibc.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.32.1-lowmem-test-glibc.patch
new file mode 100644
index 0000000..3915dff
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.32.1-lowmem-test-glibc.patch
@@ -0,0 +1,60 @@
+From e1fd25a3d0c18bd941f685bbdf5aa3812403a48e Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 6 Oct 2015 09:11:38 +0200
+Subject: [PATCH] Run only pixbuf-lowmem test on GNU libc
+
+The test case depends on GNU libc specific internals so we only run it
+on GNU libc.
+
+This fixes build on Linux with musl libc.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=756078
+---
+ tests/Makefile.am | 5 -----
+ tests/pixbuf-lowmem.c | 8 ++++++++
+ 2 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 1f09711..2a0325a 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -19,13 +19,8 @@ LDADD = \
+ noinst_PROGRAMS += \
+ pixbuf-read \
+ pixbuf-random \
+- $(NULL)
+-
+-if OS_LINUX
+-noinst_PROGRAMS += \
+ pixbuf-lowmem \
+ $(NULL)
+-endif
+
+ test_programs = \
+ animation \
+diff --git a/tests/pixbuf-lowmem.c b/tests/pixbuf-lowmem.c
+index ae71788..9e9571f 100644
+--- a/tests/pixbuf-lowmem.c
++++ b/tests/pixbuf-lowmem.c
+@@ -24,6 +24,7 @@
+ #include <time.h>
+ #include <string.h>
+
++#ifdef __GLIBC__
+ #define PRETEND_MEM_SIZE (16 * 1024 * 1024)
+ #define REMAINING_MEM_SIZE 100000
+
+@@ -225,3 +226,10 @@ main (int argc, char **argv)
+
+ return 0;
+ }
++#else
++int
++main (int argc, char **argv)
++{
++ return 0;
++}
++#endif
+--
+2.6.1
+
diff --git a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.1.ebuild b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.1.ebuild
index 54226b3..978be55 100644
--- a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.1.ebuild
+++ b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.1.ebuild
@@ -6,7 +6,7 @@ EAPI="5"
GCONF_DEBUG="no"
GNOME2_LA_PUNT="yes"
-inherit eutils flag-o-matic gnome2 multilib libtool multilib-minimal
+inherit autotools eutils flag-o-matic gnome2 multilib libtool multilib-minimal
DESCRIPTION="Image loading library for GTK+"
HOMEPAGE="http://www.gtk.org/"
@@ -49,6 +49,8 @@ MULTILIB_CHOST_TOOLS=(
src_prepare() {
# Upstream patches from 2.32.x
epatch "${FILESDIR}"/${P}-gint64-shift-overflow.patch
+ epatch "${FILESDIR}"/${P}-lowmem-test-glibc.patch #563052, needs eautoreconf
+ eautoreconf
# This will avoid polluting the pkg-config file with versioned libpng,
# which is causing problems with libpng14 -> libpng15 upgrade
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/gdk-pixbuf/, x11-libs/gdk-pixbuf/files/
@ 2016-02-26 12:26 Anthony G. Basile
0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2016-02-26 12:26 UTC (permalink / raw
To: gentoo-commits
commit: 0cde5cef33c8cae17a2c4f96ffecc8d47422cea1
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 26 12:36:18 2016 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Feb 26 12:36:38 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cde5cef
x11-libs/gdk-pixbuf: fix build on uClibc, bug #563052
Upstream doesn't understand the proper use of __GLIBC__ and __UCLIBC__,
which I am trying to convince them of.
See: https://bugzilla.gnome.org/show_bug.cgi?id=756590
Package-Manager: portage-2.2.26
.../gdk-pixbuf-2.32.3-fix-lowmem-uclibc.patch | 34 ++++++++++++++++++++++
x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.3-r1.ebuild | 3 ++
x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.3.ebuild | 3 ++
3 files changed, 40 insertions(+)
diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.32.3-fix-lowmem-uclibc.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.32.3-fix-lowmem-uclibc.patch
new file mode 100644
index 0000000..77ea7e7
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.32.3-fix-lowmem-uclibc.patch
@@ -0,0 +1,34 @@
+From 21b8eb73d9272e06707ad6d0357f3034b8d9a46f Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <blueness@gentoo.org>
+Date: Wed, 14 Oct 2015 16:18:19 -0400
+Subject: [PATCH] tests/pixbuf-lowmem.c: Do not run pixbuf-lowmem test on
+ uClibc
+
+pixbuf-lowmem.c depends on GNU libc internals and does not build
+on musl or uClibc. Commit e1fd25a fixes this issue for musl by
+testing if __GLIBC__ is set. However, uClibc sets __GLIBC__ and
+so this check is insufficient there. We expand the check so that
+we run pixbuf-lowmem on glibc, while avoiding it on both musl and
+uClibc.
+
+Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
+---
+ tests/pixbuf-lowmem.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/pixbuf-lowmem.c b/tests/pixbuf-lowmem.c
+index 9e9571f..ec7504f 100644
+--- a/tests/pixbuf-lowmem.c
++++ b/tests/pixbuf-lowmem.c
+@@ -24,7 +24,7 @@
+ #include <time.h>
+ #include <string.h>
+
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #define PRETEND_MEM_SIZE (16 * 1024 * 1024)
+ #define REMAINING_MEM_SIZE 100000
+
+--
+2.4.9
+
diff --git a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.3-r1.ebuild b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.3-r1.ebuild
index a8fa239..5ca298a 100644
--- a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.3-r1.ebuild
+++ b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.3-r1.ebuild
@@ -43,6 +43,9 @@ MULTILIB_CHOST_TOOLS=(
)
src_prepare() {
+ # See https://bugzilla.gnome.org/show_bug.cgi?id=756590
+ epatch "${FILESDIR}"/${PN}-2.32.3-fix-lowmem-uclibc.patch
+
# This will avoid polluting the pkg-config file with versioned libpng,
# which is causing problems with libpng14 -> libpng15 upgrade
# See upstream bug #667068
diff --git a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.3.ebuild b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.3.ebuild
index 27a8968..b7f6597 100644
--- a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.3.ebuild
+++ b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.32.3.ebuild
@@ -43,6 +43,9 @@ MULTILIB_CHOST_TOOLS=(
)
src_prepare() {
+ # See https://bugzilla.gnome.org/show_bug.cgi?id=756590
+ epatch "${FILESDIR}"/${PN}-2.32.3-fix-lowmem-uclibc.patch
+
# This will avoid polluting the pkg-config file with versioned libpng,
# which is causing problems with libpng14 -> libpng15 upgrade
# See upstream bug #667068
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/gdk-pixbuf/, x11-libs/gdk-pixbuf/files/
@ 2017-09-15 6:43 Gilles Dartiguelongue
0 siblings, 0 replies; 7+ messages in thread
From: Gilles Dartiguelongue @ 2017-09-15 6:43 UTC (permalink / raw
To: gentoo-commits
commit: 17cd70a3a834bbaca8d7618eeb901f0c6f870578
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 15 06:40:41 2017 +0000
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Fri Sep 15 06:42:48 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17cd70a3
x11-libs/gdk-pixbuf: fix TIFF loading support, bug #629716
Closes: https://bugs.gentoo.org/show_bug.cgi?id=629716
Package-Manager: Portage-2.3.8, Repoman-2.3.3
.../gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch | 66 +++++++++++
x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r1.ebuild | 124 +++++++++++++++++++++
2 files changed, 190 insertions(+)
diff --git a/x11-libs/gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch b/x11-libs/gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch
new file mode 100644
index 00000000000..47e62ef9118
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch
@@ -0,0 +1,66 @@
+From 66537d1ecf7e857a0a443c1ebf72baf6f19dd3e4 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Mon, 11 Sep 2017 19:11:50 +0200
+Subject: build: Fix TIFF loader compilation with autotools
+
+https://bugzilla.gnome.org/show_bug.cgi?id=786342
+---
+ configure.ac | 7 +++----
+ gdk-pixbuf/Makefile.am | 2 +-
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0abe5ce..c07bd6f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -564,7 +564,6 @@ dnl Test for libjasper
+ *** --without-libjasper to configure])
+ fi
+
+-AC_SUBST(LIBTIFF)
+ AC_SUBST(LIBJPEG)
+ AC_SUBST(LIBPNG)
+ AC_SUBST(LIBJASPER)
+@@ -676,7 +675,7 @@ if test x$gio_can_sniff = x; then
+ AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])
+ fi
+
+-AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
++AM_CONDITIONAL(HAVE_TIFF, test "x$libtiff_found" != x)
+ AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
+ AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
+ AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
+@@ -684,7 +683,7 @@ AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
+ if $dynworks ; then
+ STATIC_LIB_DEPS=
+ if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
+- STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
++ STATIC_LIB_DEPS="$STATIC_LIB_DEPS $TIFF_LIBS"
+ fi
+ if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
+ STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
+@@ -698,7 +697,7 @@ if $dynworks ; then
+ STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJASPER"
+ fi
+ else
+- STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBJASPER"
++ STATIC_LIB_DEPS="$TIFF_LIBS $LIBJPEG $LIBPNG $LIBJASPER"
+ fi
+
+ # Checks to see whether we should include mediaLib
+diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am
+index 01b693c..720a058 100644
+--- a/gdk-pixbuf/Makefile.am
++++ b/gdk-pixbuf/Makefile.am
+@@ -88,7 +88,7 @@ libpixbufloader_pnm_la_LIBADD = $(module_libs)
+ libstatic_pixbufloader_tiff_la_SOURCES = io-tiff.c
+ libpixbufloader_tiff_la_SOURCES = io-tiff.c
+ libpixbufloader_tiff_la_LDFLAGS = -avoid-version -module $(no_undefined)
+-libpixbufloader_tiff_la_LIBADD = $(LIBTIFF) $(module_libs)
++libpixbufloader_tiff_la_LIBADD = $(TIFF_LIBS) $(module_libs)
+
+ #
+ # The XPM loader
+--
+cgit v0.12
+
diff --git a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r1.ebuild b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r1.ebuild
new file mode 100644
index 00000000000..b56eb7ce266
--- /dev/null
+++ b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_LA_PUNT="yes"
+GNOME2_EAUTORECONF="yes"
+
+inherit flag-o-matic gnome2 multilib multilib-minimal
+
+DESCRIPTION="Image loading library for GTK+"
+HOMEPAGE="https://git.gnome.org/browse/gdk-pixbuf"
+
+LICENSE="LGPL-2+"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="X debug +introspection jpeg jpeg2k tiff test"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.48.0:2[${MULTILIB_USEDEP}]
+ >=media-libs/libpng-1.4:0=[${MULTILIB_USEDEP}]
+ introspection? ( >=dev-libs/gobject-introspection-0.9.3:= )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ jpeg2k? ( media-libs/jasper:=[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-3.9.2:0=[${MULTILIB_USEDEP}] )
+ X? ( x11-libs/libX11[${MULTILIB_USEDEP}] )
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/gtk-doc-am-1.20
+ >=sys-devel/gettext-0.19
+ virtual/pkgconfig
+"
+# librsvg blocker is for the new pixbuf loader API, you lose icons otherwise
+RDEPEND="${COMMON_DEPEND}
+ !<gnome-base/gail-1000
+ !<gnome-base/librsvg-2.31.0
+ !<x11-libs/gtk+-2.21.3:2
+ !<x11-libs/gtk+-2.90.4:3
+"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gdk-pixbuf-query-loaders$(get_exeext)
+)
+
+PATCHES=(
+ # See https://bugzilla.gnome.org/show_bug.cgi?id=756590
+ "${FILESDIR}"/${PN}-2.32.3-fix-lowmem-uclibc.patch
+ # Fix TIFF loader compilation, bug #629716 (from master)
+ "${FILESDIR}"/2.36.10-fix-tiff-loader.patch
+)
+
+src_prepare() {
+ # This will avoid polluting the pkg-config file with versioned libpng,
+ # which is causing problems with libpng14 -> libpng15 upgrade
+ # See upstream bug #667068
+ # First check that the pattern is present, to catch upstream changes on bumps,
+ # because sed doesn't return failure code if it doesn't do any replacements
+ grep -q 'l in libpng16' configure || die "libpng check order has changed upstream"
+ sed -e 's:l in libpng16:l in libpng libpng16:' -i configure || die
+ [[ ${CHOST} == *-solaris* ]] && append-libs intl
+
+ gnome2_src_prepare
+}
+
+multilib_src_configure() {
+ # png always on to display icons
+ ECONF_SOURCE="${S}" \
+ gnome2_src_configure \
+ $(usex debug --enable-debug=yes "") \
+ $(use_with jpeg libjpeg) \
+ $(use_with jpeg2k libjasper) \
+ $(use_with tiff libtiff) \
+ $(multilib_native_use_enable introspection) \
+ $(use_with X x11) \
+ --with-libpng
+
+ # work-around gtk-doc out-of-source brokedness
+ if multilib_is_native_abi; then
+ ln -s "${S}"/docs/reference/${PN}/html docs/reference/${PN}/html || die
+ fi
+}
+
+multilib_src_install() {
+ # Parallel install fails when no gdk-pixbuf is already installed, bug #481372
+ MAKEOPTS="${MAKEOPTS} -j1" gnome2_src_install
+}
+
+pkg_preinst() {
+ gnome2_pkg_preinst
+
+ multilib_pkg_preinst() {
+ # Make sure loaders.cache belongs to gdk-pixbuf alone
+ local cache="usr/$(get_libdir)/${PN}-2.0/2.10.0/loaders.cache"
+
+ if [[ -e ${EROOT}${cache} ]]; then
+ cp "${EROOT}"${cache} "${ED}"/${cache} || die
+ else
+ touch "${ED}"/${cache} || die
+ fi
+ }
+
+ multilib_foreach_abi multilib_pkg_preinst
+}
+
+pkg_postinst() {
+ # causes segfault if set, see bug 375615
+ unset __GL_NO_DSO_FINALIZER
+
+ multilib_foreach_abi gnome2_pkg_postinst
+
+ # Migration snippet for when this was handled by gtk+
+ if [ -e "${EROOT}"usr/lib/gtk-2.0/2.*/loaders ]; then
+ elog "You need to rebuild ebuilds that installed into" "${EROOT}"usr/lib/gtk-2.0/2.*/loaders
+ elog "to do that you can use qfile from portage-utils:"
+ elog "emerge -va1 \$(qfile -qC ${EPREFIX}/usr/lib/gtk-2.0/2.*/loaders)"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+
+ if [[ -z ${REPLACED_BY_VERSION} ]]; then
+ rm -f "${EROOT}"usr/lib*/${PN}-2.0/2.10.0/loaders.cache
+ fi
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/gdk-pixbuf/, x11-libs/gdk-pixbuf/files/
@ 2017-09-21 21:21 Gilles Dartiguelongue
0 siblings, 0 replies; 7+ messages in thread
From: Gilles Dartiguelongue @ 2017-09-21 21:21 UTC (permalink / raw
To: gentoo-commits
commit: 26a1f15bb0a5261c1c6506aa0305aea13acd314c
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 21 21:10:52 2017 +0000
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Thu Sep 21 21:20:59 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26a1f15b
fix detection of libtiff in upstream patch, bug #631088
Closes: https://bugs.gentoo.org/show_bug.cgi?id=631088
x11-libs/gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch | 2 +-
.../{gdk-pixbuf-2.36.10-r1.ebuild => gdk-pixbuf-2.36.10-r2.ebuild} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/x11-libs/gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch b/x11-libs/gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch
index 47e62ef9118..80ed32f83f3 100644
--- a/x11-libs/gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch
+++ b/x11-libs/gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch
@@ -26,7 +26,7 @@ index 0abe5ce..c07bd6f 100644
fi
-AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
-+AM_CONDITIONAL(HAVE_TIFF, test "x$libtiff_found" != x)
++AM_CONDITIONAL(HAVE_TIFF, test "x$libtiff_found" != xno)
AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
diff --git a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r1.ebuild b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r2.ebuild
similarity index 100%
rename from x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r1.ebuild
rename to x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r2.ebuild
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/gdk-pixbuf/, x11-libs/gdk-pixbuf/files/
@ 2018-04-17 12:58 Mart Raudsepp
0 siblings, 0 replies; 7+ messages in thread
From: Mart Raudsepp @ 2018-04-17 12:58 UTC (permalink / raw
To: gentoo-commits
commit: 5b68f857234da2dd5651b05ac65bd6fed78c8f55
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 17 12:58:26 2018 +0000
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Tue Apr 17 12:58:26 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b68f857
x11-libs/gdk-pixbuf: security cleanup
Package-Manager: Portage-2.3.28, Repoman-2.3.9
x11-libs/gdk-pixbuf/Manifest | 1 -
.../gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch | 66 -----------
x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r2.ebuild | 124 ---------------------
3 files changed, 191 deletions(-)
diff --git a/x11-libs/gdk-pixbuf/Manifest b/x11-libs/gdk-pixbuf/Manifest
index 6372cac87fb..8c610bda12c 100644
--- a/x11-libs/gdk-pixbuf/Manifest
+++ b/x11-libs/gdk-pixbuf/Manifest
@@ -1,4 +1,3 @@
-DIST gdk-pixbuf-2.36.10.tar.xz 5772196 BLAKE2B 542df9a5b9d3e790cb592b714a402633eaf37ecd4a21d597f307bdc3f5a0a35e3c3d9e3f6c822e163d0d64b9de62d7b120cb2b174f3109bdffc5e08225506f0c SHA512 d080d20baa20efe58cc5e5d043532f57e7950c0f7a3661998f924ae2a819f6bf1113e1da7785ac2063dfa582576d418eea5b3c80ea3db16057de43cc3f911d35
DIST gdk-pixbuf-2.36.11.tar.xz 5675908 BLAKE2B 1b111c2866b06ff5da5d5e043481956d6ffbc69fa66236d91b29a6e923c01b91054eb491d2ba15a2e5d2d694f143eb0cc472bbed9bfce0bc015d6602449920fa SHA512 231e13ef2339fc6953788e8597a0c455143273338793ed835dac6ccf42e26e0292dec4121a4976b859ba8ffaa81b3ca5b250b54bd4897dbd3146a1874a59d4e3
DIST gdk-pixbuf-2.36.12-bug753605-atsize.jpg 80850 BLAKE2B 17e414ca097b7aaf513241eacae97c5bc582f7ebd8870e8b67ce4af4e57134b8b4ae0ed579eb4cf0f57db2891e95a673d2129a1bafefe5ab8e2a8dd5f66da271 SHA512 d27197d2395446cd3c970841381958f7eb1b8df78913f7da70bec5f09af6edfc5dd74cd809c37ec8cf69f0eba504e0cc6354f1ec6ce3ec2192ad316cb64b69c9
DIST gdk-pixbuf-2.36.12.tar.xz 5675768 BLAKE2B da9e18b5dc55ad13a1bdab76d9c63a6233da1b45235ae5eb620e6e3f83888a0cc846f1ba17f72cb3b5af1ccd59a69631b3403bf09e262c53e0149e6f26896a33 SHA512 5d3bd620cf464bf92079b15c78f8400db48c427053c6eeedc4ea9652a4c290a09a26310100cc7eb487daf4b565df9f7e3a6edf14685f81ddbff6a0652fb6b41b
diff --git a/x11-libs/gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch b/x11-libs/gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch
deleted file mode 100644
index 80ed32f83f3..00000000000
--- a/x11-libs/gdk-pixbuf/files/2.36.10-fix-tiff-loader.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 66537d1ecf7e857a0a443c1ebf72baf6f19dd3e4 Mon Sep 17 00:00:00 2001
-From: Bastien Nocera <hadess@hadess.net>
-Date: Mon, 11 Sep 2017 19:11:50 +0200
-Subject: build: Fix TIFF loader compilation with autotools
-
-https://bugzilla.gnome.org/show_bug.cgi?id=786342
----
- configure.ac | 7 +++----
- gdk-pixbuf/Makefile.am | 2 +-
- 2 files changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0abe5ce..c07bd6f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -564,7 +564,6 @@ dnl Test for libjasper
- *** --without-libjasper to configure])
- fi
-
--AC_SUBST(LIBTIFF)
- AC_SUBST(LIBJPEG)
- AC_SUBST(LIBPNG)
- AC_SUBST(LIBJASPER)
-@@ -676,7 +675,7 @@ if test x$gio_can_sniff = x; then
- AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])
- fi
-
--AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
-+AM_CONDITIONAL(HAVE_TIFF, test "x$libtiff_found" != xno)
- AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
- AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
- AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
-@@ -684,7 +683,7 @@ AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
- if $dynworks ; then
- STATIC_LIB_DEPS=
- if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
-- STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
-+ STATIC_LIB_DEPS="$STATIC_LIB_DEPS $TIFF_LIBS"
- fi
- if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
- STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
-@@ -698,7 +697,7 @@ if $dynworks ; then
- STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJASPER"
- fi
- else
-- STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBJASPER"
-+ STATIC_LIB_DEPS="$TIFF_LIBS $LIBJPEG $LIBPNG $LIBJASPER"
- fi
-
- # Checks to see whether we should include mediaLib
-diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am
-index 01b693c..720a058 100644
---- a/gdk-pixbuf/Makefile.am
-+++ b/gdk-pixbuf/Makefile.am
-@@ -88,7 +88,7 @@ libpixbufloader_pnm_la_LIBADD = $(module_libs)
- libstatic_pixbufloader_tiff_la_SOURCES = io-tiff.c
- libpixbufloader_tiff_la_SOURCES = io-tiff.c
- libpixbufloader_tiff_la_LDFLAGS = -avoid-version -module $(no_undefined)
--libpixbufloader_tiff_la_LIBADD = $(LIBTIFF) $(module_libs)
-+libpixbufloader_tiff_la_LIBADD = $(TIFF_LIBS) $(module_libs)
-
- #
- # The XPM loader
---
-cgit v0.12
-
diff --git a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r2.ebuild b/x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r2.ebuild
deleted file mode 100644
index 645819ace7a..00000000000
--- a/x11-libs/gdk-pixbuf/gdk-pixbuf-2.36.10-r2.ebuild
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-GNOME2_LA_PUNT="yes"
-GNOME2_EAUTORECONF="yes"
-
-inherit flag-o-matic gnome2 multilib multilib-minimal
-
-DESCRIPTION="Image loading library for GTK+"
-HOMEPAGE="https://git.gnome.org/browse/gdk-pixbuf"
-
-LICENSE="LGPL-2+"
-SLOT="2"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="X debug +introspection jpeg jpeg2k tiff test"
-
-COMMON_DEPEND="
- >=dev-libs/glib-2.48.0:2[${MULTILIB_USEDEP}]
- >=media-libs/libpng-1.4:0=[${MULTILIB_USEDEP}]
- introspection? ( >=dev-libs/gobject-introspection-0.9.3:= )
- jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
- jpeg2k? ( media-libs/jasper:=[${MULTILIB_USEDEP}] )
- tiff? ( >=media-libs/tiff-3.9.2:0=[${MULTILIB_USEDEP}] )
- X? ( x11-libs/libX11[${MULTILIB_USEDEP}] )
-"
-DEPEND="${COMMON_DEPEND}
- >=dev-util/gtk-doc-am-1.20
- >=sys-devel/gettext-0.19
- virtual/pkgconfig
-"
-# librsvg blocker is for the new pixbuf loader API, you lose icons otherwise
-RDEPEND="${COMMON_DEPEND}
- !<gnome-base/gail-1000
- !<gnome-base/librsvg-2.31.0
- !<x11-libs/gtk+-2.21.3:2
- !<x11-libs/gtk+-2.90.4:3
-"
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/gdk-pixbuf-query-loaders$(get_exeext)
-)
-
-PATCHES=(
- # See https://bugzilla.gnome.org/show_bug.cgi?id=756590
- "${FILESDIR}"/${PN}-2.32.3-fix-lowmem-uclibc.patch
- # Fix TIFF loader compilation, bug #629716 (from master)
- "${FILESDIR}"/2.36.10-fix-tiff-loader.patch
-)
-
-src_prepare() {
- # This will avoid polluting the pkg-config file with versioned libpng,
- # which is causing problems with libpng14 -> libpng15 upgrade
- # See upstream bug #667068
- # First check that the pattern is present, to catch upstream changes on bumps,
- # because sed doesn't return failure code if it doesn't do any replacements
- grep -q 'l in libpng16' configure || die "libpng check order has changed upstream"
- sed -e 's:l in libpng16:l in libpng libpng16:' -i configure || die
- [[ ${CHOST} == *-solaris* ]] && append-libs intl
-
- gnome2_src_prepare
-}
-
-multilib_src_configure() {
- # png always on to display icons
- ECONF_SOURCE="${S}" \
- gnome2_src_configure \
- $(usex debug --enable-debug=yes "") \
- $(use_with jpeg libjpeg) \
- $(use_with jpeg2k libjasper) \
- $(use_with tiff libtiff) \
- $(multilib_native_use_enable introspection) \
- $(use_with X x11) \
- --with-libpng
-
- # work-around gtk-doc out-of-source brokedness
- if multilib_is_native_abi; then
- ln -s "${S}"/docs/reference/${PN}/html docs/reference/${PN}/html || die
- fi
-}
-
-multilib_src_install() {
- # Parallel install fails when no gdk-pixbuf is already installed, bug #481372
- MAKEOPTS="${MAKEOPTS} -j1" gnome2_src_install
-}
-
-pkg_preinst() {
- gnome2_pkg_preinst
-
- multilib_pkg_preinst() {
- # Make sure loaders.cache belongs to gdk-pixbuf alone
- local cache="usr/$(get_libdir)/${PN}-2.0/2.10.0/loaders.cache"
-
- if [[ -e ${EROOT}${cache} ]]; then
- cp "${EROOT}"${cache} "${ED}"/${cache} || die
- else
- touch "${ED}"/${cache} || die
- fi
- }
-
- multilib_foreach_abi multilib_pkg_preinst
-}
-
-pkg_postinst() {
- # causes segfault if set, see bug 375615
- unset __GL_NO_DSO_FINALIZER
-
- multilib_foreach_abi gnome2_pkg_postinst
-
- # Migration snippet for when this was handled by gtk+
- if [ -e "${EROOT}"usr/lib/gtk-2.0/2.*/loaders ]; then
- elog "You need to rebuild ebuilds that installed into" "${EROOT}"usr/lib/gtk-2.0/2.*/loaders
- elog "to do that you can use qfile from portage-utils:"
- elog "emerge -va1 \$(qfile -qC ${EPREFIX}/usr/lib/gtk-2.0/2.*/loaders)"
- fi
-}
-
-pkg_postrm() {
- gnome2_pkg_postrm
-
- if [[ -z ${REPLACED_BY_VERSION} ]]; then
- rm -f "${EROOT}"usr/lib*/${PN}-2.0/2.10.0/loaders.cache
- fi
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-04-17 12:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-26 12:26 [gentoo-commits] repo/gentoo:master commit in: x11-libs/gdk-pixbuf/, x11-libs/gdk-pixbuf/files/ Anthony G. Basile
-- strict thread matches above, loose matches on Subject: below --
2018-04-17 12:58 Mart Raudsepp
2017-09-21 21:21 Gilles Dartiguelongue
2017-09-15 6:43 Gilles Dartiguelongue
2015-10-14 12:45 Alexandre Rostovtsev
2015-10-12 23:33 Alexandre Rostovtsev
2015-09-01 5:15 Alexandre Rostovtsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox