Lines Matching +full:apt +full:- +full:get

2 # SPDX-License-Identifier: GPL-2.0-or-later
5 # Copyright (c) 2017-2020 Mauro Carvalho Chehab <mchehab@kernel.org>
51 'amsfonts.sty' => 'texlive-amsfonts',
52 'amsmath.sty' => 'texlive-amsmath',
53 'amssymb.sty' => 'texlive-amsfonts',
54 'amsthm.sty' => 'texlive-amscls',
55 'anyfontsize.sty' => 'texlive-anyfontsize',
56 'atbegshi.sty' => 'texlive-oberdiek',
57 'bm.sty' => 'texlive-tools',
58 'capt-of.sty' => 'texlive-capt-of',
59 'cmap.sty' => 'texlive-cmap',
60 'ecrm1000.tfm' => 'texlive-ec',
61 'eqparbox.sty' => 'texlive-eqparbox',
62 'eu1enc.def' => 'texlive-euenc',
63 'fancybox.sty' => 'texlive-fancybox',
64 'fancyvrb.sty' => 'texlive-fancyvrb',
65 'float.sty' => 'texlive-float',
66 'fncychap.sty' => 'texlive-fncychap',
67 'footnote.sty' => 'texlive-mdwtools',
68 'framed.sty' => 'texlive-framed',
69 'luatex85.sty' => 'texlive-luatex85',
70 'multirow.sty' => 'texlive-multirow',
71 'needspace.sty' => 'texlive-needspace',
72 'palatino.sty' => 'texlive-psnfss',
73 'parskip.sty' => 'texlive-parskip',
74 'polyglossia.sty' => 'texlive-polyglossia',
75 'tabulary.sty' => 'texlive-tabulary',
76 'threeparttable.sty' => 'texlive-threeparttable',
77 'titlesec.sty' => 'texlive-titlesec',
78 'ucs.sty' => 'texlive-ucs',
79 'upquote.sty' => 'texlive-upquote',
80 'wrapfig.sty' => 'texlive-wrapfig',
81 'ctexhook.sty' => 'texlive-ctex',
102 $optional--;
143 return if(-e $_);
152 return "$_/$_[0]" if(-x "$_/$_[0]");
165 return "$dir/python3" if(-x "$dir/python3");
169 return "$dir/python" if(-x "$dir/python");
189 my $err = system("perl -M$prog -e 1 2>/dev/null /dev/null");
202 my $err = system("$python_cmd -c 'import $prog' 2>/dev/null /dev/null");
214 my $err = system("rpm -q '$prog' 2>/dev/null >/dev/null");
225 my $err = system("pacman -Q '$prog' 2>/dev/null >/dev/null");
248 my $fname = "sphinx-build";
251 $fname = "sphinx-build-3";
265 open IN, "$cmd --version 2>&1 |";
267 if (m/^\s*sphinx-build\s+([\d\.]+)((\+\/[\da-f]+)|(b\d+))?$/) {
294 die "Can't get needs_sphinx version from $conf" if (!$min_version);
305 die "Can't get default sphinx version from $requirement_file" if (!$default_version);
340 $res = qx(cat $_[0]) if (-r $_[0]);
351 return $name if (-x $name );
357 # Subroutines that check distro-specific hints
363 "python-sphinx" => "python3-sphinx",
364 "ensurepip" => "python3-venv",
368 "Pod::Usage" => "perl-modules",
369 "xelatex" => "texlive-xetex",
370 "rsvg-convert" => "librsvg2-bin",
374 check_missing_file(["/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexhook.sty"],
375 "texlive-lang-chinese", 2);
378 "fonts-dejavu", 2);
380 check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc",
381 "/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc",
382 "/usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc"],
383 "fonts-noto-cjk", 2);
391 printf("\n\tsudo apt-get install $install\n");
397 "python-sphinx" => "python3-sphinx",
398 "virtualenv" => "python3-virtualenv",
401 "Pod::Usage" => "perl-Pod-Usage",
402 "xelatex" => "texlive-xetex-bin",
403 "rsvg-convert" => "librsvg2-tools",
407 "graphviz-gd", # Fedora 26: needed for PDF support
411 "texlive-collection-fontsrecommended",
412 "texlive-collection-latex",
413 "texlive-xecjk",
414 "dejavu-sans-fonts",
415 "dejavu-serif-fonts",
416 "dejavu-sans-mono-fonts",
427 $map{"virtualenv"} = "python-virtualenv";
435 printf("\thttps://www.systutorials.com/241660/how-to-install-tex-live-on-centos-7-linux/\n");
449 check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc"],
450 "google-noto-sans-cjk-ttc-fonts", 2);
463 printf("\n\tsudo dnf install -y $install\n");
467 printf("\n\tsudo yum install -y $install\n");
474 "python-sphinx" => "python3-sphinx",
475 "virtualenv" => "python3-virtualenv",
478 "Pod::Usage" => "perl-Pod-Usage",
479 "xelatex" => "texlive-xetex-bin",
482 # On Tumbleweed, this package is also named rsvg-convert
483 $map{"rsvg-convert"} = "rsvg-view" if (!($system_release =~ /Tumbleweed/));
486 "texlive-babel-english",
487 "texlive-caption",
488 "texlive-colortbl",
489 "texlive-courier",
490 "texlive-dvips",
491 "texlive-helvetic",
492 "texlive-makeindex",
493 "texlive-metafont",
494 "texlive-metapost",
495 "texlive-palatino",
496 "texlive-preview",
497 "texlive-times",
498 "texlive-zapfchan",
499 "texlive-zapfding",
502 $map{"latexmk"} = "texlive-latexmk-bin";
515 printf("\n\tsudo zypper install --no-recommends $install\n");
521 "python-sphinx" => "python3-sphinx",
522 "virtualenv" => "python3-virtualenv",
525 "Pod::Usage" => "perl-Pod-Usage",
527 "rsvg-convert" => "librsvg2",
531 "texlive-fontsextra",
534 $map{"latexmk"} = "texlive-collection-basic";
540 $noto_sans = "noto-sans-cjk-fonts";
541 @tex_pkgs = ( "texlive-collection-fontsextra" );
544 $noto_sans = "google-noto-sans-cjk-ttc-fonts";
549 check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
550 "/usr/share/fonts/TTF/NotoSans-Regular.ttf"],
565 "virtualenv" => "python-virtualenv",
568 "xelatex" => "texlive-bin",
569 "latexmk" => "texlive-core",
570 "rsvg-convert" => "extra/librsvg",
574 "texlive-core",
575 "texlive-latexextra",
576 "ttf-dejavu",
581 check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"],
582 "noto-fonts-cjk", 2);
589 printf("\n\tsudo pacman -S $install\n");
595 "virtualenv" => "dev-python/virtualenv",
596 "dot" => "media-gfx/graphviz",
597 "convert" => "media-gfx/imagemagick",
598 "xelatex" => "dev-texlive/texlive-xetex media-fonts/dejavu",
599 "rsvg-convert" => "gnome-base/librsvg",
603 "media-fonts/dejavu", 2) if ($pdf);
606 check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf",
607 "/usr/share/fonts/noto-cjk/NotoSerifCJK-Regular.ttc"],
608 "media-fonts/noto-cjk", 2);
618 my $imagemagick = "media-gfx/imagemagick svg png";
619 my $cairo = "media-gfx/graphviz cairo pdf";
624 printf("\tsudo su -c 'echo \"$imagemagick\" > $portage_imagemagick'\n")
627 printf("\tsudo su -c 'echo \"$cairo\" > $portage_cairo'\n");
630 printf("\tsudo emerge --ask $install\n");
636 # Distro-specific hints
687 # Fall-back to generic hint code for other distros
691 "sphinx-build" => "sphinx"
722 $sphinx_cmd =~ s/activate/sphinx-build/;
723 next if (! -f $sphinx_cmd);
729 …rtual environment $f is not working.\nPython version upgrade? Remove it with:\n\n\trm -rf $f\n\n");
745 # Avoid running sphinx-builds from venv if $cur_version is good
751 # Get the highest version from sphinx_*/bin/sphinx-build and the
783 # - minimal supported version;
784 # - minimal PDF version;
785 # - recommended version.
797 # sphinx-build is present and its version is >= $min_version
870 printf "\tpip install -r $requirement_file\n";
883 add_package("python-sphinx", 0);
890 printf "\n Please note that Sphinx >= 3.0 will currently produce false-positive\n";
893 printf "\thttps://github.com/sphinx-doc/sphinx/pull/8313\n";
915 my $tmp = qx($python_cmd --version 2>&1);
929 add_package("python-sphinx", 0);
940 $virtualenv_cmd = findprog("virtualenv-3");
941 $virtualenv_cmd = findprog("virtualenv-3.5") if (!$virtualenv_cmd);
947 $virtualenv_cmd = "$python_cmd -m venv";
959 # Extra PDF files - should use 2 for is_optional
961 check_program("rsvg-convert", 2) if ($pdf);
964 # Do distro-specific checks and output distro-install commands
975 # Check if sphinx-build is called sphinx-build-3
977 printf "\tsudo ln -sf %s /usr/bin/sphinx-build\n\n",
978 which("sphinx-build-3");
1002 if ($arg eq "--no-virtualenv") {
1004 } elsif ($arg eq "--no-pdf"){
1006 } elsif ($arg eq "--version-check"){
1009 print "Usage:\n\t$0 <--no-virtualenv> <--no-pdf> <--version-check>\n\n";
1011 print "\t--no-virtualenv\t- Recommend installing Sphinx instead of using a virtualenv\n";
1012 print "\t--version-check\t- if version is compatible, don't check for missing dependencies\n";
1013 print "\t--no-pdf\t- don't check for dependencies required to build PDF docs\n\n";
1014 exit -1;
1028 $system_release = qx(lsb_release -d) if which("lsb_release");
1030 $system_release = catcheck("/etc/system-release") if !$system_release;
1031 $system_release = catcheck("/etc/redhat-release") if !$system_release;
1032 $system_release = catcheck("/etc/lsb-release") if !$system_release;
1033 $system_release = catcheck("/etc/gentoo-release") if !$system_release;
1038 if (open IN, "cat /etc/os-release|") {