scripts: sphinx-pre-install: address some issues with Gentoo
[linux-block.git] / scripts / sphinx-pre-install
index ba750f7b912794988ffd14d3f4943e0dd068d45a..86e14b9fd53724b563e79a97cb7c5734fce1370d 100755 (executable)
@@ -560,7 +560,8 @@ sub give_gentoo_hints()
                           "media-fonts/dejavu", 2) if ($pdf);
 
        if ($pdf) {
-               check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf"],
+               check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf",
+                                   "/usr/share/fonts/noto-cjk/NotoSerifCJK-Regular.ttc"],
                                   "media-fonts/noto-cjk", 2);
        }
 
@@ -575,10 +576,10 @@ sub give_gentoo_hints()
        my $portage_imagemagick = "/etc/portage/package.use/imagemagick";
        my $portage_cairo = "/etc/portage/package.use/graphviz";
 
-       if (qx(cat $portage_imagemagick) ne "$imagemagick\n") {
+       if (qx(grep imagemagick $portage_imagemagick 2>/dev/null) eq "") {
                printf("\tsudo su -c 'echo \"$imagemagick\" > $portage_imagemagick'\n")
        }
-       if (qx(cat $portage_cairo) ne  "$cairo\n") {
+       if (qx(grep graphviz $portage_cairo 2>/dev/null) eq  "") {
                printf("\tsudo su -c 'echo \"$cairo\" > $portage_cairo'\n");
        }