diff --git a/pandoc-cli-disable-lua-version.patch b/pandoc-cli-disable-lua-version.patch deleted file mode 100644 index bdf7c80..0000000 --- a/pandoc-cli-disable-lua-version.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- 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 456a245..ac0f974 100644 --- a/pandoc.spec +++ b/pandoc.spec @@ -1,6 +1,13 @@ # generated by cabal-rpm-2.1.4 --subpackage # https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/ +%ifarch ppc64le +# pandoc --version crashes with +lua feature +# https://bugzilla.redhat.com/show_bug.cgi?id=2177568 +%bcond lua 0 +%else +%bcond lua 1 +%endif %bcond server 0 %global pkg_name pandoc-cli @@ -83,7 +90,6 @@ 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 @@ -675,11 +681,6 @@ 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’ @@ -689,7 +690,13 @@ rm %{digits}/Setup.lhs %build # Begin cabal-rpm build: %ghc_libs_build %{subpkgs} +%ifarch ppc64le +# pandoc --version crashes with +lua feature +# https://bugzilla.redhat.com/show_bug.cgi?id=2177568 +%define cabal_configure_options -f -lua +%else %define cabal_configure_options -f lua +%endif %ghc_bin_build # End cabal-rpm build @@ -706,7 +713,9 @@ rm %{buildroot}%{_bindir}/example rm %{buildroot}%{_datadir}/%{pandoc}/COPYRIGHT +%if %{with lua} ln -s pandoc %{buildroot}%{_bindir}/pandoc-lua +%endif %if %{with server} ln -s pandoc %{buildroot}%{_bindir}/pandoc-server %endif @@ -720,10 +729,12 @@ touch %{buildroot}%{_datadir}/bash-completion/completions/%{name} %check -# lua version crashing on ppc64le without patch +# crashing on ppc64le with +lua %{buildroot}%{_bindir}/pandoc -v +%if %{with lua} # make sure lua enabled echo | %{buildroot}%{_bindir}/pandoc --data-dir=%{buildroot}%{_datadir}/%{pandoc}/data --lua-filter /dev/null +%endif %post @@ -735,7 +746,9 @@ echo | %{buildroot}%{_bindir}/pandoc --data-dir=%{buildroot}%{_datadir}/%{pandoc %license COPYING.md %{_bindir}/pandoc # End cabal-rpm files +%if %{with lua} %{_bindir}/pandoc-lua +%endif %if %{with server} %{_bindir}/pandoc-server %endif @@ -759,6 +772,7 @@ echo | %{buildroot}%{_bindir}/pandoc --data-dir=%{buildroot}%{_datadir}/%{pandoc - add deps: hslua-{cli,module-zip,repl}, isocline, typst, digits, ordered-containers, toml-parser, and pandoc-lua-engine - pandoc server disabled for now +- note that LUA support is disabled on ppc64le (#2172771) * Sun Aug 6 2023 Jens Petersen - 3.0.1-24 - rebuild