cabal-debian 4.38.2 → 4.38.3
raw patch · 2 files changed
+16/−4 lines, 2 files
Files
cabal-debian.cabal view
@@ -1,5 +1,5 @@ Name: cabal-debian-Version: 4.38.2+Version: 4.38.3 Copyright: Copyright (c) 2007-2014, David Fox, Jeremy Shaw License: BSD3 License-File: LICENSE
src/Debian/Debianize/BuildDependencies.hs view
@@ -136,9 +136,9 @@ fold union empty $ Set.map (\ hc' -> Set.map (hc',) $ hcPackageTypes hc') hcs - libDeps <- allBuildDepends (maybe [] (return . libBuildInfo) (Cabal.library pkgDesc))- binDeps <- allBuildDepends (List.map buildInfo (Cabal.executables pkgDesc))- testDeps <- allBuildDepends (List.map testBuildInfo (Cabal.testSuites pkgDesc))+ libDeps <- allBuildDepends (maybe [] (filter isBuildable . return . libBuildInfo) (Cabal.library pkgDesc))+ binDeps <- allBuildDepends (List.map buildInfo (filter isBuildable (Cabal.executables pkgDesc)))+ testDeps <- allBuildDepends (List.map testBuildInfo (filter isBuildable (Cabal.testSuites pkgDesc))) -- liftIO (putStrLn ("library dependencies: " ++ show libDeps)) -- liftIO (putStrLn ("executable dependencies: " ++ show binDeps))@@ -185,6 +185,18 @@ hcPackageTypesTests :: CompilerFlavor -> Set B.PackageType hcPackageTypesTests GHC = singleton [B.Development, B.Profiling] #endif++class IsBuildable e where+ isBuildable :: e -> Bool++instance IsBuildable Executable where+ isBuildable = buildable . buildInfo++instance IsBuildable BuildInfo where+ isBuildable = buildable++instance IsBuildable TestSuite where+ isBuildable = buildable . testBuildInfo -- | Collect the dependencies required to build any packages that have -- architecture "all".