summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@gentoo.org>2006-05-20 20:08:16 +0000
committerSaleem Abdulrasool <compnerd@gentoo.org>2006-05-20 20:08:16 +0000
commit51af301e6686f400fcb7228615ca7d7408bd20ee (patch)
tree9da9efd5cc80b08ca9ad99e003ba4d79d50d0092 /x11-libs/cairo/files
parentAdded ~hppa (diff)
downloadgentoo-2-51af301e6686f400fcb7228615ca7d7408bd20ee.tar.gz
gentoo-2-51af301e6686f400fcb7228615ca7d7408bd20ee.tar.bz2
gentoo-2-51af301e6686f400fcb7228615ca7d7408bd20ee.zip
add missing file (bug #133768)
(Portage version: 2.1_rc1-r3)
Diffstat (limited to 'x11-libs/cairo/files')
-rw-r--r--x11-libs/cairo/files/cairo-1.1.6-poppler-revert.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/x11-libs/cairo/files/cairo-1.1.6-poppler-revert.patch b/x11-libs/cairo/files/cairo-1.1.6-poppler-revert.patch
new file mode 100644
index 000000000000..dc96a78b6436
--- /dev/null
+++ b/x11-libs/cairo/files/cairo-1.1.6-poppler-revert.patch
@@ -0,0 +1,73 @@
+diff -ruN cairo-1.1.6.orig/test/Makefile.am cairo-1.1.6/test/Makefile.am
+--- cairo-1.1.6.orig/test/Makefile.am 2006-05-05 02:43:39.000000000 -0400
++++ cairo-1.1.6/test/Makefile.am 2006-05-06 22:38:28.000000000 -0400
+@@ -330,11 +330,6 @@
+ noinst_PROGRAMS += svg2png
+ svg2png_CFLAGS = $(LIBRSVG_CFLAGS)
+ svg2png_LDADD = $(LIBRSVG_LIBS)
+-if CAIRO_CAN_TEST_PDF_SURFACE
+-noinst_PROGRAMS += pdf2svg
+-pdf2svg_CFLAGS = $(POPPLER_CFLAGS)
+-pdf2svg_LDADD = $(LDADD) $(POPPLER_LIBS)
+-endif
+ endif
+
+ CLEANFILES = \
+diff -ruN cairo-1.1.6.orig/test/pdf2png.c cairo-1.1.6/test/pdf2png.c
+--- cairo-1.1.6.orig/test/pdf2png.c 2006-05-04 02:03:48.000000000 -0400
++++ cairo-1.1.6/test/pdf2png.c 2006-05-06 22:25:41.000000000 -0400
+@@ -37,15 +37,13 @@
+ {
+ PopplerDocument *document;
+ PopplerPage *page;
++ GdkPixbuf *pixbuf;
+ double width, height;
+ GError *error;
+ const char *filename = argv[1];
+ const char *output_filename = argv[2];
+ const char *page_label = argv[3];
+ gchar *absolute, *uri;
+- cairo_surface_t *surface;
+- cairo_t *cr;
+- cairo_status_t status;
+
+ if (argc != 4)
+ FAIL ("usage: pdf2png input_file.pdf output_file.png page");
+@@ -77,28 +75,16 @@
+
+ poppler_page_get_size (page, &width, &height);
+
+- surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
+- width * PIXELS_PER_POINT,
+- height * PIXELS_PER_POINT);
+- cr = cairo_create (surface);
++ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8,
++ width * PIXELS_PER_POINT,
++ height * PIXELS_PER_POINT);
++ gdk_pixbuf_fill (pixbuf, 0xffffffff);
++ poppler_page_render_to_pixbuf (page, 0, 0, width , height,
++ PIXELS_PER_POINT, 0, pixbuf);
+
+- /* Clear background */
+- cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */
+- cairo_paint (cr);
+-
+- poppler_page_render (page, cr);
+-
+- status = cairo_status (cr);
+- if (status)
+- FAIL (cairo_status_to_string (status));
+-
+- cairo_destroy (cr);
+-
+- cairo_surface_write_to_png (surface, output_filename);
+-
+- status = cairo_surface_status (surface);
+- if (status)
+- FAIL (cairo_status_to_string (status));
++ gdk_pixbuf_save (pixbuf, output_filename, "png", &error, NULL);
++ if (error != NULL)
++ FAIL (error->message);
+
+ return 0;
+ }