Skip to content
Snippets Groups Projects
Commit a664eb3c authored by Rodrigo Mesquita's avatar Rodrigo Mesquita :seedling:
Browse files

Migrate darcs

parent 1c17609f
No related branches found
No related tags found
1 merge request!20Darcs
Pipeline #86380 passed
diff --git a/Setup.hs b/SetupHooks.hs
similarity index 81%
similarity index 80%
rename from Setup.hs
rename to SetupHooks.hs
index 79a7500..0b91adc 100644
index 79a7500..49f36ec 100644
--- a/Setup.hs
+++ b/SetupHooks.hs
@@ -2,8 +2,10 @@
......@@ -16,7 +16,7 @@ index 79a7500..0b91adc 100644
import Distribution.PackageDescription ( PackageDescription )
import Distribution.Package ( packageVersion )
import Distribution.Version( Version )
@@ -32,32 +34,26 @@ import qualified Control.Exception as Exception
@@ -32,40 +34,34 @@ import qualified Control.Exception as Exception
catchAny :: IO a -> (Exception.SomeException -> IO a) -> IO a
catchAny f h = Exception.catch f (\e -> h (e :: Exception.SomeException))
......@@ -45,14 +45,15 @@ index 79a7500..0b91adc 100644
+ buildHooks = noBuildHooks {
+ preBuildComponentHook = Just $ \what lbi ti ->
+ let verb = buildingWhatVerbosity what
+ in commonPreBuildHook what lbi verb
+ in commonPreBuildHook lbi verb,
+ postBuildComponentHook = Just $ \what lbi _ti ->
+ buildManpage lbi -- for all components?
+ }
+, copyHooks = noCopyHooks {
+ -- Copy/install hooks
+ postCopyHook = Just $ \ lbi flags ti ->
+ installManpage pkg lbi (fromFlag $ copyVerbosity flags) (fromFlag $ copyDest flags),
+ postCopyComponentHook = Just $ \ lbi flags ti ->
+ -- It's safe to pass PackageDescription since it is only used for its Id (both in absoluteInstallDirs and in determineVersion)
+ installManpage (localPkgDescr lbi) lbi (fromFlag $ copyVerbosity flags) (fromFlag $ copyDest flags)
+ }
}
......@@ -67,16 +68,22 @@ index 79a7500..0b91adc 100644
versionInfoExists <-
(&&) <$> doesFileExist "release/distributed-context"
<*> doesFileExist "release/distributed-version"
@@ -65,7 +61,6 @@ commonBuildHook runHook pkg lbi hooks verbosity = do
unless versionInfoExists $
callProcess "runghc" ["./release/gen-version-info.hs"]
(version, state) <- determineVersion verbosity pkg
- (version, state) <- determineVersion verbosity pkg
+ (version, state) <- determineVersion verbosity (localPkgDescr lbi)
generateVersionModule verbosity lbi version state
- return $ runHook simpleUserHooks pkg lbi hooks
-- ---------------------------------------------------------------------
-- man page
@@ -171,3 +167,4 @@ parseFile f = do
((s, _):_) -> return s
_ -> return Nothing
else return Nothing
+
diff --git a/darcs.cabal b/darcs.cabal
index 72ea398..d67e500 100644
index 72ea398..f708ee0 100644
--- a/darcs.cabal
+++ b/darcs.cabal
@@ -41,7 +41,7 @@ Description: Darcs is a free, open source revision control
......@@ -88,3 +95,48 @@ index 72ea398..d67e500 100644
extra-source-files:
-- C files
src/*.h
@@ -416,6 +416,8 @@ Library
build-depends: unix >= 2.7.1.0 && < 2.8
build-depends: base >= 4.10 && < 4.16,
+ -- force base-compat bound up to test with 9.6
+ base-compat >= 0.13 && < 0.14,
stm >= 2.1 && < 2.6,
binary >= 0.5 && < 0.11,
containers >= 0.5.6.2 && < 0.7,
@@ -425,21 +427,21 @@ Library
mtl >= 2.2.1 && < 2.3,
transformers >= 0.4.2.0 && < 0.6,
parsec >= 3.1.9 && < 3.2,
- fgl >= 5.5.2.3 && < 5.8,
+ fgl >= 5.5.2.3 && < 5.9,
html >= 1.0.1.2 && < 1.1,
filepath >= 1.4.1 && < 1.5.0.0,
haskeline >= 0.7.2 && < 0.9,
- memory >= 0.14 && < 0.17,
- cryptonite >= 0.24 && < 0.30,
+ memory >= 0.14 && < 0.19,
+ cryptonite >= 0.3 && < 0.31,
base16-bytestring >= 0.1.1.7 && < 1.1,
utf8-string >= 1 && < 1.1,
vector >= 0.11 && < 0.13,
tar >= 0.5 && < 0.6,
data-ordlist == 0.4.*,
- attoparsec >= 0.13.0.1 && < 0.14,
+ attoparsec >= 0.14 && < 0.15,
zip-archive >= 0.3 && < 0.5,
async >= 2.0.2 && < 2.3,
- constraints >= 0.11 && < 0.13,
+ constraints >= 0.11 && < 0.15,
unix-compat >= 0.5 && < 0.6,
bytestring >= 0.10.6 && < 0.11,
old-time >= 1.1.0.3 && < 1.2,
@@ -449,7 +451,7 @@ Library
temporary >= 1.2.1 && < 1.4,
process >= 1.2.3.0 && < 1.7,
array >= 0.5.1.0 && < 0.6,
- hashable >= 1.2.3.3 && < 1.4,
+ hashable >= 1.4 && < 1.5,
mmap >= 0.5.9 && < 0.6,
zlib >= 0.6.1.2 && < 0.7.0.0,
network-uri >= 2.6 && < 2.8,
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment