History

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.

Mauro Carvalho Chehab committed 6 years ago

Commit d6ebf181 parent e45a6311 file · +21 −4Browse files

Unified · Split

scripts/sphinx-pre-install+21−4
@@ -494,7 +494,7 @@ sub give_mageia_hints() · 493 unmodified lines
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() · 2 unmodified lines
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() · 107 unmodified lines
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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t