From 6db720421a4fbfda957e7199464f16b6f261b40a Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 20 Aug 2016 02:19:53 -0400 Subject: Build fixes. --- bittorrent.cabal | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'bittorrent.cabal') diff --git a/bittorrent.cabal b/bittorrent.cabal index bc062921..efc1cb0d 100644 --- a/bittorrent.cabal +++ b/bittorrent.cabal @@ -42,6 +42,10 @@ flag examples description: Whether to build examples. default: False +flag network-uri + description: Use network-uri package. + default: True + library default-language: Haskell2010 default-extensions: PatternGuards @@ -98,7 +102,6 @@ library , bits-extras >= 0.1.2 , convertible >= 1.0 , pretty >= 1.1 - , prettyclass >= 1.0 -- Control , deepseq >= 1.3 @@ -153,7 +156,6 @@ library , time >= 1.0 -- Network - , network >= 2.4 , krpc >= 0.6.1 , http-types >= 0.8 , http-client >= 0.2 @@ -170,11 +172,19 @@ library , filepath >= 1.3 , mmap >= 0.5 + if flag(network-uri) + Build-depends: network >= 2.6 + , network-uri >= 2.6 + else + Build-depends: network >= 2.4 && < 2.6 + ghc-options: -Wall ghc-prof-options: test-suite spec + if !flag(testing) + buildable: False default-language: Haskell2010 default-extensions: OverloadedStrings type: exitcode-stdio-1.0 @@ -236,7 +246,6 @@ test-suite spec -- * Network , http-types , iproute - , network -- * System , optparse-applicative >= 0.8 @@ -254,6 +263,11 @@ test-suite spec , krpc >= 0.6.1 , bittorrent , temporary + if flag(network-uri) + Build-depends: network >= 2.6 + , network-uri >= 2.6 + else + Build-depends: network >= 2.4 && < 2.6 ghc-options: -Wall -fno-warn-orphans @@ -285,7 +299,7 @@ executable mktorrent build-depends: base == 4.* , bytestring , text - , prettyclass + , pretty , mtl , conduit @@ -311,6 +325,6 @@ executable client build-depends: base == 4.* , bittorrent , mtl - , prettyclass + , pretty , data-default , optparse-applicative -- cgit v1.2.3