File: hslua.cabal

package info (click to toggle)
haskell-hslua 0.4.1-10
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 700 kB
  • ctags: 1,937
  • sloc: ansic: 11,878; haskell: 143; makefile: 8
file content (126 lines) | stat: -rw-r--r-- 4,530 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name:                   hslua
version:                0.4.1
stability:              beta
cabal-version:          >= 1.8
license:                MIT
build-type:             Simple
license-File:           COPYRIGHT
copyright:              Gracjan Polak 2007-2012, Ömer Sinan Ağacan 2012-2015
author:                 Gracjan Polak, Ömer Sinan Ağacan
maintainer:             omeragacan@gmail.com
synopsis:               A Lua language interpreter embedding in Haskell
description:            The Scripting.Lua module is a wrapper of Lua language interpreter
                        as described in [lua.org](http://www.lua.org/).
                        .
                        This package contains full Lua interpreter version 5.1.5.
                        If you want to link it with system-wide Lua installation, use @system-lua@ flag.
                        .
                        [Example programs](https://github.com/osa1/hslua/tree/master/examples)
category:               Scripting
extra-source-files:     lua-5.1.5/*.h
                        README.md
                        CHANGELOG.md
                        COPYRIGHT
                        examples/callbacks/callbacks.lua
                        examples/haskellfun/haskellfun.lua
                        examples/err_prop/err_prop.lua

source-repository head
  type:                 git
  location:             https://github.com/osa1/hslua.git

flag system-lua
  description:          Use the system-wide Lua instead of the bundled copy
  default:              True

flag apicheck
  description:          Compile Lua with -DLUA_USE_APICHECK.
  default:              False

flag luajit
  description:          Link with LuaJIT (should be used with -fsystem-lua)
  default:              True

library
  build-depends:        base == 4.*, bytestring >= 0.10.2.0 && < 0.11
  exposed-modules:      Scripting.Lua, Scripting.Lua.Raw
  hs-source-dirs:       src
  ghc-options:          -Wall -O2
  if flag(system-lua)
    if flag(luajit)
      Pkgconfig-depends:  lua5.1, luajit
    else
      Pkgconfig-depends:  lua5.1
  else
    c-sources:          lua-5.1.5/lobject.c, lua-5.1.5/ltm.c, lua-5.1.5/ldblib.c,
                        lua-5.1.5/ldo.c, lua-5.1.5/lvm.c, lua-5.1.5/ltable.c,
                        lua-5.1.5/lstrlib.c, lua-5.1.5/lfunc.c,
                        lua-5.1.5/lstate.c, lua-5.1.5/lmathlib.c, lua-5.1.5/lmem.c,
                        lua-5.1.5/ltablib.c, lua-5.1.5/lzio.c, lua-5.1.5/lstring.c,
                        lua-5.1.5/ldump.c, lua-5.1.5/linit.c, lua-5.1.5/lbaselib.c,
                        lua-5.1.5/lauxlib.c, lua-5.1.5/lopcodes.c, lua-5.1.5/lgc.c,
                        lua-5.1.5/lcode.c, lua-5.1.5/loadlib.c, lua-5.1.5/lapi.c,
                        lua-5.1.5/lundump.c, lua-5.1.5/loslib.c, lua-5.1.5/lparser.c,
                        lua-5.1.5/ldebug.c, lua-5.1.5/liolib.c,
                        lua-5.1.5/llex.c

    include-dirs:       lua-5.1.5

  if os(linux)
    cc-options:         "-DLUA_USE_LINUX"

  if os(darwin)
    cc-options:         "-DLUA_USE_MACOSX"

  if os(freebsd)
    cc-options:         "-DLUA_USE_POSIX"

  if os(windows)
     cc-options:        "-D__NO_ISOCEXT"

  if flag(apicheck)
    cc-Options:         "-DLUA_USE_APICHECK"

-- This is not necessary because we have a test suite now. Still keeping here as
-- a very simple test. Originally added with 799a4c2 to test if linking with
-- system-wide Lua is really working.
test-suite simple-test
  type:                 exitcode-stdio-1.0
  main-is:              simple-test.hs
  hs-source-dirs:       test
  build-depends:        base, hslua

test-suite callbacks
  type:                 exitcode-stdio-1.0
  main-is:              callbacks.hs
  hs-source-dirs:       examples/callbacks
  build-depends:        base, bytestring, hslua

test-suite haskellfun
  type:                 exitcode-stdio-1.0
  main-is:              haskellfun.hs
  hs-source-dirs:       examples/haskellfun
  build-depends:        base, bytestring, hslua

test-suite err_prop
  type:                 exitcode-stdio-1.0
  main-is:              err_prop.hs
  hs-source-dirs:       examples/err_prop
  build-depends:        base, bytestring, hslua

test-suite test
  type:                 exitcode-stdio-1.0
  main-is:              Spec.hs
  hs-source-dirs:       test
  ghc-options:          -Wall -threaded

  build-depends:
    base,
    bytestring,
    hslua,
    hspec,
    hspec-contrib,
    HUnit,
    text,
    QuickCheck >= 2.7,
    quickcheck-instances