The current implementation take a simple file as first argument, this change allows to take a list as a first argument. Some file could have a different path according distribution version
Unified · Split
| @@ -124,11 +124,13 @@ sub add_package($$) · 123 unmodified lines | ||
| 124 | 124 | |
| 125 | 125 | sub check_missing_file($$$) |
| 126 | 126 | { |
| 127 | − my $file = shift; | |
| 127 | + my $files = shift; | |
| 128 | 128 | my $package = shift; |
| 129 | 129 | my $is_optional = shift; |
| 130 | 130 | |
| 131 | − return if(-e $file); | |
| 131 | + for (@$files) { | |
| 132 | + return if(-e $_); | |
| 133 | + } | |
| 132 | 134 | |
| 133 | 135 | add_package($package, $is_optional); |
| 134 | 136 | } |
| @@ -343,10 +345,10 @@ sub give_debian_hints() · 208 unmodified lines | ||
| 343 | 345 | ); |
| 344 | 346 | |
| 345 | 347 | if ($pdf) { |
| 346 | − check_missing_file("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", | |
| 348 | + check_missing_file(["/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"], | |
| 347 | 349 | "fonts-dejavu", 2); |
| 348 | 350 | |
| 349 | − check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc", | |
| 351 | + check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"], | |
| 350 | 352 | "fonts-noto-cjk", 2); |
| 351 | 353 | } |
| 352 | 354 | |
| @@ -413,7 +415,7 @@ sub give_redhat_hints() · 60 unmodified lines | ||
| 413 | 415 | } |
| 414 | 416 | |
| 415 | 417 | if ($pdf) { |
| 416 | − check_missing_file("/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc", | |
| 418 | + check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc"], | |
| 417 | 419 | "google-noto-sans-cjk-ttc-fonts", 2); |
| 418 | 420 | } |
| 419 | 421 | |
| @@ -498,7 +500,7 @@ sub give_mageia_hints() · 78 unmodified lines | ||
| 498 | 500 | $map{"latexmk"} = "texlive-collection-basic"; |
| 499 | 501 | |
| 500 | 502 | if ($pdf) { |
| 501 | − check_missing_file("/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc", | |
| 503 | + check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc"], | |
| 502 | 504 | "google-noto-sans-cjk-ttc-fonts", 2); |
| 503 | 505 | } |
| 504 | 506 | |
| @@ -528,7 +530,7 @@ sub give_arch_linux_hints() · 23 unmodified lines | ||
| 528 | 530 | check_pacman_missing(\@archlinux_tex_pkgs, 2) if ($pdf); |
| 529 | 531 | |
| 530 | 532 | if ($pdf) { |
| 531 | − check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc", | |
| 533 | + check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"], | |
| 532 | 534 | "noto-fonts-cjk", 2); |
| 533 | 535 | } |
| 534 | 536 | |
| @@ -549,11 +551,11 @@ sub give_gentoo_hints() · 14 unmodified lines | ||
| 549 | 551 | "rsvg-convert" => "gnome-base/librsvg", |
| 550 | 552 | ); |
| 551 | 553 | |
| 552 | − check_missing_file("/usr/share/fonts/dejavu/DejaVuSans.ttf", | |
| 554 | + check_missing_file(["/usr/share/fonts/dejavu/DejaVuSans.ttf"], | |
| 553 | 555 | "media-fonts/dejavu", 2) if ($pdf); |
| 554 | 556 | |
| 555 | 557 | if ($pdf) { |
| 556 | − check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf", | |
| 558 | + check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf"], | |
| 557 | 559 | "media-fonts/noto-cjk", 2); |
| 558 | 560 | } |
| 559 | 561 | |