Skip to content

Commit

Permalink
#3974 workaround pandoc builds without lua filters in F39
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Aug 24, 2023
1 parent 299e78a commit da98d04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packaging/rpm/xpra.spec
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@ autoprov: no
%if 0%{?nvidia_codecs}
%define build_args %{DEFAULT_BUILD_ARGS}
%else
%if 0%{?fedora}>=39
%define build_args %{DEFAULT_BUILD_ARGS} --without-nvidia --without-pandoc_lua
%else
%define build_args %{DEFAULT_BUILD_ARGS} --without-nvidia
%endif
%endif
%global selinux_variants mls targeted
%define selinux_modules cups_xpra xpra_socketactivation

Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ def has_header_file(name, isdir=False):
example_ENABLED = DEFAULT

#Cython / gcc / packaging build options:
docs_ENABLED = DEFAULT
docs_ENABLED = DEFAULT and shutil.which("pandoc")
pandoc_lua_ENABLED = DEFAULT
annotate_ENABLED = DEFAULT
warn_ENABLED = True
strict_ENABLED = False
Expand Down Expand Up @@ -325,7 +326,7 @@ def has_header_file(name, isdir=False):
"pam", "xdg_open",
"audio", "opengl", "printing", "webcam", "notifications", "keyboard",
"rebuild",
"docs",
"docs", "pandoc_lua",
"annotate", "warn", "strict",
"shadow", "proxy", "rfb", "quic", "http", "ssh",
"debug", "PIC",
Expand Down Expand Up @@ -478,7 +479,7 @@ def convert_doc(fsrc, fdst, fmt="html", force=False):
print(f" {bsrc:<30} -> {bdst}")
pandoc = os.environ.get("PANDOC", "pandoc")
cmd = [pandoc, "--from", "commonmark", "--to", fmt, "-o", fdst, fsrc]
if fmt=="html":
if fmt=="html" and pandoc_lua_ENABLED:
cmd += ["--lua-filter", "./fs/bin/links-to-html.lua"]
r = subprocess.Popen(cmd).wait(30)
assert r==0, "'%s' returned %s" % (" ".join(cmd), r)
Expand Down

0 comments on commit da98d04

Please sign in to comment.