commit cpphs for openSUSE:Factory
Hello community, here is the log from the commit of package cpphs for openSUSE:Factory checked in at 2017-01-28 11:07:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cpphs (Old) and /work/SRC/openSUSE:Factory/.cpphs.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "cpphs" Changes: -------- --- /work/SRC/openSUSE:Factory/cpphs/cpphs.changes 2016-07-21 07:59:59.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.cpphs.new/cpphs.changes 2017-02-03 17:34:56.768097287 +0100 @@ -1,0 +2,11 @@ +Thu Sep 15 06:58:44 UTC 2016 - psimons@suse.com + +- Update to version 1.20.2 revision 0 with cabal2obs. + +------------------------------------------------------------------- +Sat Jul 23 11:53:53 UTC 2016 - jengelh@inai.de + +- SRPM license field should contain all licenses. In addition, + I see no obvious "or later" clauses. + +------------------------------------------------------------------- Old: ---- cpphs-1.20.1.tar.gz New: ---- cpphs-1.20.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cpphs.spec ++++++ --- /var/tmp/diff_new_pack.XY9Omw/_old 2017-02-03 17:34:57.300022000 +0100 +++ /var/tmp/diff_new_pack.XY9Omw/_new 2017-02-03 17:34:57.304021434 +0100 @@ -18,22 +18,20 @@ %global pkg_name cpphs Name: %{pkg_name} -Version: 1.20.1 +Version: 1.20.2 Release: 0 Summary: A liberalised re-implementation of cpp, the C pre-processor -License: GPL-2.0+ +License: GPL-2.0 and LGPL-2.1 Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{name} Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel -# Begin cabal-rpm deps: BuildRequires: ghc-directory-devel BuildRequires: ghc-old-locale-devel BuildRequires: ghc-old-time-devel BuildRequires: ghc-polyparse-devel BuildRequires: ghc-rpm-macros BuildRoot: %{_tmppath}/%{name}-%{version}-build -# End cabal-rpm deps %description Cpphs is a re-implementation of the C pre-processor that is both more @@ -68,7 +66,6 @@ %prep %setup -q - %build %ghc_lib_build ++++++ cpphs-1.20.1.tar.gz -> cpphs-1.20.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.1/CHANGELOG new/cpphs-1.20.2/CHANGELOG --- old/cpphs-1.20.1/CHANGELOG 2016-03-04 10:33:47.000000000 +0100 +++ new/cpphs-1.20.2/CHANGELOG 2016-09-05 18:34:13.000000000 +0200 @@ -2,6 +2,7 @@ ------------ * bugfixes for #if defined(FOO) && FOO(a,b) * (1.20.1): fix version number + * (1.20.2): ensure all input/output is UTF8, regardless of locale Version 1.19 ------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.1/Language/Preprocessor/Cpphs/ReadFirst.hs new/cpphs-1.20.2/Language/Preprocessor/Cpphs/ReadFirst.hs --- old/cpphs-1.20.1/Language/Preprocessor/Cpphs/ReadFirst.hs 2016-03-04 10:33:47.000000000 +0100 +++ new/cpphs-1.20.2/Language/Preprocessor/Cpphs/ReadFirst.hs 2016-09-05 18:34:13.000000000 +0200 @@ -13,12 +13,15 @@ module Language.Preprocessor.Cpphs.ReadFirst ( readFirst + , readFileUTF8 + , writeFileUTF8 ) where -import System.IO (hPutStrLn, stderr) +import System.IO import System.Directory (doesFileExist) -import Data.List (intersperse) -import Control.Monad (when) +import Data.List (intersperse) +import Control.Exception as E +import Control.Monad (when) import Language.Preprocessor.Cpphs.Position (Posn,directory,cleanPath) -- | Attempt to read the given file from any location within the search path. @@ -51,5 +54,20 @@ let file = cleanPath p++'/':cleanPath name ok <- doesFileExist file if not ok then try name ps - else do content <- readFile file + else do content <- readFileUTF8 file return (file,content) + +readFileUTF8 :: FilePath -> IO String +readFileUTF8 file = do + h <- openFile file ReadMode + (do utf8r <- mkTextEncoding "UTF-8//ROUNDTRIP" + hSetEncoding h utf8r + hGetContents h) `E.onException` (hClose h) + +writeFileUTF8 :: FilePath -> String -> IO () +writeFileUTF8 f txt = withFile f WriteMode $ \hdl-> + do utf8r <- mkTextEncoding "UTF-8//ROUNDTRIP" + hSetEncoding hdl utf8r + hPutStr hdl txt + `E.onException` (hClose hdl) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.1/cpphs.cabal new/cpphs-1.20.2/cpphs.cabal --- old/cpphs-1.20.1/cpphs.cabal 2016-03-04 10:33:47.000000000 +0100 +++ new/cpphs-1.20.2/cpphs.cabal 2016-09-05 18:34:13.000000000 +0200 @@ -1,5 +1,5 @@ Name: cpphs -Version: 1.20.1 +Version: 1.20.2 Copyright: 2004-2016, Malcolm Wallace License: LGPL License-File: LICENCE-LGPL @@ -7,6 +7,7 @@ Author: Malcolm Wallace <Malcolm.Wallace@me.com> Maintainer: Malcolm Wallace <Malcolm.Wallace@me.com> Homepage: http://projects.haskell.org/cpphs/ +bug-reports: https://github.com/malcolmwallace/cpphs/issues Synopsis: A liberalised re-implementation of cpp, the C pre-processor. Description: Cpphs is a re-implementation of the C pre-processor that is both diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.1/cpphs.hs new/cpphs-1.20.2/cpphs.hs --- old/cpphs-1.20.1/cpphs.hs 2016-03-04 10:33:47.000000000 +0100 +++ new/cpphs-1.20.2/cpphs.hs 2016-09-05 18:34:13.000000000 +0200 @@ -15,15 +15,20 @@ import System.Exit ( exitWith, ExitCode(..) ) import Data.Maybe import Language.Preprocessor.Cpphs ( runCpphs, CpphsOptions(..), parseOptions ) -import System.IO ( stdout, IOMode(WriteMode), openFile, hPutStr, hFlush, hClose ) +import Language.Preprocessor.Cpphs.ReadFirst ( readFileUTF8, writeFileUTF8 ) +import System.IO ( stdin, stdout, stderr, hFlush, hSetEncoding, utf8 ) import Control.Monad ( when ) import Data.List ( isPrefixOf ) version :: String -version = "1.20.1" +version = "1.20.2" main :: IO () main = do + hSetEncoding stdin utf8 + hSetEncoding stdout utf8 + hSetEncoding stderr utf8 + args <- getArgs args <- return $ if "--cpp" `elem` args then convertArgs args else args @@ -60,10 +65,10 @@ execute :: CpphsOptions -> Maybe FilePath -> Maybe FilePath -> IO () execute opts ofile infile = let (filename, readIt) = case infile of - Just x -> (x, readFile x) + Just x -> (x, readFileUTF8 x) Nothing -> ("stdin", getContents) output Nothing x = do putStr x; hFlush stdout - output (Just f) x = writeFile f x + output (Just f) x = writeFileUTF8 f x in do contents <- readIt transformed <- runCpphs opts filename contents output ofile transformed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.1/docs/index.html new/cpphs-1.20.2/docs/index.html --- old/cpphs-1.20.1/docs/index.html 2016-03-04 10:33:47.000000000 +0100 +++ new/cpphs-1.20.2/docs/index.html 2016-09-05 18:34:13.000000000 +0200 @@ -198,12 +198,11 @@ <b>Current stable version:</b> <p> -cpphs-1.20, release date 2016-03-04<br> +cpphs-1.20.2, release date 2016-09-05<br> By HTTP: <a href="http://hackage.haskell.org/package/cpphs">Hackage</a>. <ul> -<li> bugfix for #if defined(FOO) && FOO(a,b) -<li> (1.20.1) fix version number +<li> (1.20.2) ensure all input/output is UTF8, regardless of locale </ul> <p> @@ -227,6 +226,16 @@ <b>Older versions:</b> <p> +cpphs-1.20, release date 2016-03-04<br> +By HTTP: +<a href="http://hackage.haskell.org/package/cpphs">Hackage</a>. +<ul> +<li> bugfix for #if defined(FOO) && FOO(a,b) +<li> (1.20.1) fix version number +<li> (1.20.2) ensure all input/output is UTF8, regardless of locale +</ul> + +<p> cpphs-1.19.3, release date 2015-08-23<br> By HTTP: <a href="http://hackage.haskell.org/package/cpphs">Hackage</a>.
participants (1)
-
root@hilbertn.suse.de