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
494 "convert" => "ImageMagick",494 "convert" => "ImageMagick",
495 "Pod::Usage" => "perl-Pod-Usage",495 "Pod::Usage" => "perl-Pod-Usage",
496 "xelatex" => "texlive",496 "xelatex" => "texlive",
497 "rsvg-convert" => "librsvg2-tools",497 "rsvg-convert" => "librsvg2",
498 );498 );
499 499
500 my @tex_pkgs = (500 my @tex_pkgs = (
@@ -503,16 +503,29 @@ sub give_mageia_hints() · 2 unmodified lines
503 503
504 $map{"latexmk"} = "texlive-collection-basic";504 $map{"latexmk"} = "texlive-collection-basic";
505 505
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
506 if ($pdf) {518 if ($pdf) {
507 check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc"],519 check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
508 "google-noto-sans-cjk-ttc-fonts", 2);520 "/usr/share/fonts/TTF/NotoSans-Regular.ttf"],
521 $noto_sans, 2);
509 }522 }
510 523
511 check_rpm_missing(\@tex_pkgs, 2) if ($pdf);524 check_rpm_missing(\@tex_pkgs, 2) if ($pdf);
512 check_missing(\%map);525 check_missing(\%map);
513 526
514 return if (!$need && !$optional);527 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");
516}529}
517 530
518sub give_arch_linux_hints()531sub give_arch_linux_hints()
@@ -626,6 +639,10 @@ sub check_distros() · 107 unmodified lines
626 give_mageia_hints;639 give_mageia_hints;
627 return;640 return;
628 }641 }
642 if ($system_release =~ /OpenMandriva/) {
643 give_mageia_hints;
644 return;
645 }
629 if ($system_release =~ /Arch Linux/) {646 if ($system_release =~ /Arch Linux/) {
630 give_arch_linux_hints;647 give_arch_linux_hints;
631 return;648 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