From de6d54fc1892a1f004d1e42737e9e6be7deb40b3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 28 Jun 2016 10:35:33 +0900 Subject: [PATCH] update lua patch to use pkgconfig for lua-5.1 --- ghc-hslua.spec | 4 +-- hslua-0.3.10-pkgconfig-lua-5.1.patch | 11 -------- hslua-system-lua.patch | 41 ++++++++-------------------- 3 files changed, 13 insertions(+), 43 deletions(-) delete mode 100644 hslua-0.3.10-pkgconfig-lua-5.1.patch diff --git a/ghc-hslua.spec b/ghc-hslua.spec index 4cf5bef..f91539e 100644 --- a/ghc-hslua.spec +++ b/ghc-hslua.spec @@ -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 diff --git a/hslua-0.3.10-pkgconfig-lua-5.1.patch b/hslua-0.3.10-pkgconfig-lua-5.1.patch deleted file mode 100644 index 8adddc8..0000000 --- a/hslua-0.3.10-pkgconfig-lua-5.1.patch +++ /dev/null @@ -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 diff --git a/hslua-system-lua.patch b/hslua-system-lua.patch index 50753aa..3089e5a 100644 --- a/hslua-system-lua.patch +++ b/hslua-system-lua.patch @@ -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,