webkitgtk3-javascriptcore 0.12.5.0 → 0.12.5.1
raw patch · 2 files changed
+41/−5 lines, 2 filesdep ~gtk3
Dependency ranges changed: gtk3
Files
- Gtk2HsSetup.hs +39/−3
- webkitgtk3-javascriptcore.cabal +2/−2
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,11 +247,24 @@ = 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 -> Verbosity -> CopyDest -- ^flags sent to copy or install@@ -332,6 +345,29 @@ Just f -> do info verb ("Ensuring that callback hooks in "++f++" are up-to-date.") genFile signalGenProgram signalsOpts f++ writeFile "gtk2hs_macros.h" $ generateMacros cPkgs++-- Based on Cabal/Distribution/Simple/Build/Macros.hs+generateMacros :: [PackageId] -> String+generateMacros cPkgs = concat $+ "/* DO NOT EDIT: This file is automatically generated by Gtk2HsSetup.hs */\n\n" :+ [ concat+ ["/* package ",display pkgid," */\n"+ ,"#define VERSION_",pkgname," ",show (display version),"\n"+ ,"#define MIN_VERSION_",pkgname,"(major1,major2,minor) (\\\n"+ ," (major1) < ",major1," || \\\n"+ ," (major1) == ",major1," && (major2) < ",major2," || \\\n"+ ," (major1) == ",major1," && (major2) == ",major2," && (minor) <= ",minor,")"+ ,"\n\n"+ ]+ | pkgid@(PackageIdentifier name version) <- cPkgs+ , let (major1:major2:minor:_) = map show (versionBranch version ++ repeat 0)+ pkgname = map fixchar (display name)+ ]+ where fixchar '-' = '_'+ fixchar '.' = '_'+ fixchar c = c --FIXME: Cabal should tell us the selected pkg-config package versions in the -- LocalBuildInfo or equivalent.
webkitgtk3-javascriptcore.cabal view
@@ -1,5 +1,5 @@ Name: webkitgtk3-javascriptcore-Version: 0.12.5.0+Version: 0.12.5.1 Synopsis: JavaScriptCore FFI from webkitgtk Description: FFI for JavaScriptCore module from webkitgtk License: BSD3@@ -58,4 +58,4 @@ -- /usr/lib/x86_64-linux-gnu/glib-2.0/include x-c2hs-Header: hsjscore.h pkgconfig-depends: webkitgtk-3.0 >=1.1.15- build-depends: gtk3 >=0.12.5.0 && <0.13, webkitgtk3 >= 0.12.5+ build-depends: gtk3 >=0.12.5.4 && <0.13, webkitgtk3 >= 0.12.5