From 1f2f2d0de108cc17616869f44f8549eeb8b26ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 28 Aug 2024 12:55:13 +0200 Subject: [PATCH] build: Stop pre-generating man pages The original asciidoc project is still stuck on python2, so on distros that didn't switch to a fork (like Fedora), it pulls in over 100M of legacy dependencies. However we are about to move our man pages to reStructuredText which doesn't have that issue, and which is already used for GLib's and GTK's man pages. Part-of: --- meson.build | 9 ++------- meson/generate-manpages.py | 23 ----------------------- subprojects/extensions-tool/meson.build | 8 ++------ 3 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 meson/generate-manpages.py diff --git a/meson.build b/meson.build index d80f33440..e5c40fdf4 100644 --- a/meson.build +++ b/meson.build @@ -132,12 +132,8 @@ else endif if get_option('man') - if fs.exists('man/gnome-shell.1') - install_man('man/gnome-shell.1') - else - a2x = find_program('a2x') - subdir('man') - endif + a2x = find_program('a2x') + subdir('man') endif mutter_typelibdir = mutter_dep.get_variable('typelibdir') @@ -326,7 +322,6 @@ gnome.post_install( gtk_update_icon_cache: true ) -meson.add_dist_script('meson/generate-manpages.py') meson.add_dist_script('meson/generate-stylesheets.py') meson.add_dist_script('meson/check-version.py', meson.project_version(), 'NEWS') diff --git a/meson/generate-manpages.py b/meson/generate-manpages.py deleted file mode 100644 index e12df61b4..000000000 --- a/meson/generate-manpages.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python3 - -import os -from pathlib import PurePath -import subprocess - -man_pages = [ - 'man/gnome-shell.1', - 'subprojects/extensions-tool/man/gnome-extensions.1', -] - -sourceroot = os.environ.get('MESON_SOURCE_ROOT') -distroot = os.environ.get('MESON_DIST_ROOT') - -for man_page in man_pages: - page_path = PurePath(man_page) - src = PurePath(sourceroot, page_path.with_suffix('.txt')) - dst = PurePath(distroot, page_path) - stylesheet = src.with_name('stylesheet.xsl') - - subprocess.call(['a2x', '--xsl-file', os.fspath(stylesheet), - '--format', 'manpage', '--destination-dir', os.fspath(dst.parent), - os.fspath(src)]) diff --git a/subprojects/extensions-tool/meson.build b/subprojects/extensions-tool/meson.build index 572e3edd0..7ae2cf14b 100644 --- a/subprojects/extensions-tool/meson.build +++ b/subprojects/extensions-tool/meson.build @@ -47,12 +47,8 @@ if bash_completion.found() endif if get_option('man') - if fs.exists('man/gnome-extensions.1') - install_man('man/gnome-extensions.1') - else - a2x = find_program('a2x') - subdir('man') - endif + a2x = find_program('a2x') + subdir('man') endif if not meson.is_subproject()