From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-eselect/eselect-pdftex/Manifest | 5 + .../eselect-pdftex/eselect-pdftex-0.3.ebuild | 28 ++++ .../eselect-pdftex/files/pdftex.eselect-0.3 | 147 +++++++++++++++++++++ app-eselect/eselect-pdftex/metadata.xml | 8 ++ 4 files changed, 188 insertions(+) create mode 100644 app-eselect/eselect-pdftex/Manifest create mode 100644 app-eselect/eselect-pdftex/eselect-pdftex-0.3.ebuild create mode 100644 app-eselect/eselect-pdftex/files/pdftex.eselect-0.3 create mode 100644 app-eselect/eselect-pdftex/metadata.xml (limited to 'app-eselect/eselect-pdftex') diff --git a/app-eselect/eselect-pdftex/Manifest b/app-eselect/eselect-pdftex/Manifest new file mode 100644 index 000000000000..3eb4ed90e49f --- /dev/null +++ b/app-eselect/eselect-pdftex/Manifest @@ -0,0 +1,5 @@ +AUX pdftex.eselect-0.3 3756 SHA256 10494d4602172a4db5e403b3478c743110666e03b6a1a18c9e7bbb328783a138 SHA512 6821ae3dda5fdc35f9d8a41e789870e38c525cfafba0079fa912048a74b873236382367e5752ef3e7115799a9bd22e2b2147a5d778e5a2b688d86e550d534b2d WHIRLPOOL 92c642d55f98d4d88928e75c6198d63bb03b22a65ba66577d7d7e516ce9837dd6b8387cb62ee579703b4ea23a391d1925d733b7bd7f649c8e0db7c34df8b16c7 +EBUILD eselect-pdftex-0.3.ebuild 744 SHA256 6e7092f3a5a918206ea6112fee60fcd193c7c0c0da2189dcb2ea8abe1a4fe1e7 SHA512 5bdca7a604c6dcecc8aee65dc06f879b58cac5f320aa6cabb51385ed2bfdde24ed62df0278d6ddb707a935849fa2f462b190310c41cf61511cdd50edb7f30590 WHIRLPOOL c014196fe85b91c11d5a2a14c7b1df1f0a8d76479106555a7c0b3edfc1171bd93a80340d608668af80634d07b5222e6680d2b5fe1a91f1095498bfb3cf43613b +MISC ChangeLog 2503 SHA256 38decb987b878aba64e8915deb08b138e0553166b6da38b2ecf2d037233bd1ea SHA512 72ba1a00ce53fad96a9a8ac0639569216eb87cc793516825033b2d0f865fe72b3a40459f003aa1e7208dc6877903b3d60cd6b7ca4303981faf65b5c3a4bafc33 WHIRLPOOL 0640e96a248a2b49896840e1d6f66500dd3a4e19605a3bce3bc428f5cc8c264d715450fa1264370d0cfaed2b6c4dc812fd52f1d96c9718b3a1b1ce4ec40cdd97 +MISC ChangeLog-2015 3003 SHA256 a10b8709d3d3671a302359aa5a42b7b2262dab6aff90af1cfb45a49288a51fcc SHA512 de66d32048528213d807857c40bc0346f40ea5ac537b1f923d89e04ff0c46a8a22caef7e50d7b6543fdf32e1c27f47ed216e707e96de8110233d29ee33a14419 WHIRLPOOL 1167981e9254c2ff99f23f4606e74cb328b8de6470197b9e8d19bb5dae6a1f13aaf3a45eee0ddfd839efb9bb01d51cd8a8417eebc6b8b3927bdaf2c00bde52a9 +MISC metadata.xml 245 SHA256 b3de478821488be2cdc91b078e21c911dc384af882c5c44631a47dfa91516dc8 SHA512 1653777623e2c15e1ce13229e396723b2cc9c214983e0f8592de98c01a31badc6c38c6735ed44f937d145883b43fb6f049af3eddb9ff96b18c96ccf8f67dd690 WHIRLPOOL 701a78fc2214f5fd4bd781477f85e87e716b8d76ea831a0fa4afc8871c4286cc363679f1ff4f844555ad4f77cc7265208b83e805f56c22fc4baeed1062280c08 diff --git a/app-eselect/eselect-pdftex/eselect-pdftex-0.3.ebuild b/app-eselect/eselect-pdftex/eselect-pdftex-0.3.ebuild new file mode 100644 index 000000000000..93fcbc816cef --- /dev/null +++ b/app-eselect/eselect-pdftex/eselect-pdftex-0.3.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit eutils + +DESCRIPTION="pdftex module for eselect" +HOMEPAGE="https://www.gentoo.org/proj/en/eselect/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~ppc ~ppc64 s390 sh sparc x86 ~x86-fbsd" +IUSE="" + +DEPEND="" +# Depend on texlive-core-2008 that allows usage of this module, otherwise it +# will not work so nicely. +RDEPEND=">=app-admin/eselect-1.2.3 + >=app-text/texlive-core-2008" + +src_install() { + local MODULEDIR="/usr/share/eselect/modules" + local MODULE="pdftex" + dodir ${MODULEDIR} + insinto ${MODULEDIR} + newins "${FILESDIR}/${MODULE}.eselect-${PVR}" ${MODULE}.eselect \ + || die "failed to install" +} diff --git a/app-eselect/eselect-pdftex/files/pdftex.eselect-0.3 b/app-eselect/eselect-pdftex/files/pdftex.eselect-0.3 new file mode 100644 index 000000000000..f382c8f876bf --- /dev/null +++ b/app-eselect/eselect-pdftex/files/pdftex.eselect-0.3 @@ -0,0 +1,147 @@ +# -*-eselect-*- vim: ft=eselect +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +DESCRIPTION="Manage /usr/bin/pdftex implementations" +MAINTAINER="tex@gentoo.org" +SVN_DATE='$Date: 2015/03/31 16:53:36 $' +VERSION=$(svn_date_to_version "${SVN_DATE}" ) + +# find a list of pdftex symlink targets, best first +find_targets() { + local f + for f in "${ROOT}"/usr/bin/pdftex-*; do + if [[ -f ${f} ]] ; then + echo "${f##*/pdftex-}" + fi + done | sort +} + +# find version number of currently symlinked version +identify_target() { + local f + f="$(canonicalise "${ROOT}"/usr/bin/pdftex)" + echo "${f##*/pdftex-}" +} + +# try to remove the pdftex symlink +remove_symlinks() { + rm -f "${ROOT}"/usr/bin/pdftex &>/dev/null +} + +# set the pdftex symlink +set_symlinks() { + local target="${1}" targets + if is_number "${target}" && [[ ${target} -ge 1 ]] ; then + targets=( $(find_targets ) ) + target=${targets[$(( ${target} - 1 ))]} + fi + if [[ -f "${ROOT}/usr/bin/pdftex-${target}" ]] ; then + remove_symlinks + ln -s "pdftex-${target}" "${ROOT}/usr/bin/pdftex" || \ + die "Could not set ${target} /usr/bin/pdftex symlink" + echo "Updating TeX formats" + "${ROOT}"/usr/bin/fmtutil-sys --all &>/dev/null || write_warning_msg "Could not update TeX formats for some reason, pdftex may not work properly." + else + die -q "Target \"${target}\" doesn't appear to be valid!" + fi +} + +### show action ### + +describe_show() { + echo "Show the current pdftex version" +} + +do_show() { + [[ -z "${@}" ]] || die -q "Too many parameters" + + write_list_start "Current pdftex verson:" + if [[ -L "${ROOT}/usr/bin/pdftex" ]] ; then + write_kv_list_entry "$(identify_target)" "" + elif [[ -e "${ROOT}/usr/bin/pdftex" ]] ; then + write_kv_list_entry "(not a symlink)" "" + else + write_kv_list_entry "(unset)" "" + fi +} + +### list action ### + +describe_list() { + echo "List available pdftex versions" +} + +do_list() { + [[ -z "${@}" ]] || die -q "Too many parameters" + + local i targets current + targets=( $(find_targets ) ) + current=$(identify_target) + for (( i = 0; i < ${#targets[@]}; i++ )); do + [[ ${targets[i]} = ${current} ]] \ + && targets[i]=$(highlight_marker "${targets[i]}") + done + write_list_start "Available pdftex versions:" + write_numbered_list -m "(none found)" "${targets[@]}" +} + +### set action ### + +describe_set() { + echo "Set a new pdftex version" +} + +describe_set_options() { + echo "target : Target version number or index from 'list' action" +} + +describe_set_parameters() { + echo "" +} + +do_set() { + if [[ -z "${1}" ]] ; then + die -q "You didn't give me a version number" + + elif [[ -n "${2}" ]] ; then + die -q "Too many parameters" + + elif [[ -L "${ROOT}/usr/bin/pdftex" ]] ; then + if ! remove_symlinks ; then + die -q "Can't remove existing version symlink" + elif ! set_symlinks "${1}" ; then + die -q "Can't set new version" + fi + + elif [[ -e "${ROOT}/usr/bin/pdftex" ]] ; then + die -q "${ROOT}/usr/bin/pdftex seems to be from an old ebuild, please remove manually" + else + set_symlinks "${1}" || die -q "Can't set new version" + fi +} + +### update action ### + +describe_update() { + echo "Automatically update the pdftex version number" +} + +describe_update_options() { + echo "--if-unset : Do not override currently selected version" +} + +do_update() { + [[ -z "${1}" ]] || ( [[ -z "${2}" ]] && [[ "${1}" == "--if-unset" ]] ) || \ + die -q "Usage error" + + if [[ -L "${ROOT}/usr/bin/pdftex" ]] ; then + [[ ${1} == "--if-unset" ]] && return + remove_symlinks || die -q "Can't remove existing symlink" + fi + if [[ -e "${ROOT}/usr/bin/pdftex" ]] ; then + die -q "${ROOT}/usr/bin/pdftex seems to be from an old ebuild, please remove manually" + elif ! [[ -z $(find_targets ) ]] ; then + set_symlinks 1 || die -q "Can't set a new version" + fi +} diff --git a/app-eselect/eselect-pdftex/metadata.xml b/app-eselect/eselect-pdftex/metadata.xml new file mode 100644 index 000000000000..13170c3184d8 --- /dev/null +++ b/app-eselect/eselect-pdftex/metadata.xml @@ -0,0 +1,8 @@ + + + + + tex@gentoo.org + Gentoo TeX Project + + -- cgit v1.2.3