From 219d72ebde4bab5a516a86608dcb3aede75c1611 Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 4 Jun 2017 22:39:14 -0400 Subject: WIP: Adapting DHT to Tox network. --- bittorrent.cabal | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'bittorrent.cabal') diff --git a/bittorrent.cabal b/bittorrent.cabal index a8858abd..b625176d 100644 --- a/bittorrent.cabal +++ b/bittorrent.cabal @@ -52,7 +52,7 @@ flag bits-extras flag dht-only description: Build only DHT related modules. - default: False + default: True flag builder description: Use older bytestring package and bytestring-builder. @@ -66,6 +66,10 @@ flag thread-debug description: Add instrumentation to threads. default: True +flag tox-only + description: Enable only the Tox DHT and disable Mainline bencoded messages. + default: True + library default-language: Haskell2010 default-extensions: PatternGuards @@ -76,7 +80,6 @@ library Network.KRPC.Message Network.KRPC.Method Network.KRPC.Manager - Data.BEncode.Pretty Data.Torrent Data.Digest.CRC32C Network.BitTorrent.Address @@ -183,7 +186,6 @@ library , base16-bytestring >= 0.1 , base32-bytestring >= 0.2 , base64-bytestring >= 1.0 - , bencoding >= 0.4.3 , cereal >= 0.3.5 -- Time @@ -221,6 +223,12 @@ library , bits-extras >= 0.1.2 else build-depends: base >= 4.8 + if !flag(tox-only) + build-depends: bencoding >= 0.4.3 + exposed-modules: Data.BEncode.Pretty + else + build-depends: largeword + exposed-modules: Data.Tox if flag(aeson) build-depends: aeson, aeson-pretty, unordered-containers, vector cpp-options: -DBENCODE_AESON @@ -319,7 +327,6 @@ test-suite spec , quickcheck-instances -- * Bittorrent - , bencoding , bittorrent , temporary if flag(network-uri) @@ -327,6 +334,8 @@ test-suite spec , network-uri >= 2.6 else Build-depends: network >= 2.4 && < 2.6 + if !flag(tox-only) + build-depends: bencoding >= 0.4.3 ghc-options: -Wall -fno-warn-orphans -- cgit v1.2.3