I found a few build issues on Ubuntu 12.04. This seems to make poppler buildable again. I'm not sure if you want to outright remove the pageRender* functions (they are deprecated) or just #ifdef them. Let me know if there are any issues. Thanks!
Cheers, - Ben 3 patches for repository http://patch-tag.com/r/AndyStewart/poppler: Wed May 30 20:05:28 EDT 2012 bgamari.f...@gmail.com * Ensure that pango.h is included Wed May 30 20:13:19 EDT 2012 bgamari.f...@gmail.com * Remove pageRenderSelectionToPixbuf and pageRenderToPixbuf As of 0.18.4 these functions no longer exist Wed May 30 20:13:38 EDT 2012 bgamari.f...@gmail.com * Remove redundant haskell98 build-depends Prelude is provided by both base and haskell98. As mentioned here[1], the recommended course of action is to remove haskell98.
[Ensure that pango.h is included bgamari.f...@gmail.com**20120531000528 Ignore-this: 67a06fb8f2178297cbe7db4a4be12c34 ] addfile ./poppler-gtk2hs.h hunk ./poppler-gtk2hs.h 1 +#include <glib/poppler.h> +#include <pango/pango.h> + hunk ./poppler.cabal 19 And move to forward in a number of areas that don't fit within the goals of xpdf. Category: Graphics Tested-With: GHC == 6.12.3 -Extra-Source-Files: Gtk2HsSetup.hs +Extra-Source-Files: poppler-gtk2hs.h + Gtk2HsSetup.hs hierarchy.list template-hsc-gtk2hs.h hunk ./poppler.cabal 64 extensions: ForeignFunctionInterface include-dirs: . - x-c2hs-Header: glib/poppler.h + x-c2hs-Header: poppler-gtk2hs.h pkgconfig-depends: poppler-glib >= 0.12.4, gobject-2.0, glib-2.0, cairo >= 1.2.0, gdk-2.0, gdk-pixbuf-2.0, pango [Remove pageRenderSelectionToPixbuf and pageRenderToPixbuf bgamari.f...@gmail.com**20120531001319 Ignore-this: de69e8a4e5cdb6f52d9cb25d68be532d As of 0.18.4 these functions no longer exist ] hunk ./Graphics/UI/Gtk/Poppler/Page.chs 45 -- * Methods pageRender, - pageRenderToPixbuf, pageGetSize, pageGetIndex, pageGetThumbnail, hunk ./Graphics/UI/Gtk/Poppler/Page.chs 59 pageGetFormFieldMapping, pageGetSelectionRegion, pageRenderSelection, - pageRenderSelectionToPixbuf, ) where import Control.Monad hunk ./Graphics/UI/Gtk/Poppler/Page.chs 88 pageRender page = ask >>= \ x -> liftIO ({#call poppler_page_render #} (toPage page) x) --- | First scale the document to match the specified pixels per point, then render the rectangle given by --- the upper left corner at (@srcX@, @srcY@) and @srcWidth@ and @srcHeight@. This function is for rendering --- a page that will be displayed. If you want to render a page that will be printed use --- 'pageRenderToPixbufForPrinting' instead -pageRenderToPixbuf :: PageClass page => page - -> Rectangle -- ^ @rect@ rectangle to render - -> Double -- ^ @scale@ scale specified as pixels per point - -> Int -- ^ @rotation@ rotate the document by the specified degree - -> Pixbuf -- ^ @pixbuf@ pixbuf to render into - -> IO () -pageRenderToPixbuf page (Rectangle x y width height) scale rotation pixbuf = - {#call poppler_page_render_to_pixbuf #} - (toPage page) - (fromIntegral x) - (fromIntegral y) - (fromIntegral width) - (fromIntegral height) - (realToFrac scale) - (fromIntegral rotation) - pixbuf - -- | Gets the size of page at the current scale and rotation. pageGetSize :: PageClass page => page -> IO (Double, Double) hunk ./Graphics/UI/Gtk/Poppler/Page.chs 293 (castPtr glyphColorPtr) (castPtr backgroundColorPtr) --- | Render the selection specified by selection for page into pixbuf. The selection will be rendered at --- scale, using @glyphColor@ for the glyphs and @backgroundColor@ for the selection background. --- --- If non-'Nothing', @oldSelection@ specifies the selection that is already rendered in pixbuf, in which case --- this function will (some day) only render the changed part of the selection. -pageRenderSelectionToPixbuf :: PageClass page => page - -> Double -- ^ @scale@ scale specified as pixels per point - -> Int -- ^ @rotation@ rotate the document by the specified degree - -> Pixbuf -- ^ @pixbuf@ pixbuf to render to - -> PopplerRectangle -- ^ @selection@ start and end point of selection as a rectangle - -> PopplerRectangle -- ^ @oldSelection@ previous selection - -> SelectionStyle -- ^ @style@ a 'SelectionStyle' - -> Color -- ^ @glyphColor@ color to use for drawing glyphs - -> Color -- ^ @backgroundColor@ color to use for the selection background - -> IO () -pageRenderSelectionToPixbuf page scale rotation pixbuf selection oldSelection style glyphColor backgroundColor = - with selection $ \ selectionPtr -> - with oldSelection $ \ oldSelectionPtr -> - with glyphColor $ \ glyphColorPtr -> - with backgroundColor $ \ backgroundColorPtr -> - {#call poppler_page_render_selection_to_pixbuf #} - (toPage page) - (realToFrac scale) - (fromIntegral rotation) - pixbuf - (castPtr selectionPtr) - (castPtr oldSelectionPtr) - ((fromIntegral . fromEnum) style) - (castPtr glyphColorPtr) - (castPtr backgroundColorPtr) [Remove redundant haskell98 build-depends bgamari.f...@gmail.com**20120531001338 Ignore-this: d8f91b8da08357431fdad45fa84c86e6 Prelude is provided by both base and haskell98. As mentioned here[1], the recommended course of action is to remove haskell98. ] hunk ./poppler.cabal 41 location: http://patch-tag.com/r/AndyStewart/poppler Library - build-depends: base >= 4 && < 5, array, containers, haskell98, mtl, bytestring, + build-depends: base >= 4 && < 5, array, containers, mtl, bytestring, glib >= 0.12 && < 0.13, cairo >= 0.12 && < 0.13, gtk >= 0.12 && < 0.13
ensure-that-pango_h-is-included.dpatch
Description: A darcs patch for your repository!
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Gtk2hs-devel mailing list Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel