summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen de Groot <yngwin@gentoo.org>2010-02-16 13:59:19 +0000
committerBen de Groot <yngwin@gentoo.org>2010-02-16 13:59:19 +0000
commit90824b6ce8b8b9cbdcd063b5876b66f34c24e580 (patch)
tree5c810ab4ec92ddfd023b30d37af786b29bc32e45 /app-text
parentVersion bump (diff)
downloadhistorical-90824b6ce8b8b9cbdcd063b5876b66f34c24e580.tar.gz
historical-90824b6ce8b8b9cbdcd063b5876b66f34c24e580.tar.bz2
historical-90824b6ce8b8b9cbdcd063b5876b66f34c24e580.zip
Install docs (bug 305391). Remove revision with patch that breaks apps (bug 303817).
Package-Manager: portage-2.2_rc62/cvs/Linux x86_64
Diffstat (limited to 'app-text')
-rw-r--r--app-text/poppler/ChangeLog8
-rw-r--r--app-text/poppler/Manifest6
-rw-r--r--app-text/poppler/files/poppler-0.12.3-cairo-image-downscale.patch517
-rw-r--r--app-text/poppler/poppler-0.12.3-r3.ebuild4
-rw-r--r--app-text/poppler/poppler-0.12.3-r4.ebuild79
5 files changed, 12 insertions, 602 deletions
diff --git a/app-text/poppler/ChangeLog b/app-text/poppler/ChangeLog
index 11ef504380f4..80cf223c3137 100644
--- a/app-text/poppler/ChangeLog
+++ b/app-text/poppler/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-text/poppler
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/ChangeLog,v 1.220 2010/02/13 10:39:25 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/ChangeLog,v 1.221 2010/02/16 13:59:18 yngwin Exp $
+
+ 16 Feb 2010; Ben de Groot <yngwin@gentoo.org> poppler-0.12.3-r3.ebuild,
+ -poppler-0.12.3-r4.ebuild,
+ -files/poppler-0.12.3-cairo-image-downscale.patch:
+ Install docs (bug 305391). Remove revision with patch that breaks apps
+ (bug 303817).
13 Feb 2010; Fabian Groffen <grobian@gentoo.org>
files/poppler-0.12.3-darwin-gtk-link.patch:
diff --git a/app-text/poppler/Manifest b/app-text/poppler/Manifest
index 8e5807541dd0..ba182f6b6e7d 100644
--- a/app-text/poppler/Manifest
+++ b/app-text/poppler/Manifest
@@ -1,11 +1,9 @@
-AUX poppler-0.12.3-cairo-image-downscale.patch 16859 RMD160 cdea9a7ecb6664e6df006b76c755650b6ebd0743 SHA1 50e11acc8b99208ca393812c7b79694d007cbd4b SHA256 84031a4ace0a603bd040f5568e9dd3384cb25e062a1de5cf0666bf66fcd8bc5f
AUX poppler-0.12.3-cmake-disable-tests.patch 2121 RMD160 3edded24926076c9c0ef42d0f1f295a8d46cafdb SHA1 fd22bdf1d887bcedd83673992fd182bfdb3bfcb0 SHA256 182489ee0d76a38c6d2570721a6777d78077ace4249bbeac7dad8d29b075c01b
AUX poppler-0.12.3-config.patch 3468 RMD160 de39ce760cca5b811e1c21efc893731fbcfbc22b SHA1 e7dd1b86d2d5312c5610b02101d5551bece21b10 SHA256 909a1626b8800b3e796c24e3c2a5b6140cd626a28b6c627bd212d6a4a9a12aef
AUX poppler-0.12.3-darwin-gtk-link.patch 455 RMD160 9f08076c4821a29ef8b96bc0eb32b0b1d93b0285 SHA1 297d84fff5ee4f9fd05ceaf34228df5e21baff90 SHA256 1d58beb5d476857e60cdf16bc4c458b8c48e59f2b9a26715f485003da18f9814
AUX poppler-0.12.3-fix-headers-installation.patch 1110 RMD160 8e327ab79c6cc3dc149b83be8c96ceb0ecfd494d SHA1 fa9b58cc1ca6f81f5dd30a41f89b8b5c136d9fe4 SHA256 ef05df49853ecde1fa5711f799f75d2811d56481f199995d88efb198f9f5b12e
AUX poppler-0.12.3-gdk.patch 633 RMD160 85f009940f64f1e4d8d3b1dff2a8ec1e09b95420 SHA1 90c650df067e5dd2558dee1c098c5655b0f5974b SHA256 c6054c500b6049ec8be492bae5d364c6fdfed23a8ffe704ad80f2677ed13ccac
DIST poppler-0.12.3.tar.gz 1616883 RMD160 a8fd07ec4dc918cc17390a5236aff9a43e1f7253 SHA1 bce8b675fb7c22d507b1965efa7bd71d9ce09460 SHA256 7a4ffe6d2950c446c285700d3b2dc399540a27ce635dd712aff646f02f8dfbcc
-EBUILD poppler-0.12.3-r3.ebuild 2665 RMD160 f5e27368ae92d888430a1e01406014dd9a852c99 SHA1 a0a92deddbc112644e0f8dad7c88524d3562d1f4 SHA256 726caac1b981c291e1a605a6ead486ecd88217425c8cea3759fc56489ea2e78a
-EBUILD poppler-0.12.3-r4.ebuild 2479 RMD160 c9ce9dd15bc4e143c4088b1ae17116e51639e8d7 SHA1 0d49f95b6a4b4ad9d813d0b038043c469711c2eb SHA256 c559deb8b50b2d7f0bb37b26d54258adab57b5b0051cadba0bfe29a89a81114f
-MISC ChangeLog 31133 RMD160 0752057f0654c025d48b219fc30369f8b2c8cef5 SHA1 fd80c5ff24138f069e61c44950dd4ca12072d0b2 SHA256 02390de3d3262d8ed2ea36fc68e9d42e491718b077c1a6aa9a2835b46b6ca68b
+EBUILD poppler-0.12.3-r3.ebuild 2720 RMD160 2ef7b55545520df24692896ef430b3f9a1d26231 SHA1 d3062e903b628aff17f485719dc44b5ecd35d50b SHA256 0a24a2981fb7760907a73fdbf1937d0ab831be1e65d96c399740ddec9b38dde3
+MISC ChangeLog 31378 RMD160 1baab245851ccd17223d4fef3371eab05ed709e9 SHA1 1bcd2964f7eb4bc51e2c3faae7518f16ef16b12e SHA256 19daf90de33be375c8e52565ba1bd7df2d2d48e2df791053ad6e6363f57ad9cf
MISC metadata.xml 565 RMD160 6a9e714721911707b23fb27535d64ab92c90a5f8 SHA1 ca7711ec7b7d2953310ae3b00ff2f447371c103f SHA256 ec946c05ddfa21325d7cb705cee3342f4a95a1d08b02f324e4bac36bfc479e0b
diff --git a/app-text/poppler/files/poppler-0.12.3-cairo-image-downscale.patch b/app-text/poppler/files/poppler-0.12.3-cairo-image-downscale.patch
deleted file mode 100644
index 61fb8d9b987c..000000000000
--- a/app-text/poppler/files/poppler-0.12.3-cairo-image-downscale.patch
+++ /dev/null
@@ -1,517 +0,0 @@
-diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
-index 9a0f3be..42ac3a8 100644
---- a/poppler/CairoOutputDev.cc
-+++ b/poppler/CairoOutputDev.cc
-@@ -58,6 +58,7 @@
- #include <splash/SplashBitmap.h>
- #include "CairoOutputDev.h"
- #include "CairoFontEngine.h"
-+#include "CairoRescaleBox.h"
- //------------------------------------------------------------------------
-
- // #define LOG_CAIRO
-@@ -1331,6 +1332,82 @@ void CairoOutputDev::endMaskClip(GfxState *state) {
- clearSoftMask(state);
- }
-
-+cairo_surface_t *CairoOutputDev::downscaleSurface(cairo_surface_t *orig_surface) {
-+ cairo_surface_t *dest_surface;
-+ unsigned char *dest_buffer;
-+ int dest_stride;
-+ unsigned char *orig_buffer;
-+ int orig_width, orig_height;
-+ int orig_stride;
-+ GBool res;
-+
-+ if (printing)
-+ return NULL;
-+
-+ cairo_matrix_t matrix;
-+ cairo_get_matrix(cairo, &matrix);
-+
-+ /* this whole computation should be factored out */
-+ double xScale = matrix.xx;
-+ double yScale = matrix.yy;
-+ int tx, tx2, ty, ty2; /* the integer co-oridinates of the resulting image */
-+ int scaledHeight;
-+ int scaledWidth;
-+ if (xScale >= 0) {
-+ tx = splashRound(matrix.x0 - 0.01);
-+ tx2 = splashRound(matrix.x0 + xScale + 0.01) - 1;
-+ } else {
-+ tx = splashRound(matrix.x0 + 0.01) - 1;
-+ tx2 = splashRound(matrix.x0 + xScale - 0.01);
-+ }
-+ scaledWidth = abs(tx2 - tx) + 1;
-+ //scaledWidth = splashRound(fabs(xScale));
-+ if (scaledWidth == 0) {
-+ // technically, this should draw nothing, but it generally seems
-+ // better to draw a one-pixel-wide stripe rather than throwing it
-+ // away
-+ scaledWidth = 1;
-+ }
-+ if (yScale >= 0) {
-+ ty = splashFloor(matrix.y0 + 0.01);
-+ ty2 = splashCeil(matrix.y0 + yScale - 0.01);
-+ } else {
-+ ty = splashCeil(matrix.y0 - 0.01);
-+ ty2 = splashFloor(matrix.y0 + yScale + 0.01);
-+ }
-+ scaledHeight = abs(ty2 - ty);
-+ if (scaledHeight == 0) {
-+ scaledHeight = 1;
-+ }
-+
-+ orig_width = cairo_image_surface_get_width (orig_surface);
-+ orig_height = cairo_image_surface_get_height (orig_surface);
-+ if (scaledWidth >= orig_width || scaledHeight >= orig_height)
-+ return NULL;
-+
-+ dest_surface = cairo_surface_create_similar (orig_surface,
-+ cairo_surface_get_content (orig_surface),
-+ scaledWidth, scaledHeight);
-+ dest_buffer = cairo_image_surface_get_data (dest_surface);
-+ dest_stride = cairo_image_surface_get_stride (dest_surface);
-+
-+ orig_buffer = cairo_image_surface_get_data (orig_surface);
-+ orig_stride = cairo_image_surface_get_stride (orig_surface);
-+
-+ res = downscale_box_filter((uint32_t *)orig_buffer,
-+ orig_stride, orig_width, orig_height,
-+ scaledWidth, scaledHeight, 0, 0,
-+ scaledWidth, scaledHeight,
-+ (uint32_t *)dest_buffer, dest_stride);
-+ if (!res) {
-+ cairo_surface_destroy (dest_surface);
-+ return NULL;
-+ }
-+
-+ return dest_surface;
-+
-+}
-+
- void CairoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
- int width, int height, GBool invert,
- GBool interpolate, GBool inlineImg) {
-@@ -2094,6 +2171,18 @@ void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
- }
- gfree(lookup);
-
-+ cairo_surface_t *scaled_surface;
-+
-+ scaled_surface = downscaleSurface (image);
-+ if (scaled_surface) {
-+ if (cairo_surface_status (scaled_surface))
-+ goto cleanup;
-+ cairo_surface_destroy (image);
-+ image = scaled_surface;
-+ width = cairo_image_surface_get_width (image);
-+ height = cairo_image_surface_get_height (image);
-+ }
-+
- cairo_surface_mark_dirty (image);
- pattern = cairo_pattern_create_for_surface (image);
- cairo_surface_destroy (image);
-diff --git a/poppler/CairoOutputDev.h b/poppler/CairoOutputDev.h
-index fb9c0d7..266f0cb 100644
---- a/poppler/CairoOutputDev.h
-+++ b/poppler/CairoOutputDev.h
-@@ -268,6 +268,7 @@ public:
-
- protected:
- void doPath(cairo_t *cairo, GfxState *state, GfxPath *path);
-+ cairo_surface_t *downscaleSurface(cairo_surface_t *orig_surface);
-
- GfxRGB fill_color, stroke_color;
- cairo_pattern_t *fill_pattern, *stroke_pattern;
-diff --git a/poppler/CairoRescaleBox.cc b/poppler/CairoRescaleBox.cc
-new file mode 100644
-index 0000000..dce5ddd
---- /dev/null
-+++ b/poppler/CairoRescaleBox.cc
-@@ -0,0 +1,352 @@
-+/* -*- Mode: c; c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t; -*- */
-+/*
-+ * Copyright © 2009 Mozilla Corporation
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and its
-+ * documentation for any purpose is hereby granted without fee, provided that
-+ * the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of Mozilla Corporation not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Mozilla Corporation makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MOZILLA CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
-+ * SHALL MOZILLA CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-+ * OF THIS SOFTWARE.
-+ *
-+ * Author: Jeff Muizelaar, Mozilla Corp.
-+ */
-+
-+/* This implements a box filter that supports non-integer box sizes */
-+
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
-+#include <stdint.h>
-+#include <stdio.h>
-+#include <assert.h>
-+#include <stdlib.h>
-+#include <math.h>
-+#include "goo/gmem.h"
-+#include "CairoRescaleBox.h"
-+
-+typedef unsigned short int uint16_t;
-+typedef unsigned int uint32_t;
-+
-+/* we work in fixed point where 1. == 1 << 24 */
-+#define FIXED_SHIFT 24
-+
-+static void downsample_row_box_filter (
-+ int start, int width,
-+ uint32_t *src, uint32_t *dest,
-+ int coverage[], int pixel_coverage)
-+{
-+ /* we need an array of the pixel contribution of each destination pixel on the boundaries.
-+ * we invert the value to get the value on the other size of the box */
-+ /*
-+
-+ value = a * contribution * 1/box_size
-+ value += a * 1/box_size
-+ value += a * 1/box_size
-+ value += a * 1/box_size
-+ value += a * (1 - contribution) * 1/box_size
-+ a * (1/box_size - contribution * 1/box_size)
-+
-+ box size is constant
-+
-+
-+ value = a * contribtion_a * 1/box_size + b * contribution_b * 1/box_size
-+ contribution_b = (1 - contribution_a)
-+ = (1 - contribution_a_next)
-+ */
-+
-+ /* box size = ceil(src_width/dest_width) */
-+ int x = 0;
-+
-+ /* skip to start */
-+ /* XXX: it might be possible to do this directly instead of iteratively, however
-+ * the iterative solution is simple */
-+ while (x < start)
-+ {
-+ int box = 1 << FIXED_SHIFT;
-+ int start_coverage = coverage[x];
-+ box -= start_coverage;
-+ src++;
-+ while (box >= pixel_coverage)
-+ {
-+ src++;
-+ box -= pixel_coverage;
-+ }
-+ x++;
-+ }
-+
-+ while (x < start + width)
-+ {
-+ uint32_t a = 0;
-+ uint32_t r = 0;
-+ uint32_t g = 0;
-+ uint32_t b = 0;
-+ int box = 1 << FIXED_SHIFT;
-+ int start_coverage = coverage[x];
-+
-+ a = ((*src >> 24) & 0xff) * start_coverage;
-+ r = ((*src >> 16) & 0xff) * start_coverage;
-+ g = ((*src >> 8) & 0xff) * start_coverage;
-+ b = ((*src >> 0) & 0xff) * start_coverage;
-+ src++;
-+ x++;
-+ box -= start_coverage;
-+
-+ while (box >= pixel_coverage)
-+ {
-+ a += ((*src >> 24) & 0xff) * pixel_coverage;
-+ r += ((*src >> 16) & 0xff) * pixel_coverage;
-+ g += ((*src >> 8) & 0xff) * pixel_coverage;
-+ b += ((*src >> 0) & 0xff) * pixel_coverage;
-+ src++;
-+
-+ box -= pixel_coverage;
-+ }
-+
-+ /* multiply by whatever is leftover
-+ * this ensures that we don't bias down.
-+ * i.e. start_coverage + n*pixel_coverage + box == 1 << 24 */
-+ if (box > 0)
-+ {
-+ a += ((*src >> 24) & 0xff) * box;
-+ r += ((*src >> 16) & 0xff) * box;
-+ g += ((*src >> 8) & 0xff) * box;
-+ b += ((*src >> 0) & 0xff) * box;
-+ }
-+
-+ a >>= FIXED_SHIFT;
-+ r >>= FIXED_SHIFT;
-+ g >>= FIXED_SHIFT;
-+ b >>= FIXED_SHIFT;
-+
-+ *dest = (a << 24) | (r << 16) | (g << 8) | b;
-+ dest++;
-+ }
-+}
-+
-+static void downsample_columns_box_filter (
-+ int n,
-+ int start_coverage,
-+ int pixel_coverage,
-+ uint32_t *src, uint32_t *dest)
-+{
-+ int stride = n;
-+ while (n--) {
-+ uint32_t a = 0;
-+ uint32_t r = 0;
-+ uint32_t g = 0;
-+ uint32_t b = 0;
-+ uint32_t *column_src = src;
-+ int box = 1 << FIXED_SHIFT;
-+
-+ a = ((*column_src >> 24) & 0xff) * start_coverage;
-+ r = ((*column_src >> 16) & 0xff) * start_coverage;
-+ g = ((*column_src >> 8) & 0xff) * start_coverage;
-+ b = ((*column_src >> 0) & 0xff) * start_coverage;
-+ column_src += stride;
-+ box -= start_coverage;
-+
-+ while (box >= pixel_coverage)
-+ {
-+ a += ((*column_src >> 24) & 0xff) * pixel_coverage;
-+ r += ((*column_src >> 16) & 0xff) * pixel_coverage;
-+ g += ((*column_src >> 8) & 0xff) * pixel_coverage;
-+ b += ((*column_src >> 0) & 0xff) * pixel_coverage;
-+ column_src += stride;
-+ box -= pixel_coverage;
-+ }
-+
-+ if (box > 0) {
-+ a += ((*column_src >> 24) & 0xff) * box;
-+ r += ((*column_src >> 16) & 0xff) * box;
-+ g += ((*column_src >> 8) & 0xff) * box;
-+ b += ((*column_src >> 0) & 0xff) * box;
-+ }
-+
-+ a >>= FIXED_SHIFT;
-+ r >>= FIXED_SHIFT;
-+ g >>= FIXED_SHIFT;
-+ b >>= FIXED_SHIFT;
-+
-+ *dest = (a << 24) | (r << 16) | (g << 8) | b;
-+ dest++;
-+ src++;
-+ }
-+}
-+
-+static int compute_coverage (int coverage[], int src_length, int dest_length)
-+{
-+ int i;
-+ /* num = src_length/dest_length
-+ total = sum(pixel) / num
-+
-+ pixel * 1/num == pixel * dest_length / src_length
-+ */
-+ /* the average contribution of each source pixel */
-+ int ratio = ((1 << 24)*(long long int)dest_length)/src_length;
-+ /* because ((1 << 24)*(long long int)dest_length) won't always be divisible by src_length
-+ * we'll need someplace to put the other bits.
-+ *
-+ * We want to ensure a + n*ratio < 1<<24
-+ *
-+ * 1<<24
-+ * */
-+
-+ double scale = (double)src_length/dest_length;
-+
-+ /* for each destination pixel compute the coverage of the left most pixel included in the box */
-+ /* I have a proof of this, which this margin is too narrow to contain */
-+ for (i=0; i<dest_length; i++)
-+ {
-+ float left_side = i*scale;
-+ float right_side = (i+1)*scale;
-+ float right_fract = right_side - floor (right_side);
-+ float left_fract = ceil (left_side) - left_side;
-+ int overage;
-+ /* find out how many source pixels will be used to fill the box */
-+ int count = floor (right_side) - ceil (left_side);
-+ /* what's the maximum value this expression can become?
-+ floor((i+1)*scale) - ceil(i*scale)
-+
-+ (i+1)*scale - i*scale == scale
-+
-+ since floor((i+1)*scale) <= (i+1)*scale
-+ and ceil(i*scale) >= i*scale
-+
-+ floor((i+1)*scale) - ceil(i*scale) <= scale
-+
-+ further since: floor((i+1)*scale) - ceil(i*scale) is an integer
-+
-+ therefore:
-+ floor((i+1)*scale) - ceil(i*scale) <= floor(scale)
-+ */
-+
-+ if (left_fract == 0.)
-+ count--;
-+
-+ /* compute how much the right-most pixel contributes */
-+ overage = ratio*(right_fract);
-+
-+ /* the remainder is the the amount that the left-most pixel
-+ * contributes */
-+ coverage[i] = (1<<24) - (count * ratio + overage);
-+ }
-+
-+ return ratio;
-+}
-+
-+GBool downscale_box_filter(uint32_t *orig, int orig_stride, unsigned orig_width, unsigned orig_height,
-+ signed scaled_width, signed scaled_height,
-+ uint16_t start_column, uint16_t start_row,
-+ uint16_t width, uint16_t height,
-+ uint32_t *dest, int dst_stride)
-+{
-+ int pixel_coverage_x, pixel_coverage_y;
-+ int dest_y;
-+ int src_y = 0;
-+ uint32_t *scanline = orig;
-+ int *x_coverage = NULL;
-+ int *y_coverage = NULL;
-+ uint32_t *temp_buf = NULL;
-+ GBool retval = gFalse;
-+
-+ x_coverage = (int *)gmallocn3 (orig_width, 1, sizeof(int));
-+ y_coverage = (int *)gmallocn3 (orig_height, 1, sizeof(int));
-+
-+ /* we need to allocate enough room for ceil(src_height/dest_height)+1
-+ Example:
-+ src_height = 140
-+ dest_height = 50
-+ src_height/dest_height = 2.8
-+
-+ |-------------| 2.8 pixels
-+ |----|----|----|----| 4 pixels
-+ need to sample 3 pixels
-+
-+ |-------------| 2.8 pixels
-+ |----|----|----|----| 4 pixels
-+ need to sample 4 pixels
-+ */
-+
-+ temp_buf = (uint32_t *)gmallocn3 ((orig_height + scaled_height-1)/scaled_height+1, scaled_width, sizeof(uint32_t));
-+
-+ if (!x_coverage || !y_coverage || !scanline || !temp_buf)
-+ goto cleanup;
-+
-+ pixel_coverage_x = compute_coverage (x_coverage, orig_width, scaled_width);
-+ pixel_coverage_y = compute_coverage (y_coverage, orig_height, scaled_height);
-+
-+ assert (width + start_column <= scaled_width);
-+
-+ /* skip the rows at the beginning */
-+ for (dest_y = 0; dest_y < start_row; dest_y++)
-+ {
-+ int box = 1 << FIXED_SHIFT;
-+ int start_coverage_y = y_coverage[dest_y];
-+ box -= start_coverage_y;
-+ src_y++;
-+ while (box >= pixel_coverage_y)
-+ {
-+ box -= pixel_coverage_y;
-+ src_y++;
-+ }
-+ }
-+
-+ for (; dest_y < start_row + height; dest_y++)
-+ {
-+ int columns = 0;
-+ int box = 1 << FIXED_SHIFT;
-+ int start_coverage_y = y_coverage[dest_y];
-+
-+ scanline = orig + src_y * orig_stride / 4;
-+ downsample_row_box_filter (start_column, width, scanline, temp_buf + width * columns, x_coverage, pixel_coverage_x);
-+ columns++;
-+ src_y++;
-+ box -= start_coverage_y;
-+
-+ while (box >= pixel_coverage_y)
-+ {
-+ scanline = orig + src_y * orig_stride / 4;
-+ downsample_row_box_filter (start_column, width, scanline, temp_buf + width * columns, x_coverage, pixel_coverage_x);
-+ columns++;
-+ src_y++;
-+ box -= pixel_coverage_y;
-+ }
-+
-+ /* downsample any leftovers */
-+ if (box > 0)
-+ {
-+ scanline = orig + src_y * orig_stride / 4;
-+ downsample_row_box_filter (start_column, width, scanline, temp_buf + width * columns, x_coverage, pixel_coverage_x);
-+ columns++;
-+ }
-+
-+ /* now scale the rows we just downsampled in the y direction */
-+ downsample_columns_box_filter (width, start_coverage_y, pixel_coverage_y, temp_buf, dest);
-+ dest += dst_stride / 4;
-+
-+// assert(width*columns <= ((orig_height + scaled_height-1)/scaled_height+1) * width);
-+ }
-+// assert (src_y<=orig_height);
-+
-+ retval = gTrue;
-+
-+cleanup:
-+ free (x_coverage);
-+ free (y_coverage);
-+ free (temp_buf);
-+
-+ return gTrue;
-+}
-diff --git a/poppler/CairoRescaleBox.h b/poppler/CairoRescaleBox.h
-new file mode 100644
-index 0000000..5349c87
---- /dev/null
-+++ b/poppler/CairoRescaleBox.h
-@@ -0,0 +1,12 @@
-+#ifndef CAIRO_RESCALE_BOX_H
-+#define CAIRO_RESCALE_BOX_H
-+
-+#include "goo/gtypes.h"
-+
-+GBool downscale_box_filter(unsigned int *orig, int orig_stride, unsigned orig_width, unsigned orig_height,
-+ signed scaled_width, signed scaled_height,
-+ unsigned short int start_column, unsigned short int start_row,
-+ unsigned short int width, unsigned short int height,
-+ unsigned int *dest, int dst_stride);
-+
-+#endif /* CAIRO_RESCALE_BOX_H */
-diff --git a/poppler/Makefile.am b/poppler/Makefile.am
-index ec79e31..096ea76 100644
---- a/poppler/Makefile.am
-+++ b/poppler/Makefile.am
-@@ -47,7 +47,9 @@ libpoppler_cairo_la_SOURCES = \
- CairoFontEngine.cc \
- CairoFontEngine.h \
- CairoOutputDev.cc \
-- CairoOutputDev.h
-+ CairoOutputDev.h \
-+ CairoRescaleBox.cc \
-+ CairoRescaleBox.h
-
- endif
-
diff --git a/app-text/poppler/poppler-0.12.3-r3.ebuild b/app-text/poppler/poppler-0.12.3-r3.ebuild
index 1092bf9d2e86..b4de5b734401 100644
--- a/app-text/poppler/poppler-0.12.3-r3.ebuild
+++ b/app-text/poppler/poppler-0.12.3-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/poppler-0.12.3-r3.ebuild,v 1.12 2010/02/11 00:30:49 yngwin Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/poppler-0.12.3-r3.ebuild,v 1.13 2010/02/16 13:59:18 yngwin Exp $
EAPI="2"
@@ -37,6 +37,8 @@ RDEPEND="${COMMON_DEPEND}
!app-text/poppler-utils
cjk? ( >=app-text/poppler-data-0.2.1 )"
+DOCS="AUTHORS ChangeLog NEWS README README-XPDF TODO"
+
src_prepare() {
epatch "${FILESDIR}"/${P}-cmake-disable-tests.patch
epatch "${FILESDIR}"/${P}-fix-headers-installation.patch
diff --git a/app-text/poppler/poppler-0.12.3-r4.ebuild b/app-text/poppler/poppler-0.12.3-r4.ebuild
deleted file mode 100644
index 756d41a1b445..000000000000
--- a/app-text/poppler/poppler-0.12.3-r4.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/poppler-0.12.3-r4.ebuild,v 1.2 2010/02/09 23:41:01 yngwin Exp $
-
-EAPI="2"
-
-inherit cmake-utils
-
-DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base"
-HOMEPAGE="http://poppler.freedesktop.org/"
-SRC_URI="http://poppler.freedesktop.org/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+abiword cairo cjk debug doc exceptions jpeg jpeg2k +lcms png qt4 +utils +xpdf-headers"
-
-COMMON_DEPEND=">=media-libs/fontconfig-2.6.0
- >=media-libs/freetype-2.3.9
- sys-libs/zlib
- abiword? ( dev-libs/libxml2:2 )
- cairo? ( dev-libs/glib:2
- >=x11-libs/cairo-1.8.4
- >=x11-libs/gtk+-2.14.0:2 )
- jpeg? ( >=media-libs/jpeg-7:0 )
- jpeg2k? ( media-libs/openjpeg )
- png? ( media-libs/libpng )
- qt4? ( x11-libs/qt-core:4
- x11-libs/qt-gui:4 )"
-DEPEND="${COMMON_DEPEND}
- dev-util/pkgconfig"
-RDEPEND="${COMMON_DEPEND}
- !dev-libs/poppler
- !dev-libs/poppler-glib
- !dev-libs/poppler-qt3
- !dev-libs/poppler-qt4
- !app-text/poppler-utils
- cjk? ( >=app-text/poppler-data-0.2.1 )"
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-cmake-disable-tests.patch
- epatch "${FILESDIR}"/${P}-fix-headers-installation.patch
- epatch "${FILESDIR}"/${P}-gdk.patch
- epatch "${FILESDIR}"/${P}-darwin-gtk-link.patch
- epatch "${FILESDIR}"/${P}-cairo-image-downscale.patch #303817
-}
-
-src_configure() {
- mycmakeargs=(
- -DBUILD_GTK_TESTS=OFF
- -DBUILD_QT4_TESTS=OFF
- -DWITH_Qt3=OFF
- -DENABLE_SPLASH=ON
- -DENABLE_ZLIB=ON
- $(cmake-utils_use_enable abiword)
- $(cmake-utils_use_enable lcms)
- $(cmake-utils_use_enable jpeg2k LIBOPENJPEG)
- $(cmake-utils_use_enable utils)
- $(cmake-utils_use_enable xpdf-headers XPDF_HEADERS)
- $(cmake-utils_use_with cairo)
- $(cmake-utils_use_with cairo GTK)
- $(cmake-utils_use_with jpeg)
- $(cmake-utils_use_with png)
- $(cmake-utils_use_with qt4)
- $(cmake-utils_use exceptions USE_EXCEPTIONS)
- )
-
- cmake-utils_src_configure
-}
-
-src_install() {
- cmake-utils_src_install
-
- if use cairo && use doc; then
- # For now install gtk-doc there
- insinto /usr/share/gtk-doc/html/poppler
- doins -r "${S}"/glib/reference/html/* || die 'failed to install API documentation'
- fi
-}