summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2026-05-14 15:59:43 -0400
committerLuke from DC <[email protected]>2026-07-12 20:34:07 +0000
commit95bf56ea2677787d7326c20dd4e120bf184f5089 (patch)
treec2cd38d983a38c7359d7a38bcd18bd8720e82f28
parentc6e534a7082d1acd9588ef251b8f759ed2dba163 (diff)
downloadatril-95bf56ea2677787d7326c20dd4e120bf184f5089.tar.bz2
atril-95bf56ea2677787d7326c20dd4e120bf184f5089.tar.xz
epub: Remove MathJax build configuration
WebKit2GTK renders MathML natively so the MathJax script injection is no longer needed. Remove the mathjax-directory build option, the auto-detection logic, and the CI package dependency. Assisted-by: OpenCode:claude-opus-4-6
-rwxr-xr-x.github/workflows/archlinux.sh1
-rw-r--r--configure.ac20
-rw-r--r--meson.build25
-rw-r--r--meson_options.txt5
4 files changed, 0 insertions, 51 deletions
diff --git a/.github/workflows/archlinux.sh b/.github/workflows/archlinux.sh
index 99c8b79d..dfc83d2c 100755
--- a/.github/workflows/archlinux.sh
+++ b/.github/workflows/archlinux.sh
@@ -31,7 +31,6 @@ requires+=(
poppler-glib
texlive-bin
webkit2gtk
- mathjax
which
yelp-tools
)
diff --git a/configure.ac b/configure.ac
index e72dff13..e29d8c69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -642,25 +642,6 @@ if test "x$enable_epub" = "xyes"; then
fi
fi
-AC_ARG_WITH([mathjax-directory],
- [AS_HELP_STRING([--with-mathjax-directory=DIRECTORY],
- [Specify the directory containing MathJax.js])],
- [],[with_mathjax_directory=check])
-AC_MSG_CHECKING([for the MathJax directory])
-mathjax_default_dir=/usr/share/javascript/mathjax
-AS_IF([test x$have_webkit = xyes -a "x$with_mathjax_directory" = xcheck],
- [for dir in "$mathjax_default_dir" /usr/share/mathjax; do
- if test -f "$dir/MathJax.js"; then
- with_mathjax_directory="$dir"
- break
- fi
- done])
-AS_IF([test "x$with_mathjax_directory" = xcheck],
- [AC_MSG_RESULT([not found, falling back to $mathjax_default_dir])
- with_mathjax_directory="$mathjax_default_dir"],
- [AC_MSG_RESULT([$with_mathjax_directory])])
-AC_DEFINE_UNQUOTED([MATHJAX_DIRECTORY], ["$with_mathjax_directory"], [Directory where to look up MathJax.js])
-
AM_CONDITIONAL(ENABLE_EPUB, test x$have_webkit = xyes)
dnl ================== End of EPUB checks ===================================================
@@ -809,7 +790,6 @@ Configure summary:
GObj. Introspection.: $enable_introspection
Use NLS.............: ${USE_NLS}
Tests...............: $enable_tests
- MathJax.............: $with_mathjax_directory
PDF Backend.........: $enable_pdf
Synctex enabled.....: $enable_synctex
diff --git a/meson.build b/meson.build
index ace6af5b..4b4965a8 100644
--- a/meson.build
+++ b/meson.build
@@ -147,37 +147,13 @@ endif
thumbnailer_mime_types = atril_mime_types
-mathjax_directory = 'not enabled'
# EPUB backend
webkit = dependency('webkit2gtk-4.1', version: '>= 2.4.3', required: get_option('epub'))
libgepub = dependency('libgepub-0.7', required: get_option('epub'))
if webkit.found() and libgepub.found()
backend_subdirs += 'epub'
atril_mime_types += 'application/epub+zip;'
-
- # MathJax configuration: auto-detect path if not specified
- mathjax_directory = get_option('mathjax-directory')
- if mathjax_directory == ''
- mathjax_directories = [
- '/usr/share/javascript/mathjax',
- '/usr/share/mathjax'
- ]
-
- fs = import('fs')
- foreach dir: mathjax_directories
- if fs.exists(join_paths(dir, 'MathJax.js'))
- mathjax_directory = dir
- break
- endif
- endforeach
-
- if mathjax_directory == ''
- warning('MathJax not found, EPUB/MathML will not work fully. Please install mathjax or set --mathjax-directory!')
- endif
- endif
-
atril_conf.set10('ENABLE_EPUB', true)
- atril_conf.set_quoted('MATHJAX_DIRECTORY', mathjax_directory)
endif
atril_conf.set_quoted('SUPPORTED_MIMETYPES', atril_mime_types)
@@ -346,7 +322,6 @@ summary = [
'desktopdir = @0@'.format(desktopdir),
'schema_dir = @0@'.format(schema_dir),
'ENABLE_DBUS = @0@'.format(get_option('enable_dbus')),
- 'MathJax directory = @0@'.format(mathjax_directory),
'',
'Backends enabled:',
]
diff --git a/meson_options.txt b/meson_options.txt
index 2ff0a8b7..74f088f6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -54,11 +54,6 @@ option('keyring',
value: true,
description: 'Keyring support for password-protected documents'
)
-option('mathjax-directory',
- type: 'string',
- value: '',
- description: 'Path to the system mathjax installation.'
-)
option('previewer',
type: 'boolean',
value: true,