summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-26 09:15:47 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-26 09:15:47 -0400
commit41fcb3d852d756ed218f3458af1ff9c7ae6d0e1d (patch)
tree8696e46240610e4bdab657d38b6209cf50914982
parent6168795c1a92c509bbd16e29717d9a02afe8414c (diff)
Version build dependency on STM, and allow building without it, which disables the watch command.
-rw-r--r--GitAnnex.hs6
-rw-r--r--Makefile2
-rw-r--r--debian/changelog2
-rw-r--r--debian/control2
-rw-r--r--doc/bugs/error_building_git-annex_3.20120624_using_cabal.mdwn5
-rw-r--r--doc/install.mdwn3
-rw-r--r--git-annex.cabal13
7 files changed, 27 insertions, 6 deletions
diff --git a/GitAnnex.hs b/GitAnnex.hs
index a4c5eb849..8dba5a3a7 100644
--- a/GitAnnex.hs
+++ b/GitAnnex.hs
@@ -5,6 +5,8 @@
- Licensed under the GNU GPL version 3 or higher.
-}
+{-# LANGUAGE CPP #-}
+
module GitAnnex where
import System.Console.GetOpt
@@ -58,7 +60,9 @@ import qualified Command.Import
import qualified Command.Map
import qualified Command.Upgrade
import qualified Command.Version
+#ifdef WITH_ASSISTANT
import qualified Command.Watch
+#endif
cmds :: [Command]
cmds = concat
@@ -100,7 +104,9 @@ cmds = concat
, Command.Map.def
, Command.Upgrade.def
, Command.Version.def
+#ifdef WITH_ASSISTANT
, Command.Watch.def
+#endif
]
options :: [Option]
diff --git a/Makefile b/Makefile
index 73fbc4140..4d5628746 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ endif
PREFIX=/usr
IGNORE=-ignore-package monads-fd -ignore-package monads-tf
-BASEFLAGS=-Wall $(IGNORE) -outputdir tmp -IUtility -DWITH_S3 $(BASEFLAGS_OPTS)
+BASEFLAGS=-Wall $(IGNORE) -outputdir tmp -IUtility -DWITH_ASSISTANT -DWITH_S3 $(BASEFLAGS_OPTS)
GHCFLAGS=-O2 $(BASEFLAGS)
CFLAGS=-Wall
diff --git a/debian/changelog b/debian/changelog
index 2c289667d..92e992ed7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
git-annex (3.20120625) UNRELEASED; urgency=low
* cabal: Only try to use inotify on Linux.
+ * Version build dependency on STM, and allow building without it,
+ which disables the watch command.
-- Joey Hess <joeyh@debian.org> Mon, 25 Jun 2012 11:38:12 -0400
diff --git a/debian/control b/debian/control
index bcecbec3d..79702ed29 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,7 @@ Build-Depends:
libghc-bloomfilter-dev,
libghc-edit-distance-dev,
libghc-hinotify-dev [linux-any],
- libghc-stm-dev,
+ libghc-stm-dev (>= 2.3),
ikiwiki,
perlmagick,
git,
diff --git a/doc/bugs/error_building_git-annex_3.20120624_using_cabal.mdwn b/doc/bugs/error_building_git-annex_3.20120624_using_cabal.mdwn
index 63dc23c2d..df83f4e4e 100644
--- a/doc/bugs/error_building_git-annex_3.20120624_using_cabal.mdwn
+++ b/doc/bugs/error_building_git-annex_3.20120624_using_cabal.mdwn
@@ -152,3 +152,8 @@ I am trying to install git-annex 3.20120624 using cabal. My currently installed
ExitFailure 1
This is using haskell-platform 2012.1.0.0~debian1 on Ubuntu 12.04.
+
+> Turns out it needs version 2.3 of the STM library. (libghc-stm-dev
+> package). I've made cabal detect an older version and skip building
+> the new `git annex watch` command, so you'll be able to build the next
+> release. [[done]] --[[Joey]]
diff --git a/doc/install.mdwn b/doc/install.mdwn
index a009ee00d..3168976f4 100644
--- a/doc/install.mdwn
+++ b/doc/install.mdwn
@@ -37,12 +37,13 @@ To build and use git-annex, you will need:
* [TestPack](http://hackage.haskell.org/cgi-bin/hackage-scripts/package/testpack)
* [QuickCheck 2](http://hackage.haskell.org/package/QuickCheck)
* [HTTP](http://hackage.haskell.org/package/HTTP)
- * [hS3](http://hackage.haskell.org/package/hS3) (optional)
* [json](http://hackage.haskell.org/package/json)
* [IfElse](http://hackage.haskell.org/package/IfElse)
* [bloomfilter](http://hackage.haskell.org/package/bloomfilter)
* [edit-distance](http://hackage.haskell.org/package/edit-distance)
+ * [hS3](http://hackage.haskell.org/package/hS3) (optional)
* [stm](http://hackage.haskell.org/package/stm)
+ (optional; version 2.3 or newer)
* [hinotify](http://hackage.haskell.org/package/hinotify)
(optional; Linux only)
* Shell commands
diff --git a/git-annex.cabal b/git-annex.cabal
index b43705793..f55940695 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -1,5 +1,5 @@
Name: git-annex
-Version: 3.20120624
+Version: 3.20120625
Cabal-Version: >= 1.8
License: GPL
Maintainer: Joey Hess <joey@kitenet.net>
@@ -31,13 +31,16 @@ Flag S3
Flag Inotify
Description: Enable inotify support
+Flag Assistant
+ Description: Enable git-annex assistant and watch command
+
Executable git-annex
Main-Is: git-annex.hs
Build-Depends: MissingH, hslogger, directory, filepath,
unix, containers, utf8-string, network, mtl, bytestring, old-locale, time,
pcre-light, extensible-exceptions, dataenc, SHA, process, json, HTTP,
base == 4.5.*, monad-control, transformers-base, lifted-base,
- IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, stm
+ IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance
-- Need to list this because it's generated from a .hsc file.
Other-Modules: Utility.Touch
C-Sources: Utility/libdiskfree.c
@@ -47,6 +50,10 @@ Executable git-annex
Build-Depends: hS3
CPP-Options: -DWITH_S3
+ if flag(Assistant)
+ Build-Depends: stm >= 2.3
+ CPP-Options: -DWITH_ASSISTANT
+
if os(linux) && flag(Inotify)
Build-Depends: hinotify
CPP-Options: -DWITH_INOTIFY
@@ -58,7 +65,7 @@ Test-Suite test
unix, containers, utf8-string, network, mtl, bytestring, old-locale, time,
pcre-light, extensible-exceptions, dataenc, SHA, process, json, HTTP,
base == 4.5.*, monad-control, transformers-base, lifted-base,
- IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, stm
+ IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance
Other-Modules: Utility.Touch
C-Sources: Utility/libdiskfree.c
Extensions: CPP