packages feed

ats-pkg 2.8.0.8 → 2.9.0.0

raw patch · 5 files changed

+19/−46 lines, 5 filesdep ~shake-ats

Dependency ranges changed: shake-ats

Files

ats-pkg.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: ats-pkg-version: 2.8.0.8+version: 2.9.0.0 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale
src/Distribution/ATS.hs view
@@ -1,9 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} -module Distribution.ATS ( cleanATSCabal-                        , fetchDependencies-                        -- * Types-                        , Version (..)+module Distribution.ATS ( -- * Types+                          Version (..)                         , ATSDependency (..)                         -- * Libraries                         , libgmp@@ -50,7 +48,8 @@ -- | This generates user hooks for a Cabal distribution that has some ATS -- library dependencies. This will *not* do anything with the ATS source files, -- but it *will* download any files necessary for the bundled C to compile.-atsUserHooks :: [ATSDependency] -> UserHooks+atsUserHooks :: [ATSDependency] -- ^ List of ATS dependencies+             -> UserHooks atsUserHooks deps = simpleUserHooks { preConf = \_ flags -> fetchDependencies flags deps >> pure emptyHookedBuildInfo                                     , postBuild = \_ _ _ -> maybeCleanBuild                                     }
src/Distribution/ATS/Build.hs view
@@ -16,8 +16,8 @@  configureCabal :: IO LocalBuildInfo -> IO LocalBuildInfo configureCabal = (<*>) $ do-    build mempty-    libDir <- (<> "/") <$> getCurrentDirectory+    build ["install"]+    libDir <- (<> "/.atspkg/lib") <$> getEnv "HOME"     pure (modifyConf libDir)  modifyBuildInfo :: String -> BuildInfo -> BuildInfo@@ -38,15 +38,8 @@ modifyLibrary libDir lib = let old = libBuildInfo lib     in lib { libBuildInfo = modifyBuildInfo libDir old } --- | Write a dummy file that will allow packaging to work.-writeDummyFile :: IO ()-writeDummyFile =-    createDirectoryIfMissing True "dist-newstyle/lib" >>-    writeFile "dist-newstyle/lib/empty" ""- -- | This uses the users hooks as is @simpleUserHooks@, modified to build the -- ATS library. cabalHooks :: UserHooks cabalHooks = let defConf = confHook simpleUserHooks-    in simpleUserHooks { preConf = \_ _ -> writeDummyFile >> pure emptyHookedBuildInfo-                       , confHook = configureCabal .* defConf }+    in simpleUserHooks { confHook = configureCabal .* defConf }
src/Language/ATS/Package/Build.hs view
@@ -191,9 +191,6 @@             ]     stopGlobalPool -asTuple :: TargetPair -> (Text, Text, Bool)-asTuple (TargetPair s t b) = (s, t, b)- mkConfig :: Rules () mkConfig =     ".atspkg/config" %> \out -> do@@ -262,6 +259,8 @@          mkUserConfig +        want (unpack . cTarget <$> as)+         specialDeps %> \out -> do             (_, cfgBin') <- cfgBin             need [ cfgBin', ".atspkg/config" ]@@ -279,10 +278,10 @@         mapM_ (g ph) (bs ++ ts)      where g ph (Bin s t ls hs' atg gc' extra) =-            atsBin (ATSTarget (unpack <$> cf) (atsToolConfig ph) gc' (unpack <$> ls) [unpack s] hs' (unpackBoth . asTuple <$> atg) mempty (unpack t) (deps extra) Executable)+            atsBin (ATSTarget (unpack <$> cf) (atsToolConfig ph) gc' (unpack <$> ls) [unpack s] hs' (unpackTgt <$> atg) mempty (unpack t) (deps extra) Executable)            h ph (Lib _ s t ls _ hs' lnk atg extra sta) =-            atsBin (ATSTarget (unpack <$> cf) (atsToolConfig ph) False (unpack <$> ls) (unpack <$> s) hs' (unpackBoth . asTuple <$> atg) (both unpack <$> lnk) (unpack t) (deps extra) (k sta))+            atsBin (ATSTarget (unpack <$> cf) (atsToolConfig ph) False (unpack <$> ls) (unpack <$> s) hs' (unpackTgt <$> atg) (unpackLinks <$> lnk) (unpack t) (deps extra) (k sta))            k False = SharedLibrary           k True  = StaticLibrary@@ -297,7 +296,10 @@           cc' = maybe (unpack ccLocal) (<> "-gcc") tgt           deps = (specialDeps:) . (".atspkg/config":) . fmap unpack -          unpackBoth :: (Text, Text, Bool) -> ATSGen-          unpackBoth (t, t', b)= ATSGen (unpack t) (unpack t') b+          unpackLinks :: (Text, Text) -> HATSGen+          unpackLinks (t, t') = HATSGen (unpack t) (unpack t')++          unpackTgt :: TargetPair -> ATSGen+          unpackTgt (TargetPair t t' b) = ATSGen (unpack t) (unpack t') b            specialDeps = ".atspkg/deps" ++ maybe mempty ("-" <>) tgt
src/Language/ATS/Package/Generic.hs view
@@ -14,29 +14,6 @@ import           Data.Hashable        (Hashable (..)) import           Quaalude --- TODO pkgconfig dirs?--- also possibly using pkg-config.--- pkg-config --cflags ~/.atspkg/lib/pkgconfig/bdw-gc.pc--- e.g. -I/home/vanessa/.atspkg/include--- pkg-config --cflags mircore--- PKG_CONFIG_PATH=$HOME/.atspkg ??--- autogen pkg-config (??)---- ALSO: packaging for vim plugins would be nice.--{--prefix=/home/vanessa/.atspkg-exec_prefix=${prefix}-libdir=${exec_prefix}/lib-includedir=${prefix}/include--Name: Boehm-Demers-Weiser Conservative Garbage Collector-Description: A garbage collector for C and C++-Version: 7.6.4-Libs: -L${libdir} -lgc-Cflags: -I${includedir}--}- -- | Functions containing installation information about a particular type. data InstallDirs a = InstallDirs { binDir      :: a -> FilePath                                  , libDir      :: a -> String -> FilePath@@ -61,6 +38,8 @@ newtype Package a b = Package { unPack :: ReaderT (InstallDirs a) IO b }     deriving (Functor)     deriving newtype (Applicative, Monad)++-- TODO statically require various things about a build.  -- | Any type implementing 'GenericPackage' can be depended on by other -- packages.