diff --git a/Graphics/Rendering/Cairo.hs b/Graphics/Rendering/Cairo.hs
--- a/Graphics/Rendering/Cairo.hs
+++ b/Graphics/Rendering/Cairo.hs
@@ -96,6 +96,7 @@
   , getTolerance
   , clip
   , clipPreserve
+  , clipExtents
   , resetClip
   , fill
   , fillPreserve
@@ -701,6 +702,12 @@
 --
 resetClip :: Render ()
 resetClip = liftRender0 Internal.resetClip
+
+-- | Computes a bounding box in user coordinates covering the area
+-- inside the current clip.
+--
+clipExtents :: Render (Double,Double,Double,Double)
+clipExtents = liftRender0 Internal.clipExtents
 
 -- | A drawing operator that fills the current path according to the current
 -- fill rule, (each sub-path is implicitly closed before being filled).
diff --git a/Graphics/Rendering/Cairo/Internal/Drawing/Cairo.chs b/Graphics/Rendering/Cairo/Internal/Drawing/Cairo.chs
--- a/Graphics/Rendering/Cairo/Internal/Drawing/Cairo.chs
+++ b/Graphics/Rendering/Cairo/Internal/Drawing/Cairo.chs
@@ -57,6 +57,7 @@
 {#fun clip               as clip             { unCairo `Cairo' } -> `()'#}
 {#fun clip_preserve      as clipPreserve     { unCairo `Cairo' } -> `()'#}
 {#fun reset_clip         as resetClip        { unCairo `Cairo' } -> `()'#}
+{#fun clip_extents       as clipExtents      { unCairo `Cairo', alloca- `Double' peekFloatConv*, alloca- `Double' peekFloatConv*, alloca- `Double' peekFloatConv*, alloca- `Double' peekFloatConv* } -> `()'#}
 {#fun fill               as fill             { unCairo `Cairo' } -> `()'#}
 {#fun fill_preserve      as fillPreserve     { unCairo `Cairo' } -> `()'#}
 {#fun fill_extents       as fillExtents      { unCairo `Cairo', alloca- `Double' peekFloatConv*, alloca- `Double' peekFloatConv*, alloca- `Double' peekFloatConv*, alloca- `Double' peekFloatConv* } -> `()'#}
diff --git a/Gtk2HsSetup.hs b/Gtk2HsSetup.hs
--- a/Gtk2HsSetup.hs
+++ b/Gtk2HsSetup.hs
@@ -167,7 +167,11 @@
     let clbi = LBI.getComponentLocalBuildInfo lbi LBI.CLibName
 
     installedPkgInfoRaw <- generateRegistrationInfo
+#if CABAL_VERSION_CHECK(1,22,0)
+                           verbosity pkg lib lbi clbi inplace False distPref packageDb
+#else
                            verbosity pkg lib lbi clbi inplace distPref
+#endif
 
     dllsInScope <- getSearchPath >>= (filterM doesDirectoryExist) >>= getDlls
     let libs = fixLibs dllsInScope (extraLibraries installedPkgInfoRaw)
diff --git a/cairo.cabal b/cairo.cabal
--- a/cairo.cabal
+++ b/cairo.cabal
@@ -1,5 +1,5 @@
 Name:           cairo
-Version:        0.13.0.5
+Version:        0.13.0.6
 License:        BSD3
 License-file:   COPYRIGHT
 Copyright:      (c) 2001-2010 The Gtk2Hs Team, (c) Paolo Martini 2005, (c) Abraham Egnor 2003, 2004, (c) Aetion Technologies LLC 2004
