packages feed

cabal-debian 5.2.4 → 5.2.5

raw patch · 5 files changed

+42/−8 lines, 5 filesdep ~Cabaldep ~DiffPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: Cabal, Diff

API changes (from Hackage documentation)

- Debian.Debianize.CopyrightDescription: instance Data.Default.Class.Default Debian.Debianize.CopyrightDescription.CopyrightDescription
+ Debian.Debianize.CopyrightDescription: instance Data.Default.Internal.Default Debian.Debianize.CopyrightDescription.CopyrightDescription

Files

cabal-debian.cabal view
@@ -1,6 +1,6 @@ cabal-version:  3.0 Name:           cabal-debian-Version:        5.2.4+Version:        5.2.5 Copyright:      Copyright (c) 2007-2014, David Fox, Jeremy Shaw; 2017-2024 Clint Adams License:        BSD-3-Clause License-File:   LICENSE@@ -136,7 +136,7 @@   test-data/artvaluereport2/output/debian/artvaluereport2-backups.install   test-data/artvaluereport2/output/debian/copyright   test-data/artvaluereport2/output/debian/source/format-Tested-With:    GHC ==9.10.1 || ==9.8.2 || ==9.6.6+Tested-With:    GHC ==9.12.1 || ==9.10.1 || ==9.8.2 || ==9.6.6  Source-Repository head   type: git@@ -149,11 +149,11 @@   Build-Depends:     base >= 4.17 && < 5,     bifunctors,-    Cabal >= 3.0,+    Cabal >= 3.0 && < 3.15,     containers,     data-default,     deepseq,-    Diff >= 0.3.1,+    Diff >= 0.3.1 && < 2,     directory,     exceptions,     filepath,@@ -218,7 +218,7 @@   Build-Depends:     base >= 4.17 && <5,     cabal-debian,-    Cabal >= 3.0,+    Cabal >= 3.0 && < 3.15,     debian >= 3.95,     lens,     mtl,@@ -233,10 +233,10 @@   Build-Depends:     base >= 4.17 && < 5,     cabal-debian,-    Cabal >= 3.0,+    Cabal >= 3.0 && < 3.15,     containers,     debian >= 3.95,-    Diff >= 0.3.1,+    Diff >= 0.3.1 && < 2,     directory,     filepath,     hsemail >= 2,
src/Debian/Debianize/Finalize.hs view
@@ -62,6 +62,9 @@ import System.IO (hPutStrLn, stderr) import Text.Parsec.Rfc2822 (NameAddr(..)) import Distribution.Pretty (Pretty(pretty))+#if MIN_VERSION_Cabal(3,14,0)+import Distribution.Utils.Path (interpretSymbolicPath)+#endif  -- | @debianize customize@ initializes the CabalT state from the -- environment and the cabal package description in (and possibly the@@ -582,7 +585,12 @@            installedExec = Set.unions (Map.elems installedExecMap)         prefixPath <- dataTop-       let dataFilePaths = Set.fromList (zip (List.map (prefixPath </>) (Cabal.dataFiles pkgDesc)) (Cabal.dataFiles pkgDesc)) :: Set (FilePath, FilePath)+#if MIN_VERSION_Cabal(3,14,0)+       let dFpD = List.map (interpretSymbolicPath Nothing) (Cabal.dataFiles pkgDesc)+#else+       let dFpD = Cabal.dataFiles pkgDesc+#endif+           dataFilePaths = Set.fromList (zip (List.map (prefixPath </>) dFpD) dFpD) :: Set (FilePath, FilePath)            execFilePaths :: Set FilePath            execFilePaths = Set.map (unUnqualComponentName . Cabal.exeName) (Set.filter (Cabal.buildable . Cabal.buildInfo) (Set.fromList (Cabal.executables pkgDesc))) :: Set FilePath        let availableData = Set.union installedData dataFilePaths
src/Debian/Debianize/InputCabal.hs view
@@ -26,7 +26,12 @@ import Distribution.PackageDescription.Parsec (readGenericPackageDescription) #endif import Distribution.Types.ComponentRequestedSpec (ComponentRequestedSpec(ComponentRequestedSpec))+#if MIN_VERSION_Cabal(3,14,0)+import Distribution.Simple.Utils (defaultPackageDescCwd, die', setupMessage)+import Distribution.Utils.Path (relativeSymbolicPath)+#else import Distribution.Simple.Utils (defaultPackageDesc, die', setupMessage)+#endif import Distribution.System as Cabal (buildArch, Platform(..)) import qualified Distribution.System as Cabal (buildOS) #if MIN_VERSION_Cabal(3,2,0)@@ -54,7 +59,11 @@         -- Load a GenericPackageDescription from the current directory         -- and from that create a finalized PackageDescription for the         -- given CompilerId.+#if MIN_VERSION_Cabal(3,14,0)+        genPkgDesc <- liftIO $ defaultPackageDescCwd vb >>= readGenericPackageDescription vb Nothing . relativeSymbolicPath+#else         genPkgDesc <- liftIO $ defaultPackageDesc vb >>= readGenericPackageDescription vb+#endif         let finalized = finalizePD (mkFlagAssignment (toList fs)) (ComponentRequestedSpec True False) (const True) (Platform buildArch Cabal.buildOS) cinfo [] genPkgDesc         ePkgDesc <- either (return . Left)                            (\ (pkgDesc, _) -> do liftIO $ bracket (setFileCreationMask 0o022) setFileCreationMask $ \ _ -> autoreconf vb pkgDesc
src/Debian/Debianize/InputDebian.hs view
@@ -1,4 +1,5 @@ -- | Read an existing Debianization from a directory file.+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable, FlexibleInstances, ScopedTypeVariables, TypeSynonymInstances #-} {-# OPTIONS_GHC -Wall -fno-warn-orphans #-} module Debian.Debianize.InputDebian@@ -38,6 +39,9 @@ --import Debug.Trace (trace) import Distribution.Package (PackageIdentifier(..), unPackageName) import qualified Distribution.PackageDescription as Cabal (dataDir, PackageDescription(package))+#if MIN_VERSION_Cabal(3,14,0)+import Distribution.Utils.Path (interpretSymbolicPath)+#endif import Prelude hiding (break, lines, log, null, readFile, sum, words) import System.Directory (doesFileExist) import System.FilePath ((</>), dropExtension, takeExtension)@@ -298,6 +302,10 @@ dataTop :: Monad m => CabalT m FilePath dataTop = do   d <- use packageDescription+#if MIN_VERSION_Cabal(3,14,0)+  return $ case interpretSymbolicPath Nothing (Cabal.dataDir d) of+#else   return $ case Cabal.dataDir d of+#endif              "" -> "."              x -> x
src/Debian/Debianize/Output.hs view
@@ -1,6 +1,7 @@ -- | Wrappers around the debianization function to perform various -- tasks - output, describe, validate a debianization, run an external -- script to produce a debianization.+{-# LANGUAGE CPP #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleInstances, OverloadedStrings, ScopedTypeVariables, StandaloneDeriving, TupleSections, TypeSynonymInstances, RankNTypes #-} {-# OPTIONS -Wall -fno-warn-name-shadowing -fno-warn-orphans #-}@@ -22,7 +23,11 @@ import Control.Monad.Fail (MonadFail) import Control.Monad.State (get, put, StateT) import Control.Monad.Trans (liftIO, MonadIO)+#if MIN_VERSION_Diff(1,0,0)+import Data.Algorithm.DiffContext (getContextDiff, prettyContextDiff, unnumber)+#else import Data.Algorithm.DiffContext (getContextDiff, prettyContextDiff)+#endif import Data.Map as Map (elems, toList) import Data.Maybe (fromMaybe) import Data.Text as Text (split, Text, unpack)@@ -171,7 +176,11 @@       doFile path (Just o) (Just n) =           if o == n           then Nothing -- Just (path ++ ": Unchanged\n")+#if MIN_VERSION_Diff(1,0,0)+          else Just (show (prettyContextDiff (text ("old" </> path)) (text ("new" </> path)) (text . unpack . unnumber) (getContextDiff (Just 2) (split (== '\n') o) (split (== '\n') n))))+#else           else Just (show (prettyContextDiff (text ("old" </> path)) (text ("new" </> path)) (text . unpack) (getContextDiff 2 (split (== '\n') o) (split (== '\n') n))))+#endif       doFile _path Nothing Nothing = error "Internal error in zipMaps"  -- | Make sure the new debianization matches the existing