summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathanDaugherty <>2020-11-20 23:13:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2020-11-20 23:13:00 (GMT)
commitf5c51bf021ce70628630e7517adf3b1b428cc5ba (patch)
tree91bd4d2895b04fdd3787db63efda36227da2ce65
parent2b1e2cfebb3d2c7f75221fef92eb140b784a21e2 (diff)
version 0.3HEAD0.3master
-rwxr-xr-xCHANGELOG.md9
-rwxr-xr-xREADME.md5
-rw-r--r--programs/Events/Main.hs2
-rw-r--r--tart.cabal14
4 files changed, 24 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4d0ef83..833f899 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,13 @@
+0.3
+---
+
+Package changes:
+ * Added `libonly` flag (defaults to `False`) to control whether to
+ build the `tart` executable.
+ * Raised the `brick` upper bound.
+ * Raised the `vty` upper bound.
+
0.2
---
diff --git a/README.md b/README.md
index 44e8368..c15f267 100755
--- a/README.md
+++ b/README.md
@@ -32,6 +32,11 @@ $ cabal new-build
$ $(find . -name tart -type f)
```
+By default, `tart` is built as both a library and a command-line tool.
+But if you want to use tart only for its Haskell library and avoid the
+additional executable dependencies, you can build with the `libonly`
+cabal build flag.
+
Features
========
diff --git a/programs/Events/Main.hs b/programs/Events/Main.hs
index 830330d..633170c 100644
--- a/programs/Events/Main.hs
+++ b/programs/Events/Main.hs
@@ -89,8 +89,6 @@ handleEvent s (VtyEvent e) =
(EvKey (KChar 'd') [MCtrl]) -> return $ moveCurrentLayerDown s
(EvKey (KChar 'v') [MCtrl]) -> return $ toggleCurrentLayer s
(EvKey (KChar 'C') []) -> return $ recenterCanvas s
- (EvKey (KChar 'f') []) -> return $ beginFgPaletteSelect s
- (EvKey (KChar 'b') []) -> return $ beginBgPaletteSelect s
(EvKey (KChar '>') []) -> return $ increaseToolSize s
(EvKey (KChar '<') []) -> return $ decreaseToolSize s
(EvKey KEsc []) | isJust (s^.dragging) -> return $ cancelDragging s
diff --git a/tart.cabal b/tart.cabal
index 72b55d7..249479e 100644
--- a/tart.cabal
+++ b/tart.cabal
@@ -1,5 +1,5 @@
name: tart
-version: 0.2
+version: 0.3
synopsis: Terminal Art
description: A program to make ASCII art
license: BSD3
@@ -19,6 +19,10 @@ Source-Repository head
type: git
location: git://github.com/jtdaugherty/tart.git
+Flag libonly
+ Description: Build only the library, not the tool
+ Default: False
+
library
ghc-options: -Wall
hs-source-dirs: src
@@ -33,7 +37,7 @@ library
build-depends: base >=4.9 && < 5,
array,
binary,
- vty >= 5.17.1 && < 5.27,
+ vty >= 5.17.1,
microlens-platform,
bytestring,
mtl,
@@ -41,6 +45,8 @@ library
text
executable tart
+ if flag(libonly)
+ Buildable: False
ghc-options: -threaded -Wall
hs-source-dirs: programs
main-is: Main.hs
@@ -78,8 +84,8 @@ executable tart
Draw.Box
default-language: Haskell2010
build-depends: base >=4.9 && < 5,
- brick >= 0.52 && < 0.53,
- vty >= 5.17 && < 5.27,
+ brick >= 0.52 && < 0.58,
+ vty,
vector,
microlens-platform,
microlens-th,