[Pkg-haskell-commits] darcs: haskell-debian: cabal-6.12.patch: Taken from upstream darcs repository
Joachim Breitner
mail at joachim-breitner.de
Sat May 1 19:49:55 UTC 2010
Sat May 1 19:41:12 UTC 2010 Joachim Breitner <mail at joachim-breitner.de>
* cabal-6.12.patch: Taken from upstream darcs repository
Ignore-this: de77119122aca81ac493daee116eddb0
A ./patches/
A ./patches/cabal-6.12.patch
A ./patches/series
Sat May 1 19:41:12 UTC 2010 Joachim Breitner <mail at joachim-breitner.de>
* cabal-6.12.patch: Taken from upstream darcs repository
Ignore-this: de77119122aca81ac493daee116eddb0
diff -rN -u old-haskell-debian/patches/cabal-6.12.patch new-haskell-debian/patches/cabal-6.12.patch
--- old-haskell-debian/patches/cabal-6.12.patch 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-debian/patches/cabal-6.12.patch 2010-05-01 19:49:54.964530331 +0000
@@ -0,0 +1,129 @@
+Sat Dec 26 16:48:09 CET 2009 David Fox <dsf at seereason.com>
+ * Changes to get a build under the Cabal shipped with ghc 6.12, made without a full understanding of what I was doing
+Index: haskell-debian-3.40/Distribution/Package/Debian/Bundled.hs
+===================================================================
+--- haskell-debian-3.40.orig/Distribution/Package/Debian/Bundled.hs 2009-09-15 17:08:39.000000000 +0200
++++ haskell-debian-3.40/Distribution/Package/Debian/Bundled.hs 2010-05-01 21:30:54.000000000 +0200
+@@ -30,7 +30,7 @@
+ import Debian.Control(Control'(Control), fieldValue, parseControlFromFile)
+ import Debian.Relation.ByteString()
+ import Debian.Relation(Relation(Rel),parseRelations)
+-import Distribution.InstalledPackageInfo(InstalledPackageInfo, libraryDirs, package)
++import Distribution.InstalledPackageInfo(InstalledPackageInfo, libraryDirs, sourcePackageId)
+ import Distribution.Simple.Compiler (Compiler(..), CompilerId(..), CompilerFlavor(..), PackageDB(GlobalPackageDB), compilerFlavor)
+ import Distribution.Simple.Configure (getInstalledPackages)
+ -- import Distribution.Simple.GHC (getInstalledPackages)
+@@ -81,7 +81,7 @@
+ (Just installedPackages) ->
+ do ghc6Files <- fmap lines $ readFile "/var/lib/dpkg/info/ghc6.list"
+ let ghcProvides = filter (\package -> any (\dir -> elem dir ghc6Files) (libraryDirs package)) (allPackages installedPackages)
+- return (Just (GHC, compilerVersion, map package ghcProvides))
++ return (Just (GHC, compilerVersion, map sourcePackageId ghcProvides))
+ ghc6BuiltIns _ = return Nothing
+
+ ghc6BuiltIns' :: Compiler -> IO (Maybe (CompilerFlavor, Version, [PackageIdentifier]))
+@@ -127,19 +127,19 @@
+ [base] -> Right base
+ _ -> Left ("When attempt to extract the base name of " ++ name ++ " I found the following matches: " ++ show subs)
+
+-getInstalledPackageIndex :: Compiler -> IO (Maybe (PackageIndex InstalledPackageInfo))
++--getInstalledPackageIndex :: Compiler -> IO (Maybe PackageIndex)
+ getInstalledPackageIndex compiler =
+ do pc <- configureAllKnownPrograms normal defaultProgramConfiguration
+- getInstalledPackages normal compiler GlobalPackageDB pc
++ getInstalledPackages normal compiler [GlobalPackageDB] pc
+
+-installedVersions :: String -> PackageIndex InstalledPackageInfo -> Either String [PackageIdentifier]
++installedVersions :: String -> PackageIndex -> Either String [PackageIdentifier]
+ installedVersions name packageIndex =
+ case searchByName packageIndex name of
+ None -> Left $ "The package " ++ name ++ " does not seem to be installed."
+ Unambiguous pkgs ->
+- case sortBy (compare `on` (pkgVersion . package)) pkgs of
++ case sortBy (compare `on` (pkgVersion . sourcePackageId)) pkgs of
+ [] -> Left $ "Odd. searchByName returned an empty Unambiguous match for " ++ name
+- ps -> Right (map package ps)
++ ps -> Right (map sourcePackageId ps)
+
+ v :: String -> [Int] -> PackageIdentifier
+ v n x = PackageIdentifier (PackageName n) (Version x [])
+Index: haskell-debian-3.40/Distribution/Package/Debian.hs
+===================================================================
+--- haskell-debian-3.40.orig/Distribution/Package/Debian.hs 2009-09-15 17:08:39.000000000 +0200
++++ haskell-debian-3.40/Distribution/Package/Debian.hs 2010-05-01 21:30:54.000000000 +0200
+@@ -44,13 +44,13 @@
+ import Distribution.Text (display)
+ import Distribution.Simple.Compiler (CompilerFlavor(..), compilerFlavor, Compiler(..))
+ --import Distribution.Simple.Configure (localBuildInfoFile)
+-import Distribution.System (buildOS, buildArch)
++import Distribution.System (Platform(..), buildOS, buildArch)
+ import Distribution.License (License(..))
+ import Distribution.Package (Package(..), PackageIdentifier(..), PackageName(..), Dependency(..))
+ import Distribution.Simple.Program (defaultProgramConfiguration)
+ import Distribution.Simple.Configure (configCompiler, maybeGetPersistBuildConfig)
+ import Distribution.Simple.InstallDirs (InstallDirs(..), InstallDirTemplates, toPathTemplate)
+-import Distribution.Simple.Register (writeInstalledConfig)
++--import Distribution.Simple.Register (writeInstalledConfig)
+ --import Distribution.Simple.Setup (defaultRegisterFlags)
+ import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..))
+ import Distribution.Simple.PackageIndex (PackageIndex,fromList)
+@@ -99,7 +99,8 @@
+
+ trim = dropWhile isSpace
+
+--- installedPackages :: Package pkg => IO [PackageIndex pkg]
++--installedPackages :: Package pkg => IO [PackageIndex]
++{-
+ installedPackages =
+ do (out, err, code) <- lazyCommand cmd L.empty >>= return . collectOutputUnpacked
+ case code of
+@@ -107,6 +108,7 @@
+ result -> error $ "Failure: " ++ cmd ++ " -> " ++ show result ++ " (" ++ err ++ ")"
+ where
+ cmd = "ghc-pkg list --simple-output"
++-}
+
+ simplePackageDescription :: GenericPackageDescription -> Flags
+ -> IO (Compiler, PackageDescription)
+@@ -114,10 +116,11 @@
+ (compiler, _) <- configCompiler (Just (rpmCompiler flags)) Nothing Nothing
+ defaultProgramConfiguration
+ (rpmVerbosity flags)
+- installed <- installedPackages
++ --installed <- installedPackages
+ case finalizePackageDescription (rpmConfigurationsFlags flags)
+- (Nothing :: Maybe (PackageIndex PackageIdentifier))
+- buildOS buildArch (compilerId compiler) [] genPkgDesc of
++ (const True) (Platform buildArch buildOS) (compilerId compiler)
++ {- (Nothing :: Maybe PackageIndex) -}
++ [] genPkgDesc of
+ Left e -> die $ "finalize failed: " ++ show e
+ Right (pd, _) -> return (compiler, pd)
+
+@@ -159,6 +162,7 @@
+ ExitSuccess -> return ()
+ ExitFailure n -> die ("autoreconf failed with status " ++ show n)
+
++{-
+ localBuildInfo :: PackageDescription -> Flags -> IO LocalBuildInfo
+ localBuildInfo pkgDesc flags =
+ maybeGetPersistBuildConfig defaultDistPref >>=
+@@ -174,6 +178,7 @@
+ if isNothing (library pkgDesc)
+ then error "cabal-debian - Unsupported: package without a library section"
+ else writeInstalledConfig defaultDistPref pkgDesc lbi False Nothing >> return lbi
++-}
+
+ data PackageInfo = PackageInfo { libDir :: FilePath
+ , cabalName :: String
+@@ -761,8 +766,8 @@
+ -- taken from TagsCheck.py in the rpmlint distribution.
+
+ showLicense :: License -> String
+-showLicense GPL = "GPL"
+-showLicense LGPL = "LGPL"
++showLicense (GPL _) = "GPL"
++showLicense (LGPL _) = "LGPL"
+ showLicense BSD3 = "BSD"
+ showLicense BSD4 = "BSD-like"
+ showLicense PublicDomain = "Public Domain"
diff -rN -u old-haskell-debian/patches/series new-haskell-debian/patches/series
--- old-haskell-debian/patches/series 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-debian/patches/series 2010-05-01 19:49:54.964530331 +0000
@@ -0,0 +1 @@
+cabal-6.12.patch
More information about the Pkg-haskell-commits
mailing list