@@ -0,0 +1,127 @@
1+name: hslua
2+version: 0.4.1
3+stability: beta
4+cabal-version: >= 1.8
5+license: MIT
6+build-type: Simple
7+license-File: COPYRIGHT
8+copyright: Gracjan Polak 2007-2012, Ömer Sinan Ağacan 2012-2015
9+author: Gracjan Polak, Ömer Sinan Ağacan
10+maintainer: omeragacan@gmail.com
11+synopsis: A Lua language interpreter embedding in Haskell
12+description: The Scripting.Lua module is a wrapper of Lua language interpreter
13+ as described in [lua.org](http://www.lua.org/).
14+ .
15+ This package contains full Lua interpreter version 5.1.5.
16+ If you want to link it with system-wide Lua installation, use @system-lua@ flag.
17+ .
18+ [Example programs](https://github.com/osa1/hslua/tree/master/examples)
19+category: Scripting
20+extra-source-files: lua-5.1.5/*.h
21+ README.md
22+ CHANGELOG.md
23+ COPYRIGHT
24+ examples/callbacks/callbacks.lua
25+ examples/haskellfun/haskellfun.lua
26+ examples/err_prop/err_prop.lua
27+
28+source-repository head
29+ type: git
30+ location: https://github.com/osa1/hslua.git
31+
32+flag system-lua
33+ description: Use the system-wide Lua instead of the bundled copy
34+ default: False
35+
36+flag apicheck
37+ description: Compile Lua with -DLUA_USE_APICHECK.
38+ default: False
39+
40+flag luajit
41+ description: Link with LuaJIT (should be used with -fsystem-lua)
42+ default: False
43+
44+library
45+ build-depends: base == 4.*, bytestring >= 0.10.2.0 && < 0.11
46+ exposed-modules: Scripting.Lua, Scripting.Lua.Raw
47+ hs-source-dirs: src
48+ ghc-options: -Wall -O2
49+ if flag(system-lua)
50+ if flag(luajit)
51+ Extra-libraries: luajit-5.1
52+ else
53+ Extra-libraries: lua5.1
54+ includes: lua.h
55+ else
56+ c-sources: lua-5.1.5/lobject.c, lua-5.1.5/ltm.c, lua-5.1.5/ldblib.c,
57+ lua-5.1.5/ldo.c, lua-5.1.5/lvm.c, lua-5.1.5/ltable.c,
58+ lua-5.1.5/lstrlib.c, lua-5.1.5/lfunc.c,
59+ lua-5.1.5/lstate.c, lua-5.1.5/lmathlib.c, lua-5.1.5/lmem.c,
60+ lua-5.1.5/ltablib.c, lua-5.1.5/lzio.c, lua-5.1.5/lstring.c,
61+ lua-5.1.5/ldump.c, lua-5.1.5/linit.c, lua-5.1.5/lbaselib.c,
62+ lua-5.1.5/lauxlib.c, lua-5.1.5/lopcodes.c, lua-5.1.5/lgc.c,
63+ lua-5.1.5/lcode.c, lua-5.1.5/loadlib.c, lua-5.1.5/lapi.c,
64+ lua-5.1.5/lundump.c, lua-5.1.5/loslib.c, lua-5.1.5/lparser.c,
65+ lua-5.1.5/ldebug.c, lua-5.1.5/liolib.c,
66+ lua-5.1.5/llex.c
67+
68+ include-dirs: lua-5.1.5
69+
70+ if os(linux)
71+ cc-options: "-DLUA_USE_LINUX"
72+
73+ if os(darwin)
74+ cc-options: "-DLUA_USE_MACOSX"
75+
76+ if os(freebsd)
77+ cc-options: "-DLUA_USE_POSIX"
78+
79+ if os(windows)
80+ cc-options: "-D__NO_ISOCEXT"
81+
82+ if flag(apicheck)
83+ cc-Options: "-DLUA_USE_APICHECK"
84+
85+-- This is not necessary because we have a test suite now. Still keeping here as
86+-- a very simple test. Originally added with 799a4c2 to test if linking with
87+-- system-wide Lua is really working.
88+test-suite simple-test
89+ type: exitcode-stdio-1.0
90+ main-is: simple-test.hs
91+ hs-source-dirs: test
92+ build-depends: base, hslua
93+
94+test-suite callbacks
95+ type: exitcode-stdio-1.0
96+ main-is: callbacks.hs
97+ hs-source-dirs: examples/callbacks
98+ build-depends: base, bytestring, hslua
99+
100+test-suite haskellfun
101+ type: exitcode-stdio-1.0
102+ main-is: haskellfun.hs
103+ hs-source-dirs: examples/haskellfun
104+ build-depends: base, bytestring, hslua
105+
106+test-suite err_prop
107+ type: exitcode-stdio-1.0
108+ main-is: err_prop.hs
109+ hs-source-dirs: examples/err_prop
110+ build-depends: base, bytestring, hslua
111+
112+test-suite test
113+ type: exitcode-stdio-1.0
114+ main-is: Spec.hs
115+ hs-source-dirs: test
116+ ghc-options: -Wall -threaded
117+
118+ build-depends:
119+ base,
120+ bytestring,
121+ hslua,
122+ hspec,
123+ hspec-contrib,
124+ HUnit,
125+ text,
126+ QuickCheck >= 2.7,
127+ quickcheck-instances