From: Samuli Suominen Date: Wed, 19 Oct 2011 13:52:55 +0000 (+0000) Subject: Fix building with app-text/poppler >= 0.18 wrt #385057 by Diego Elio Pettenò X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e87f7fa2a9dd72180f27fc1baab24eca1a6092b6;p=gentoo.git Fix building with app-text/poppler >= 0.18 wrt #385057 by Diego Elio Pettenò Package-Manager: portage-2.2.0_alpha69/cvs/Linux x86_64 --- diff --git a/app-text/apvlv/ChangeLog b/app-text/apvlv/ChangeLog index afe65f39fc45..537c8a581742 100644 --- a/app-text/apvlv/ChangeLog +++ b/app-text/apvlv/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-text/apvlv # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/apvlv/ChangeLog,v 1.14 2011/07/14 09:29:11 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/apvlv/ChangeLog,v 1.15 2011/10/19 13:52:55 ssuominen Exp $ + +*apvlv-0.1.2-r1 (19 Oct 2011) + + 19 Oct 2011; Samuli Suominen +apvlv-0.1.2-r1.ebuild, + +files/apvlv-0.1.2-poppler-0.18.patch: + Fix building with app-text/poppler >= 0.18 wrt #385057 by Diego Elio Pettenò *apvlv-0.1.2 (14 Jul 2011) diff --git a/app-text/apvlv/Manifest b/app-text/apvlv/Manifest index 0a4f7f7608a8..85944846f4cc 100644 --- a/app-text/apvlv/Manifest +++ b/app-text/apvlv/Manifest @@ -1,19 +1,23 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 +Hash: SHA1 AUX apvlv-0.1.0-poppler-0.16.patch 433 RMD160 e6142232a6c2065bc43317f077002a72e8e974b8 SHA1 6f9845596c690e12df14916d57deac1a4057e25a SHA256 c7065f3a123378cb0bf574ef8bbfe2c5b894ddb7380933c23e39653c81bd3b17 +AUX apvlv-0.1.2-poppler-0.18.patch 4311 RMD160 bec007f97be2413d9568fb7d0e2de04da8606f0a SHA1 7dfc25c6785ea118aee68d3221b9e396c6aa3fd7 SHA256 b1dbf0a268b28af49f3de98794e66b5c16b10f03f007fddaf27861e14ffce59a DIST apvlv-0.1.1-Source.tar.gz 276433 RMD160 df4347783b5e2712e4a736190af95e0d53581d72 SHA1 b5edd49e69517cc09cd2ce053467d849a03eb238 SHA256 4427861af472c3c6297419dd8ad543cf32fcaaf178a00320f05ecc9f832881ff DIST apvlv-0.1.2-Source.tar.gz 331595 RMD160 50b9357369fab694f18d6574453309bd73ed4fe8 SHA1 7cb3219641e95b4b0f91ede66d061d6d48f53f74 SHA256 65f010287dd98644d25997f95054bc95abc22fd8d5e2d7bc3b3b59978fbb470a -EBUILD apvlv-0.1.1.ebuild 1312 RMD160 69e616fe5414d4e62255cf7af97f4706b79d6b8d SHA1 cd316309da8224fa9bdef0ebd40ce8b88aec6586 SHA256 83088fa6f077adba605c2740766aa3c6fc3e46bff559c9bd8a7cb3975264da17 -EBUILD apvlv-0.1.2.ebuild 1430 RMD160 6f942d68a708336ef7525709a90768690cf25ab0 SHA1 6c4449e55e84854bebe02ae7d92bfec5c2f19d29 SHA256 e85c61bb9eacd21899f58490a393d3d9d61e6130dc6c9029fffaf51f20206356 -MISC ChangeLog 2300 RMD160 ad58c373f9dd1614183bc3a592fc5119b7e050b1 SHA1 d755149e86f3bb2fd79ce5107be47890b4ac33fe SHA256 428b2aa0e80ad9dc7489709191e5f2b0b429123e3c188814d14461015b95807a +EBUILD apvlv-0.1.1.ebuild 1340 RMD160 12fb24bfed86628ef83d1df4367ded83eb7a351a SHA1 fcecfba15a75f0ef7b11abdf34249ed8bd8406a1 SHA256 e1ee3376621494c60793105c8a9996b44baf4f1504079b46e5862c5fd4d4f73d +EBUILD apvlv-0.1.2-r1.ebuild 1435 RMD160 18b93a9b04941247ae552b57dc0a914d88eed525 SHA1 62553ae556aedacb5af7104c84c7267b40be5c33 SHA256 557e59f25dbc6b7c1b61f8e9b241d24701fb689e4d06c2640fca8d7a2ecdd173 +EBUILD apvlv-0.1.2.ebuild 1454 RMD160 5c5c2adfecebf7aaba462a288a1bd816a75e9585 SHA1 c028f347f17a3b964b09d7c9688a0835fd35bb75 SHA256 c409ea8182d67239203f64d36496bacc155001f645f486490d716f60e0e9c3f5 +MISC ChangeLog 2531 RMD160 6df456ffae4b22c32fb7e4a9b92eff65a0d9512e SHA1 c8fa489ab376d29cae9ac658b34056b79780429e SHA256 2520840bcab545d7b26e3587febdd2fa119bf92bd96bd8938573b7137bc43267 MISC metadata.xml 238 RMD160 aa4c6102dcad9033be66a368544fb5eb1333a2fa SHA1 b1bb872f150b9a4662c2ae89d549ef179abdedad SHA256 c82e7b300e53440b3083f208b7c5266d4dfb30d5e844bf5f3cc3537a76891d14 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iJwEAQEIAAYFAk5/GKkACgkQfXuS5UK5QB2YSwP/f/iv7MOPxMImZi2lynzdHvlo -q9B1PhnjjKenYerulBLJAJAPoC2fkKiNE9awJZpvGx2fXfi6FX7njsfCoQ1nqe5o -Kx4E/Qqonum06VvW7a/gexBtlKta5HIb+8wamuN6EZu7on4S4M3NCWX4m+KmzqkE -x1CCDNzEzMA23pJK1Hk= -=D6B+ +iQEcBAEBAgAGBQJOntYeAAoJEEdUh39IaPFNr8UH+gJ0fW/bN30wILOP8ia/FTLZ +zrBjSC6xumFkmm20vKd4pZb90gRoOJYVE0Pw9v0LSW5o8E5SBH/ymEb3vnpamTo+ +bLvfKxGzj9HPf7jC9A33y1L+X3xZVolh4LxjbYXK5nqYwTgysyv6MTXPmTjirtyO +etJ39YPQBKO9zzcpuYGyd0qDEPVMINCZARt6Rt5fHbFlmMhhlL39sVmZYasZa/3E +f40QB7riW3r0M/qYOSKWvc545HX/RD110dkLUmy5YOCGyZMM6EBBvgcOylNqwtqh +6OGz+qpFipnMfe4Efuxt2FAVYXrRw7V7/y2jB3pgAjpT8jsTKlaQwCNuBQHXFi0= +=4Ciq -----END PGP SIGNATURE----- diff --git a/app-text/apvlv/apvlv-0.1.1.ebuild b/app-text/apvlv/apvlv-0.1.1.ebuild index c728e35cf710..7dfcf44bbabf 100644 --- a/app-text/apvlv/apvlv-0.1.1.ebuild +++ b/app-text/apvlv/apvlv-0.1.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/apvlv/apvlv-0.1.1.ebuild,v 1.3 2011/03/19 21:19:16 tomka Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/apvlv/apvlv-0.1.1.ebuild,v 1.4 2011/10/19 13:52:55 ssuominen Exp $ EAPI=3 @@ -18,6 +18,7 @@ IUSE="debug djvu" RDEPEND=">=x11-libs/gtk+-2.10.4:2 >=app-text/poppler-0.12.3-r3[cairo] + +--- src/poppler-gdk.h ++++ src/poppler-gdk.h +@@ -0,0 +1,132 @@ ++#include ++ ++static void ++copy_cairo_surface_to_pixbuf (cairo_surface_t *surface, ++ GdkPixbuf *pixbuf) ++{ ++ int cairo_width, cairo_height, cairo_rowstride; ++ unsigned char *pixbuf_data, *dst, *cairo_data; ++ int pixbuf_rowstride, pixbuf_n_channels; ++ unsigned int *src; ++ int x, y; ++ ++ cairo_width = cairo_image_surface_get_width (surface); ++ cairo_height = cairo_image_surface_get_height (surface); ++ cairo_rowstride = cairo_image_surface_get_stride (surface); ++ cairo_data = cairo_image_surface_get_data (surface); ++ ++ pixbuf_data = gdk_pixbuf_get_pixels (pixbuf); ++ pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf); ++ pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf); ++ ++ if (cairo_width > gdk_pixbuf_get_width (pixbuf)) ++ cairo_width = gdk_pixbuf_get_width (pixbuf); ++ if (cairo_height > gdk_pixbuf_get_height (pixbuf)) ++ cairo_height = gdk_pixbuf_get_height (pixbuf); ++ for (y = 0; y < cairo_height; y++) ++ { ++ src = (unsigned int *) (cairo_data + y * cairo_rowstride); ++ dst = pixbuf_data + y * pixbuf_rowstride; ++ for (x = 0; x < cairo_width; x++) ++ { ++ dst[0] = (*src >> 16) & 0xff; ++ dst[1] = (*src >> 8) & 0xff; ++ dst[2] = (*src >> 0) & 0xff; ++ if (pixbuf_n_channels == 4) ++ dst[3] = (*src >> 24) & 0xff; ++ dst += pixbuf_n_channels; ++ src++; ++ } ++ } ++} ++ ++static void ++_poppler_page_render_to_pixbuf (PopplerPage *page, ++ int src_x, int src_y, ++ int src_width, int src_height, ++ double scale, ++ int rotation, ++ GBool printing, ++ GdkPixbuf *pixbuf) ++{ ++ cairo_t *cr; ++ cairo_surface_t *surface; ++ ++ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, ++ src_width, src_height); ++ cr = cairo_create (surface); ++ cairo_save (cr); ++ switch (rotation) { ++ case 90: ++ cairo_translate (cr, src_x + src_width, -src_y); ++ break; ++ case 180: ++ cairo_translate (cr, src_x + src_width, src_y + src_height); ++ break; ++ case 270: ++ cairo_translate (cr, -src_x, src_y + src_height); ++ break; ++ default: ++ cairo_translate (cr, -src_x, -src_y); ++ } ++ ++ if (scale != 1.0) ++ cairo_scale (cr, scale, scale); ++ ++ if (rotation != 0) ++ cairo_rotate (cr, rotation * G_PI / 180.0); ++ ++ if (printing) ++ poppler_page_render_for_printing (page, cr); ++ else ++ poppler_page_render (page, cr); ++ cairo_restore (cr); ++ ++ cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER); ++ cairo_set_source_rgb (cr, 1., 1., 1.); ++ cairo_paint (cr); ++ ++ cairo_destroy (cr); ++ ++ copy_cairo_surface_to_pixbuf (surface, pixbuf); ++ cairo_surface_destroy (surface); ++} ++ ++/** ++ * poppler_page_render_to_pixbuf: ++ * @page: the page to render from ++ * @src_x: x coordinate of upper left corner ++ * @src_y: y coordinate of upper left corner ++ * @src_width: width of rectangle to render ++ * @src_height: height of rectangle to render ++ * @scale: scale specified as pixels per point ++ * @rotation: rotate the document by the specified degree ++ * @pixbuf: pixbuf to render into ++ * ++ * First scale the document to match the specified pixels per point, ++ * then render the rectangle given by the upper left corner at ++ * (src_x, src_y) and src_width and src_height. ++ * This function is for rendering a page that will be displayed. ++ * If you want to render a page that will be printed use ++ * poppler_page_render_to_pixbuf_for_printing() instead ++ * ++ * Deprecated: 0.16 ++ **/ ++void ++poppler_page_render_to_pixbuf (PopplerPage *page, ++ int src_x, int src_y, ++ int src_width, int src_height, ++ double scale, ++ int rotation, ++ GdkPixbuf *pixbuf) ++{ ++ g_return_if_fail (POPPLER_IS_PAGE (page)); ++ g_return_if_fail (scale > 0.0); ++ g_return_if_fail (pixbuf != NULL); ++ ++ _poppler_page_render_to_pixbuf (page, src_x, src_y, ++ src_width, src_height, ++ scale, rotation, ++ gFalse, ++ pixbuf); ++}