gtk 0.12.5.2 → 0.12.5.3
raw patch · 2 files changed
+20/−7 lines, 2 filesdep ~cairodep ~glibdep ~pango
Dependency ranges changed: cairo, glib, pango
Files
- Gtk2HsSetup.hs +16/−3
- gtk.cabal +4/−4
Gtk2HsSetup.hs view
@@ -55,8 +55,8 @@ import Distribution.Version (Version(..)) import Distribution.Verbosity import Control.Monad (when, unless, filterM, liftM, forM, forM_)-import Data.Maybe ( isJust, isNothing, fromMaybe, maybeToList )-import Data.List (isPrefixOf, isSuffixOf, stripPrefix, nub)+import Data.Maybe ( isJust, isNothing, fromMaybe, maybeToList, catMaybes )+import Data.List (isPrefixOf, isSuffixOf, stripPrefix, nub, tails ) import Data.Char (isAlpha, isNumber) import qualified Data.Map as M import qualified Data.Set as S@@ -247,10 +247,23 @@ = nub $ ["-I" ++ dir | dir <- PD.includeDirs bi] ++ [opt | opt@('-':c:_) <- PD.cppOptions bi ++ PD.ccOptions bi, c `elem` "DIU"]- ++ ["-D__GLASGOW_HASKELL__="++show (ghcDefine . versionBranch . compilerVersion $ LBI.compiler lbi)]+ ++ ["-D__GLASGOW_HASKELL__="++show (ghcDefine . ghcVersion . compilerId $ LBI.compiler lbi)] where ghcDefine (v1:v2:_) = v1 * 100 + v2 ghcDefine _ = __GLASGOW_HASKELL__++ ghcVersion :: CompilerId -> [Int]+-- This version is nicer, but we need to know the Cabal version that includes the new CompilerId+-- #if CABAL_VERSION_CHECK(1,19,2)+-- ghcVersion (CompilerId GHC v _) = versionBranch v+-- ghcVersion (CompilerId _ _ (Just c)) = ghcVersion c+-- #else+-- ghcVersion (CompilerId GHC v) = versionBranch v+-- #endif+-- ghcVersion _ = []+-- This version should work fine for now+ ghcVersion = concat . take 1 . map (read . (++"]") . takeWhile (/=']')) . catMaybes+ . map (stripPrefix "CompilerId GHC (Version {versionBranch = ") . tails . show installCHI :: PackageDescription -- ^information from the .cabal file -> LocalBuildInfo -- ^information from the configure step
gtk.cabal view
@@ -1,5 +1,5 @@ Name: gtk-Version: 0.12.5.2+Version: 0.12.5.3 License: LGPL-2.1 License-file: COPYING Copyright: (c) 2001-2010 The Gtk2Hs Team@@ -137,9 +137,9 @@ Library build-depends: base >= 4 && < 5, array, containers, mtl, bytestring,- glib >= 0.12.5 && < 0.13,- pango >= 0.12.5 && < 0.13,- cairo >= 0.12.5 && < 0.13+ glib >= 0.12.5.3 && < 0.13,+ pango >= 0.12.5.3 && < 0.13,+ cairo >= 0.12.5.3 && < 0.13 if flag(have-gio) build-depends: gio >= 0.12.5 && < 0.13 cpp-options: -DHAVE_GIO