Version build dependency on STM, and allow building without it, which disables the watch command.

This commit is contained in:
Joey Hess 2012-06-26 09:15:47 -04:00
parent 6168795c1a
commit 41fcb3d852
7 changed files with 27 additions and 6 deletions

View file

@ -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]

View file

@ -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

2
debian/changelog vendored
View file

@ -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

2
debian/control vendored
View file

@ -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,

View file

@ -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]]

View file

@ -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

View file

@ -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