diff --git a/ghc-hslua.spec b/ghc-hslua.spec index fa368b2..16c562e 100644 --- a/ghc-hslua.spec +++ b/ghc-hslua.spec @@ -14,6 +14,7 @@ Summary: A Lua language interpreter embedding in Haskell License: MIT Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz +Patch0: hslua-system-lua.patch BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros @@ -23,7 +24,7 @@ BuildRequires: ghc-containers-devel BuildRequires: ghc-exceptions-devel BuildRequires: ghc-mtl-devel BuildRequires: ghc-text-devel -BuildRequires: pkgconfig(luajit) +BuildRequires: pkgconfig(lua) %if %{with tests} BuildRequires: ghc-QuickCheck-devel BuildRequires: ghc-quickcheck-instances-devel @@ -50,7 +51,7 @@ Requires(postun): ghc-compiler = %{ghc_version} %endif Requires: %{name}%{?_isa} = %{version}-%{release} # Begin cabal-rpm deps: -Requires: pkgconfig(luajit) +Requires: pkgconfig(lua) # End cabal-rpm deps %description devel @@ -59,13 +60,14 @@ This package provides the Haskell %{pkg_name} library development files. %prep %setup -q -n %{pkgver} -cabal-tweak-drop-dep ', fail >= 4.9 && < 5' -cabal-tweak-flag system-lua True -cabal-tweak-flag use-pkgconfig True +%patch0 -p1 -b .orig +sed -i "/fail /d" hslua.cabal +#cabal-tweak-drop-dep '\", fail >= 4.9 && < 5\"' rm -r lua-5.3.4 %build +%define cabal_configure_options -f -luajit -f use-pkgconfig %ghc_lib_build diff --git a/hslua-system-lua.patch b/hslua-system-lua.patch index 3089e5a..af8d85c 100644 --- a/hslua-system-lua.patch +++ b/hslua-system-lua.patch @@ -1,11 +1,31 @@ ---- 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, +--- hslua-0.9.5/hslua.cabal.orig 2018-01-04 23:32:01.000000000 +0100 ++++ hslua-0.9.5/hslua.cabal 2018-01-30 00:14:21.052923877 +0100 +@@ -35,7 +35,8 @@ + + flag system-lua + description: Use the system-wide Lua instead of the bundled copy. +- default: False ++ default: True ++ manual: True + + flag apicheck + description: Compile Lua with -DLUA_USE_APICHECK. +@@ -60,6 +61,7 @@ + flag luajit + description: Link with LuaJIT. This implies flag system-lua as well. + default: False ++ manual: True + + flag lua501 + description: Build against lua 5.1. +@@ -115,7 +116,7 @@ + if flag(lua502) + pkgconfig-depends: lua5.2 + else +- pkgconfig-depends: lua5.3 ++ pkgconfig-depends: lua + else + Extra-libraries: lua + if !flag(use-pkgconfig) + +Diff finished. Tue Jan 30 00:14:26 2018