on master help sign in
Hackage does not support impl(ghcjs) yet.

Use a flag instead for now and let cabal switch it off when ghcjs-base is not present (on ghc).

commit50ec30abfffa3d3657b8564aa6c69cfedc2394c8 authorHamish Mackenzie <Hamish.K.Mackenzie@googlemail.com> dateMon 9 Dec 2013, 05:45 (13 years ago) parente28d9a5
1 file changed+12−4
jsaddle.cabal+12−4
jsaddle.cabal+12−4
@@ -17,6 +17,10 @@ Source-Repository head
1717 type: git
1818 location: https://github.com/ghcjs/jsaddle
1919
20+flag ghcjs
21+ description: Tell cabal we are using ghcjs (work around until hackage supports impl(ghcjs))
22+ default: True
23+
2024flag gtk3
2125 Description: Use GTK3 rather than GTK2
2226 Default: True
@@ -34,11 +38,13 @@ flag jmacro
3438 default: True
3539
3640library
37− if impl(ghcjs) && flag(jsffi)
41+-- if impl(ghcjs) && flag(jsffi)
42+ if flag(ghcjs) && flag(jsffi)
3843 cpp-options: -DUSE_JAVASCRIPTFFI
3944 build-depends: ghcjs-base
4045
41− if !impl(ghcjs) || flag(webkit)
46+-- if !impl(ghcjs) || flag(webkit)
47+ if !flag(ghcjs) || flag(webkit)
4248 cpp-options: -DUSE_WEBKIT
4349 if flag(gtk3)
4450 build-depends: webkitgtk3 >=0.12.5 && <0.13,
@@ -71,11 +77,13 @@ test-suite test-tool
7177 if flag(jsffi)
7278 buildable: False
7379
74− if impl(ghcjs) && flag(jsffi)
80+-- if impl(ghcjs) && flag(jsffi)
81+ if flag(ghcjs) && flag(jsffi)
7582 cpp-options: -DUSE_JAVASCRIPTFFI
7683 build-depends: ghcjs-base
7784
78− if !impl(ghcjs) || flag(webkit)
85+-- if !impl(ghcjs) || flag(webkit)
86+ if !flag(ghcjs) || flag(webkit)
7987 cpp-options: -DUSE_WEBKIT
8088 build-depends: glib >=0.12.3.1 && <0.13
8189 if flag(gtk3)