update lua patch to use pkgconfig for lua-5.1

This commit is contained in:
Jens Petersen 2016-06-28 10:35:33 +09:00
parent 8aff4f185b
commit de6d54fc18
3 changed files with 13 additions and 43 deletions

View File

@ -12,7 +12,7 @@ Summary: Lua language interpreter embedding in Haskell
License: MIT
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
Patch0: hslua-0.3.10-pkgconfig-lua-5.1.patch
Patch0: hslua-system-lua.patch
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
@ -53,7 +53,7 @@ This package provides the Haskell %{pkg_name} library development files.
%setup -q -n %{pkg_name}-%{version}
%patch0 -p1 -b .lua~
cabal-tweak-flag system-lua True
rm src/*.c src/*.h
rm -r lua-5.1.5
%build

View File

@ -1,11 +0,0 @@
--- hslua-0.3.10/hslua.cabal~ 2014-01-22 10:24:05.704696822 +0900
+++ hslua-0.3.10/hslua.cabal 2014-01-22 16:57:10.384860068 +0900
@@ -30,7 +30,7 @@
Exposed-modules: Scripting.Lua, Scripting.Lua.ConfigFile
Hs-source-dirs: src
if flag(system-lua)
- Pkgconfig-depends: lua
+ Pkgconfig-depends: lua-5.1
C-sources: cbits/ntrljmp.c
Include-dirs: cbits
else

View File

@ -1,30 +1,11 @@
--- hslua-0.3.6.1/hslua.cabal.orig 2013-06-18 15:02:48.000000000 +0900
+++ hslua-0.3.6.1/hslua.cabal 2013-09-18 18:34:30.652499112 +0900
@@ -21,18 +21,25 @@
type: git
location: https://github.com/osa1/hslua.git
+flag system-lua
+ description: Use the system-wide lua instead of the bundled copy
+ default: False
+
Library
Build-depends: base==4.*, mtl >= 2.1
Exposed-modules: Scripting.Lua, Scripting.Lua.ConfigFile
Hs-source-dirs: src
- C-sources: src/lapi.c, src/lauxlib.c, src/lbaselib.c, src/lcode.c,
+ if flag(system-lua)
+ Pkgconfig-depends: lua
+ else
+ C-sources: src/lapi.c, src/lauxlib.c, src/lbaselib.c, src/lcode.c,
src/ldblib.c, src/ldebug.c, src/ldo.c, src/ldump.c, src/lfunc.c,
src/lgc.c, src/linit.c, src/liolib.c, src/llex.c, src/lmathlib.c,
src/lmem.c, src/loadlib.c, src/lobject.c, src/lopcodes.c,
src/loslib.c, src/lparser.c, src/lstate.c, src/lstring.c,
src/lstrlib.c, src/ltable.c, src/ltablib.c, src/ltm.c,
src/lundump.c, src/lvm.c, src/lzio.c, src/ntrljmp.c
- Include-dirs: src
+ Include-dirs: src
if os(linux)
CC-Options: "-DLUA_USE_LINUX"
--- hslua-0.4.1/hslua.cabal~ 2015-09-09 06:23:09.000000000 +0900
+++ hslua-0.4.1/hslua.cabal 2016-06-28 10:21:53.952491564 +0900
@@ -50,7 +50,7 @@
if flag(luajit)
Extra-libraries: luajit-5.1
else
- Extra-libraries: lua
+ Pkgconfig-depends: lua-5.1
includes: lua.h
else
c-sources: lua-5.1.5/lobject.c, lua-5.1.5/ltm.c, lua-5.1.5/ldblib.c,