[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d48a6ae0a6382841fe8c6924eac32ae88d0c0bda.1586361086.git.mchehab+huawei@kernel.org>
Date: Wed, 8 Apr 2020 17:55:24 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Linux Doc Mailing List <linux-doc@...r.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
linux-kernel@...r.kernel.org, Jonathan Corbet <corbet@....net>,
Tim Bird <Tim.Bird@...y.com>,
Markus Heiser <markus.heiser@...marit.de>
Subject: [PATCH 5/6] scripts: sphinx-pre-install: add support for OpenMandriva
It seems that Mageia and OpenMandriva will reunite on a single
distribution. In any case, both came from Mandriva. So, it is
close enough to use the same logic.
So, add support for it.
Tested with OpenMandriva 4.1 and with Mageia 7.1.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
scripts/sphinx-pre-install | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 3ae732a028db..dab8e3daeed7 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -494,7 +494,7 @@ sub give_mageia_hints()
"convert" => "ImageMagick",
"Pod::Usage" => "perl-Pod-Usage",
"xelatex" => "texlive",
- "rsvg-convert" => "librsvg2-tools",
+ "rsvg-convert" => "librsvg2",
);
my @tex_pkgs = (
@@ -503,16 +503,29 @@ sub give_mageia_hints()
$map{"latexmk"} = "texlive-collection-basic";
+ my $packager_cmd;
+ my $noto_sans;
+ if ($system_release =~ /OpenMandriva/) {
+ $packager_cmd = "dnf install";
+ $noto_sans = "noto-sans-cjk-fonts";
+ @tex_pkgs = ( "texlive-collection-fontsextra" );
+ } else {
+ $packager_cmd = "urpmi";
+ $noto_sans = "google-noto-sans-cjk-ttc-fonts";
+ }
+
+
if ($pdf) {
- check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc"],
- "google-noto-sans-cjk-ttc-fonts", 2);
+ check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
+ "/usr/share/fonts/TTF/NotoSans-Regular.ttf"],
+ $noto_sans, 2);
}
check_rpm_missing(\@tex_pkgs, 2) if ($pdf);
check_missing(\%map);
return if (!$need && !$optional);
- printf("You should run:\n\n\tsudo urpmi $install\n");
+ printf("You should run:\n\n\tsudo $packager_cmd $install\n");
}
sub give_arch_linux_hints()
@@ -626,6 +639,10 @@ sub check_distros()
give_mageia_hints;
return;
}
+ if ($system_release =~ /OpenMandriva/) {
+ give_mageia_hints;
+ return;
+ }
if ($system_release =~ /Arch Linux/) {
give_arch_linux_hints;
return;
--
2.25.2
Powered by blists - more mailing lists