diff --git a/sdk_container/src/third_party/portage-stable/eclass/fixheadtails.eclass b/sdk_container/src/third_party/portage-stable/eclass/fixheadtails.eclass deleted file mode 100644 index c19d33924a..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/fixheadtails.eclass +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: fixheadtails.eclass -# @MAINTAINER: -# base-system@gentoo.org -# @AUTHOR: -# Original author John Mylchreest -# @BLURB: functions to replace obsolete head/tail with POSIX compliant ones - -DEPEND=">=sys-apps/sed-4" - -_do_sed_fix() { - einfo " - fixed $1" - sed -i \ - -e 's/head \+-\([0-9]\)/head -n \1/g' \ - -e 's/tail \+\([-+][0-9]\+\)c/tail -c \1/g' \ - -e 's/tail \+\([-+][0-9]\)/tail -n \1/g' ${1} || \ - die "sed ${1} failed" -} - -# @FUNCTION: ht_fix_file -# @USAGE: -# @DESCRIPTION: -# Fix all the specified files. -ht_fix_file() { - local i - einfo "Replacing obsolete head/tail with POSIX compliant ones" - for i in "$@" ; do - _do_sed_fix "$i" - done -} - -# @FUNCTION: ht_fix_all -# @DESCRIPTION: -# Find and fix all files in the current directory as needed. -ht_fix_all() { - local MATCHES - MATCHES=$(grep -l -s -i -R -e "head -[ 0-9]" -e "tail [+-][ 0-9]" * | sort -u) - [[ -n ${MATCHES} ]] \ - && ht_fix_file ${MATCHES} \ - || einfo "No need for ht_fix_all anymore !" -} diff --git a/sdk_container/src/third_party/portage-stable/eclass/gnome-python-common-r1.eclass b/sdk_container/src/third_party/portage-stable/eclass/gnome-python-common-r1.eclass deleted file mode 100644 index 0d604425b9..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/gnome-python-common-r1.eclass +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: gnome-python-common-r1.eclass -# @MAINTAINER: -# GNOME team -# @AUTHOR: -# Author: Michał Górny -# Based on the work of: Arun raghaven -# which in turn was based on the work of Jim Ramsay -# @SUPPORTED_EAPIS: 5 -# @BLURB: Common functionality for building gnome-python* bindings -# @DESCRIPTION: -# This eclass provides python-r1 support for the GNOME2 library Python -# bindings. - -: ${GNOME_ORG_MODULE:=gnome-python} -: ${GNOME_TARBALL_SUFFIX:=bz2} -: ${GNOME2_LA_PUNT:=yes} -: ${GCONF_DEBUG:=no} - -# @ECLASS-VARIABLE: G_PY_BINDINGS -# @DESCRIPTION: -# The actual '--enable-' name. If multiple bindings are to -# be enabled, must be an array. -: ${G_PY_BINDINGS:=${PN%-python}} - -# @ECLASS-VARIABLE: EXAMPLES -# @DEFAULT_UNSET -# @DESCRIPTION: -# The set of example files to be installed if the 'examples' USE flag -# is set. - -case "${EAPI:-0}" in - 0|1|2|3|4) - die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" - ;; - 5) - ;; - *) - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" - ;; -esac - -inherit eutils gnome2 python-r1 - -EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install - -HOMEPAGE="http://pygtk.org/" - -RESTRICT="${RESTRICT} test" - -DOCS="AUTHORS ChangeLog NEWS README" - -if [[ ${GNOME_ORG_MODULE} != "gnome-python" ]]; then - DOCS="${DOCS} MAINTAINERS" -fi - -RDEPEND="~dev-python/${GNOME_ORG_MODULE}-base-${PV} - ${PYTHON_DEPS}" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -REQUIRED_USE=${PYTHON_REQUIRED_USE} - -gnome-python-common-r1_src_prepare() { - gnome2_src_prepare - - # The .pc file is installed by respective gnome-python*-base package - sed -i '/^pkgconfig_DATA/d' Makefile.in || die "sed failed" - sed -i '/^pkgconfigdir/d' Makefile.in || die "sed failed" -# -# python_copy_sources -} - -gnome-python-common-r1_src_configure() { - local myconf=( - --disable-allbindings - "${G_PY_BINDINGS[@]/#/--enable-}" - ) - - ECONF_SOURCE=${S} \ - python_foreach_impl \ - gnome2_src_configure "${myconf[@]}" "${@}" -} - -gnome-python-common-r1_src_compile() { - python_foreach_impl default -} - -gnome-python-common-r1_src_test() { - python_foreach_impl default -} - -# Do a regular gnome2 src_install and then install examples if required. -# Set the variable EXAMPLES to provide the set of examples to be installed. -# (to install a directory recursively, specify it with a trailing '/' - for -# example, foo/bar/) -gnome-python-common-r1_src_install() { - python_foreach_impl gnome2_src_install - - if in_iuse examples && use examples; then - docinto examples - dodoc -r "${EXAMPLES[@]}" - fi -} diff --git a/sdk_container/src/third_party/portage-stable/eclass/gstreamer.eclass b/sdk_container/src/third_party/portage-stable/eclass/gstreamer.eclass deleted file mode 100644 index 24877de422..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/gstreamer.eclass +++ /dev/null @@ -1,268 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: gstreamer.eclass -# @MAINTAINER: -# gstreamer@gentoo.org -# @AUTHOR: -# Michał Górny -# Gilles Dartiguelongue -# Saleem Abdulrasool -# foser -# zaheerm -# @SUPPORTED_EAPIS: 5 6 -# @BLURB: Helps building core & split gstreamer plugins. -# @DESCRIPTION: -# Eclass to make external gst-plugins emergable on a per-plugin basis -# and to solve the problem with gst-plugins generating far too much -# unneeded dependencies. -# -# GStreamer consuming applications should depend on the specific plugins -# they need as defined in their source code. Usually you can find that -# out by grepping the source tree for 'factory_make'. If it uses playbin -# plugin, consider adding media-plugins/gst-plugins-meta dependency, but -# also list any packages that provide explicitly requested plugins. - -inherit eutils multilib multilib-minimal toolchain-funcs versionator xdg-utils - -case "${EAPI:-0}" in - 5|6) - ;; - 0|1|2|3|4) - die "EAPI=\"${EAPI:-0}\" is not supported anymore" - ;; - *) - die "EAPI=\"${EAPI}\" is not supported yet" - ;; -esac - -# @ECLASS-VARIABLE: GST_PLUGINS_BUILD -# @DESCRIPTION: -# Defines the plugins to be built. -# May be set by an ebuild and contain more than one indentifier, space -# seperated (only src_configure can handle mutiple plugins at this time). -: ${GST_PLUGINS_BUILD:=${PN/gst-plugins-/}} - -# @ECLASS-VARIABLE: GST_PLUGINS_BUILD_DIR -# @DESCRIPTION: -# Actual build directory of the plugin. -# Most often the same as the configure switch name. -: ${GST_PLUGINS_BUILD_DIR:=${PN/gst-plugins-/}} - -# @ECLASS-VARIABLE: GST_TARBALL_SUFFIX -# @DESCRIPTION: -# Most projects hosted on gstreamer.freedesktop.org mirrors provide -# tarballs as tar.bz2 or tar.xz. This eclass defaults to xz. This is -# because the gstreamer mirrors are moving to only have xz tarballs for -# new releases. -: ${GST_TARBALL_SUFFIX:="xz"} - -# Even though xz-utils are in @system, they must still be added to DEPEND; see -# https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml -if [[ ${GST_TARBALL_SUFFIX} == "xz" ]]; then - DEPEND="${DEPEND} app-arch/xz-utils" -fi - -# @ECLASS-VARIABLE: GST_ORG_MODULE -# @DESCRIPTION: -# Name of the module as hosted on gstreamer.freedesktop.org mirrors. -# Leave unset if package name matches module name. -: ${GST_ORG_MODULE:=$PN} - -# @ECLASS-VARIABLE: GST_ORG_PVP -# @INTERNAL -# @DESCRIPTION: -# Major and minor numbers of the version number. -: ${GST_ORG_PVP:=$(get_version_component_range 1-2)} - - -DESCRIPTION="${BUILD_GST_PLUGINS} plugin for gstreamer" -HOMEPAGE="https://gstreamer.freedesktop.org/" -SRC_URI="https://gstreamer.freedesktop.org/src/${GST_ORG_MODULE}/${GST_ORG_MODULE}-${PV}.tar.${GST_TARBALL_SUFFIX}" - -LICENSE="GPL-2" -case ${GST_ORG_PVP} in - 0.10) SLOT="0.10"; GST_MIN_PV="0.10.36-r2" ;; - 1.*) SLOT="1.0"; GST_MIN_PV="1.2.4-r1" ;; - *) die "Unkown gstreamer release." -esac - -S="${WORKDIR}/${GST_ORG_MODULE}-${PV}" - -RDEPEND=" - >=dev-libs/glib-2.38.2-r1:2[${MULTILIB_USEDEP}] - >=media-libs/gstreamer-${GST_MIN_PV}:${SLOT}[${MULTILIB_USEDEP}] -" -DEPEND=" - >=sys-apps/sed-4 - >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] -" - -# Export common multilib phases. -multilib_src_configure() { gstreamer_multilib_src_configure; } - -if [[ ${PN} != ${GST_ORG_MODULE} ]]; then - # Do not run test phase for invididual plugin ebuilds. - RESTRICT="test" - RDEPEND="${RDEPEND} - >=media-libs/${GST_ORG_MODULE}-${PV}:${SLOT}[${MULTILIB_USEDEP}]" - - # Export multilib phases used for split builds. - multilib_src_compile() { gstreamer_multilib_src_compile; } - multilib_src_install() { gstreamer_multilib_src_install; } - multilib_src_install_all() { gstreamer_multilib_src_install_all; } -else - IUSE="nls" - DEPEND="${DEPEND} nls? ( >=sys-devel/gettext-0.17 )" -fi - -DEPEND="${DEPEND} ${RDEPEND}" - -# @FUNCTION: gstreamer_environment_reset -# @INTERNAL -# @DESCRIPTION: -# Clean up environment for clean builds. -# >=dev-lang/orc-0.4.23 rely on environment variables to find a place to -# allocate files to mmap. -gstreamer_environment_reset() { - xdg_environment_reset -} - -# @FUNCTION: gstreamer_get_plugins -# @INTERNAL -# @DESCRIPTION: -# Get the list of plugins requiring external dependencies. -gstreamer_get_plugins() { - # Must be called from src_prepare/src_configure - GST_PLUGINS_LIST=$(sed -rn 's/^AG_GST_CHECK_FEATURE\((\w+),.*/ \1 /p' \ - "${ECONF_SOURCE:-${S}}"/configure.* | LC_ALL='C' tr '[:upper:]' '[:lower:]') -} - -# @FUNCTION: gstreamer_get_plugin_dir -# @USAGE: gstreamer_get_plugin_dir [] -# @INTERNAL -# @DESCRIPTION: -# Finds plugin build directory and output it. -# Defaults to ${GST_PLUGINS_BUILD_DIR} if argument is not provided -gstreamer_get_plugin_dir() { - local build_dir=${1:-${GST_PLUGINS_BUILD_DIR}} - - if [[ ! -d ${S}/ext/${build_dir} ]]; then - if [[ ! -d ${S}/sys/${build_dir} ]]; then - ewarn "No such plugin directory" - die - fi - einfo "Building system plugin in ${build_dir}..." >&2 - echo sys/${build_dir} - else - einfo "Building external plugin in ${build_dir}..." >&2 - echo ext/${build_dir} - fi -} - -# @FUNCTION: gstreamer_system_link -# @USAGE: gstreamer_system_link gst-libs/gst/audio:gstreamer-audio [...] -# @DESCRIPTION: -# Walks through makefiles in order to make sure build will link against system -# libraries. -# Takes a list of path fragments and corresponding pkgconfig libraries -# separated by colon (:). Will replace the path fragment by the output of -# pkgconfig. -gstreamer_system_link() { - local pdir directory libs pkgconfig pc tuple - pkgconfig=$(tc-getPKG_CONFIG) - - for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do - pdir=$(gstreamer_get_plugin_dir ${plugin_dir}) - - for tuple in $@ ; do - directory=${tuple%:*} - pc=${tuple#*:}-${SLOT} - libs="$(${pkgconfig} --libs-only-l ${pc} || die)" - sed -e "s:\$(top_builddir)/${directory}/.*\.la:${libs}:" \ - -i "${pdir}"/Makefile.{am,in} || die - done - done -} - -# @FUNCTION: gstreamer_multilib_src_configure -# @DESCRIPTION: -# Handles logic common to configuring gstreamer plugins -gstreamer_multilib_src_configure() { - local plugin gst_conf=() ECONF_SOURCE=${ECONF_SOURCE:-${S}} - - gstreamer_get_plugins - gstreamer_environment_reset - - for plugin in ${GST_PLUGINS_LIST} ; do - if has ${plugin} ${GST_PLUGINS_BUILD} ; then - gst_conf+=( --enable-${plugin} ) - else - gst_conf+=( --disable-${plugin} ) - fi - done - - if grep -q "ORC_CHECK" "${ECONF_SOURCE}"/configure.* ; then - if in_iuse orc ; then - gst_conf+=( $(use_enable orc) ) - else - gst_conf+=( --disable-orc ) - fi - fi - - if grep -q "AM_MAINTAINER_MODE" "${ECONF_SOURCE}"/configure.* ; then - gst_conf+=( --disable-maintainer-mode ) - fi - - if grep -q "disable-schemas-compile" "${ECONF_SOURCE}"/configure ; then - gst_conf+=( --disable-schemas-compile ) - fi - - if [[ ${PN} == ${GST_ORG_MODULE} ]]; then - gst_conf+=( $(use_enable nls) ) - fi - - einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..." - econf \ - --with-package-name="Gentoo GStreamer ebuild" \ - --with-package-origin="https://www.gentoo.org" \ - "${gst_conf[@]}" "${@}" -} - -# @FUNCTION: gstreamer_multilib_src_compile -# @DESCRIPTION: -# Compiles requested gstreamer plugin. -gstreamer_multilib_src_compile() { - local plugin_dir - - for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do - emake -C "$(gstreamer_get_plugin_dir ${plugin_dir})" - done -} - -# @FUNCTION: gstreamer_multilib_src_install -# @DESCRIPTION: -# Installs requested gstreamer plugin. -gstreamer_multilib_src_install() { - local plugin_dir - - for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do - emake -C "$(gstreamer_get_plugin_dir ${plugin_dir})" \ - DESTDIR="${D}" install - done -} - -# @FUNCTION: gstreamer_multilib_src_install_all -# @DESCRIPTION: -# Installs documentation for requested gstreamer plugin, and removes .la -# files. -gstreamer_multilib_src_install_all() { - local plugin_dir - - for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do - local dir=$(gstreamer_get_plugin_dir ${plugin_dir}) - [[ -e ${dir}/README ]] && dodoc "${dir}"/README - done - - prune_libtool_files --modules -} diff --git a/sdk_container/src/third_party/portage-stable/eclass/nvidia-driver.eclass b/sdk_container/src/third_party/portage-stable/eclass/nvidia-driver.eclass deleted file mode 100644 index 482c62c012..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/nvidia-driver.eclass +++ /dev/null @@ -1,205 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: nvidia-driver.eclass -# @MAINTAINER: -# Jeroen Roovers -# @AUTHOR: -# Original author: Doug Goldstein -# @BLURB: Provide useful messages for nvidia-drivers based on currently installed Nvidia card -# @DESCRIPTION: -# Provide useful messages for nvidia-drivers based on currently installed Nvidia -# card. It inherits versionator. - -inherit readme.gentoo-r1 versionator - -DEPEND="sys-apps/pciutils" - -# Variables for readme.gentoo.eclass: -DISABLE_AUTOFORMATTING="yes" -DOC_CONTENTS="You must be in the video group to use the NVIDIA device -For more info, read the docs at -https://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6 - -This ebuild installs a kernel module and X driver. Both must -match explicitly in their version. This means, if you restart -X, you must modprobe -r nvidia before starting it back up - -To use the NVIDIA GLX, run \"eselect opengl set nvidia\" - -To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\" - -NVIDIA has requested that any bug reports submitted have the -output of nvidia-bug-report.sh included. -" - -# the data below is derived from -# http://us.download.nvidia.com/XFree86/Linux-x86_64/396.18/README/supportedchips.html - -drv_71xx=" - 0020 0028 0029 002c 002d 00a0 0100 0101 0103 0150 0151 0152 0153 -" - -drv_96xx=" - 0110 0111 0112 0113 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 017a - 017c 017d 0181 0182 0183 0185 0188 018a 018b 018c 01a0 01f0 0200 0201 0202 - 0203 0250 0251 0253 0258 0259 025b 0280 0281 0282 0286 0288 0289 028c -" - -drv_173x=" - 00fa 00fb 00fc 00fd 00fe 0301 0302 0308 0309 0311 0312 0314 031a 031b 031c - 0320 0321 0322 0323 0324 0325 0326 0327 0328 032a 032b 032c 032d 0330 0331 - 0332 0333 0334 0338 033f 0341 0342 0343 0344 0347 0348 034c 034e -" - -drv_304x=" - 0040 0041 0042 0043 0044 0045 0046 0047 0048 004e 0090 0091 0092 0093 0095 - 0098 0099 009d 00c0 00c1 00c2 00c3 00c8 00c9 00cc 00cd 00ce 00f1 00f2 00f3 - 00f4 00f5 00f6 00f8 00f9 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 - 014a 014c 014d 014e 014f 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 - 016a 01d0 01d1 01d2 01d3 01d6 01d7 01d8 01da 01db 01dc 01dd 01de 01df 0211 - 0212 0215 0218 0221 0222 0240 0241 0242 0244 0245 0247 0290 0291 0292 0293 - 0294 0295 0297 0298 0299 029a 029b 029c 029d 029e 029f 02e0 02e1 02e2 02e3 - 02e4 038b 0390 0391 0392 0393 0394 0395 0397 0398 0399 039c 039e 03d0 03d1 - 03d2 03d5 03d6 0531 0533 053a 053b 053e 07e0 07e1 07e2 07e3 07e5 -" - -drv_340x=" - 0191 0193 0194 0197 019d 019e 0400 0401 0402 0403 0404 0405 0406 0407 0408 - 0409 040a 040b 040c 040d 040e 040f 0410 0420 0421 0422 0423 0424 0425 0426 - 0427 0428 0429 042a 042b 042c 042d 042e 042f 05e0 05e1 05e2 05e3 05e6 05e7 - 05e7 05e7 05e7 05e7 05e7 05ea 05eb 05ed 05f8 05f9 05fd 05fe 05ff 0600 0601 - 0602 0603 0604 0605 0606 0607 0608 0609 0609 060a 060b 060c 060d 060f 0610 - 0611 0612 0613 0614 0615 0617 0618 0619 061a 061b 061c 061d 061e 061f 0621 - 0622 0623 0625 0626 0627 0628 062a 062b 062c 062d 062e 062e 0630 0631 0632 - 0635 0637 0638 063a 0640 0641 0643 0644 0645 0646 0647 0648 0649 0649 064a - 064b 064c 0651 0652 0652 0653 0654 0654 0654 0655 0656 0658 0659 065a 065b - 065c 06e0 06e1 06e2 06e3 06e4 06e5 06e6 06e7 06e8 06e8 06e9 06ea 06eb 06ec - 06ef 06f1 06f8 06f9 06f9 06fa 06fb 06fd 06ff 06ff 0840 0844 0845 0846 0847 - 0848 0849 084a 084b 084c 084d 084f 0860 0861 0862 0863 0864 0865 0866 0866 - 0867 0868 0869 086a 086c 086d 086e 086f 0870 0871 0872 0872 0873 0873 0874 - 0876 087a 087d 087e 087f 08a0 08a2 08a3 08a4 08a5 0a20 0a22 0a23 0a26 0a27 - 0a28 0a29 0a2a 0a2b 0a2c 0a2d 0a32 0a34 0a35 0a38 0a3c 0a60 0a62 0a63 0a64 - 0a65 0a66 0a67 0a68 0a69 0a6a 0a6c 0a6e 0a6e 0a6f 0a70 0a70 0a70 0a71 0a72 - 0a73 0a73 0a73 0a74 0a74 0a75 0a75 0a76 0a78 0a7a 0a7a 0a7a 0a7a 0a7a 0a7a - 0a7a 0a7a 0a7a 0a7a 0a7a 0a7c 0ca0 0ca2 0ca3 0ca4 0ca5 0ca7 0ca8 0ca9 0cac - 0caf 0cb0 0cb1 0cbc 10c0 10c3 10c5 10d8 -" - -drv_390x=" - 06c0 06c4 06ca 06cd 06d1 06d2 06d8 06d9 06da 06dc 06dd 06de 06df 0dc0 0dc4 - 0dc5 0dc6 0dcd 0dce 0dd1 0dd2 0dd3 0dd6 0dd8 0dda 0de0 0de1 0de2 0de3 0de4 - 0de5 0de7 0de8 0de9 0dea 0deb 0dec 0ded 0dee 0def 0df0 0df1 0df2 0df3 0df4 - 0df5 0df6 0df7 0df8 0df9 0dfa 0dfc 0e22 0e23 0e24 0e30 0e31 0e3a 0e3b 0f00 - 0f01 0f02 0f03 1040 1042 1048 1049 104a 104b 104c 1050 1051 1052 1054 1055 - 1056 1057 1058 1059 105a 105b 107c 107d 1080 1081 1082 1084 1086 1087 1088 - 1089 108b 1091 1094 1096 109a 109b 1140 1200 1201 1203 1205 1206 1207 1208 - 1210 1211 1212 1213 1241 1243 1244 1245 1246 1247 1248 1249 124b 124d 1251 -" - -mask_71xx=">=x11-drivers/nvidia-drivers-72.0.0" -mask_96xx=">=x11-drivers/nvidia-drivers-97.0.0" -mask_173x=">=x11-drivers/nvidia-drivers-177.0.0" -mask_304x=">=x11-drivers/nvidia-drivers-305.0.0" -mask_340x=">=x11-drivers/nvidia-drivers-341.0.0" -mask_390x=">=x11-drivers/nvidia-drivers-391.0.0" - -# @FUNCTION: nvidia-driver-get-card -# @DESCRIPTION: -# Retrieve the PCI device ID for each Nvidia video card you have -nvidia-driver-get-card() { - local NVIDIA_CARD=$( - [ -x /usr/sbin/lspci ] && /usr/sbin/lspci -d 10de: -n \ - | awk -F'[: ]' '/ 03[0-9][0-9]: /{print $6}' - ) - - if [ -n "${NVIDIA_CARD}" ]; then - echo "${NVIDIA_CARD}" - else - echo 0000 - fi -} - -nvidia-driver-get-mask() { - local NVIDIA_CARDS="$(nvidia-driver-get-card)" - local card drv - - for card in ${NVIDIA_CARDS}; do - for drv in ${drv_71xx}; do - if [ "x${card}" = "x${drv}" ]; then - echo "${mask_71xx}" - return 0 - fi - done - - for drv in ${drv_96xx}; do - if [ "x${card}" = "x${drv}" ]; then - echo "${mask_96xx}" - return 0 - fi - done - - for drv in ${drv_173x}; do - if [ "x${card}" = "x${drv}" ]; then - echo "${mask_173x}" - return 0 - fi - done - - for drv in ${drv_304x}; do - if [ "x${card}" = "x${drv}" ]; then - echo "${mask_304x}" - return 0 - fi - done - - for drv in ${drv_340x}; do - if [ "x${card}" = "x${drv}" ]; then - echo "${mask_340x}" - return 0 - fi - done - - for drv in ${drv_390x}; do - if [ "x${card}" = "x${drv}" ]; then - echo "${mask_390x}" - return 0 - fi - done - done - - echo '' - return 1 -} - -# @FUNCTION: nvidia-driver-check-warning -# @DESCRIPTION: -# Prints out a warning if the driver does not work w/ the installed video card -nvidia-driver-check-warning() { - local NVIDIA_MASK="$(nvidia-driver-get-mask)" - - if [ -n "${NVIDIA_MASK}" ]; then - version_compare "${NVIDIA_MASK##*-}" "${PV}" - if [ x"${?}" = x1 ]; then - ewarn "***** WARNING *****" - ewarn - ewarn "You are currently installing a version of nvidia-drivers that is" - ewarn "known not to work with a video card you have installed on your" - ewarn "system. If this is intentional, please ignore this. If it is not" - ewarn "please perform the following steps:" - ewarn - ewarn "Add the following mask entry to /etc/portage/package.mask by" - if [ -d "${ROOT}/etc/portage/package.mask" ]; then - ewarn "echo \"${NVIDIA_MASK}\" > /etc/portage/package.mask/nvidia-drivers" - else - ewarn "echo \"${NVIDIA_MASK}\" >> /etc/portage/package.mask" - fi - ewarn - ewarn "Failure to perform the steps above could result in a non-working" - ewarn "X setup." - ewarn - ewarn "For more information please read:" - ewarn "http://www.nvidia.com/object/IO_32667.html" - fi - fi -} diff --git a/sdk_container/src/third_party/portage-stable/eclass/perl-app.eclass b/sdk_container/src/third_party/portage-stable/eclass/perl-app.eclass deleted file mode 100644 index 6b762dd83b..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/perl-app.eclass +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# Author: Michael Cummings -# Maintained by the Perl herd -# @SUPPORTED_EAPIS: 5 - -# If the ebuild doesn't override this, ensure we do not depend on the perl subslot value -: ${GENTOO_DEPEND_ON_PERL_SUBSLOT:="no"} -inherit perl-module - -case "${EAPI:-0}" in - 5) - ;; - 6) - die "EAPI=${EAPI} is not supported by perl-app.eclass. Please use perl-module.eclass instead." - ;; - *) - die "EAPI=${EAPI} is not supported by perl-app.eclass" - ;; -esac - -# @FUNCTION: perl-app_src_prep -# @USAGE: perl-app_src_prep -# @DESCRIPTION: -# This is a wrapper function to perl-app_src_configure(). -perl-app_src_prep() { - perl-app_src_configure -} - -# @FUNCTION: perl-app_src_configure -# @USAGE: perl-app_src_configure -# @DESCRIPTION: -# This is a wrapper function to perl-module_src_configure(). -perl-app_src_configure() { - perl-module_src_configure -} - -# @FUNCTION: perl-app_src_compile -# @USAGE: perl-app_src_compile -# @DESCRIPTION: -# This is a wrapper function to perl-module_src_compile(). -perl-app_src_compile() { - has "${EAPI:-0}" 0 1 && perl-app_src_prep - perl-module_src_compile -} diff --git a/sdk_container/src/third_party/portage-stable/eclass/texlive-common.eclass b/sdk_container/src/third_party/portage-stable/eclass/texlive-common.eclass deleted file mode 100644 index 4b357897f1..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/texlive-common.eclass +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: texlive-common.eclass -# @MAINTAINER: -# tex@gentoo.org -# @AUTHOR: -# Original Author: Alexis Ballier -# @SUPPORTED_EAPIS: 3 4 5 6 7 -# @BLURB: Provide various functions used by both texlive-core and texlive modules -# @DESCRIPTION: -# Purpose: Provide various functions used by both texlive-core and texlive -# modules. -# -# Note that this eclass *must* not assume the presence of any standard tex tool - -case "${EAPI:-0}" in - 0|1|2) - die "EAPI='${EAPI}' is not supported anymore" - ;; - *) - ;; -esac - -TEXMF_PATH=/usr/share/texmf -TEXMF_DIST_PATH=/usr/share/texmf-dist -TEXMF_VAR_PATH=/var/lib/texmf - -# @FUNCTION: texlive-common_handle_config_files -# @DESCRIPTION: -# Has to be called in src_install after having installed the files in ${D} -# This function will move the relevant files to /etc/texmf and symling them -# from their original location. This is to allow easy update of texlive's -# configuration - -texlive-common_handle_config_files() { - # Handle config files properly - [ -d "${ED}${TEXMF_PATH}" ] || return - cd "${ED}${TEXMF_PATH}" - for f in $(find . -name '*.cnf' -type f -o -name '*.cfg' -type f | sed -e "s:\./::g") ; do - if [ "${f#*config}" != "${f}" -o "${f#doc}" != "${f}" -o "${f#source}" != "${f}" -o "${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." - dosym /etc/texmf/$(dirname ${f}).d/$(basename ${f}) ${TEXMF_PATH}/${f} - done -} - -# @FUNCTION: texlive-common_is_file_present_in_texmf -# @DESCRIPTION: -# Return if a file is present in the texmf tree -# Call it from the directory containing texmf and texmf-dist - -texlive-common_is_file_present_in_texmf() { - local mark="${T}/$1.found" - [ -d texmf ] && find texmf -name $1 -exec touch "${mark}" \; - [ -d texmf-dist ] && find texmf-dist -name $1 -exec touch "${mark}" \; - [ -f "${mark}" ] -} - -# @FUNCTION: texlive-common_do_symlinks -# @USAGE: < src > < dest > -# @DESCRIPTION: -# Mimic the install_link function of texlinks -# -# Should have the same behavior as the one in /usr/bin/texlinks -# except that it is under the control of the package manager -# Note that $1 corresponds to $src and $2 to $dest in this function -# ( Arguments are switched because texlinks main function sends them switched ) -# This function should not be called from an ebuild, prefer etexlinks that will -# also do the fmtutil file parsing. - -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" - elif [ -e "${ED}/usr/bin/$1" -o -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 - ;; - esac - shift; shift; - done -} - -# @FUNCTION: etexlinks -# @USAGE: < file > -# @DESCRIPTION: -# Mimic texlinks on a fmtutil format file -# -# $1 has to be a fmtutil format file like fmtutil.cnf -# etexlinks foo will install the symlinks that texlinks --cnffile foo would have -# created. We cannot use texlinks with portage as it is not DESTDIR aware. -# (It would not fail but will not create the symlinks if the target is not in -# the same dir as the source) -# Also, as this eclass must not depend on a tex distribution to be installed we -# cannot use texlinks from here. - -etexlinks() { - # Install symlinks from formats to engines - texlive-common_do_symlinks $(sed '/^[ ]*#/d; /^[ ]*$/d' "$1" | awk '{print $1, $2}') -} - -# @FUNCTION: dobin_texmf_scripts -# @USAGE: < file1 file2 ... > -# @DESCRIPTION: -# Symlinks a script from the texmf tree to /usr/bin. Requires permissions to be -# correctly set for the file that it will point to. - -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} || die "failed to install ${1} as $trg" - shift - done -} - -# @FUNCTION: etexmf-update -# @USAGE: In ebuilds' pkg_postinst and pkg_postrm phases -# @DESCRIPTION: -# Runs texmf-update if it is available and prints a warning otherwise. This -# function helps in factorizing some code. - -etexmf-update() { - if has_version 'app-text/texlive-core' ; then - if [ "$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 -} - -# @FUNCTION: efmtutil-sys -# @USAGE: In ebuilds' pkg_postinst to force a rebuild of TeX formats. -# @DESCRIPTION: -# Runs fmtutil-sys if it is available and prints a warning otherwise. This -# function helps in factorizing some code. - -efmtutil-sys() { - if has_version 'app-text/texlive-core' ; then - if [ "$ROOT" = "/" ] && [ -x "${EPREFIX}"/usr/bin/fmtutil-sys ] ; then - einfo "Rebuilding formats" - "${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null - 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 -} diff --git a/sdk_container/src/third_party/portage-stable/eclass/texlive-module.eclass b/sdk_container/src/third_party/portage-stable/eclass/texlive-module.eclass deleted file mode 100644 index 2b9fac4da1..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/texlive-module.eclass +++ /dev/null @@ -1,428 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: texlive-module.eclass -# @MAINTAINER: -# tex@gentoo.org -# @AUTHOR: -# Original Author: Alexis Ballier -# @SUPPORTED_EAPIS: 3 4 5 6 7 -# @BLURB: Provide generic install functions so that modular texlive's texmf ebuild will only have to inherit this eclass -# @DESCRIPTION: -# Purpose: Provide generic install functions so that modular texlive's texmf ebuilds will -# only have to inherit this eclass. -# Ebuilds have to provide TEXLIVE_MODULE_CONTENTS variable that contains the list -# of packages that it will install. (See below) -# -# For TeX Live versions prior to 2009, the ebuild was supposed to unpack the -# texmf and texmf-dist directories to ${WORKDIR} (which is what the default -# src_unpack does). -# Starting from TeX Live 2009, the eclass provides a src_unpack function taking -# care of unpacking and relocating the files that need it. -# -# It inherits texlive-common. Patching is supported via the PATCHES -# bash array. - -# @ECLASS-VARIABLE: TEXLIVE_MODULE_CONTENTS -# @DESCRIPTION: -# The list of packages that will be installed. This variable will be expanded to -# SRC_URI: -# foo -> texlive-module-foo-${PV}.tar.xz - -# @ECLASS-VARIABLE: TEXLIVE_MODULE_DOC_CONTENTS -# @DESCRIPTION: -# The list of packages that will be installed if the doc useflag is enabled. -# Expansion to SRC_URI is the same as for TEXLIVE_MODULE_CONTENTS. - -# @ECLASS-VARIABLE: TEXLIVE_MODULE_SRC_CONTENTS -# @DESCRIPTION: -# The list of packages that will be installed if the source useflag is enabled. -# Expansion to SRC_URI is the same as for TEXLIVE_MODULE_CONTENTS. - -# @ECLASS-VARIABLE: TEXLIVE_MODULE_BINSCRIPTS -# @DESCRIPTION: -# A space separated list of files that are in fact scripts installed in the -# texmf tree and that we want to be available directly. They will be installed in -# /usr/bin. - -# @ECLASS-VARIABLE: TEXLIVE_MODULE_BINLINKS -# @DESCRIPTION: -# A space separated list of links to add for BINSCRIPTS. -# The systax is: foo:bar to create a symlink bar -> foo. - -# @ECLASS-VARIABLE: TL_PV -# @DESCRIPTION: -# Normally the module's PV reflects the TeXLive release it belongs to. -# If this is not the case, TL_PV takes the version number for the -# needed app-text/texlive-core. - -# @ECLASS-VARIABLE: TL_MODULE_INFORMATION -# @DESCRIPTION: -# Information to display about the package. -# e.g. for enabling/disabling a feature - -# @ECLASS-VARIABLE: PATCHES -# @DESCRIPTION: -# Array variable specifying any patches to be applied. - -case "${EAPI:-0}" in - 0|1|2) - die "EAPI='${EAPI}' is not supported anymore" - ;; - 3|4|5) - inherit texlive-common eutils - ;; - *) - inherit texlive-common - ;; -esac - -HOMEPAGE="http://www.tug.org/texlive/" - -COMMON_DEPEND=">=app-text/texlive-core-${TL_PV:-${PV}}" - -IUSE="source" - -# Starting from TeX Live 2009, upstream provides .tar.xz modules. -PKGEXT=tar.xz -case "${EAPI:-0}" in - 0|1|2|3|4|5|6) - DEPEND="${COMMON_DEPEND} - app-arch/xz-utils" - ;; - *) - # We do not need anything from SYSROOT: - # Everything is built from the texlive install in / - # Generated files are noarch - BDEPEND="${COMMON_DEPEND} - app-arch/xz-utils" - ;; -esac - -for i in ${TEXLIVE_MODULE_CONTENTS}; do - SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.${PKGEXT}" -done - -# Forge doc SRC_URI -[ -n "${TEXLIVE_MODULE_DOC_CONTENTS}" ] && SRC_URI="${SRC_URI} doc? (" -for i in ${TEXLIVE_MODULE_DOC_CONTENTS}; do - SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.${PKGEXT}" -done -[ -n "${TEXLIVE_MODULE_DOC_CONTENTS}" ] && SRC_URI="${SRC_URI} )" - -# Forge source SRC_URI -if [ -n "${TEXLIVE_MODULE_SRC_CONTENTS}" ] ; then - SRC_URI="${SRC_URI} source? (" - for i in ${TEXLIVE_MODULE_SRC_CONTENTS}; do - SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.${PKGEXT}" - done - SRC_URI="${SRC_URI} )" -fi - -RDEPEND="${COMMON_DEPEND}" - -IUSE="${IUSE} doc" - -# @ECLASS-VARIABLE: TEXLIVE_MODULE_OPTIONAL_ENGINE -# @DESCRIPTION: -# A space separated list of Tex engines that can be made optional. -# e.g. "luatex luajittex" - -if [ -n "${TEXLIVE_MODULE_OPTIONAL_ENGINE}" ] ; then - for engine in ${TEXLIVE_MODULE_OPTIONAL_ENGINE} ; do - IUSE="${IUSE} +${engine}" - done -fi - -S="${WORKDIR}" - -# @FUNCTION: texlive-module_src_unpack -# @DESCRIPTION: -# Only for TeX Live 2009 and later. -# After unpacking, the files that need to be relocated are moved accordingly. - -RELOC_TARGET=texmf-dist - -texlive-module_src_unpack() { - unpack ${A} - - grep RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist" - { for i in $(<"${T}/reloclist"); do dirname $i; done; } | uniq > "${T}/dirlist" - for i in $(<"${T}/dirlist"); do - [ -d "${RELOC_TARGET}/${i}" ] || mkdir -p "${RELOC_TARGET}/${i}" - done - for i in $(<"${T}/reloclist"); do - mv "${i}" "${RELOC_TARGET}"/$(dirname "${i}") || die "failed to relocate ${i} to ${RELOC_TARGET}/$(dirname ${i})" - done -} - -# @FUNCTION: texlive-module_src_prepare -# @DESCRIPTION: -# Apply patches from the PATCHES array and user patches, if any. - -texlive-module_src_prepare() { - case "${EAPI:-0}" in - 0|1|2|3|4|5) - [[ ${#PATCHES[@]} -gt 0 ]] && epatch "${PATCHES[@]}" - epatch_user - ;; - *) - die "texlive-module_src_prepare is not to be used in EAPI ${EAPI}" - ;; - esac -} - -# @FUNCTION: texlive-module_add_format -# @DESCRIPTION: -# Creates/appends to a format.${PN}.cnf file for fmtutil. -# It parses the AddFormat directive of tlpobj files to create it. -# This will make fmtutil generate the formats when asked and allow the remaining -# src_compile phase to build the formats. - -texlive-module_add_format() { - local name engine mode patterns options - eval $@ - einfo "Appending to format.${PN}.cnf for $@" - [ -d texmf-dist/fmtutil ] || mkdir -p texmf-dist/fmtutil - [ -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 - fi - [ -z "${patterns}" ] && patterns="-" - printf "${name}\t${engine}\t${patterns}\t${options}\n" >> texmf-dist/fmtutil/format.${PN}.cnf -} - -# @FUNCTION: texlive-module_make_language_def_lines -# @DESCRIPTION: -# Creates a language.${PN}.def entry to put in /etc/texmf/language.def.d. -# It parses the AddHyphen directive of tlpobj files to create it. - -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" - 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" - done - fi -} - -# @FUNCTION: texlive-module_make_language_dat_lines -# @DESCRIPTION: -# Creates a language.${PN}.dat entry to put in /etc/texmf/language.dat.d. -# It parses the AddHyphen directive of tlpobj files to create it. - -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" - if [ -n "$synonyms" ] ; then - for i in $(echo $synonyms | tr ',' ' ') ; do - einfo "Generating language.dat synonym $i for $@" - echo "=$i" >> "${S}/language.${PN}.dat" - done - fi -} - -# @FUNCTION: texlive-module_synonyms_to_language_lua_line -# @DESCRIPTION: -# Helper function for texlive-module_make_language_lua_lines to generate a -# correctly formatted synonyms entry for language.dat.lua. - -texlive-module_synonyms_to_language_lua_line() { - local prev="" - for i in $(echo $@ | tr ',' ' ') ; do - printf "${prev} '%s'" $i - prev="," - done -} - -# @FUNCTION: texlive-module_make_language_lua_lines -# @DESCRIPTION: -# Only valid for TeXLive 2010 and later. -# Creates a language.${PN}.dat.lua entry to put in -# /etc/texmf/language.dat.lua.d. -# It parses the AddHyphen directive of tlpobj files to create it. - -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" - printf "\t\tloader = '%s',\n" "$file" >> "$dest" - printf "\t\tlefthyphenmin = %s,\n\t\trighthyphenmin = %s,\n" "$lefthyphenmin" "$righthyphenmin" >> "$dest" - printf "\t\tsynonyms = {%s },\n" "$(texlive-module_synonyms_to_language_lua_line "$synonyms")" >> "$dest" - [ -n "$file_patterns" ] && printf "\t\tpatterns = '%s',\n" "$file_patterns" >> "$dest" - [ -n "$file_exceptions" ] && printf "\t\thyphenation = '%s',\n" "$file_exceptions" >> "$dest" - [ -n "$luaspecial" ] && printf "\t\tspecial = '%s',\n" "$luaspecial" >> "$dest" - printf "\t},\n" >> "$dest" -} - -# @FUNCTION: texlive-module_src_compile -# @DESCRIPTION: -# exported function: -# Generates the config files that are to be installed in /etc/texmf; -# texmf-update script will take care of merging the different config files for -# different packages in a single one used by the whole tex installation. -# -# Once the config files are generated, we build the format files using fmtutil -# (provided by texlive-core). The compiled format files will be sent to -# texmf-var/web2c, like fmtutil defaults to but with some trick to stay in the -# sandbox. - -texlive-module_src_compile() { - # Generate config files from the tlpobj files provided by TeX Live 2008 and - # later - for i in "${S}"/tlpkg/tlpobj/*; - do - grep '^execute ' "${i}" | sed -e 's/^execute //' | tr ' \t' '##' >> "${T}/jobs" - 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 proccess ${command}. Please file a bug." - esac - done - - # Build format files - for i in texmf-dist/fmtutil/format*.cnf; do - if [ -f "${i}" ]; then - einfo "Building format ${i}" - [ -d texmf-var ] || mkdir texmf-var - [ -d texmf-var/web2c ] || mkdir texmf-var/web2c - VARTEXFONTS="${T}/fonts" TEXMFHOME="${S}/texmf:${S}/texmf-dist:${S}/texmf-var"\ - env -u TEXINPUTS fmtutil --cnffile "${i}" --fmtdir "${S}/texmf-var/web2c" --all\ - || die "failed to build format ${i}" - fi - done - - # Delete ls-R files, these should not be created but better be certain they - # do not end up being installed. - find . -name 'ls-R' -delete -} - -# @FUNCTION: texlive-module_src_install -# @DESCRIPTION: -# exported function: -# Installs texmf and config files to the system. - -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 - [ -d texmf-doc ] && cp -pR texmf-doc "${ED}/usr/share/" - else - [ -d texmf/doc ] && rm -rf texmf/doc - [ -d texmf-dist/doc ] && rm -rf texmf-dist/doc - fi - - [ -d texmf ] && cp -pR texmf "${ED}/usr/share/" - [ -d texmf-dist ] && cp -pR texmf-dist "${ED}/usr/share/" - [ -d tlpkg ] && use source && cp -pR tlpkg "${ED}/usr/share/" - - insinto /var/lib/texmf - [ -d texmf-var ] && doins -r texmf-var/* - - 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 -} - -# @FUNCTION: texlive-module_pkg_postinst -# @DESCRIPTION: -# exported function: -# Run texmf-update to ensure the tex installation is consistent with the -# installed texmf trees. - -texlive-module_pkg_postinst() { - etexmf-update - [ -n "${TL_MODULE_INFORMATION}" ] && elog "${TL_MODULE_INFORMATION}" -} - -# @FUNCTION: texlive-module_pkg_postrm -# @DESCRIPTION: -# exported function: -# Run texmf-update to ensure the tex installation is consistent with the -# installed texmf trees. - -texlive-module_pkg_postrm() { - etexmf-update -} - -case "${EAPI:-0}" in - 0|1|2|3|4|5) - EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install \ - pkg_postinst pkg_postrm - ;; - *) - EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm - ;; -esac