hackport 0.4.4 → 0.4.5
raw patch · 8 files changed
+138/−214 lines, 8 filesdep ~deepseq
Dependency ranges changed: deepseq
Files
- Cabal2Ebuild.hs +3/−2
- Merge.hs +22/−9
- Merge/Dependencies.hs +15/−10
- Portage/EBuild.hs +38/−4
- Portage/GHCCore.hs +48/−182
- Portage/PackageId.hs +6/−1
- hackport.cabal +5/−5
- tests/resolveCat.hs +1/−1
Cabal2Ebuild.hs view
@@ -39,9 +39,10 @@ import qualified Portage.Overlay as O import Portage.Version -cabal2ebuild :: Cabal.PackageDescription -> Portage.EBuild-cabal2ebuild pkg = Portage.ebuildTemplate {+cabal2ebuild :: Portage.Category -> Cabal.PackageDescription -> Portage.EBuild+cabal2ebuild cat pkg = Portage.ebuildTemplate { E.name = Portage.cabal_pn_to_PN cabal_pn,+ E.category = display cat, E.hackage_name= cabalPkgName, E.version = display (Cabal.pkgVersion (Cabal.package pkg)), E.description = if null (Cabal.synopsis pkg) then Cabal.description pkg
Merge.hs view
@@ -3,7 +3,7 @@ , mergeGenericPackageDescription ) where -import Control.Monad.Error+import Control.Monad.Except import Control.Exception import qualified Data.ByteString.Lazy.Char8 as BL import Data.Function (on)@@ -40,7 +40,7 @@ , createDirectoryIfMissing , doesFileExist )-import System.Cmd (system)+import System.Process (system) import System.FilePath ((</>)) import System.Exit @@ -52,7 +52,6 @@ import Network.URI import qualified Portage.Cabal as Portage-import qualified Portage.Dependency.Normalize as PN import qualified Portage.PackageId as Portage import qualified Portage.Version as Portage import qualified Portage.Metadata as Portage@@ -67,7 +66,6 @@ import qualified Util as U -import Debug.Trace (<.>) :: String -> String -> String a <.> b = a ++ '.':b@@ -358,13 +356,28 @@ icalate _s [x] = [x] icalate s (x:xs) = (x ++ s) : icalate s xs + gamesFlags :: [String]+ gamesFlags = ["--prefix=\"${GAMES_PREFIX}\""]++ addGamesFlags :: [String] -> [String]+ addGamesFlags xs+ | Portage.is_games_cat cat = xs ++ gamesFlags+ | otherwise = xs++ build_configure_call :: [String] -> [String]+ build_configure_call [] = []+ build_configure_call conf_args = icalate " \\" $+ "haskell-cabal_src_configure" :+ map ('\t':) conf_args++ -- returns list USE-parameters to './setup configure' selected_flags :: ([Cabal.FlagName], Cabal.FlagAssignment) -> [String] selected_flags ([], []) = []- selected_flags (active_fns, users_fas) = icalate " \\" $ "haskell-cabal_src_configure" : map snd (L.sortBy (compare `on` fst) flag_pairs)+ selected_flags (active_fns, users_fas) = map snd (L.sortBy (compare `on` fst) flag_pairs) where flag_pairs :: [(String, String)] flag_pairs = active_pairs ++ users_pairs- active_pairs = map (\fn -> (fn, "\t$(cabal_flag " ++ cfn_to_iuse fn ++ " " ++ fn ++ ")")) $ map unFlagName active_fns- users_pairs = map (\fa -> ((unFlagName . fst) fa, "\t--flag=" ++ pp_fn fa)) users_fas+ active_pairs = map (\fn -> (fn, "$(cabal_flag " ++ cfn_to_iuse fn ++ " " ++ fn ++ ")")) $ map unFlagName active_fns+ users_pairs = map (\fa -> ((unFlagName . fst) fa, "--flag=" ++ pp_fn fa)) users_fas to_iuse x = let fn = unFlagName $ Cabal.flagName x p = if Cabal.flagDefault x then "+" else "" in p ++ cfn_to_iuse fn@@ -373,12 +386,12 @@ . (\e -> e { E.depend_extra = S.toList $ Merge.dep_e tdeps } ) . (\e -> e { E.rdepend = Merge.rdep tdeps} ) . (\e -> e { E.rdepend_extra = S.toList $ Merge.rdep_e tdeps } )- . (\e -> e { E.src_configure = selected_flags (active_flags, user_specified_fas) } )+ . (\e -> e { E.src_configure = build_configure_call $ addGamesFlags $ selected_flags (active_flags, user_specified_fas) } ) . (\e -> e { E.iuse = E.iuse e ++ map to_iuse active_flag_descs }) . ( case requested_cabal_flags of Nothing -> id Just ucf -> (\e -> e { E.used_options = E.used_options e ++ [("flags", ucf)] }))- $ C2E.cabal2ebuild pkgDesc+ $ C2E.cabal2ebuild cat pkgDesc mergeEbuild verbosity existing_meta pkgdir ebuild when fetch $ do
Merge/Dependencies.hs view
@@ -118,11 +118,6 @@ -- without slot business raw_haskell_deps :: Portage.Dependency raw_haskell_deps = PN.normalize_depend $ Portage.DependAllOf $ haskellDependencies overlay (buildDepends pkg)- haskell_deps :: Portage.Dependency- haskell_deps =- case () of- _ | treatAsLibrary -> Portage.set_build_slot $ add_profile $ raw_haskell_deps- _ | otherwise -> raw_haskell_deps test_deps :: Portage.Dependency test_deps = Portage.mkUseDependency (True, Portage.Use "test") $ Portage.DependAllOf $@@ -156,7 +151,7 @@ dep_e = S.singleton "${RDEPEND}", rdep = Portage.DependAllOf [ Portage.set_build_slot ghc_dep- , haskell_deps+ , Portage.set_build_slot $ add_profile $ raw_haskell_deps , extra_libs , Portage.DependAllOf pkg_config_libs ]@@ -164,15 +159,15 @@ | otherwise = mempty { dep = Portage.DependAllOf- [ ghc_dep- , cabal_dep+ [ cabal_dep , build_tools- , haskell_deps , test_deps ], dep_e = S.singleton "${RDEPEND}", rdep = Portage.DependAllOf- [ extra_libs+ [ Portage.set_build_slot ghc_dep+ , Portage.set_build_slot $ raw_haskell_deps+ , extra_libs , Portage.DependAllOf pkg_config_libs ] }@@ -341,6 +336,12 @@ , ("dl", any_c_p "virtual" "libc") , ("glfw", any_c_p "media-libs" "glfw") , ("nettle", any_c_p "dev-libs" "nettle")+ , ("Xpm", any_c_p "x11-libs" "libXpm")+ , ("Xss", any_c_p "x11-libs" "libXScrnSaver")+ , ("tag_c", any_c_p "media-libs" "taglib")+ , ("magic", any_c_p "sys-apps" "file")+ , ("crypt", any_c_p "virtual" "libc")+ , ("Xrender", any_c_p "x11-libs" "libXrender") ] ---------------------------------------------------------------@@ -430,6 +431,9 @@ ,("gtk+-unix-print-2.0", ("x11-libs", "gtk+", Portage.GivenSlot "2")) ,("gtk+-x11-2.0", ("x11-libs", "gtk+", Portage.GivenSlot "2")) + ,("gtk+-3.0", ("x11-libs", "gtk+", Portage.GivenSlot "3"))+ ,("webkitgtk-3.0", ("net-libs", "webkit-gtk", Portage.GivenSlot "3"))+ ,("cairo", ("x11-libs", "cairo", Portage.AnySlot)) -- need [svg] for dev-haskell/cairo ,("cairo-ft", ("x11-libs", "cairo", Portage.AnySlot)) ,("cairo-ps", ("x11-libs", "cairo", Portage.AnySlot))@@ -490,4 +494,5 @@ ,("libssh2", ("net-libs", "libssh2", Portage.AnySlot)) ,("SDL_image", ("media-libs", "sdl-image", Portage.AnySlot)) ,("libzmq", ("net-libs", "zeromq", Portage.AnySlot))+ ,("taglib_c", ("media-libs", "taglib", Portage.AnySlot)) ]
Portage/EBuild.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} module Portage.EBuild ( EBuild(..) , ebuildTemplate@@ -6,6 +7,7 @@ ) where import Portage.Dependency+import qualified Portage.PackageId as PI import qualified Portage.Dependency.Normalize as PN import Data.String.Utils@@ -16,10 +18,15 @@ import Data.Version(Version(..)) import qualified Paths_hackport(version) +#if MIN_VERSION_time(1,5,0)+import qualified System.Locale as SL+#else import qualified System.Locale as TC+#endif data EBuild = EBuild { name :: String,+ category :: String, hackage_name :: String, -- might differ a bit (we mangle case) version :: String, hackportVersion :: String,@@ -49,6 +56,7 @@ ebuildTemplate :: EBuild ebuildTemplate = EBuild { name = "foobar",+ category = "dev-haskell", hackage_name = "FooBar", version = "0.1", hackportVersion = getHackportVersion Paths_hackport.version,@@ -73,7 +81,7 @@ -- | Given an EBuild, give the URI to the tarball of the source code. -- Assumes that the server is always hackage.haskell.org. src_uri :: EBuild -> String-src_uri e = +src_uri e = case my_pn e of -- use standard address given that the package name has no upper -- characters@@ -94,7 +102,7 @@ sconcat (map (\(k, v) -> ss "#hackport: " . ss k . ss ": " . ss v . nl) $ used_options ebuild). nl. ss "CABAL_FEATURES=". quote' (sepBy " " $ features ebuild). nl.- ss "inherit haskell-cabal". nl.+ ss "inherit haskell-cabal". if_games (ss " games") . nl. nl. (case my_pn ebuild of Nothing -> id@@ -116,12 +124,34 @@ (case my_pn ebuild of Nothing -> id Just _ -> nl. ss "S=". quote ("${WORKDIR}/${MY_P}"). nl).- verbatim (nl. ss "src_prepare() {" . nl)++ if_games (nl . ss "pkg_setup() {" . nl.+ ss (tabify_line " games_pkg_setup") . nl.+ ss (tabify_line " haskell-cabal_pkg_setup") . nl.+ ss "}" . nl).++ verbatim (nl . ss "src_prepare() {" . nl) (src_prepare ebuild) (ss "}" . nl).+ verbatim (nl. ss "src_configure() {" . nl) (src_configure ebuild) (ss "}" . nl).++ if_games (nl . ss "src_compile() {" . nl.+ ss (tabify_line " haskell-cabal_src_compile") . nl.+ ss "}" . nl).++ if_games (nl . ss "src_install() {" . nl.+ ss (tabify_line " haskell-cabal_src_install") . nl.+ ss (tabify_line " prepgamesdirs") . nl.+ ss "}" . nl).++ if_games (nl . ss "pkg_postinst() {" . nl.+ ss (tabify_line " ghc-package_pkg_postinst") . nl.+ ss (tabify_line " games_pkg_postinst") . nl.+ ss "}" . nl).+ id $ [] where expandVars = replaceMultiVars [ ( name ebuild, "${PN}")@@ -130,6 +160,10 @@ toMirror = replace "http://hackage.haskell.org/" "mirror://hackage/" this_year :: String this_year = TC.formatTime TC.defaultTimeLocale "%Y" now+ if_games :: DString -> DString+ if_games ds = if PI.is_games_cat (PI.Category (category ebuild))+ then ds+ else id -- "+a" -> "a" -- "b" -> "b"@@ -190,7 +224,7 @@ esc = concatMap esc' esc' c = case c of- '"' -> "\""+ '"' -> "\\\"" '\n' -> " " '`' -> "'" _ -> [c]
Portage/GHCCore.hs view
@@ -29,30 +29,17 @@ -- ghcs tried in specified order. -- It means that first ghc in this list is a minmum default. ghcs :: [(CompilerId, PackageIndex)]-ghcs = modern_ghcs ++ ancient_ghcs- where modern_ghcs = [ghc741, ghc742, ghc761, ghc762, ghc782]- ancient_ghcs = [ghc6104, ghc6121, ghc6122, ghc6123, ghc704]+ghcs = modern_ghcs+ where modern_ghcs = [ghc741, ghc742, ghc761, ghc762, ghc782, ghc7101] cabalFromGHC :: [Int] -> Maybe Version cabalFromGHC ver = lookup ver table where- table = [([6,6,0], Version [1,1,6] [])- ,([6,6,1], Version [1,1,6,2] [])- ,([6,8,1], Version [1,2,2,0] [])- ,([6,8,2], Version [1,2,3,0] [])- ,([6,8,3], Version [1,2,4,0] [])- ,([6,10,1], Version [1,6,0,1] [])- ,([6,10,2], Version [1,6,0,3] [])- ,([6,10,3], Version [1,6,0,3] [])- ,([6,10,4], Version [1,6,0,3] [])- ,([6,12,1], Version [1,8,0,2] [])- ,([6,12,2], Version [1,8,0,4] [])- ,([6,12,3], Version [1,8,0,6] [])- ,([7,0,1], Version [1,10,0,0] [])- ,([7,4,2], Version [1,14,0] [])- ,([7,6,1], Version [1,16,0] [])- ,([7,6,2], Version [1,16,0] [])- ,([7,8,2], Version [1,18,1,3] [])+ table = [ ([7,4,2], Version [1,14,0] [])+ , ([7,6,1], Version [1,16,0] [])+ , ([7,6,2], Version [1,16,0] [])+ , ([7,8,2], Version [1,18,1,3] [])+ , ([7,10,1], Version [1,22,2,0] []) ] platform :: Platform@@ -118,6 +105,9 @@ ghc :: [Int] -> CompilerId ghc nrs = CompilerId GHC (Version nrs []) +ghc7101 :: (CompilerId, PackageIndex)+ghc7101 = (ghc [7,10,1], mkIndex ghc7101_pkgs)+ ghc782 :: (CompilerId, PackageIndex) ghc782 = (ghc [7,8,2], mkIndex ghc782_pkgs) @@ -133,24 +123,37 @@ ghc741 :: (CompilerId, PackageIndex) ghc741 = (ghc [7,4,1], mkIndex ghc741_pkgs) -ghc704 :: (CompilerId, PackageIndex)-ghc704 = (ghc [7,0,1], mkIndex ghc704_pkgs)--ghc6123 :: (CompilerId, PackageIndex)-ghc6123 = (ghc [6,12,3], mkIndex ghc6123_pkgs)--ghc6122 :: (CompilerId, PackageIndex)-ghc6122 = (ghc [6,12,2], mkIndex ghc6122_pkgs)--ghc6121 :: (CompilerId, PackageIndex)-ghc6121 = (ghc [6,12,1], mkIndex ghc6121_pkgs)--ghc6104 :: (CompilerId, PackageIndex)-ghc6104 = (ghc [6,10,4], mkIndex ghc6104_pkgs)- -- | Non-upgradeable core packages -- Source: http://haskell.org/haskellwiki/Libraries_released_with_GHC+-- and our binary tarballs (package.conf.d.initial subdir) +ghc7101_pkgs :: [PackageIdentifier]+ghc7101_pkgs =+ [ p "array" [0,5,1,0]+ , p "base" [4,8,0,0]+-- , p "binary" [0,7,3,0] package is upgradeable+ , p "bytestring" [0,10,6,0]+-- , p "Cabal" [1,18,1,3] package is upgradeable+ , p "containers" [0,5,6,2]+ , p "deepseq" [1,4,1,1] -- used by time+ , p "directory" [1,2,2,0]+ , p "filepath" [1,4,0,0]+ , p "ghc-prim" [0,4,0,0]+ -- , p "haskell2010" [1,1,2,0] -- stopped shipping in 7.10, deprecated+ -- , p "haskell98" [2,0,0,3] -- stopped shipping in 7.10, deprecated+ , p "hoopl" [3,10,0,2] -- used by libghc+ , p "hpc" [0,6,0,2] -- used by libghc+ , p "integer-gmp" [1,0,0,0]+ -- , p "old-locale" [1,0,0,6] -- stopped shipping in 7.10, deprecated+ -- , p "old-time" [1,1,0,2] -- stopped shipping in 7.10, deprecated+ , p "pretty" [1,1,2,0]+ , p "process" [1,2,3,0]+ , p "template-haskell" [2,10,0,0] -- used by libghc+ , p "time" [1,5,0,1] -- used by haskell98, unix, directory, hpc, ghc. unsafe to upgrade+-- , p "transformers" [0,4,2,0] -- used by libghc+ , p "unix" [2,7,1,0]+ ]+ ghc782_pkgs :: [PackageIdentifier] ghc782_pkgs = [ p "array" [0,5,0,0]@@ -168,8 +171,8 @@ , p "hoopl" [3,10,0,1] -- used by libghc , p "hpc" [0,6,0,1] -- used by libghc , p "integer-gmp" [0,5,1,0]- , p "old-locale" [1,0,0,6]- , p "old-time" [1,1,0,2]+ -- , p "old-locale" [1,0,0,6] -- stopped shipping in 7.10, deprecated+ -- , p "old-time" [1,1,0,2] -- stopped shipping in 7.10, deprecated , p "pretty" [1,1,1,1] , p "process" [1,2,0,0] , p "template-haskell" [2,9,0,0] -- used by libghc@@ -195,8 +198,8 @@ , p "hoopl" [3,9,0,0] -- used by libghc , p "hpc" [0,6,0,0] -- used by libghc , p "integer-gmp" [0,5,0,0]- , p "old-locale" [1,0,0,5]- , p "old-time" [1,1,0,1]+ -- , p "old-locale" [1,0,0,5] -- stopped shipping in 7.10, deprecated+ -- , p "old-time" [1,1,0,1] -- stopped shipping in 7.10, deprecated , p "pretty" [1,1,1,0] , p "process" [1,1,0,2] , p "template-haskell" [2,8,0,0] -- used by libghc@@ -221,8 +224,8 @@ , p "hoopl" [3,9,0,0] -- used by libghc , p "hpc" [0,6,0,0] -- used by libghc , p "integer-gmp" [0,5,0,0]- , p "old-locale" [1,0,0,5]- , p "old-time" [1,1,0,1]+ -- , p "old-locale" [1,0,0,5] -- stopped shipping in 7.10, deprecated+ -- , p "old-time" [1,1,0,1] -- stopped shipping in 7.10, deprecated , p "pretty" [1,1,1,0] , p "process" [1,1,0,2] , p "template-haskell" [2,8,0,0] -- used by libghc@@ -248,8 +251,8 @@ , p "hoopl" [3,8,7,3] -- used by libghc , p "hpc" [0,5,1,1] -- used by libghc , p "integer-gmp" [0,4,0,0]- , p "old-locale" [1,0,0,4]- , p "old-time" [1,1,0,0]+ -- , p "old-locale" [1,0,0,4] -- stopped shipping in 7.10, deprecated+ -- , p "old-time" [1,1,0,0] -- stopped shipping in 7.10, deprecated , p "pretty" [1,1,1,0] , p "process" [1,1,0,1] , p "template-haskell" [2,7,0,0] -- used by libghc@@ -275,150 +278,13 @@ , p "hoopl" [3,8,7,3] -- used by libghc , p "hpc" [0,5,1,1] -- used by libghc , p "integer-gmp" [0,4,0,0]- , p "old-locale" [1,0,0,4]- , p "old-time" [1,1,0,0]+ -- , p "old-locale" [1,0,0,4] -- stopped shipping in 7.10, deprecated+ -- , p "old-time" [1,1,0,0] -- stopped shipping in 7.10, deprecated , p "pretty" [1,1,1,0] , p "process" [1,1,0,1] , p "template-haskell" [2,7,0,0] -- used by libghc , p "time" [1,4] , p "unix" [2,5,1,0]- ]--ghc704_pkgs :: [PackageIdentifier]-ghc704_pkgs =- [ p "array" [0,3,0,2]- , p "base" [4,3,1,0]- , p "bytestring" [0,9,1,10]--- , p "Cabal" [1,10,2,0] package is upgradeable- , p "containers" [0,4,0,0]- , p "directory" [1,1,0,0]--- , p "extensible-exceptions" [0,1,1,2] -- package is upgradeable, stopped shipping in 7.6- , p "filepath" [1,2,0,0]- , p "ghc-binary" [0,5,0,2]- , p "ghc-prim" [0,2,0,0]- , p "haskell2010" [1,0,0,0]- , p "haskell98" [1,1,0,1]- , p "hpc" [0,5,0,6]- , p "integer-gmp" [0,2,0,2]- , p "old-locale" [1,0,0,2]- , p "old-time" [1,0,0,6]- , p "pretty" [1,0,1,2]- , p "process" [1,0,1,5]--- , p "random" [1,0,0,3] -- will not be shipped starting from ghc-7.2- , p "template-haskell" [2,5,0,0]- , p "time" [1,2,0,3]- , p "unix" [2,4,2,0]- ]--ghc6123_pkgs :: [PackageIdentifier]-ghc6123_pkgs =- [ p "array" [0,3,0,1]- , p "base" [3,0,3,2]- , p "base" [4,2,0,2]- , p "bytestring" [0,9,1,7]--- , p "Cabal" [1,8,0,6] package is upgradeable- , p "containers" [0,3,0,0]- , p "directory" [1,0,1,1]--- , p "extensible-exceptions" [0,1,1,1] -- package is upgradeable, stopped shipping in 7.6- , p "filepath" [1,1,0,4]- , p "ghc-binary" [0,5,0,2]- , p "ghc-prim" [0,2,0,0]- , p "haskell98" [1,0,1,1]- , p "hpc" [0,5,0,5]- , p "integer-gmp" [0,2,0,1]- , p "integer-simple" [0,1,0,0]- , p "old-locale" [1,0,0,2]- , p "old-time" [1,0,0,5]- , p "pretty" [1,0,1,1]- , p "process" [1,0,1,3]--- , p "random" [1,0,0,2] -- will not be shipped starting from ghc-7.2--- , p "syb" [0,1,0,2] -- not distributed with ghc-7- , p "template-haskell" [2,4,0,1]- , p "time" [1,1,4]- , p "unix" [2,4,0,2]--- , p "utf8-string" [0,3,4] package is upgradeable- ]--ghc6122_pkgs :: [PackageIdentifier]-ghc6122_pkgs = - [ p "array" [0,3,0,0]- , p "base" [3,0,3,2]- , p "base" [4,2,0,1]- , p "bytestring" [0,9,1,6]--- , p "Cabal" [1,8,0,4] package is upgradeable- , p "containers" [0,3,0,0]- , p "directory" [1,0,1,1]--- , p "extensible-exceptions" [0,1,1,1] -- package is upgradeable, stopped shipping in 7.6- , p "filepath" [1,1,0,4]- , p "ghc-binary" [0,5,0,2]- , p "ghc-prim" [0,2,0,0]- , p "haskell98" [1,0,1,1]- , p "hpc" [0,5,0,5]- , p "integer-gmp" [0,2,0,1]- , p "old-locale" [1,0,0,2]- , p "old-time" [1,0,0,4]- , p "pretty" [1,0,1,1]- , p "process" [1,0,1,2]--- , p "random" [1,0,0,2] -- will not be shipped starting from ghc-7.2--- , p "syb" [0,1,0,2] -- not distributed with ghc-7- , p "template-haskell" [2,4,0,1]- , p "time" [1,1,4]- , p "unix" [2,4,0,1]--- , p "utf8-string" [0,3,4] package is upgradeable- ]--ghc6121_pkgs :: [PackageIdentifier]-ghc6121_pkgs =- [ p "array" [0,3,0,0]- , p "base" [3,0,3,2]- , p "base" [4,2,0,0]- , p "bytestring" [0,9,1,5]--- , p "Cabal" [1,8,0,2] package is upgradeable- , p "containers" [0,3,0,0]- , p "directory" [1,0,1,0]--- , p "extensible-exceptions" [0,1,1,1] -- package is upgradeable, stopped shipping in 7.6- , p "filepath" [1,1,0,3]- , p "ghc-binary" [0,5,0,2]- , p "ghc-prim" [0,2,0,0]- , p "haskell98" [1,0,1,1]- , p "hpc" [0,5,0,4]- , p "integer-gmp" [0,2,0,0]- , p "old-locale" [1,0,0,2]- , p "old-time" [1,0,0,3]- , p "pretty" [1,0,1,1]- , p "process" [1,0,1,2]--- , p "random" [1,0,0,2] -- will not be shipped starting from ghc-7.2--- , p "syb" [0,1,0,2] -- not distributed with ghc-7- , p "template-haskell" [2,4,0,0]- , p "time" [1,1,4]- , p "unix" [2,4,0,0]--- , p "utf8-string" [0,3,4] package is upgradeable- ]--ghc6104_pkgs :: [PackageIdentifier]-ghc6104_pkgs =- [ p "array" [0,2,0,0]- , p "base" [3,0,3,1]- , p "base" [4,1,0,0]- , p "bytestring" [0,9,1,4]--- , p "Cabal" [1,6,0,3] package is upgradeable- , p "containers" [0,2,0,1]- , p "directory" [1,0,0,3]--- , p "extensible-exceptions" [0,1,1,0] -- package is upgradeable, stopped shipping in 7.6- , p "filepath" [1,1,0,2]- , p "ghc-prim" [0,1,0,0]- , p "haskell98" [1,0,1,0]- , p "hpc" [0,5,0,3]- , p "integer" [0,1,0,1]- , p "old-locale" [1,0,0,1]- , p "old-time" [1,0,0,2]- , p "packedstring" [0,1,0,1]- , p "pretty" [1,0,1,0]- , p "process" [1,0,1,1]--- , p "random" [1,0,0,1] -- will not be shipped starting from ghc-7.2--- , p "syb" [0,1,0,1] -- not distributed with ghc-7- , p "template-haskell" [2,3,0,1]- , p "unix" [2,3,2,0] ] p :: String -> [Int] -> PackageIdentifier
Portage/PackageId.hs view
@@ -12,10 +12,12 @@ normalizeCabalPackageName, normalizeCabalPackageId, packageIdToFilePath,- cabal_pn_to_PN+ cabal_pn_to_PN,+ is_games_cat ) where import Data.Char+import qualified Data.List as L import qualified Distribution.Package as Cabal import Distribution.Text (Text(..))@@ -129,3 +131,6 @@ cabal_pn_to_PN :: Cabal.PackageName -> String cabal_pn_to_PN = map toLower . display++is_games_cat :: Category -> Bool+is_games_cat = L.isPrefixOf "games" . unCategory
hackport.cabal view
@@ -1,5 +1,5 @@ Name: hackport-Version: 0.4.4+Version: 0.4.5 License: GPL License-file: LICENSE Author: Henning Günther, Duncan Coutts, Lennart Kolmodin@@ -25,7 +25,7 @@ Hs-Source-Dirs: ., cabal, cabal/Cabal, cabal/cabal-install Build-Depends: base >= 2.0 && < 5,- deepseq >= 1.3 && < 1.4,+ deepseq >= 1.3, filepath, parsec, mtl,@@ -135,7 +135,7 @@ Main-Is: tests/resolveCat.hs Hs-Source-Dirs: ., cabal, cabal/Cabal, cabal/cabal-install, tests Build-Depends: base >= 3 && < 5,- deepseq >= 1.3 && < 1.4,+ deepseq >= 1.3, bytestring, containers, directory,@@ -156,7 +156,7 @@ Main-Is: tests/print_deps.hs Hs-Source-Dirs: ., cabal, cabal/Cabal, cabal/cabal-install, tests Build-Depends: base >= 3 && < 5,- deepseq >= 1.3 && < 1.4,+ deepseq >= 1.3, bytestring, containers, directory,@@ -177,7 +177,7 @@ Main-Is: tests/normalize_deps.hs Hs-Source-Dirs: ., cabal, cabal/Cabal, cabal/cabal-install, tests Build-Depends: base >= 3 && < 5,- deepseq >= 1.3 && < 1.4,+ deepseq >= 1.3, bytestring, containers, directory,
tests/resolveCat.hs view
@@ -13,7 +13,7 @@ tests = TestList [ TestLabel "resolve cabal" (test_resolveCategory "dev-haskell" "cabal") , TestLabel "resolve ghc" (test_resolveCategory "dev-lang" "ghc") , TestLabel "resolve Cabal" (test_resolveCategory "dev-haskell" "Cabal")- , TestLabel "resolve DaRsC" (test_resolveCategory "dev-vcs" "darcs")+ , TestLabel "resolve DaRcS" (test_resolveCategory "dev-vcs" "DaRcS") ] test_resolveCategory :: String -> String -> Test