Hello community,
here is the log from the commit of package ghc-haskell-gi for openSUSE:Factory
checked in at 2017-06-22 10:37:36
Comparing /work/SRC/openSUSE:Factory/ghc-haskell-gi (Old)
and /work/SRC/openSUSE:Factory/.ghc-haskell-gi.new (New)
Package is "ghc-haskell-gi"
Thu Jun 22 10:37:36 2017 rev:3 rq:504070 version:0.20.2
Changes:
--- /work/SRC/openSUSE:Factory/ghc-haskell-gi/ghc-haskell-gi.changes
2017-05-03 15:56:08.477110124 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-haskell-gi.new/ghc-haskell-gi.changes
2017-06-22 10:37:37.261070900 +0200
@@ -1,0 +2,5 @@
+Thu Jun 8 11:08:16 UTC 2017 - psim...@suse.com
+
+- Update to version 0.20.2.
+
+---
Old:
haskell-gi-0.20.1.tar.gz
New:
haskell-gi-0.20.2.tar.gz
Other differences:
--
++ ghc-haskell-gi.spec ++
--- /var/tmp/diff_new_pack.AW7ib5/_old 2017-06-22 10:37:37.900980688 +0200
+++ /var/tmp/diff_new_pack.AW7ib5/_new 2017-06-22 10:37:37.900980688 +0200
@@ -19,7 +19,7 @@
%global pkg_name haskell-gi
%bcond_with tests
Name: ghc-%{pkg_name}
-Version:0.20.1
+Version:0.20.2
Release:0
Summary:Generate Haskell bindings for GObject Introspection capable
libraries
License:LGPL-2.1+
++ haskell-gi-0.20.1.tar.gz -> haskell-gi-0.20.2.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/haskell-gi-0.20.1/ChangeLog.md
new/haskell-gi-0.20.2/ChangeLog.md
--- old/haskell-gi-0.20.1/ChangeLog.md 2017-03-27 22:44:51.0 +0200
+++ new/haskell-gi-0.20.2/ChangeLog.md 2017-06-03 12:00:54.0 +0200
@@ -1,11 +1,15 @@
+### 0.20.2
+
++ Fixes for GHC 8.2.1.
+
### 0.20.1
- + gtk-doc parser and haddock generator: while no means perfect,
- now the autogenerated bindings come with some reasonable
- autogenerated documentation.
++ gtk-doc parser and haddock generator: while by no means perfect,
+now the autogenerated bindings come with some reasonable
+autogenerated documentation.
- + Many bugfixes. A particularly important one is for
- [issue 82](https://github.com/haskell-gi/haskell-gi/issues/82), which
- made compilation of
- [gi-glib](http://hackage.haskell.org/package/gi-glib) fail, for
- the latest version of gobject-introspection.
++ Many bugfixes. A particularly important one is for
+[issue 82](https://github.com/haskell-gi/haskell-gi/issues/82), which
+made compilation of
+[gi-glib](http://hackage.haskell.org/package/gi-glib) fail, for
+the latest version of gobject-introspection.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/haskell-gi-0.20.1/cmdline/haskell-gi.hs
new/haskell-gi-0.20.2/cmdline/haskell-gi.hs
--- old/haskell-gi-0.20.1/cmdline/haskell-gi.hs 2017-03-27 22:44:51.0
+0200
+++ new/haskell-gi-0.20.2/cmdline/haskell-gi.hs 2017-06-03 12:00:54.0
+0200
@@ -5,6 +5,7 @@
#endif
import Control.Monad (forM_, when, (>=>))
import Control.Exception (handle)
+import Control.Applicative ((<|>))
import Data.Char (toLower)
import Data.Bool (bool)
@@ -71,6 +72,17 @@
let (a, '=':b) = break (=='=') s
in (a, b)
+solveNameVersion::Overrides -> Text -> (Text, Maybe Text)
+solveNameVersion ovs name = (nameWithoutVersion, version)
+ where
+ namePieces = T.splitOn "-" name
+ nameWithoutVersion = head namePieces
+ versionInName = if length namePieces == 2
+ then Just (last namePieces)
+ else Nothing
+ versionInOverride = M.lookup nameWithoutVersion (nsChooseVersion ovs)
+ version = versionInOverride <|> versionInName
+
optDescrs :: [OptDescr (Options -> Options)]
optDescrs = [
Option "h" ["help"] (NoArg $ \opt -> opt { optMode = Help })
@@ -118,8 +130,8 @@
-- | Load a dependency without further postprocessing.
loadRawAPIs :: Bool -> Overrides -> [FilePath] -> Text -> IO [(Name, API)]
loadRawAPIs verbose ovs extraPaths name = do
- let version = M.lookup name (nsChooseVersion ovs)
- gir <- loadRawGIRInfo verbose name version extraPaths
+ let (nameWithoutVersion, version) = solveNameVersion ovs name
+ gir <- loadRawGIRInfo verbose nameWithoutVersion version extraPaths
return (girAPIs gir)
-- | Set up the flags for the code generator.
@@ -165,18 +177,18 @@
-- for this module.
processMod :: Options -> Overrides -> [FilePath] -> Text -> IO ()
processMod options ovs extraPaths name = do
- let version = M.lookup name (nsChooseVersion ovs)
- cfg = Config {modName = name,
+ let (nameWithoutVersion, version) = solveNameVersion ovs name
+ cfg = Config {modName = nameWithoutVersion,
verbose = optVe