Skip to content

Commit d6ebf18

Browse files
mchehabJonathan Corbet
authored andcommitted
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@kernel.org> Link: https://lore.kernel.org/r/692809729c6818a0b0f75513da15970c53d5565c.1586883286.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent e45a631 commit d6ebf18

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

‎scripts/sphinx-pre-install‎

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ sub give_mageia_hints()
494494
"convert" => "ImageMagick",
495495
"Pod::Usage" => "perl-Pod-Usage",
496496
"xelatex" => "texlive",
497-
"rsvg-convert" => "librsvg2-tools",
497+
"rsvg-convert" => "librsvg2",
498498
);
499499

500500
my @tex_pkgs = (
@@ -503,16 +503,29 @@ sub give_mageia_hints()
503503

504504
$map{"latexmk"} = "texlive-collection-basic";
505505

506+
my $packager_cmd;
507+
my $noto_sans;
508+
if ($system_release =~ /OpenMandriva/) {
509+
$packager_cmd = "dnf install";
510+
$noto_sans = "noto-sans-cjk-fonts";
511+
@tex_pkgs = ( "texlive-collection-fontsextra" );
512+
} else {
513+
$packager_cmd = "urpmi";
514+
$noto_sans = "google-noto-sans-cjk-ttc-fonts";
515+
}
516+
517+
506518
if ($pdf) {
507-
check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc"],
508-
"google-noto-sans-cjk-ttc-fonts", 2);
519+
check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
520+
"/usr/share/fonts/TTF/NotoSans-Regular.ttf"],
521+
$noto_sans, 2);
509522
}
510523

511524
check_rpm_missing(\@tex_pkgs, 2) if ($pdf);
512525
check_missing(\%map);
513526

514527
return if (!$need && !$optional);
515-
printf("You should run:\n\n\tsudo urpmi $install\n");
528+
printf("You should run:\n\n\tsudo $packager_cmd $install\n");
516529
}
517530

518531
sub give_arch_linux_hints()
@@ -626,6 +639,10 @@ sub check_distros()
626639
give_mageia_hints;
627640
return;
628641
}
642+
if ($system_release =~ /OpenMandriva/) {
643+
give_mageia_hints;
644+
return;
645+
}
629646
if ($system_release =~ /Arch Linux/) {
630647
give_arch_linux_hints;
631648
return;

0 commit comments

Comments
 (0)