Lines Matching +full:activate +full:- +full:to +full:- +full:activate

2 # SPDX-License-Identifier: GPL-2.0-or-later
5 # Copyright (c) 2017-2020 Mauro Carvalho Chehab <mchehab@kernel.org>
49 'amsfonts.sty' => 'texlive-amsfonts',
50 'amsmath.sty' => 'texlive-amsmath',
51 'amssymb.sty' => 'texlive-amsfonts',
52 'amsthm.sty' => 'texlive-amscls',
53 'anyfontsize.sty' => 'texlive-anyfontsize',
54 'atbegshi.sty' => 'texlive-oberdiek',
55 'bm.sty' => 'texlive-tools',
56 'capt-of.sty' => 'texlive-capt-of',
57 'cmap.sty' => 'texlive-cmap',
58 'ecrm1000.tfm' => 'texlive-ec',
59 'eqparbox.sty' => 'texlive-eqparbox',
60 'eu1enc.def' => 'texlive-euenc',
61 'fancybox.sty' => 'texlive-fancybox',
62 'fancyvrb.sty' => 'texlive-fancyvrb',
63 'float.sty' => 'texlive-float',
64 'fncychap.sty' => 'texlive-fncychap',
65 'footnote.sty' => 'texlive-mdwtools',
66 'framed.sty' => 'texlive-framed',
67 'luatex85.sty' => 'texlive-luatex85',
68 'multirow.sty' => 'texlive-multirow',
69 'needspace.sty' => 'texlive-needspace',
70 'palatino.sty' => 'texlive-psnfss',
71 'parskip.sty' => 'texlive-parskip',
72 'polyglossia.sty' => 'texlive-polyglossia',
73 'tabulary.sty' => 'texlive-tabulary',
74 'threeparttable.sty' => 'texlive-threeparttable',
75 'titlesec.sty' => 'texlive-titlesec',
76 'ucs.sty' => 'texlive-ucs',
77 'upquote.sty' => 'texlive-upquote',
78 'wrapfig.sty' => 'texlive-wrapfig',
94 # detected, we have to disable PDF output.
96 # So, we need to ignore the packages that distros would
97 # need for LaTeX to work
99 $optional--;
104 print "Warning: better to also install \"$prog\".\n";
138 return if(-e $_);
147 return "$_/$_[0]" if(-x "$_/$_[0]");
160 return "$dir/python3" if(-x "$dir/python3");
164 return "$dir/python" if(-x "$dir/python");
184 my $err = system("perl -M$prog -e 1 2>/dev/null /dev/null");
197 my $err = system("$python_cmd -c 'import $prog' 2>/dev/null /dev/null");
209 my $err = system("rpm -q '$prog' 2>/dev/null >/dev/null");
220 my $err = system("pacman -Q '$prog' 2>/dev/null >/dev/null");
243 my $fname = "sphinx-build";
246 $fname = "sphinx-build-3";
260 open IN, "$cmd --version 2>&1 |";
262 if (m/^\s*sphinx-build\s+([\d\.]+)(\+\/[\da-f]+)?$/) {
338 $res = qx(cat $_[0]) if (-r $_[0]);
349 return $name if (-x $name );
355 # Subroutines that check distro-specific hints
361 "python-sphinx" => "python3-sphinx",
362 "sphinx_rtd_theme" => "python3-sphinx-rtd-theme",
363 "ensurepip" => "python3-venv",
367 "Pod::Usage" => "perl-modules",
368 "xelatex" => "texlive-xetex",
369 "rsvg-convert" => "librsvg2-bin",
374 "fonts-dejavu", 2);
376 check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc",
377 "/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc",
378 "/usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc"],
379 "fonts-noto-cjk", 2);
386 printf("You should run:\n\n\tsudo apt-get install $install\n");
392 "python-sphinx" => "python3-sphinx",
393 "sphinx_rtd_theme" => "python3-sphinx_rtd_theme",
394 "virtualenv" => "python3-virtualenv",
397 "Pod::Usage" => "perl-Pod-Usage",
398 "xelatex" => "texlive-xetex-bin",
399 "rsvg-convert" => "librsvg2-tools",
403 "graphviz-gd", # Fedora 26: needed for PDF support
407 "texlive-collection-fontsrecommended",
408 "texlive-collection-latex",
409 "texlive-xecjk",
410 "dejavu-sans-fonts",
411 "dejavu-serif-fonts",
412 "dejavu-sans-mono-fonts",
423 $map{"virtualenv"} = "python-virtualenv";
430 printf("If you want to build PDF, please read:\n");
431 printf("\thttps://www.systutorials.com/241660/how-to-install-tex-live-on-centos-7-linux/\n");
445 check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc"],
446 "google-noto-sans-cjk-ttc-fonts", 2);
458 printf("You should run:\n\n\tsudo dnf install -y $install\n");
461 printf("You should run:\n\n\tsudo yum install -y $install\n");
468 "python-sphinx" => "python3-sphinx",
469 "sphinx_rtd_theme" => "python3-sphinx_rtd_theme",
470 "virtualenv" => "python3-virtualenv",
473 "Pod::Usage" => "perl-Pod-Usage",
474 "xelatex" => "texlive-xetex-bin",
477 # On Tumbleweed, this package is also named rsvg-convert
478 $map{"rsvg-convert"} = "rsvg-view" if (!($system_release =~ /Tumbleweed/));
481 "texlive-babel-english",
482 "texlive-caption",
483 "texlive-colortbl",
484 "texlive-courier",
485 "texlive-dvips",
486 "texlive-helvetic",
487 "texlive-makeindex",
488 "texlive-metafont",
489 "texlive-metapost",
490 "texlive-palatino",
491 "texlive-preview",
492 "texlive-times",
493 "texlive-zapfchan",
494 "texlive-zapfding",
497 $map{"latexmk"} = "texlive-latexmk-bin";
501 # I tried hard, but was unable to find a way to install
509 printf("You should run:\n\n\tsudo zypper install --no-recommends $install\n");
515 "python-sphinx" => "python3-sphinx",
516 "sphinx_rtd_theme" => "python3-sphinx_rtd_theme",
517 "virtualenv" => "python3-virtualenv",
520 "Pod::Usage" => "perl-Pod-Usage",
522 "rsvg-convert" => "librsvg2",
526 "texlive-fontsextra",
529 $map{"latexmk"} = "texlive-collection-basic";
535 $noto_sans = "noto-sans-cjk-fonts";
536 @tex_pkgs = ( "texlive-collection-fontsextra" );
539 $noto_sans = "google-noto-sans-cjk-ttc-fonts";
544 check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
545 "/usr/share/fonts/TTF/NotoSans-Regular.ttf"],
559 "sphinx_rtd_theme" => "python-sphinx_rtd_theme",
560 "virtualenv" => "python-virtualenv",
563 "xelatex" => "texlive-bin",
564 "latexmk" => "texlive-core",
565 "rsvg-convert" => "extra/librsvg",
569 "texlive-core",
570 "texlive-latexextra",
571 "ttf-dejavu",
576 check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"],
577 "noto-fonts-cjk", 2);
583 printf("You should run:\n\n\tsudo pacman -S $install\n");
589 "sphinx_rtd_theme" => "dev-python/sphinx_rtd_theme",
590 "virtualenv" => "dev-python/virtualenv",
591 "dot" => "media-gfx/graphviz",
592 "convert" => "media-gfx/imagemagick",
593 "xelatex" => "dev-texlive/texlive-xetex media-fonts/dejavu",
594 "rsvg-convert" => "gnome-base/librsvg",
598 "media-fonts/dejavu", 2) if ($pdf);
601 check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf",
602 "/usr/share/fonts/noto-cjk/NotoSerifCJK-Regular.ttc"],
603 "media-fonts/noto-cjk", 2);
612 my $imagemagick = "media-gfx/imagemagick svg png";
613 my $cairo = "media-gfx/graphviz cairo pdf";
618 printf("\tsudo su -c 'echo \"$imagemagick\" > $portage_imagemagick'\n")
621 printf("\tsudo su -c 'echo \"$cairo\" > $portage_cairo'\n");
624 printf("\tsudo emerge --ask $install\n");
630 # Distro-specific hints
681 # Fall-back to generic hint code for other distros
685 "sphinx-build" => "sphinx"
700 printf "\nIf you want to exit the virtualenv, you can use:\n";
723 my $tmp = qx($python_cmd --version 2>&1);
738 add_package("python-sphinx", 0);
745 $virtualenv_cmd = findprog("virtualenv-3");
746 $virtualenv_cmd = findprog("virtualenv-3.5") if (!$virtualenv_cmd);
761 # Extra PDF files - should use 2 for is_optional
763 check_program("rsvg-convert", 2) if ($pdf);
770 # Do distro-specific checks and output distro-install commands
781 # Check if sphinx-build is called sphinx-build-3
783 printf "\tsudo ln -sf %s /usr/bin/sphinx-build\n\n",
784 which("sphinx-build-3");
791 my $min_activate = "$ENV{'PWD'}/${virtenv_prefix}${min_version}/bin/activate";
792 my @activates = glob "$ENV{'PWD'}/${virtenv_prefix}*/bin/activate";
802 my ($activate, $ver);
807 $sphinx_cmd =~ s/activate/sphinx-build/;
808 next if (! -f $sphinx_cmd);
812 $activate = $f;
815 $activate = $f;
819 if ($activate ne "") {
821 printf "\nNeed to activate Sphinx (version $ver) on virtualenv with:\n";
822 printf "\t. $activate\n";
827 printf "\tdeactivate && . $activate\n";
830 my $rec_activate = "$virtenv_dir/bin/activate";
832 print "To upgrade Sphinx, use:\n\n" if ($rec_sphinx_upgrade);
837 printf "\t$python_cmd -m venv $virtenv_dir\n";
842 printf "\tpip install -r $requirement_file\n";
868 if ($arg eq "--no-virtualenv") {
870 } elsif ($arg eq "--no-pdf"){
872 } elsif ($arg eq "--version-check"){
875 print "Usage:\n\t$0 <--no-virtualenv> <--no-pdf> <--version-check>\n\n";
877 print "\t--no-virtualenv\t- Recommend installing Sphinx instead of using a virtualenv\n";
878 print "\t--version-check\t- if version is compatible, don't check for missing dependencies\n";
879 print "\t--no-pdf\t- don't check for dependencies required to build PDF docs\n\n";
880 exit -1;
890 # fail back to reading the known different places where the distro name
894 $system_release = qx(lsb_release -d) if which("lsb_release");
896 $system_release = catcheck("/etc/system-release") if !$system_release;
897 $system_release = catcheck("/etc/redhat-release") if !$system_release;
898 $system_release = catcheck("/etc/lsb-release") if !$system_release;
899 $system_release = catcheck("/etc/gentoo-release") if !$system_release;
904 if (open IN, "cat /etc/os-release|") {