Hello community, here is the log from the commit of package cpphs for openSUSE:Factory checked in at 2017-05-06 18:27:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cpphs (Old) and /work/SRC/openSUSE:Factory/.cpphs.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cpphs" Sat May 6 18:27:52 2017 rev:11 rq:491450 version:1.20.5 Changes: -------- --- /work/SRC/openSUSE:Factory/cpphs/cpphs.changes 2017-04-14 13:37:10.723990178 +0200 +++ /work/SRC/openSUSE:Factory/.cpphs.new/cpphs.changes 2017-05-06 18:28:05.244469016 +0200 @@ -1,0 +2,5 @@ +Wed Apr 19 13:20:26 UTC 2017 - [email protected] + +- Update to version 1.20.5 with cabal2obs. + +------------------------------------------------------------------- Old: ---- cpphs-1.20.4.tar.gz cpphs.cabal New: ---- cpphs-1.20.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cpphs.spec ++++++ --- /var/tmp/diff_new_pack.0V6kho/_old 2017-05-06 18:28:07.880097116 +0200 +++ /var/tmp/diff_new_pack.0V6kho/_new 2017-05-06 18:28:07.880097116 +0200 @@ -18,17 +18,15 @@ %global pkg_name cpphs Name: %{pkg_name} -Version: 1.20.4 +Version: 1.20.5 Release: 0 Summary: A liberalised re-implementation of cpp, the C pre-processor 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 -Source1: https://hackage.haskell.org/package/%{name}-%{version}/revision/1.cabal#/%{name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-directory-devel -BuildRequires: ghc-filepath-devel BuildRequires: ghc-old-locale-devel BuildRequires: ghc-old-time-devel BuildRequires: ghc-polyparse-devel @@ -67,7 +65,6 @@ %prep %setup -q -cp -p %{SOURCE1} %{name}.cabal %build %ghc_lib_build ++++++ cpphs-1.20.4.tar.gz -> cpphs-1.20.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.4/CHANGELOG new/cpphs-1.20.5/CHANGELOG --- old/cpphs-1.20.4/CHANGELOG 2017-02-27 16:00:59.000000000 +0100 +++ new/cpphs-1.20.5/CHANGELOG 2017-04-11 15:22:48.000000000 +0200 @@ -3,6 +3,9 @@ * 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 + * (1.20.3): detect an absolute windows path with a drive letter in a #include + * (1.20.4): more windows path handling + * (1.20.5): revert change in 1.20.4 Version 1.19 ------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.4/Language/Preprocessor/Cpphs/Position.hs new/cpphs-1.20.5/Language/Preprocessor/Cpphs/Position.hs --- old/cpphs-1.20.4/Language/Preprocessor/Cpphs/Position.hs 2017-02-27 16:00:58.000000000 +0100 +++ new/cpphs-1.20.5/Language/Preprocessor/Cpphs/Position.hs 2017-04-11 15:22:48.000000000 +0200 @@ -17,6 +17,7 @@ , addcol, newline, tab, newlines, newpos , cppline, haskline, cpp2hask , filename, lineno, directory + , cleanPath ) where import Data.List (isPrefixOf) @@ -38,7 +39,7 @@ -- | Constructor. Argument is filename. newfile :: String -> Posn -newfile name = Pn name 1 1 Nothing +newfile name = Pn (cleanPath name) 1 1 Nothing -- | Increment column number by given quantity. addcol :: Int -> Posn -> Posn @@ -96,3 +97,10 @@ dirname = reverse . safetail . dropWhile (not.(`elem`"\\/")) . reverse where safetail [] = [] safetail (_:x) = x + +-- | Sigh. Mixing Windows filepaths with unix is bad. Make sure there is a +-- canonical path separator. +cleanPath :: FilePath -> FilePath +cleanPath [] = [] +cleanPath ('\\':cs) = '/': cleanPath cs +cleanPath (c:cs) = c: cleanPath cs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.4/Language/Preprocessor/Cpphs/ReadFirst.hs new/cpphs-1.20.5/Language/Preprocessor/Cpphs/ReadFirst.hs --- old/cpphs-1.20.4/Language/Preprocessor/Cpphs/ReadFirst.hs 2017-02-27 16:00:58.000000000 +0100 +++ new/cpphs-1.20.5/Language/Preprocessor/Cpphs/ReadFirst.hs 2017-04-11 15:22:48.000000000 +0200 @@ -18,12 +18,11 @@ ) where import System.IO -import System.Directory (doesFileExist,findFile) -import System.FilePath (isRelative) +import System.Directory (doesFileExist) import Data.List (intersperse) import Control.Exception as E import Control.Monad (when) -import Language.Preprocessor.Cpphs.Position (Posn,directory) +import Language.Preprocessor.Cpphs.Position (Posn,directory,cleanPath) -- | Attempt to read the given file from any location within the search path. -- The first location found is returned, together with the file content. @@ -37,25 +36,27 @@ , String ) -- ^ discovered filepath, and file contents - -readFirst name demand paths warn = do - case (isRelative name, directory demand) of - (False, _) -> try name [] - (_, "") -> try name (".":paths) - (_, dd) -> try name (dd:".":paths) +readFirst name demand path warn = + case name of + nm@(c:':':_) -> try nm [""] -- Windows absolute path + '/':nm -> try nm [""] + _ -> try name (cons dd (".":path)) where - try name ds = do - file <- findFile ds name - case file of - Just f -> do - content <- readFileUTF8 f - return (f,content) - Nothing -> do + dd = directory demand + cons x xs = if null x then xs else x:xs + try name [] = do + when warn $ hPutStrLn stderr ("Warning: Can't find file \""++name ++"\" in directories\n\t" - ++concat (intersperse "\n\t" ds) + ++concat (intersperse "\n\t" (cons dd (".":path))) ++"\n Asked for by: "++show demand) - return ("missing file: "++name,"") + return ("missing file: "++name,"") + try name (p:ps) = do + let file = cleanPath p++'/':cleanPath name + ok <- doesFileExist file + if not ok then try name ps + else do content <- readFileUTF8 file + return (file,content) readFileUTF8 :: FilePath -> IO String readFileUTF8 file = do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.4/Language/Preprocessor/Cpphs/RunCpphs.hs new/cpphs-1.20.5/Language/Preprocessor/Cpphs/RunCpphs.hs --- old/cpphs-1.20.4/Language/Preprocessor/Cpphs/RunCpphs.hs 2017-02-27 16:00:58.000000000 +0100 +++ new/cpphs-1.20.5/Language/Preprocessor/Cpphs/RunCpphs.hs 2017-04-11 15:22:48.000000000 +0200 @@ -15,7 +15,7 @@ import Language.Preprocessor.Cpphs.Options (CpphsOptions(..), BoolOptions(..) ,trailing) import Language.Preprocessor.Cpphs.Tokenise (deWordStyle, tokenise) -import Language.Preprocessor.Cpphs.Position (Posn) +import Language.Preprocessor.Cpphs.Position (cleanPath, Posn) import Language.Preprocessor.Unlit as Unlit (unlit) @@ -31,7 +31,7 @@ preInc = case preInclude options of [] -> "" is -> concatMap (\f->"#include \""++f++"\"\n") is - ++ "#line 1 \""++filename++"\"\n" + ++ "#line 1 \""++cleanPath filename++"\"\n" pass1 <- cppIfdef filename (defines options) (includes options) bools (preInc++input) @@ -58,7 +58,7 @@ preInc = case preInclude options of [] -> "" is -> concatMap (\f->"#include \""++f++"\"\n") is - ++ "#line 1 \""++filename++"\"\n" + ++ "#line 1 \""++cleanPath filename++"\"\n" (pass2,syms) <- if macros bools then do pass1 <- cppIfdef filename (defines options) (includes options) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.4/README new/cpphs-1.20.5/README --- old/cpphs-1.20.4/README 2017-02-27 16:00:58.000000000 +0100 +++ new/cpphs-1.20.5/README 2017-04-11 15:22:48.000000000 +0200 @@ -30,7 +30,7 @@ COPYRIGHT --------- -Copyright (c) 2004-2016 Malcolm Wallace ([email protected]) +Copyright (c) 2004-2017 Malcolm Wallace ([email protected]) LICENCE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.4/cpphs.cabal new/cpphs-1.20.5/cpphs.cabal --- old/cpphs-1.20.4/cpphs.cabal 2017-02-27 16:00:59.000000000 +0100 +++ new/cpphs-1.20.5/cpphs.cabal 2017-04-11 15:22:48.000000000 +0200 @@ -1,5 +1,5 @@ Name: cpphs -Version: 1.20.4 +Version: 1.20.5 Copyright: 2004-2017, Malcolm Wallace License: LGPL License-File: LICENCE-LGPL @@ -24,7 +24,7 @@ Extra-Source-Files: README, LICENCE-GPL, LICENCE-commercial, CHANGELOG, docs/cpphs.1, docs/index.html Library - Build-Depends: base>3&&<6, old-locale, old-time, directory, filepath, polyparse>=1.9 + Build-Depends: base>3&&<6, old-locale, old-time, directory, polyparse>=1.9 Exposed-Modules: Language.Preprocessor.Cpphs Language.Preprocessor.Unlit @@ -40,7 +40,7 @@ Language.Preprocessor.Cpphs.Tokenise Executable cpphs - Build-Depends: base>3&&<6, old-locale, old-time, directory, filepath, polyparse>=1.9 + Build-Depends: base>3&&<6, old-locale, old-time, directory, polyparse>=1.9 Main-Is: cpphs.hs Other-Modules: Language.Preprocessor.Cpphs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.4/cpphs.hs new/cpphs-1.20.5/cpphs.hs --- old/cpphs-1.20.4/cpphs.hs 2017-02-27 16:00:58.000000000 +0100 +++ new/cpphs-1.20.5/cpphs.hs 2017-04-11 15:22:48.000000000 +0200 @@ -21,7 +21,7 @@ import Data.List ( isPrefixOf ) version :: String -version = "1.20.4" +version = "1.20.5" main :: IO () main = do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpphs-1.20.4/docs/index.html new/cpphs-1.20.5/docs/index.html --- old/cpphs-1.20.4/docs/index.html 2017-02-27 16:00:59.000000000 +0100 +++ new/cpphs-1.20.5/docs/index.html 2017-04-11 15:22:48.000000000 +0200 @@ -198,11 +198,11 @@ <b>Current stable version:</b> <p> -cpphs-1.20.3, release date 2017-02-06<br> +cpphs-1.20.5, release date 2017-04-11<br> By HTTP: <a href="http://hackage.haskell.org/package/cpphs">Hackage</a>. <ul> -<li> (1.20.3) detect an absolute windows path with a drive letter in a #include +<li> (1.20.5) reverts the changes in 1.20.4 </ul> <p> @@ -226,6 +226,30 @@ <b>Older versions:</b> <p> +cpphs-1.20.5, release date 2017-04-11<br> +By HTTP: +<a href="http://hackage.haskell.org/package/cpphs">Hackage</a>. +<ul> +<li> (1.20.5) reverts the changes in 1.20.4 +</ul> + +<p> +cpphs-1.20.4, release date 2017-02-27<br> +By HTTP: +<a href="http://hackage.haskell.org/package/cpphs">Hackage</a>. +<ul> +<li> (1.20.4) more windows path handling +</ul> + +<p> +cpphs-1.20.3, release date 2017-02-06<br> +By HTTP: +<a href="http://hackage.haskell.org/package/cpphs">Hackage</a>. +<ul> +<li> (1.20.3) detect an absolute windows path with a drive letter in a #include +</ul> + +<p> cpphs-1.20.2, release date 2016-09-05<br> By HTTP: <a href="http://hackage.haskell.org/package/cpphs">Hackage</a>.
