Skip to content

Commit

Permalink
Overhaul cabal file
Browse files Browse the repository at this point in the history
Re-layout entries, add missing fields (like `manual` for flags), and add
version bounds to all packages.
  • Loading branch information
tarleb committed Jul 6, 2018
1 parent 762942f commit 6323fe7
Showing 1 changed file with 162 additions and 146 deletions.
308 changes: 162 additions & 146 deletions hslua.cabal
@@ -1,185 +1,201 @@
name: hslua
version: 1.0.0
stability: beta
cabal-version: >= 1.10
license: MIT
build-type: Simple
license-File: COPYRIGHT
copyright: © 2007–2012 Gracjan Polak
© 2012–2016 Ömer Sinan Ağacan
© 2016–2018 Albert Krewinkel
author: Gracjan Polak, Ömer Sinan Ağacan
maintainer: albert+hslua@zeitkraut.de
synopsis: A Lua language interpreter embedding in Haskell
description: The Foreign.Lua module is a wrapper of Lua language
interpreter as described on
<https://www.lua.org/ lua.org>.
.
This package contains a full Lua interpreter version
5.3.4. If you want to link it with a system-wide Lua
installation, use the @system-lua@ flag.
.
<https://github.com/hslua/hslua-examples Example programs>
are available in a separate repository.
tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1
category: Foreign
extra-source-files: lua-5.3.4/*.h
safer-api/safer-api.h
README.md
CHANGELOG.md
COPYRIGHT
test/lua/*.lua
name: hslua
version: 1.0.0
synopsis: Bindings to Lua, an embeddable scripting language
description: The Foreign.Lua module is a wrapper of Lua language
interpreter as described on <https://www.lua.org/ lua.org>.
.
This package contains a full Lua interpreter version 5.3.4.
If you want to link it with a system-wide Lua installation,
use the @system-lua@ flag.
.
<https://github.com/hslua/hslua-examples Example programs>
are available in a separate repository.
homepage: https://github.com/hslua/hslua
bug-reports: https://github.com/hslua/hslua/issues
license: MIT
license-file: COPYRIGHT
author: Gracjan Polak, Ömer Sinan Ağacan
maintainer: albert+hslua@zeitkraut.de
copyright: © 2007–2012 Gracjan Polak
© 2012–2016 Ömer Sinan Ağacan
© 2016–2018 Albert Krewinkel
category: Foreign
build-type: Simple
extra-source-files: lua-5.3.4/*.h
safer-api/safer-api.h
README.md
CHANGELOG.md
test/lua/*.lua
cabal-version: >=1.10
tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1

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


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

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

flag lua_32bits
description: Compile Lua with -DLUA_32BITS
default: False
default: False
manual: True
description: Compile Lua with -DLUA_32BITS

flag allow-unsafe-gc
description: Allow optimizations which make Lua's garbage collection
potentially unsafe; haskell finalizers must be handled
with extreme care.
default: True
default: True
manual: True
description: Allow optimizations which make Lua's garbage collection
potentially unsafe; haskell finalizers must be handled
with extreme care.

flag export-dynamic
description: Add all symbols to dynamic symbol table; disabling this
will make it possible to create fully static binaries,
but renders loading of dynamic C libraries impossible.
default: True
default: True
manual: True
description: Add all symbols to dynamic symbol table; disabling this
will make it possible to create fully static binaries,
but renders loading of dynamic C libraries impossible.

flag pkg-config
description: Use @pkg-config@ to discover library and include paths.
Setting this flag implies `system-lua`.
default: False
manual: True
description: Use @pkg-config@ to discover library and include paths.
Setting this flag implies `system-lua`.

default: False

library
build-depends: base >= 4.8 && < 5
, bytestring >= 0.10.2 && < 0.11
, containers >= 0.5 && < 0.6
, exceptions >= 0.8 && < 0.11
, fail >= 4.9 && < 5
, mtl >= 2.2 && < 2.3
, text
exposed-modules: Foreign.Lua
, Foreign.Lua.Core
, Foreign.Lua.Core.Constants
, Foreign.Lua.Core.Error
, Foreign.Lua.Core.RawBindings
, Foreign.Lua.Core.Types
, Foreign.Lua.FunctionCalling
, Foreign.Lua.Types
, Foreign.Lua.Types.Retrievable
, Foreign.Lua.Types.Pushable
, Foreign.Lua.Util
hs-source-dirs: src
ghc-options: -Wall
default-language: Haskell2010
default-extensions: CApiFFI
, CPP
, ForeignFunctionInterface
, LambdaCase
c-sources: safer-api/safer-api.c
include-dirs: safer-api
exposed-modules: Foreign.Lua
, Foreign.Lua.Core
, Foreign.Lua.Core.Constants
, Foreign.Lua.Core.Error
, Foreign.Lua.Core.RawBindings
, Foreign.Lua.Core.Types
, Foreign.Lua.FunctionCalling
, Foreign.Lua.Types
, Foreign.Lua.Types.Retrievable
, Foreign.Lua.Types.Pushable
, Foreign.Lua.Util
build-depends: base >= 4.8 && < 5
, bytestring >= 0.10.2 && < 0.11
, containers >= 0.5 && < 0.6
, exceptions >= 0.8 && < 0.11
, fail >= 4.9 && < 5
, mtl >= 2.2 && < 2.3
, text >= 1.0 && < 1.3
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall
default-extensions: CApiFFI
, CPP
, ForeignFunctionInterface
, LambdaCase
other-extensions: DeriveDataTypeable
, DeriveFunctor
, FlexibleContexts
, FlexibleInstances
, ScopedTypeVariables
c-sources: safer-api/safer-api.c
include-dirs: safer-api

if flag(system-lua) || flag(pkg-config)
if flag(pkg-config)
pkgconfig-depends: lua5.3
else
extra-libraries: lua
includes: lua.h
extra-libraries: lua
includes: lua.h
else
c-sources: lua-5.3.4/lapi.c
, lua-5.3.4/lcode.c
, lua-5.3.4/lctype.c
, lua-5.3.4/ldebug.c
, lua-5.3.4/ldo.c
, lua-5.3.4/ldump.c
, lua-5.3.4/lfunc.c
, lua-5.3.4/lgc.c
, lua-5.3.4/llex.c
, lua-5.3.4/lmem.c
, lua-5.3.4/lobject.c
, lua-5.3.4/lopcodes.c
, lua-5.3.4/lparser.c
, lua-5.3.4/lstate.c
, lua-5.3.4/lstring.c
, lua-5.3.4/ltable.c
, lua-5.3.4/ltm.c
, lua-5.3.4/lundump.c
, lua-5.3.4/lvm.c
, lua-5.3.4/lzio.c

, lua-5.3.4/lauxlib.c
, lua-5.3.4/lbaselib.c
, lua-5.3.4/lbitlib.c
, lua-5.3.4/lcorolib.c
, lua-5.3.4/ldblib.c
, lua-5.3.4/liolib.c
, lua-5.3.4/lmathlib.c
, lua-5.3.4/lstrlib.c
, lua-5.3.4/loslib.c
, lua-5.3.4/ltablib.c
, lua-5.3.4/lutf8lib.c
, lua-5.3.4/loadlib.c
, lua-5.3.4/linit.c
include-dirs: lua-5.3.4
include-dirs: lua-5.3.4
c-sources: lua-5.3.4/lapi.c
, lua-5.3.4/lcode.c
, lua-5.3.4/lctype.c
, lua-5.3.4/ldebug.c
, lua-5.3.4/ldo.c
, lua-5.3.4/ldump.c
, lua-5.3.4/lfunc.c
, lua-5.3.4/lgc.c
, lua-5.3.4/llex.c
, lua-5.3.4/lmem.c
, lua-5.3.4/lobject.c
, lua-5.3.4/lopcodes.c
, lua-5.3.4/lparser.c
, lua-5.3.4/lstate.c
, lua-5.3.4/lstring.c
, lua-5.3.4/ltable.c
, lua-5.3.4/ltm.c
, lua-5.3.4/lundump.c
, lua-5.3.4/lvm.c
, lua-5.3.4/lzio.c

, lua-5.3.4/lauxlib.c
, lua-5.3.4/lbaselib.c
, lua-5.3.4/lbitlib.c
, lua-5.3.4/lcorolib.c
, lua-5.3.4/ldblib.c
, lua-5.3.4/liolib.c
, lua-5.3.4/lmathlib.c
, lua-5.3.4/lstrlib.c
, lua-5.3.4/loslib.c
, lua-5.3.4/ltablib.c
, lua-5.3.4/lutf8lib.c
, lua-5.3.4/loadlib.c
, lua-5.3.4/linit.c

if os(linux)
cc-options: "-DLUA_USE_LINUX"
cc-options: -DLUA_USE_LINUX
if flag(export-dynamic)
ld-options: "-Wl,-E"
ld-options: -Wl,-E

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

if os(freebsd)
cc-options: "-DLUA_USE_POSIX"
cc-options: -DLUA_USE_POSIX
if flag(export-dynamic)
ld-options: "-Wl,-E"
ld-options: -Wl,-E

if flag(lua_32bits)
cc-options: "-DLUA_32BITS"
cc-options: -DLUA_32BITS

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

if flag(allow-unsafe-gc)
cpp-options: -DALLOW_UNSAFE_GC
cpp-options: -DALLOW_UNSAFE_GC


test-suite test-hslua
type: exitcode-stdio-1.0
main-is: test-hslua.hs
hs-source-dirs: test
ghc-options: -Wall -threaded
default-language: Haskell2010
other-modules: Foreign.LuaTest
, Foreign.Lua.CoreTest
, Foreign.Lua.FunctionCallingTest
, Foreign.Lua.TypesTest
, Foreign.Lua.Types.RetrievableTest
, Foreign.Lua.Types.PushableTest
, Foreign.Lua.UtilTest
, Test.HsLua.Arbitrary
, Test.HsLua.Util
build-depends: base
, QuickCheck >= 2.7
, bytestring
, containers
, hslua
, quickcheck-instances
, tasty
, tasty-hunit
, tasty-quickcheck
, text
type: exitcode-stdio-1.0
main-is: test-hslua.hs
hs-source-dirs: test
ghc-options: -Wall -threaded
default-language: Haskell2010
other-modules: Foreign.LuaTest
, Foreign.Lua.CoreTest
, Foreign.Lua.FunctionCallingTest
, Foreign.Lua.TypesTest
, Foreign.Lua.Types.RetrievableTest
, Foreign.Lua.Types.PushableTest
, Foreign.Lua.UtilTest
, Test.HsLua.Arbitrary
, Test.HsLua.Util
build-depends: base >= 4.8 && < 5
, bytestring >= 0.10.2 && < 0.11
, containers >= 0.5 && < 0.6
, exceptions >= 0.8 && < 0.11
, fail >= 4.9 && < 5
, mtl >= 2.2 && < 2.3
, text >= 1.0 && < 1.3
-- for testing
, hslua
, QuickCheck >= 2.7
, quickcheck-instances >= 0.3
, tasty >= 0.11
, tasty-hunit >= 0.9
, tasty-quickcheck >= 0.8

0 comments on commit 6323fe7

Please sign in to comment.