rpms/cairo/devel cairo-1.1.4-work-with-older-poppler.patch, NONE, 1.1 cairo.spec, 1.38, 1.39
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed May 3 09:26:37 UTC 2006
- Previous message (by thread): rpms/cairo/devel .cvsignore, 1.12, 1.13 cairo.spec, 1.37, 1.38 sources, 1.12, 1.13 cairo-1.1.2-XRenderAddGlyphs-4705.patch, 1.1, NONE cairo-1.1.2-embedded-bitmaps.patch, 1.1, NONE
- Next message (by thread): rpms/busybox/devel busybox-1.1.1-page_size.patch, NONE, 1.1 busybox.spec, 1.35, 1.36
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cworth
Update of /cvs/dist/rpms/cairo/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv29850
Modified Files:
cairo.spec
Added Files:
cairo-1.1.4-work-with-older-poppler.patch
Log Message:
Add new cairo-1.1.4-work-with-older-poppler.patch
cairo-1.1.4-work-with-older-poppler.patch:
pdf2png.c | 38 +++++++++++---------------------------
1 files changed, 11 insertions(+), 27 deletions(-)
--- NEW FILE cairo-1.1.4-work-with-older-poppler.patch ---
commit 1082d156e4578fe2158ad8de2aa9483ba511b8bf
Author: Carl Worth <cworth at cworth.org>
Date: Wed May 3 02:17:55 2006 -0700
Revert "pdf2png: Use new poppler_page_render to render directly through cairo."
This reverts 253472492ee2a690646a30b32cf8180f5b6e3299 commit.
diff --git a/test/pdf2png.c b/test/pdf2png.c
index c8ea0db..3edb17c 100644
--- a/test/pdf2png.c
+++ b/test/pdf2png.c
@@ -1,6 +1,5 @@
/*
* Copyright © 2005 Red Hat, Inc.
- * Copyright © 2006 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
@@ -21,8 +20,7 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * Authors: Kristian Høgsberg <krh at redhat.com>
- * Carl Worth <cworth at redhat.com>
+ * Author: Kristian Høgsberg <krh at redhat.com>
*/
#include <stdlib.h>
@@ -37,15 +35,13 @@ int main (int argc, char *argv[])
{
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 +73,16 @@ int main (int argc, char *argv[])
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;
}
Index: cairo.spec
===================================================================
RCS file: /cvs/dist/rpms/cairo/devel/cairo.spec,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- cairo.spec 3 May 2006 09:11:41 -0000 1.38
+++ cairo.spec 3 May 2006 09:26:34 -0000 1.39
@@ -4,7 +4,7 @@
Summary: A vector graphics library
Name: cairo
Version: 1.1.4
-Release: 1
+Release: 2
URL: http://cairographics.org
Source0: %{name}-%{version}.tar.gz
License: LGPL/MPL
@@ -23,6 +23,8 @@
BuildRequires: freetype-devel >= %{freetype_version}
BuildRequires: fontconfig-devel >= %{fontconfig_version}
+Patch0: cairo-1.1.4-work-with-older-poppler.patch
+
%description
Cairo is a vector graphics library designed to provide high-quality
display and print output. Currently supported output targets include
@@ -48,6 +50,7 @@
%prep
%setup -q
+%patch0 -p1 -b .work-with-older-poppler
%build
%configure --enable-warnings --disable-glitz --disable-quartz \
@@ -82,6 +85,10 @@
%{_datadir}/gtk-doc/*
%changelog
+* Wed May 3 2006 Carl Worth <cworth at redhat.com> - 1.1.4-2
+- Revert upstream commit that introduced a dependency on a newer
+ poppler version for the PDF tests.
+
* Wed May 3 2006 Carl Worth <cworth at redhat.com> - 1.1.4-1
- Update to new upstream 1.1.4
- Drop both embedded-bitmaps and XRenderAddGlyphs patches as both now
- Previous message (by thread): rpms/cairo/devel .cvsignore, 1.12, 1.13 cairo.spec, 1.37, 1.38 sources, 1.12, 1.13 cairo-1.1.2-XRenderAddGlyphs-4705.patch, 1.1, NONE cairo-1.1.2-embedded-bitmaps.patch, 1.1, NONE
- Next message (by thread): rpms/busybox/devel busybox-1.1.1-page_size.patch, NONE, 1.1 busybox.spec, 1.35, 1.36
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list