diff --git a/pandoc-cli-disable-lua-version.patch b/pandoc-cli-disable-lua-version.patch new file mode 100644 index 0000000..bdf7c80 --- /dev/null +++ b/pandoc-cli-disable-lua-version.patch @@ -0,0 +1,13 @@ +--- pandoc-cli-0.1.1.1/hslua-cli-1.4.1/src/HsLua/CLI.hs~ 2001-09-09 09:46:40.000000000 +0800 ++++ pandoc-cli-0.1.1.1/hslua-cli-1.4.1/src/HsLua/CLI.hs 2023-09-28 16:52:57.472974622 +0800 +@@ -134,8 +134,8 @@ + then IgnoreEnvVars + else ConsultEnvVars + settingsRunner settings envVarOpt $ do +- -- print version info +- when (optVersion opts) (showVersion $ settingsVersionInfo settings) ++ -- -- print version info ++ -- when (optVersion opts) (showVersion $ settingsVersionInfo settings) + + -- push `arg` table + case optScript opts of diff --git a/pandoc.spec b/pandoc.spec index 8b6a9a6..92dced7 100644 --- a/pandoc.spec +++ b/pandoc.spec @@ -83,6 +83,7 @@ Source26: https://hackage.haskell.org/package/%{typst}/%{typst}.tar.gz Source27: https://hackage.haskell.org/package/%{unicodecollation}/%{unicodecollation}.tar.gz # End cabal-rpm sources Source30: https://hackage.haskell.org/package/%{base64}/base64.cabal#/%{base64}.cabal +Patch0: pandoc-cli-disable-lua-version.patch # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel @@ -674,6 +675,11 @@ or texlive-collection-luatex respectively. # Begin cabal-rpm setup: %setup -q -n %{pandoccli} -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -a18 -a19 -a20 -a21 -a22 -a23 %{?pandocserver:-a24} -a25 -a26 -a27 # End cabal-rpm setup +%ifarch ppc64le +# pandoc --version crashes with +lua feature +# https://bugzilla.redhat.com/show_bug.cgi?id=2177568 +%patch -P0 -p1 -b .orig +%endif cp -p %{SOURCE30} %{base64}/base64.cabal # Not in scope: ‘runTests’ @@ -714,6 +720,7 @@ touch %{buildroot}%{_datadir}/bash-completion/completions/%{name} %check +# lua version crashing on ppc64le without patch %{buildroot}%{_bindir}/pandoc -v