compilation fixes
[intricacy.git] / intricacy.cabal
blob39a325a279d3f482c469cbad1f7edd97fef7cefb
1 cabal-version:      >=1.10
2 name:               intricacy
3 version:            0.8.2.1
4 license:            GPL-3
5 license-file:       COPYING
6 maintainer:         mbays@sdf.org
7 author:             Martin Bays
8 homepage:           http://mbays.freeshell.org/intricacy
9 synopsis:           A game of competitive puzzle-design
10 description:
11     A lockpicking-themed turn-based puzzle game on a hex grid. A series of
12     preset puzzles serves as an extended single-player introduction, after
13     which players enter a multi-player game with a client-server architecture,
14     in which players design puzzles (locks) and solve those designed by
15     others. A metagame encourages the design of maximally difficult puzzles,
16     within tight size constraints. The client supports Curses and SDL, with
17     all graphics in SDL mode drawn by code using SDL-gfx. The network protocol
18     is based on the 'binary' package, and is intended to be reasonably
19     efficient. TVars are used to give transparent local caching and background
20     network operations. Also incorporates an implementation of a graph
21     5-colouring algorithm (see GraphColouring.hs).
23 category:           Game
24 build-type:         Simple
25 data-files:
26     VeraMoBd.ttf
27     tutorial/*.lock
28     tutorial/*.text
29     initiation/initiation.map
30     initiation/*.lock
31     initiation/*.text
32     sounds/*.ogg
34 extra-source-files:
35     Main_stub.h
36     README
37     BUILD
38     NEWS
39     tutorial-extra/*.lock
40     tutorial-extra/README
42 source-repository head
43     type:     git
44     location: http://mbays.freeshell.org/intricacy/.git
46 flag game
47     description: Build game
48     manual:      True
50 flag sdl
51     description: Enable SDL UI
53 flag sound
54     description: Enable sound
56 flag curses
57     description: Enable Curses UI
59 flag server
60     description: Build server
61     default:     False
62     manual:      True
64 flag sendmail
65     description: Include support for sending mail
66     default:     False
67     manual:      True
69 executable intricacy
70     main-is:          Intricacy.hs
71     other-modules:
72         AsciiLock
73         BinaryInstances
74         BoardColouring
75         Cache
76         Command
77         CVec
78         Database
79         EditGameState
80         Frame
81         GameState
82         GameStateTypes
83         GraphColouring
84         Hex
85         Init
86         InputMode
87         Interact
88         InteractUtil
89         KeyBindings
90         Lock
91         MainState
92         Maxlocksize
93         Metagame
94         Mundanities
95         Paths_intricacy
96         Physics
97         Protocol
98         ServerAddr
99         Util
100         Version
102     default-language: Haskell2010
104     if !flag(game)
105         buildable: False
107     else
108         default-extensions: DoAndIfThenElse
109         build-depends:
110             base >=4.3 && <5,
111             mtl >=2.1.3.1 && <2.4,
112             transformers >=0.3.0.0 && <0.8,
113             stm >=2.1 && <2.6,
114             directory >=1.0 && <1.4,
115             exceptions >=0.8.3 && <0.11,
116             filepath >=1.0 && <1.6,
117             time >=1.2 && <1.14,
118             bytestring >=0.10 && <0.13,
119             array >=0.3 && <0.6,
120             containers >=0.4 && <0.8,
121             vector >=0.9 && <0.14,
122             binary >=0.5 && <0.11,
123             network-simple >=0.3 && <0.5,
124             safe >=0.3.18 && <0.4,
125             memory >=0.11 && <0.19,
126             cryptonite >=0.16 && <0.31
128         if !impl(ghc >=8.0)
129             build-depends: semigroups ==0.18.*
131         if flag(sdl)
132             build-depends:
133                 SDL >=0.6.5 && <0.7,
134                 SDL-ttf ==0.6.*,
135                 SDL-gfx >=0.6 && <0.8
137             if flag(sound)
138                 cpp-options:   -DSOUND
139                 build-depends:
140                     SDL-mixer ==0.6.*,
141                     random >=1.0 && <1.4
143             if os(windows)
144                 extra-libraries:
145                     SDL_ttf
146                     SDL
147                     SDL_gfx
148                     freetype
150                 ghc-options:     -optl-mwindows
152                 if flag(sound)
153                     extra-libraries: SDL_mixer
155             if os(osx)
156                 cpp-options:  -DAPPLE
157                 c-sources:    c_main.c
158                 include-dirs: /usr/include/SDL /usr/local/include/SDL
159                 ghc-options:  -no-hs-main
161         if flag(curses)
162             cpp-options:       -DMAIN_CURSES
163             pkgconfig-depends: ncursesw -any
164             other-modules:
165                 CursesRender
166                 CursesUI
167                 CursesUIMInstance
169             build-depends:     hscurses ==1.4.*
171         if flag(sdl)
172             cpp-options:   -DMAIN_SDL
173             other-modules:
174                 SDLGlyph
175                 SDLRender
176                 SDLUI
177                 SDLUIMInstance
179         if (!flag(sdl) && !flag(curses))
180             buildable:     False
181             build-depends: base <0
183 executable intricacy-server
184     main-is:          Server.hs
185     other-modules:
186         AsciiLock
187         BinaryInstances
188         BoardColouring
189         CVec
190         Database
191         Frame
192         GameState
193         GameStateTypes
194         GraphColouring
195         Hex
196         Lock
197         Maxlocksize
198         Metagame
199         Mundanities
200         Paths_intricacy
201         Physics
202         Protocol
203         Util
204         Version
206     default-language: Haskell2010
208     if flag(server)
209         default-extensions: DoAndIfThenElse
210         build-depends:
211             base >=4.3 && <5,
212             mtl >=2.2 && <2.4,
213             transformers >=0.4 && <0.8,
214             stm >=2.1 && <2.6,
215             directory >=1.0 && <1.4,
216             exceptions >=0.8.3 && <0.11,
217             filepath >=1.0 && <1.5,
218             time >=1.5 && <1.14,
219             bytestring >=0.10 && <0.12,
220             array >=0.3 && <0.6,
221             containers >=0.4 && <0.7,
222             vector >=0.9 && <0.13,
223             binary >=0.5 && <0.11,
224             network-fancy >=0.1.5 && <0.3,
225             safe >=0.3.18 && <0.4,
226             random >=1.0 && <1.4,
227             pipes >=4 && <4.4,
228             feed >=1.1 && <1.4,
229             xml-conduit >=1.0 && <1.10,
230             email-validate >=1.0 && <2.4,
231             text >=0.1 && <3,
232             text-short ==0.1.*,
233             mime-mail >=0.4.4 && <0.6,
234             memory >=0.11 && <0.18,
235             cryptonite >=0.16 && <0.31,
236             argon2 ==1.3.*
238         if !impl(ghc >=8.0)
239             build-depends: semigroups ==0.18.*
241         if flag(sendmail)
242             cpp-options:   -DSENDMAIL
243             build-depends:
244                 smtp-mail >=0.1.4.1 && <0.4
245     else
246         buildable: False