From f5129666e79bab63d70bc2490aa67303522326d7 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 28 Mar 2022 10:06:52 -0700 Subject: [PATCH] Add lua53 flag. It is false by default. If set to true, compile with hslua 2.1 and Lua 5.3, otherwise hslua 2.2 and Lua 5.4. --- INSTALL.md | 3 +-- pandoc.cabal | 10 +++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index ca1799dd3..cc15d46fc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -310,8 +310,7 @@ You will need cabal version 2.0 or higher. - `embed_data_files`: embed all data files into the binary (default no). This is helpful if you want to create a relocatable binary. - - `https`: enable support for downloading resources over https - (using the `http-client` and `http-client-tls` libraries). + - `lua53`: embed support for Lua 5.3 instead of 5.4. 3. Build: diff --git a/pandoc.cabal b/pandoc.cabal index e3d00e4fb..48ab8653c 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -420,6 +420,10 @@ flag embed_data_files Description: Embed data files in binary for relocatable executable. Default: False +flag lua53 + Description: Embed Lua 5.3 instead of 5.4. + Default: False + flag trypandoc Description: Build trypandoc cgi executable. Default: False @@ -484,7 +488,6 @@ library file-embed >= 0.0 && < 0.1, filepath >= 1.1 && < 1.5, haddock-library >= 1.10 && < 1.11, - hslua >= 2.1 && < 2.3, hslua-marshalling >= 2.1 && < 2.3, hslua-module-doclayout>= 1.0.2 && < 1.1, hslua-module-path >= 1.0 && < 1.1, @@ -529,6 +532,11 @@ library zlib >= 0.5 && < 0.7 if !os(windows) build-depends: unix >= 2.4 && < 2.8 + if flag(lua53) + build-depends: hslua >= 2.1 && < 2.2, + hslua-aeson >= 2.1 && < 2.3 + else + build-depends: hslua >= 2.2 && < 2.3 if flag(embed_data_files) cpp-options: -DEMBED_DATA_FILES other-modules: Text.Pandoc.Data