declare -x ABI="amd64"
declare -x ABI_MIPS=""
declare -x ABI_S390=""
declare -x ABI_X86="64"
declare -x ADA_TARGET=""
declare -x ALSA_CARDS=""
declare -x AMDGPU_TARGETS=""
declare -x APACHE2_MODULES=""
declare -x APACHE2_MPMS=""
declare -x ARCH="amd64"
declare -x AUDIODEV="default"
declare BDEPEND=">=app-text/texlive-core-2021
	app-arch/xz-utils"
declare -x BINPKG_FORMAT="xpak"
declare -x BINPKG_GPG_SIGNING_BASE_COMMAND="/usr/bin/flock /run/lock/portage-binpkg-gpg.lock /usr/bin/gpg --sign --armor [PORTAGE_CONFIG]"
declare -x BINPKG_GPG_SIGNING_DIGEST="SHA512"
declare -x BINPKG_GPG_VERIFY_BASE_COMMAND="/usr/bin/gpg --verify --batch --no-tty --no-auto-check-trustdb --status-fd 2 [PORTAGE_CONFIG] [SIGNATURE]"
declare -x BINPKG_GPG_VERIFY_GPG_HOME="/etc/portage/gnupg"
declare -x BOOTSTRAP_USE="unicode internal-glib pkg-config split-usr xml python_targets_python3_11 multilib"
declare -x CALCULATE=""
declare -x CALLIGRA_FEATURES=""
declare -x CAMERAS=""
declare -x CBUILD="x86_64-pc-linux-gnu"
declare -x CFLAGS="-O2 -march=znver2 --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=512 -pipe"
declare -x CFLAGS_amd64="-m64"
declare -x CFLAGS_x32="-mx32"
declare -x CFLAGS_x86="-m32 -mfpmath=sse"
declare -x CHOST="x86_64-pc-linux-gnu"
declare -x CHOST_amd64="x86_64-pc-linux-gnu"
declare -x CHOST_x32="x86_64-pc-linux-gnux32"
declare -x CHOST_x86="i686-pc-linux-gnu"
declare -- CL_CONFIG="/usr/bin/cl-config"
declare -- CL_CORE_PATCH="/usr/bin/cl-core-patch"
declare -- CL_UPDATE_PROG="/usr/sbin/cl-core"
declare -x COLLECTD_PLUGINS=""
declare -- COMMON_DEPEND=">=app-text/texlive-core-2021"
declare -- CORE_METHOD="--method core_setup"
declare -x CPU_FLAGS_ARM=""
declare -x CPU_FLAGS_PPC=""
declare -x CPU_FLAGS_X86=""
declare -x CURL_SSL=""
declare -x CXXFLAGS=""
declare -x DEFAULT_ABI="amd64"
declare -x DEFINED_PHASES=" compile install postinst postrm unpack"
declare DEPEND="!<app-text/dvipsk-5.996_p20160523
>=app-text/texlive-core-2020[luajittex?]
 "
declare DESCRIPTION="TeXLive Essential programs and files"
declare -x DIROPTIONS="-m0755"
declare -x EAPI="7"
declare -x ELIBC="glibc"
declare -x EMERGE_JOBS="--jobs=1"
declare -x ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
declare -- EPOCHREALTIME="1683810469.417145"
declare -- EPOCHSECONDS="1683810469"
declare -x EXEOPTIONS="-m0755"
declare -x FCFLAGS="-O2 -pipe"
declare -x FETCHCOMMAND_SSH="bash -c \"x=\\\${2#ssh://} ; host=\\\${x%%/*} ; port=\\\${host##*:} ; host=\\\${host%:*} ; [[ \\\${host} = \\\${port} ]] && port= ; exec rsync --rsh=\\\"ssh \\\${port:+-p\\\${port}} \\\${3}\\\" -avP \\\"\\\${host}:/\\\${x#*/}\\\" \\\"\\\$1\\\"\" rsync \"\${DISTDIR}/\${FILE}\" \"\${URI}\" \"\${PORTAGE_SSH_OPTS}\""
declare -x FFLAGS="-O2 -pipe"
declare -x FFTOOLS=""
declare -x GCC_SPECS=""
declare -x GPG_VERIFY_GROUP_DROP="nogroup"
declare -x GPG_VERIFY_USER_DROP="nobody"
declare -x GPSD_PROTOCOLS=""
declare -x GRUB_PLATFORMS=""
declare -x GSETTINGS_BACKEND="dconf"
declare HOMEPAGE="http://www.tug.org/texlive/"
declare IDEPEND=""
declare -x INHERITED=" eapi8-dosym texlive-common texlive-module"
declare -x INPUT_DEVICES=""
declare -x INSOPTIONS="-m0644"
declare IUSE="source doc +luajittex"
declare -x IUSE_EFFECTIVE="abi_x86_64 alpha amd64 amd64-linux arm arm64 arm64-macos doc elibc_Cygwin elibc_Darwin elibc_SunOS elibc_Winnt elibc_bionic elibc_glibc elibc_mingw elibc_musl hppa ia64 kernel_Darwin kernel_SunOS kernel_Winnt kernel_linux loong luajittex m68k mips ppc ppc-macos ppc64 ppc64-linux prefix prefix-guest prefix-stack riscv s390 source sparc sparc-solaris sparc64-solaris userland_BSD userland_GNU x64-cygwin x64-macos x64-solaris x64-winnt x86 x86-linux x86-solaris x86-winnt"
declare -x IUSE_IMPLICIT="abi_x86_64 prefix prefix-guest prefix-stack"
declare -x KERNEL="linux"
declare -x KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
declare -x L10N=""
declare -x LANG="ru ru_RU en EN_US"
declare -x LANGUAGE=""
declare -x LCD_DEVICES=""
declare -x LC_COLLATE="C"
declare -x LC_CTYPE="C.UTF-8"
declare -x LC_MESSAGES="C"
declare -x LC_NUMERIC="POSIX"
declare -x LDFLAGS="-Wl,--as-needed"
declare -x LDFLAGS_amd64="-m elf_x86_64"
declare -x LDFLAGS_x32="-m elf32_x86_64"
declare -x LDFLAGS_x86="-m elf_i386"
declare -x LEX="flex"
declare -x LIBDIR_amd64="lib64"
declare -x LIBDIR_x32="libx32"
declare -x LIBDIR_x86="lib"
declare -x LIBOPTIONS="-m0644"
declare -x LIBREOFFICE_EXTENSIONS=""
declare -x LICENSE=" GPL-1 GPL-2 LPPL-1.3 LPPL-1.3c MIT OFL public-domain TeX TeX-other-free "
declare -x LIRC_DEVICES="devinput"
declare -x LLVM_TARGETS=""
declare -x LUA_SINGLE_TARGET=""
declare -x LUA_TARGETS=""
declare -x MAIL="/var/mail/root"
declare -x MAKEOPTS="-j7"
declare -x MANPAGER="manpager"
declare -x MONKEYD_PLUGINS=""
declare -x MOZ_GMP_PATH="/usr/lib64/nsbrowser/plugins/gmp-gmpopenh264/system-installed"
declare -x MULTILIB_ABIS="amd64 x86"
declare -x MULTILIB_STRICT_DENY="64-bit.*shared object"
declare -x MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
declare -x MULTILIB_STRICT_EXEMPT="(perl5|gcc|binutils|eclipse-3|debug|portage|udev|systemd|clang|python-exec|llvm)"
declare -x NGINX_MODULES_HTTP=""
declare -x NGINX_MODULES_MAIL=""
declare -x NGINX_MODULES_STREAM=""
declare -x NPM_CONFIG_GLOBALCONFIG="/etc/npm/npmrc"
declare -x NPTL_KERN_VER="5.10.0"
declare -x OFFICE_IMPLEMENTATION=""
declare -x OPENCL_PROFILE="ocl-icd"
declare -x OPENGL_PROFILE="xorg-x11"
declare -x OPENMPI_FABRICS=""
declare -x OPENMPI_OFED_FEATURES=""
declare -x OPENMPI_RM=""
declare -x PATH="/usr/lib/ccache/bin:/usr/lib/portage/python3.10/ebuild-helpers/xattr:/usr/lib/portage/python3.10/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/15/bin"
declare PDEPEND=""
declare -x PHP_TARGETS=""
declare -- PKGEXT="tar.xz"
declare -x PORTAGE_COMPRESSION_COMMAND="zstd -T7 -19 -T6"
declare -a PORTAGE_DOCOMPRESS=([0]="/usr/share/doc" [1]="/usr/share/info" [2]="/usr/share/man")
declare -x PORTAGE_DOCOMPRESS_SIZE_LIMIT="128"
declare -a PORTAGE_DOCOMPRESS_SKIP=([0]="/usr/share/doc/texlive-basic-2021/html")
declare -a PORTAGE_DOSTRIP=([0]="/")
declare -a PORTAGE_DOSTRIP_SKIP=()
declare -x PORTAGE_NICENESS="19"
declare -x POSTGRES_TARGETS=""
declare -x PRELINK_PATH_MASK="/usr/lib64/gimp/2.0/plug-ins/hot"
declare -- PROFILE_BASHRC_D="1"
declare -a PROFILE_BASHRC_DIRS=([0]="/etc/calculate/profile.bashrc.d" [1]="/var/lib/calculate/profile.bashrc.d")
declare -- PROFILE_BASHRC_DN="/var/lib/calculate/profile.bashrc.d"
declare -- PROFILE_BASHRC_FILE="60-fix-libdb_6"
declare -x PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"
declare -- PROPERTIES=""
declare -x PYTHONDONTWRITEBYTECODE="1"
declare -x PYTHON_SINGLE_TARGET=""
declare -x PYTHON_TARGETS=""
declare -x QEMU_SOFTMMU_TARGETS=""
declare -x QEMU_USER_TARGETS=""
declare -x QT_GRAPHICSSYSTEM="raster"
declare RDEPEND="!<app-text/dvipsk-5.996_p20160523
>=app-text/texlive-core-2020[luajittex?]
  >=app-text/texlive-core-2021"
declare -- RELOC_TARGET="texmf-dist"
declare REPOSITORY
declare REQUIRED_USE=""
declare RESTRICT=""
declare -x RESUMECOMMAND_SSH="bash -c \"x=\\\${2#ssh://} ; host=\\\${x%%/*} ; port=\\\${host##*:} ; host=\\\${host%:*} ; [[ \\\${host} = \\\${port} ]] && port= ; exec rsync --rsh=\\\"ssh \\\${port:+-p\\\${port}} \\\${3}\\\" -avP \\\"\\\${host}:/\\\${x#*/}\\\" \\\"\\\$1\\\"\" rsync \"\${DISTDIR}/\${FILE}\" \"\${URI}\" \"\${PORTAGE_SSH_OPTS}\""
declare -x ROS_MESSAGES=""
declare -x RUBY_TARGETS=""
declare -- RUN_CORE="/usr/bin/python3 /usr/sbin/cl-core"
declare -x S="/var/calculate/tmp/portage/dev-texlive/texlive-basic-2021/work"
declare -x SANDBOX_DEBUG="0"
declare -x SANDBOX_DENY=""
declare -x SANDBOX_METHOD="any"
declare -x SANDBOX_PREDICT="/var/calculate/tmp/portage/dev-texlive/texlive-basic-2021/homedir:/dev/crypto:/var/cache/man:/var/cache/fontconfig"
declare -x SANDBOX_READ="/:/var/calculate/ccache:/var/calculate/tmp/portage"
declare -x SANDBOX_VERBOSE="1"
declare -x SANDBOX_WRITE=":/dev/console:/dev/fd:/dev/full:/dev/null:/dev/ptmx:/dev/pts/:/dev/pty:/dev/shm:/dev/tts:/dev/tty:/dev/vc/:/dev/zero:/proc/self/fd:/tmp/:/usr/lib/cf:/usr/lib/conftest:/usr/lib32/cf:/usr/lib32/conftest:/usr/lib64/cf:/usr/lib64/conftest:/usr/tmp/:/usr/tmp/cf:/usr/tmp/conftest:/var/calculate/ccache:/var/calculate/tmp/portage:/var/calculate/tmp/portage/dev-texlive/texlive-basic-2021/homedir/.bash_history:/var/tmp/"
declare -x SANE_BACKENDS=""
declare -x SHELL="/bin/bash"
declare -x SLOT="0"
declare -i SRANDOM="3442053856"
declare SRC_URI=" https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-amsfonts-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-amsfonts-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-amsfonts-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-bibtex-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-bibtex-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-bibtex-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-cm-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-cm-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-cm-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-colorprofiles-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-colorprofiles-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-colorprofiles-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-ec-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-ec-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-ec-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-enctex-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-enctex-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-enctex-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-etex-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-etex-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-etex-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-etex-pkg-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-etex-pkg-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-etex-pkg-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-graphics-def-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-graphics-def-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-graphics-def-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-hyph-utf8-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-hyph-utf8-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-hyph-utf8-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-hyphenex-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-hyphenex-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-hyphenex-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-ifplatform-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-ifplatform-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-ifplatform-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-iftex-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-iftex-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-iftex-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-knuth-lib-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-knuth-lib-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-knuth-lib-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-knuth-local-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-knuth-local-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-knuth-local-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-lua-alt-getopt-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-lua-alt-getopt-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-lua-alt-getopt-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-luahbtex-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-luahbtex-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-luahbtex-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-luatex-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-luatex-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-luatex-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-makeindex-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-makeindex-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-makeindex-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-metafont-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-metafont-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-metafont-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-mflogo-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-mflogo-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-mflogo-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-mfware-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-mfware-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-mfware-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-modes-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-modes-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-modes-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-pdftex-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-pdftex-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-pdftex-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-plain-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-plain-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-plain-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-tex-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-tex-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-tex-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-tex-ini-files-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-tex-ini-files-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-tex-ini-files-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-texlive-common-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-texlive-common-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-texlive-common-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-texlive-docindex-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-texlive-docindex-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-texlive-docindex-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-texlive-en-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-texlive-en-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-texlive-en-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-texlive-msg-translations-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-texlive-msg-translations-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-texlive-msg-translations-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-tlshell-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-tlshell-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-tlshell-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-unicode-data-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-unicode-data-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-unicode-data-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-collection-basic-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-collection-basic-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-collection-basic-2021.tar.xz doc? ( https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-amsfonts.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-amsfonts.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-amsfonts.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-bibtex.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-bibtex.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-bibtex.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-cm.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-cm.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-cm.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-colorprofiles.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-colorprofiles.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-colorprofiles.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-ec.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-ec.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-ec.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-enctex.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-enctex.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-enctex.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-etex.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-etex.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-etex.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-etex-pkg.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-etex-pkg.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-etex-pkg.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-graphics-def.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-graphics-def.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-graphics-def.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-hyph-utf8.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-hyph-utf8.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-hyph-utf8.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-ifplatform.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-ifplatform.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-ifplatform.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-iftex.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-iftex.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-iftex.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-lua-alt-getopt.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-lua-alt-getopt.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-lua-alt-getopt.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-luahbtex.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-luahbtex.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-luahbtex.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-luatex.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-luatex.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-luatex.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-makeindex.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-makeindex.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-makeindex.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-metafont.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-metafont.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-metafont.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-mflogo.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-mflogo.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-mflogo.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-mfware.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-mfware.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-mfware.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-modes.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-modes.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-modes.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-pdftex.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-pdftex.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-pdftex.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-tex.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-tex.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-tex.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-tex-ini-files.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-tex-ini-files.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-tex-ini-files.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-texlive-common.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-texlive-common.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-texlive-common.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-texlive-docindex.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-texlive-docindex.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-texlive-docindex.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-texlive-en.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-texlive-en.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-texlive-en.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-tlshell.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-tlshell.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-tlshell.doc-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-unicode-data.doc-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-unicode-data.doc-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-unicode-data.doc-2021.tar.xz ) source? ( https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-amsfonts.source-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-amsfonts.source-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-amsfonts.source-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-hyph-utf8.source-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-hyph-utf8.source-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-hyph-utf8.source-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-hyphenex.source-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-hyphenex.source-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-hyphenex.source-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-ifplatform.source-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-ifplatform.source-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-ifplatform.source-2021.tar.xz https://dev.gentoo.org/~zlogene/distfiles/texlive/tl-mflogo.source-2021.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/texlive/tl-mflogo.source-2021.tar.xz https://dev.gentoo.org/~sam/distfiles/texlive/tl-mflogo.source-2021.tar.xz )"
declare -x SUDO_COMMAND="/usr/bin/emerge -av dev-python/sphinx"
declare -x SUDO_GID="1001"
declare -x SUDO_UID="1000"
declare -x SUDO_USER="dmimaz"
declare -x SYMLINK_LIB="no"
declare -- TEXLIVE_DEVS=" zlogene dilfridge sam "
declare -- TEXLIVE_MODULE_BINSCRIPTS="texmf-dist/scripts/simpdftex/simpdftex"
declare -- TEXLIVE_MODULE_CONTENTS="amsfonts bibtex cm colorprofiles ec enctex etex etex-pkg graphics-def hyph-utf8 hyphenex ifplatform iftex knuth-lib knuth-local lua-alt-getopt luahbtex luatex makeindex metafont mflogo mfware modes pdftex plain tex tex-ini-files texlive-common texlive-docindex texlive-en texlive-msg-translations tlshell unicode-data collection-basic
"
declare -- TEXLIVE_MODULE_DOC_CONTENTS="amsfonts.doc bibtex.doc cm.doc colorprofiles.doc ec.doc enctex.doc etex.doc etex-pkg.doc graphics-def.doc hyph-utf8.doc ifplatform.doc iftex.doc lua-alt-getopt.doc luahbtex.doc luatex.doc makeindex.doc metafont.doc mflogo.doc mfware.doc modes.doc pdftex.doc tex.doc tex-ini-files.doc texlive-common.doc texlive-docindex.doc texlive-en.doc tlshell.doc unicode-data.doc "
declare -- TEXLIVE_MODULE_OPTIONAL_ENGINE="luajittex"
declare -- TEXLIVE_MODULE_SRC_CONTENTS="amsfonts.source hyph-utf8.source hyphenex.source ifplatform.source mflogo.source "
declare -- TEXMF_DIST_PATH="/usr/share/texmf-dist"
declare -- TEXMF_PATH="/usr/share/texmf"
declare -- TEXMF_VAR_PATH="/var/lib/texmf"
declare -x THEMES=""
declare -x TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1"
declare -x USE="abi_x86_64 amd64 elibc_glibc kernel_linux luajittex userland_GNU"
declare -x USERLAND="GNU"
declare -x USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
declare -x USE_EXPAND_UNPREFIXED="ARCH"
declare -x USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-linux arm arm64 arm64-macos hppa ia64 loong m68k mips ppc ppc64 ppc64-linux ppc-macos riscv s390 sparc sparc64-solaris sparc-solaris x64-cygwin x64-macos x64-solaris x64-winnt x86 x86-linux x86-solaris x86-winnt"
declare -x USE_EXPAND_VALUES_ELIBC="bionic Cygwin Darwin glibc mingw musl SunOS Winnt"
declare -x USE_EXPAND_VALUES_KERNEL="Darwin linux SunOS Winnt"
declare -x USE_EXPAND_VALUES_USERLAND="BSD GNU"
declare -x UWSGI_PLUGINS=""
declare -x VBOX_APP_HOME="/usr/lib64/virtualbox"
declare -x VIDEO_CARDS=""
declare -x VOICEMAIL_STORAGE=""
declare -x XDG_CONFIG_DIRS="/etc/xdg"
declare -x XDG_CURRENT_DESKTOP="KDE"
declare -x XDG_DATA_DIRS="/usr/local/share:/usr/share"
declare -x XSESSION="Plasma"
declare -x XTABLES_ADDONS=""
declare -x _E_DESTTREE_="/usr"
declare -x _E_DOCDESTTREE_=""
declare -x _E_EXEDESTTREE_=""
declare -x _E_INSDESTTREE_=""
declare -- _TEXLIVE_COMMON_ECLASS="1"
declare -- _TEXLIVE_MODULE_ECLASS="1"
declare -x ac_cv_c_undeclared_builtin_options="none needed"
declare -- calculate_lockfile="/var/calculate/tmp/portage/dev-texlive/.texlive-basic.calculate_lockfile"
declare -x enable_year2038="no"
declare -- engine="luajittex"
declare -x gl_cv_compiler_check_decl_option="-Werror=implicit-function-declaration"
declare -- i="mflogo.source"
declare -- tldev="sam"
__eapi6_src_install () 
{ 
    if [[ -f Makefile || -f GNUmakefile || -f makefile ]]; then
        emake DESTDIR="${D}" install;
    fi;
    einstalldocs
}
__eapi6_src_prepare () 
{ 
    if ___is_indexed_array_var PATCHES; then
        [[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}";
    else
        if [[ -n ${PATCHES} ]]; then
            eapply ${PATCHES};
        fi;
    fi;
    eapply_user
}
__eapi7_ver_compare () 
{ 
    local va=${1} vb=${2} a an al as ar b bn bl bs br re LC_ALL=C;
    re="^([0-9]+(\.[0-9]+)*)([a-z]?)((_(alpha|beta|pre|rc|p)[0-9]*)*)(-r[0-9]+)?$";
    [[ ${va} =~ ${re} ]] || die "${FUNCNAME}: invalid version: ${va}";
    an=${BASH_REMATCH[1]};
    al=${BASH_REMATCH[3]};
    as=${BASH_REMATCH[4]};
    ar=${BASH_REMATCH[7]};
    [[ ${vb} =~ ${re} ]] || die "${FUNCNAME}: invalid version: ${vb}";
    bn=${BASH_REMATCH[1]};
    bl=${BASH_REMATCH[3]};
    bs=${BASH_REMATCH[4]};
    br=${BASH_REMATCH[7]};
    __eapi7_ver_compare_int "${an%%.*}" "${bn%%.*}" || return;
    while [[ ${an} == *.* && ${bn} == *.* ]]; do
        an=${an#*.};
        bn=${bn#*.};
        a=${an%%.*};
        b=${bn%%.*};
        if [[ ${a} == 0* || ${b} == 0* ]]; then
            [[ ${a} =~ 0+$ ]] && a=${a%"${BASH_REMATCH[0]}"};
            [[ ${b} =~ 0+$ ]] && b=${b%"${BASH_REMATCH[0]}"};
            [[ ${a} > ${b} ]] && return 3;
            [[ ${a} < ${b} ]] && return 1;
        else
            __eapi7_ver_compare_int "${a}" "${b}" || return;
        fi;
    done;
    [[ ${an} == *.* ]] && return 3;
    [[ ${bn} == *.* ]] && return 1;
    [[ ${al} > ${bl} ]] && return 3;
    [[ ${al} < ${bl} ]] && return 1;
    as=${as#_}${as:+_};
    bs=${bs#_}${bs:+_};
    while [[ -n ${as} && -n ${bs} ]]; do
        a=${as%%_*};
        b=${bs%%_*};
        if [[ ${a%%[0-9]*} == "${b%%[0-9]*}" ]]; then
            __eapi7_ver_compare_int "${a##*[a-z]}" "${b##*[a-z]}" || return;
        else
            [[ ${a%%[0-9]*} == p ]] && return 3;
            [[ ${b%%[0-9]*} == p ]] && return 1;
            [[ ${a} > ${b} ]] && return 3 || return 1;
        fi;
        as=${as#*_};
        bs=${bs#*_};
    done;
    if [[ -n ${as} ]]; then
        [[ ${as} == p[_0-9]* ]] && return 3 || return 1;
    else
        if [[ -n ${bs} ]]; then
            [[ ${bs} == p[_0-9]* ]] && return 1 || return 3;
        fi;
    fi;
    __eapi7_ver_compare_int "${ar#-r}" "${br#-r}" || return;
    return 2
}
__eapi7_ver_compare_int () 
{ 
    local a=$1 b=$2 d=$(( ${#1}-${#2} ));
    if [[ ${d} -gt 0 ]]; then
        printf -v b "%0${d}d%s" 0 "${b}";
    else
        if [[ ${d} -lt 0 ]]; then
            printf -v a "%0$(( -d ))d%s" 0 "${a}";
        fi;
    fi;
    [[ ${a} > ${b} ]] && return 3;
    [[ ${a} == "${b}" ]]
}
__eapi7_ver_parse_range () 
{ 
    local range=${1};
    local max=${2};
    [[ ${range} == [0-9]* ]] || die "${FUNCNAME}: range must start with a number";
    start=${range%-*};
    [[ ${range} == *-* ]] && end=${range#*-} || end=${start};
    if [[ -n ${end} ]]; then
        [[ ${start} -le ${end} ]] || die "${FUNCNAME}: end of range must be >= start";
        [[ ${end} -le ${max} ]] || end=${max};
    else
        end=${max};
    fi
}
__eapi7_ver_split () 
{ 
    local v=${1} LC_ALL=C;
    comp=();
    local s c;
    while [[ -n ${v} ]]; do
        s=${v%%[a-zA-Z0-9]*};
        v=${v:${#s}};
        [[ ${v} == [0-9]* ]] && c=${v%%[^0-9]*} || c=${v%%[^a-zA-Z]*};
        v=${v:${#c}};
        comp+=("${s}" "${c}");
    done
}
__eapi8_src_prepare () 
{ 
    local f;
    if ___is_indexed_array_var PATCHES; then
        [[ ${#PATCHES[@]} -gt 0 ]] && eapply -- "${PATCHES[@]}";
    else
        if [[ -n ${PATCHES} ]]; then
            eapply -- ${PATCHES};
        fi;
    fi;
    eapply_user
}
_dosym8_canonicalize () 
{ 
    local path slash i prev out IFS=/;
    path=($1);
    [[ $1 == /* ]] && slash=/;
    while true; do
        prev=;
        for i in ${!path[@]};
        do
            if [[ -z ${path[i]} || ${path[i]} == . ]]; then
                unset "path[i]";
            else
                if [[ ${path[i]} != .. ]]; then
                    prev=${i};
                else
                    if [[ -n ${prev} || -n ${slash} ]]; then
                        [[ -n ${prev} ]] && unset "path[prev]";
                        unset "path[i]";
                        continue 2;
                    fi;
                fi;
            fi;
        done;
        break;
    done;
    out="${slash}${path[*]}";
    echo "${out:-.}"
}
calculate_configurable_package () 
{ 
    ! [[ -f /var/lib/calculate/calculate-core/cache/merge-setup.list ]] || grep ${CATEGORY}/${PN} /var/lib/calculate/calculate-core/cache/merge-setup.list &> /dev/null
}
calculate_lock_setup () 
{ 
    if calculate_configurable_package; then
        flock -x -w 120 $calculate_lockfile true;
    fi
}
calculate_unlock_setup () 
{ 
    if calculate_configurable_package; then
        rm $calculate_lockfile;
    fi
}
check_skip () 
{ 
    declare -A SKIPPKGS=(["calculate-install"]="1" ["calculate-lib"]="1" ["calculate-console"]="1" ["calculate-console-gui"]="1" ["calculate-core"]="1" ["calculate-desktop"]="1" ["calculate-client"]="1" ["calculate-update"]="1");
    [[ -z ${SKIPPKGS[$PN]} ]]
}
clean_binary_bdepends () 
{ 
    local bdeps=$(/usr/libexec/calculate/cl-variable --value update.cl_update_with_bdeps_set 2>/dev/null);
    local _instmark=/var/db/pkg/$CATEGORY/$PF/EMERGE_FROM;
    echo -n $EMERGE_FROM > $_instmark;
    if [[ $EMERGE_FROM == binary ]] && [[ $bdeps == auto ]]; then
        local _bdep=/var/db/pkg/$CATEGORY/$PF/BDEPEND;
        local _dep=/var/db/pkg/$CATEGORY/$PF/DEPEND;
        [[ -f $_bdep ]] && mv $_bdep $_bdep.binary;
        [[ -f $_dep ]] && mv $_dep $_dep.binary;
    fi
}
clean_contents_mark () 
{ 
    rm -f /var/lib/calculate/-CONTENTS-*
}
clean_update_mark () 
{ 
    rm -f /var/lib/calculate/-merge-$PN-*
}
dobin_texmf_scripts () 
{ 
    while [[ ${#} -gt 0 ]]; do
        local trg=$(basename ${1} | sed 's,\.[^/]*$,,' | tr '[:upper:]' '[:lower:]');
        einfo "Installing ${1} as ${trg} bin wrapper";
        [[ -x ${ED}/usr/share/${1} ]] || die "Trying to install a non existing or non executable symlink to /usr/bin: ${1}";
        dosym ../share/${1} /usr/bin/${trg};
        shift;
    done
}
dosym8 () 
{ 
    local option_r;
    case $1 in 
        -r)
            option_r=t;
            shift
        ;;
    esac;
    [[ $# -eq 2 ]] || die "${FUNCNAME}: bad number of arguments";
    local target=$1 link=$2;
    if [[ -n ${option_r} ]]; then
        local linkdir comp;
        [[ ${target} == /* ]] || die "${FUNCNAME}: -r specified but no absolute target path";
        target=$(_dosym8_canonicalize "${target}");
        linkdir=$(_dosym8_canonicalize "/${link#/}");
        linkdir=${linkdir%/*};
        linkdir=${linkdir:-/};
        local ifs_save=${IFS-' 	
'} IFS=/;
        for comp in ${linkdir};
        do
            if [[ ${target%%/*} == "${comp}" ]]; then
                target=${target#"${comp}"};
                target=${target#/};
            else
                target=..${target:+/}${target};
            fi;
        done;
        IFS=${ifs_save};
        target=${target:-.};
    fi;
    dosym "${target}" "${link}"
}
eapply () 
{ 
    local failed patch_cmd=patch;
    local -x LC_COLLATE=POSIX;
    type -P gpatch > /dev/null && patch_cmd=gpatch;
    function _eapply_patch () 
    { 
        local f=${1};
        local prefix=${2};
        ebegin "${prefix:-Applying }${f##*/}";
        local all_opts=(-p1 -f -g0 --no-backup-if-mismatch "${patch_options[@]}");
        if ${patch_cmd} "${all_opts[@]}" --dry-run -s -F0 < "${f}" &> /dev/null; then
            all_opts+=(-s -F0);
        fi;
        ${patch_cmd} "${all_opts[@]}" < "${f}";
        failed=${?};
        if ! eend "${failed}"; then
            __helpers_die "patch -p1 ${patch_options[*]} failed with ${f}";
        fi
    };
    local patch_options=() files=();
    local i found_doublehyphen;
    for ((i = 1; i <= ${#@}; ++i ))
    do
        if [[ ${@:i:1} == -- ]]; then
            patch_options=("${@:1:i-1}");
            files=("${@:i+1}");
            found_doublehyphen=1;
            break;
        fi;
    done;
    if [[ -z ${found_doublehyphen} ]]; then
        for ((i = 1; i <= ${#@}; ++i ))
        do
            if [[ ${@:i:1} != -* ]]; then
                patch_options=("${@:1:i-1}");
                files=("${@:i}");
                break;
            fi;
        done;
        for i in "${files[@]}";
        do
            if [[ ${i} == -* ]]; then
                die "eapply: all options must be passed before non-options";
            fi;
        done;
    fi;
    if [[ ${#files[@]} -eq 0 ]]; then
        die "eapply: no files specified";
    fi;
    local f;
    for f in "${files[@]}";
    do
        if [[ -d ${f} ]]; then
            function _eapply_get_files () 
            { 
                local LC_ALL=POSIX;
                local prev_shopt=$(shopt -p nullglob);
                shopt -s nullglob;
                local f;
                for f in "${1}"/*;
                do
                    if [[ ${f} == *.diff || ${f} == *.patch ]]; then
                        files+=("${f}");
                    fi;
                done;
                ${prev_shopt}
            };
            local files=();
            _eapply_get_files "${f}";
            [[ ${#files[@]} -eq 0 ]] && die "No *.{patch,diff} files in directory ${f}";
            einfo "Applying patches from ${f} ...";
            local f2;
            for f2 in "${files[@]}";
            do
                _eapply_patch "${f2}" '  ';
                [[ ${failed} -ne 0 ]] && return "${failed}";
            done;
        else
            _eapply_patch "${f}";
            [[ ${failed} -ne 0 ]] && return "${failed}";
        fi;
    done;
    return 0
}
eapply_user () 
{ 
    [[ ${EBUILD_PHASE} == prepare ]] || die "eapply_user() called during invalid phase: ${EBUILD_PHASE}";
    local tagfile=${T}/.portage_user_patches_applied;
    [[ -f ${tagfile} ]] && return;
     >> "${tagfile}";
    local basedir=${PORTAGE_CONFIGROOT%/}/etc/portage/patches;
    local columns=${COLUMNS:-0};
    [[ ${columns} == 0 ]] && columns=$(set -- $( ( stty size </dev/tty ) 2>/dev/null || echo 24 80 ) ; echo $2);
    (( columns > 0 )) || (( columns = 80 ));
    local applied d f;
    local -A _eapply_user_patches;
    local prev_shopt=$(shopt -p nullglob);
    shopt -s nullglob;
    for d in "${basedir}"/${CATEGORY}/{${P}-${PR},${P},${PN}}{:${SLOT%/*},};
    do
        for f in "${d}"/*;
        do
            if [[ ( ${f} == *.diff || ${f} == *.patch ) && -z ${_eapply_user_patches[${f##*/}]} ]]; then
                _eapply_user_patches[${f##*/}]=${f};
            fi;
        done;
    done;
    if [[ ${#_eapply_user_patches[@]} -gt 0 ]]; then
        while read -r -d '' f; do
            f=${_eapply_user_patches[${f}]};
            if [[ -s ${f} ]]; then
                if [[ -z ${applied} ]]; then
                    einfo "${PORTAGE_COLOR_INFO}$(for ((column = 0; column < ${columns} - 3; column++)); do echo -n =; done)${PORTAGE_COLOR_NORMAL}";
                    einfo "Applying user patches from ${basedir} ...";
                fi;
                eapply "${f}";
                applied=1;
            fi;
        done < <(printf -- '%s\0' "${!_eapply_user_patches[@]}" |
				LC_ALL=C sort -z);
    fi;
    ${prev_shopt};
    if [[ -n ${applied} ]]; then
        einfo "User patches applied.";
        einfo "${PORTAGE_COLOR_INFO}$(for ((column = 0; column < ${columns} - 3; column++)); do echo -n =; done)${PORTAGE_COLOR_NORMAL}";
    fi
}
efmtutil-sys () 
{ 
    if has_version 'app-text/texlive-core'; then
        if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]]; then
            einfo "Rebuilding formats";
            "${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null || die;
        else
            ewarn "Cannot run fmtutil-sys for some reason.";
            ewarn "Your formats might be inconsistent with your installed ${PN} version";
            ewarn "Please try to figure what has happened";
        fi;
    fi
}
einstalldocs () 
{ 
    ( if [[ $(declare -p DOCS 2>/dev/null) != *=* ]]; then
        local d;
        for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS FAQ CREDITS CHANGELOG;
        do
            [[ -f ${d} && -s ${d} ]] && docinto / && dodoc "${d}";
        done;
    else
        if ___is_indexed_array_var DOCS; then
            [[ ${#DOCS[@]} -gt 0 ]] && docinto / && dodoc -r "${DOCS[@]}";
        else
            [[ -n ${DOCS} ]] && docinto / && dodoc -r ${DOCS};
        fi;
    fi );
    ( if ___is_indexed_array_var HTML_DOCS; then
        [[ ${#HTML_DOCS[@]} -gt 0 ]] && docinto html && dodoc -r "${HTML_DOCS[@]}";
    else
        [[ -n ${HTML_DOCS} ]] && docinto html && dodoc -r ${HTML_DOCS};
    fi )
}
etexlinks () 
{ 
    texlive-common_do_symlinks $(sed '/^[      ]*#/d; /^[      ]*$/d' "$1" | awk '{print $1, $2}')
}
etexmf-update () 
{ 
    if has_version 'app-text/texlive-core'; then
        if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/sbin/texmf-update ]]; then
            "${EPREFIX}"/usr/sbin/texmf-update;
        else
            ewarn "Cannot run texmf-update for some reason.";
            ewarn "Your texmf tree might be inconsistent with your configuration";
            ewarn "Please try to figure what has happened";
        fi;
    fi
}
fix_kernel_symlink () 
{ 
    local kernel_build=$(/usr/libexec/calculate/cl-variable --value install.cl_install_kernel_build 2>/dev/null);
    if [[ $? -ne 1 ]] && [[ -n $kernel_build ]] && [[ -L /usr/src/linux ]]; then
        [[ "$kernel_build" =~ ^[0-9]+\.[0-9]+$ ]] && kernel_build="${kernel_build}.";
        last_kernel="$(ls -1d /usr/src/linux-${kernel_build}* | sed 's/.*linux-//' | sort -V | tail -1)";
        if [[ -n $last_kernel ]]; then
            if [[ "$(readlink /usr/src/linux)" != "linux-${last_kernel}" ]]; then
                rm /usr/src/linux;
                ln -sf linux-${last_kernel} /usr/src/linux;
            fi;
        fi;
    fi
}
get_libdir () 
{ 
    local libdir_var="LIBDIR_${ABI}";
    local libdir="lib";
    [[ -n ${ABI} && -n ${!libdir_var} ]] && libdir=${!libdir_var};
    echo "${libdir}"
}
in_iuse () 
{ 
    local use=${1};
    if [[ -z "${use}" ]]; then
        echo "!!! in_iuse() called without a parameter." 1>&2;
        echo "!!! in_iuse <USEFLAG>" 1>&2;
        die "in_iuse() called without a parameter";
    fi;
    local liuse=(${IUSE_EFFECTIVE});
    has "${use}" "${liuse[@]#[+-]}"
}
mark_update_package () 
{ 
    if [[ -d /var/lib/calculate ]]; then
        touch "/var/lib/calculate/-merge-$PN--${SLOT/\/*}-$PPID";
    fi
}
pkg_nofetch () 
{ 
    default
}
pkg_postinst () 
{ 
    texlive-module_pkg_postinst "$@"
}
pkg_postrm () 
{ 
    texlive-module_pkg_postrm "$@"
}
pkg_postrm_dispatch () 
{ 
    if [[ ! -f /var/lib/calculate/-merge-$PN--${SLOT/\/*}-$PPID ]]; then
        pkg_postrm_unmerge;
    else
        pkg_postrm_update;
    fi
}
pkg_postrm_unmerge () 
{ 
    if ! [[ -f /var/lib/calculate/calculate-core/cache/merge-setup.list ]] || grep ${CATEGORY}/${PN} /var/lib/calculate/calculate-core/cache/merge-setup.list &> /dev/null; then
        [ -f ${CL_UPDATE_PROG} ] && check_skip && ${RUN_CORE} ${CORE_METHOD} --no-progress --pkg-version ${PVR} --pkg-slot ${SLOT/\/*} --pkg-category ${CATEGORY} --pkg-path / --pkg-name ${PN};
    fi
}
pkg_postrm_update () 
{ 
    if [[ -d /var/lib/calculate ]]; then
        cp /var/db/pkg/${CATEGORY}/${PF}/CONTENTS /var/lib/calculate/-CONTENTS-$PN;
    fi
}
post_pkg_config () 
{ 
    [ -f ${CL_CONFIG} ] && ${CL_CONFIG} --no-progress --pkg-version ${PVR} --pkg-slot ${SLOT/\/*} --pkg-category ${CATEGORY} --pkg-name ${PN} --verbose
}
post_pkg_postinst () 
{ 
    [[ "$PN" == "calculate-sources" ]] && fix_kernel_symlink;
    post_setup_package;
    calculate_unlock_setup;
    clean_binary_bdepends
}
post_setup_package () 
{ 
    local remove_dir_list="";
    if [ -f ${CL_UPDATE_PROG} ] && [[ $PN == "calculate-utils" ]] && [[ -f /var/lib/calculate/calculate-core/setup-failed.list ]]; then
        while read category pkgname mypvr myslot; do
            if [[ -n $category ]]; then
                pkg_lockfile_dir=/var/calculate/tmp/portage/$category;
                pkg_lockfile="$pkg_lockfile_dir"/.${pkgname}.calculate_lockfile;
                if ! [[ -d $pkg_lockfile_dir ]]; then
                    mkdir -p $pkg_lockfile_dir;
                    remove_dir_list="$remove_dir_list $pkg_lockfile_dir";
                fi;
                ( flock -x -w 1 73 || exit 1;
                fuser /var/db/pkg/$category/.${pkgname}*.portage_lockfile &> /dev/null || CTARGET=${CTARGET} GCC_CONFIG_VER=${GCC_CONFIG_VER} ${RUN_CORE} ${CORE_METHOD} --no-progress --pkg-name $pkgname --pkg-category $category --pkg-slot $myslot --pkg-version $mypvr --pkg-path "/";
                rm -f /var/lib/calculate/-runlevels-$pkgname;
                rm $pkg_lockfile ) 73> $pkg_lockfile;
            fi;
        done < /var/lib/calculate/calculate-core/setup-failed.list;
        rm -f /var/lib/calculate/calculate-core/setup-failed.list;
    fi;
    if [ -f ${CL_UPDATE_PROG} ] && [[ -f /var/lib/calculate/-postmerge ]] && check_skip; then
        OLDIFS=$IFS;
        IFS=/;
        while read category pkgname; do
            [ -d /var/db/pkg/${category}/${pkgname}-* ] || continue;
            IFS=$OLDIFS;
            if ! [[ -f /var/lib/calculate/calculate-core/cache/merge-setup.list ]] || grep ${category}/${pkgname} /var/lib/calculate/calculate-core/cache/merge-setup.list &> /dev/null; then
                pkg_lockfile_dir=/var/calculate/tmp/portage/$category;
                pkg_lockfile="$pkg_lockfile_dir"/.${pkgname}.calculate_lockfile;
                if ! [[ -d $pkg_lockfile_dir ]]; then
                    mkdir -p $pkg_lockfile_dir;
                    remove_dir_list="$remove_dir_list $pkg_lockfile_dir";
                fi;
                ( flock -x -w 1 73 || exit 1;
                fuser /var/db/pkg/$category/.${pkgname}*.portage_lockfile &> /dev/null || CTARGET=${CTARGET} GCC_CONFIG_VER=${GCC_CONFIG_VER} ${RUN_CORE} ${CORE_METHOD} --no-progress --pkg-name $pkgname --pkg-category $category --pkg-path "/";
                rm $pkg_lockfile ) 73> $pkg_lockfile;
            fi;
            IFS=/;
        done < <(awk '!x[$0]++' /var/lib/calculate/-postmerge);
        IFS=$OLDIFS;
    fi;
    rm -f /var/lib/calculate/-postmerge;
    [[ -n $remove_dir_list ]] && rmdir $remove_dir_list
}
pre_pkg_postinst () 
{ 
    setup_merge_package;
    clean_contents_mark;
    clean_update_mark;
    unstash_automagic_requires
}
pre_pkg_postrm () 
{ 
    pkg_postrm_dispatch;
    clean_update_mark
}
pre_pkg_preinst () 
{ 
    mark_update_package;
    save_runlevels
}
save_runlevels () 
{ 
    if [[ -d /var/lib/calculate ]]; then
        find /etc/runlevels/{default,boot,sysinit,shutdown} > /var/lib/calculate/-runlevels-$PN;
    fi
}
setup_merge_package () 
{ 
    rm -f /var/lib/calculate/-postmerge;
    if ! [[ -f /var/lib/calculate/calculate-core/cache/merge-setup.list ]] || grep ${CATEGORY}/${PN} /var/lib/calculate/calculate-core/cache/merge-setup.list &> /dev/null; then
        if [ -f ${CL_UPDATE_PROG} ] && check_skip; then
            if ! CTARGET=${CTARGET} GCC_CONFIG_VER=${GCC_CONFIG_VER} ${RUN_CORE} ${CORE_METHOD} --no-progress --pkg-version ${PVR} --pkg-slot ${SLOT/\/*} --pkg-category ${CATEGORY} --pkg-path "/" --pkg-name ${PN}; then
                echo $CATEGORY $PN $PVR ${SLOT/\/*} >> /var/lib/calculate/calculate-core/setup-failed.list;
                return 1;
            fi;
        fi;
    fi;
    rm -f /var/lib/calculate/-runlevels-$PN
}
src_compile () 
{ 
    texlive-module_src_compile "$@"
}
src_configure () 
{ 
    default
}
src_install () 
{ 
    texlive-module_src_install "$@"
}
src_prepare () 
{ 
    default
}
src_test () 
{ 
    default
}
src_unpack () 
{ 
    texlive-module_src_unpack "$@"
}
texlive-common_do_symlinks () 
{ 
    while [[ ${#} != 0 ]]; do
        case ${1} in 
            cont-?? | metafun | mptopdf)
                einfo "Symlink ${1} skipped (special case)"
            ;;
            mf)
                einfo "Symlink ${1} -> ${2} skipped (texlive-core takes care of it)"
            ;;
            *)
                if [[ ${1} == ${2} ]]; then
                    einfo "Symlink ${1} -> ${2} skipped";
                else
                    if [[ -e ${ED}/usr/bin/${1} || -L ${ED}/usr/bin/${1} ]]; then
                        einfo "Symlink ${1} skipped (file exists)";
                    else
                        einfo "Making symlink from ${1} to ${2}";
                        dosym ${2} /usr/bin/${1};
                    fi;
                fi
            ;;
        esac;
        shift;
        shift;
    done
}
texlive-common_handle_config_files () 
{ 
    [[ -d ${ED}${TEXMF_PATH} ]] || return;
    cd "${ED}${TEXMF_PATH}" || die;
    while read -r f; do
        if [[ ${f#*config} != ${f} || ${f#doc} != ${f} || ${f#source} != ${f} || ${f#tex} != ${f} ]]; then
            continue;
        fi;
        dodir /etc/texmf/$(dirname ${f}).d;
        einfo "Moving (and symlinking) ${EPREFIX}${TEXMF_PATH}/${f} to ${EPREFIX}/etc/texmf/$(dirname ${f}).d";
        mv "${ED}/${TEXMF_PATH}/${f}" "${ED}/etc/texmf/$(dirname ${f}).d" || die "mv ${f} failed.";
        dosym8 -r /etc/texmf/$(dirname ${f}).d/$(basename ${f}) ${TEXMF_PATH}/${f};
    done < <(find  -name '*.cnf' -type f -o -name '*.cfg' -type f | sed -e "s:\./::g")
}
texlive-common_is_file_present_in_texmf () 
{ 
    local mark="${T}/${1}.found";
    if [[ -d texmf ]]; then
        find texmf -name ${1} -exec touch ${mark} {} + || die;
    fi;
    if [[ -d texmf-dist ]]; then
        find texmf-dist -name ${1} -exec touch ${mark} {} + || die;
    fi;
    [ -f "${mark}" ]
}
texlive-module_add_format () 
{ 
    local name engine mode patterns options;
    eval $@;
    einfo "Appending to format.${PN}.cnf for $@";
    if [[ ! -d texmf-dist/fmtutil ]]; then
        mkdir -p texmf-dist/fmtutil || die;
    fi;
    [[ -f texmf-dist/fmtutil/format.${PN}.cnf ]] || { 
        echo "# Generated for ${PN}	by texlive-module.eclass" > texmf-dist/fmtutil/format.${PN}.cnf
    };
    [[ -n ${TEXLIVE_MODULE_OPTIONAL_ENGINE} ]] && has ${engine} ${TEXLIVE_MODULE_OPTIONAL_ENGINE} && use !${engine} && mode="disabled";
    if [[ ${mode} = disabled ]]; then
        printf "#! " >> texmf-dist/fmtutil/format.${PN}.cnf || die;
    fi;
    [[ -z ${patterns} ]] && patterns="-";
    printf "${name}\t${engine}\t${patterns}\t${options}\n" >> texmf-dist/fmtutil/format.${PN}.cnf || die
}
texlive-module_make_language_dat_lines () 
{ 
    local lefthyphenmin righthyphenmin synonyms name file file_patterns file_exceptions luaspecial;
    eval $@;
    einfo "Generating language.dat entry for $@";
    echo "$name $file" >> "${S}/language.${PN}.dat" || die;
    if [[ -n ${synonyms} ]]; then
        for i in $(echo ${synonyms} | tr ',' ' ');
        do
            einfo "Generating language.dat synonym ${i} for $@";
            echo "=${i}" >> "${S}/language.${PN}.dat" || die;
        done;
    fi
}
texlive-module_make_language_def_lines () 
{ 
    local lefthyphenmin righthyphenmin synonyms name file file_patterns file_exceptions luaspecial;
    eval $@;
    einfo "Generating language.def entry for $@";
    [[ -z ${lefthyphenmin} ]] && lefthyphenmin="2";
    [[ -z ${righthyphenmin} ]] && righthyphenmin="3";
    echo "\\addlanguage{$name}{$file}{}{$lefthyphenmin}{$righthyphenmin}" >> "${S}/language.${PN}.def" || die;
    if [[ -n ${synonyms} ]]; then
        for i in $(echo $synonyms | tr ',' ' ');
        do
            einfo "Generating language.def synonym $i for $@";
            echo "\\addlanguage{$i}{$file}{}{$lefthyphenmin}{$righthyphenmin}" >> "${S}/language.${PN}.def" || die;
        done;
    fi
}
texlive-module_make_language_lua_lines () 
{ 
    local lefthyphenmin righthyphenmin synonyms name file file_patterns file_exceptions luaspecial;
    local dest="${S}/language.${PN}.dat.lua";
    eval $@;
    [[ -z ${lefthyphenmin} ]] && lefthyphenmin="2";
    [[ -z ${righthyphenmin} ]] && righthyphenmin="3";
    einfo "Generating language.dat.lua entry for $@";
    printf "\t['%s'] = {\n" "${name}" >> "${dest}" || die;
    printf "\t\tloader = '%s',\n" "${file}" >> "${dest}" || die;
    printf "\t\tlefthyphenmin = %s,\n\t\trighthyphenmin = %s,\n" "${lefthyphenmin}" "${righthyphenmin}" >> "${dest}" || die;
    printf "\t\tsynonyms = {%s },\n" "$(texlive-module_synonyms_to_language_lua_line "${synonyms}")" >> "${dest}" || die;
    if [[ -n ${file_patterns} ]]; then
        printf "\t\tpatterns = '%s',\n" "${file_patterns}" >> "${dest}" || die;
    fi;
    if [[ -n ${file_exceptions} ]]; then
        printf "\t\thyphenation = '%s',\n" "${file_exceptions}" >> "${dest}" || die;
    fi;
    if [[ -n ${luaspecial} ]]; then
        printf "\t\tspecial = '%s',\n" "$luaspecial" >> "${dest}" || die;
    fi;
    printf "\t},\n" >> "${dest}" || die
}
texlive-module_pkg_postinst () 
{ 
    etexmf-update;
    [[ -n ${TL_MODULE_INFORMATION} ]] && elog "${TL_MODULE_INFORMATION}"
}
texlive-module_pkg_postrm () 
{ 
    etexmf-update
}
texlive-module_src_compile () 
{ 
    for i in "${S}"/tlpkg/tlpobj/*;
    do
        grep '^execute ' "${i}" | sed -e 's/^execute //' | tr ' \t' '##' >> "${T}/jobs" || die;
    done;
    for i in $(<"${T}/jobs");
    do
        j="$(echo $i | tr '#' ' ')";
        command=${j%% *};
        parameter=${j#* };
        case ${command} in 
            addMap)
                echo "Map ${parameter}" >> "${S}/${PN}.cfg"
            ;;
            addMixedMap)
                echo "MixedMap ${parameter}" >> "${S}/${PN}.cfg"
            ;;
            addKanjiMap)
                echo "KanjiMap ${parameter}" >> "${S}/${PN}.cfg"
            ;;
            addDvipsMap)
                echo "p	+${parameter}" >> "${S}/${PN}-config.ps"
            ;;
            addDvipdfmMap)
                echo "f	${parameter}" >> "${S}/${PN}-config"
            ;;
            AddHyphen)
                texlive-module_make_language_def_lines ${parameter};
                texlive-module_make_language_dat_lines ${parameter};
                texlive-module_make_language_lua_lines ${parameter}
            ;;
            AddFormat)
                texlive-module_add_format ${parameter}
            ;;
            BuildFormat)
                einfo "Format ${parameter} already built."
            ;;
            BuildLanguageDat)
                einfo "Language file $parameter already generated."
            ;;
            *)
                die "No rule to process ${command}. Please file a bug."
            ;;
        esac;
    done;
    fmt_call="$(has_version '>=app-text/texlive-core-2019'          && echo "fmtutil-user" || echo "fmtutil")";
    for i in texmf-dist/fmtutil/format*.cnf;
    do
        if [[ -f ${i} ]]; then
            einfo "Building format ${i}";
            if [[ ! -d texmf-var ]]; then
                mkdir texmf-var || die;
            fi;
            if [[ ! -d texmf-var/web2c ]]; then
                mkdir texmf-var/web2c || die;
            fi;
            VARTEXFONTS="${T}/fonts" TEXMFHOME="${S}/texmf:${S}/texmf-dist:${S}/texmf-var" env -u TEXINPUTS $fmt_call --cnffile "${i}" --fmtdir "${S}/texmf-var/web2c" --all || die "failed to build format ${i}";
        fi;
    done;
    find . -name 'ls-R' -delete || die
}
texlive-module_src_install () 
{ 
    for i in texmf-dist/fmtutil/format*.cnf;
    do
        [[ -f ${i} ]] && etexlinks "${i}";
    done;
    dodir /usr/share;
    if use doc; then
        if [[ -d texmf-doc ]]; then
            cp -pR texmf-doc "${ED}/usr/share/" || die;
        fi;
    else
        if [[ -d texmf-dist/doc ]]; then
            rm -rf texmf-dist/doc || die;
        fi;
        if [[ -d texmf/doc ]]; then
            rm -rf texmf/doc || die;
        fi;
    fi;
    if [[ -d texmf ]]; then
        cp -pR texmf "${ED}/usr/share/" || die;
    fi;
    if [[ -d texmf-dist ]]; then
        cp -pR texmf-dist "${ED}/usr/share/" || die;
    fi;
    if [[ -d tlpkg ]] && use source; then
        cp -pR tlpkg "${ED}/usr/share/" || die;
    fi;
    if [[ -d texmf-var ]]; then
        insinto /var/lib/texmf;
        doins -r texmf-var/.;
    fi;
    insinto /etc/texmf/updmap.d;
    [[ -f ${S}/${PN}.cfg ]] && doins "${S}/${PN}.cfg";
    insinto /etc/texmf/dvips.d;
    [[ -f ${S}/${PN}-config.ps ]] && doins "${S}/${PN}-config.ps";
    insinto /etc/texmf/dvipdfm/config;
    [[ -f ${S}/${PN}-config ]] && doins "${S}/${PN}-config";
    if [[ -f ${S}/language.${PN}.def ]]; then
        insinto /etc/texmf/language.def.d;
        doins "${S}/language.${PN}.def";
    fi;
    if [[ -f ${S}/language.${PN}.dat ]]; then
        insinto /etc/texmf/language.dat.d;
        doins "${S}/language.${PN}.dat";
    fi;
    if [[ -f ${S}/language.${PN}.dat.lua ]]; then
        insinto /etc/texmf/language.dat.lua.d;
        doins "${S}/language.${PN}.dat.lua";
    fi;
    [[ -n ${TEXLIVE_MODULE_BINSCRIPTS} ]] && dobin_texmf_scripts ${TEXLIVE_MODULE_BINSCRIPTS};
    if [[ -n ${TEXLIVE_MODULE_BINLINKS} ]]; then
        for i in ${TEXLIVE_MODULE_BINLINKS};
        do
            [[ -f ${ED}/usr/bin/${i%:*} ]] || die "Trying to install an invalid	BINLINK. This should not happen. Please file a bug.";
            dosym ${i%:*} /usr/bin/${i#*:};
        done;
    fi;
    texlive-common_handle_config_files;
    TEXMF_PATH=${TEXMF_DIST_PATH} texlive-common_handle_config_files
}
texlive-module_src_unpack () 
{ 
    unpack ${A};
    sed -n -e 's:\s*RELOC/::p' tlpkg/tlpobj/* > "${T}/reloclist" || die;
    sed -e 's/\/[^/]*$//' -e "s:^:${RELOC_TARGET}/:" "${T}/reloclist" | sort -u | xargs mkdir -p || die;
    local i;
    while read i; do
        mv "${i}" "${RELOC_TARGET}/${i%/*}" || die;
    done < "${T}/reloclist"
}
texlive-module_synonyms_to_language_lua_line () 
{ 
    local prev="";
    for i in $(echo $@ | tr ',' ' ');
    do
        printf "${prev} '%s'" ${i};
        prev=",";
    done
}
unstash_automagic_requires () 
{ 
    local automagic_dir=/var/lib/calculate/calculate-builder/automagic-requires;
    if [[ -d $automagic_dir ]]; then
        /usr/bin/rsync -aXKx ${automagic_dir}/ / && rm -rf ${automagic_dir};
    fi
}
update_cache () 
{ 
    [[ -x /usr/libexec/calculate/cl-pkg-cache ]] && /usr/libexec/calculate/cl-pkg-cache
}
ver_cut () 
{ 
    local range=${1};
    local v=${2:-${PV}};
    local start end;
    local -a comp;
    __eapi7_ver_split "${v}";
    local max=$((${#comp[@]}/2));
    __eapi7_ver_parse_range "${range}" "${max}";
    local IFS=;
    if [[ ${start} -gt 0 ]]; then
        start=$(( start*2 - 1 ));
    fi;
    echo "${comp[*]:start:end*2-start}"
}
ver_rs () 
{ 
    local v;
    (( ${#} & 1 )) && v=${@: -1} || v=${PV};
    local start end i;
    local -a comp;
    __eapi7_ver_split "${v}";
    local max=$((${#comp[@]}/2 - 1));
    while [[ ${#} -ge 2 ]]; do
        __eapi7_ver_parse_range "${1}" "${max}";
        for ((i = start*2; i <= end*2; i+=2 ))
        do
            [[ ${i} -eq 0 && -z ${comp[i]} ]] && continue;
            comp[i]=${2};
        done;
        shift 2;
    done;
    local IFS=;
    echo "${comp[*]}"
}
ver_test () 
{ 
    local va op vb;
    if [[ $# -eq 3 ]]; then
        va=${1};
        shift;
    else
        va=${PVR};
    fi;
    [[ $# -eq 2 ]] || die "${FUNCNAME}: bad number of arguments";
    op=${1};
    vb=${2};
    case ${op} in 
        -eq | -ne | -lt | -le | -gt | -ge)

        ;;
        *)
            die "${FUNCNAME}: invalid operator: ${op}"
        ;;
    esac;
    __eapi7_ver_compare "${va}" "${vb}";
    test $? "${op}" 2
}
