diff options
author | Ulrich Müller <ulm@gentoo.org> | 2015-03-31 16:51:56 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2015-03-31 16:51:56 +0000 |
commit | 0736de3abf301979dce71155280e855df4a5b9d8 (patch) | |
tree | cde6324c6f57595f4a8156190cadab8c724ecc25 /app-eselect/eselect-mpost | |
parent | Move package from app-admin to app-eselect category. (diff) | |
download | gentoo-2-0736de3abf301979dce71155280e855df4a5b9d8.tar.gz gentoo-2-0736de3abf301979dce71155280e855df4a5b9d8.tar.bz2 gentoo-2-0736de3abf301979dce71155280e855df4a5b9d8.zip |
Move package from app-admin to app-eselect category.
(Portage version: 2.2.18/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 9433907D693FB5B8!)
Diffstat (limited to 'app-eselect/eselect-mpost')
-rw-r--r-- | app-eselect/eselect-mpost/ChangeLog | 82 | ||||
-rw-r--r-- | app-eselect/eselect-mpost/eselect-mpost-0.1.ebuild | 28 | ||||
-rw-r--r-- | app-eselect/eselect-mpost/eselect-mpost-0.2.ebuild | 29 | ||||
-rw-r--r-- | app-eselect/eselect-mpost/eselect-mpost-0.3.ebuild | 29 | ||||
-rw-r--r-- | app-eselect/eselect-mpost/files/mpost.eselect-0.1 | 153 | ||||
-rw-r--r-- | app-eselect/eselect-mpost/files/mpost.eselect-0.2 | 148 | ||||
-rw-r--r-- | app-eselect/eselect-mpost/files/mpost.eselect-0.3 | 148 | ||||
-rw-r--r-- | app-eselect/eselect-mpost/metadata.xml | 5 |
8 files changed, 622 insertions, 0 deletions
diff --git a/app-eselect/eselect-mpost/ChangeLog b/app-eselect/eselect-mpost/ChangeLog new file mode 100644 index 000000000000..9acb59add6bf --- /dev/null +++ b/app-eselect/eselect-mpost/ChangeLog @@ -0,0 +1,82 @@ +# ChangeLog for app-eselect/eselect-mpost +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-mpost/ChangeLog,v 1.1 2015/03/31 16:51:56 ulm Exp $ + + 31 Mar 2015; Ulrich Müller <ulm@gentoo.org> +eselect-mpost-0.1.ebuild, + +eselect-mpost-0.2.ebuild, +eselect-mpost-0.3.ebuild, + +files/mpost.eselect-0.1, +files/mpost.eselect-0.2, +files/mpost.eselect-0.3, + +metadata.xml: + Move package from app-admin to app-eselect category. + + 01 Jan 2012; Raúl Porcel <armin76@gentoo.org> eselect-mpost-0.3.ebuild: + alpha/ia64/s390/sh/sparc stable wrt #393879 + + 21 Dec 2011; Markus Meier <maekke@gentoo.org> eselect-mpost-0.3.ebuild: + arm stable, bug #393879 + + 21 Dec 2011; Pawel Hajdan jr <phajdan.jr@gentoo.org> + eselect-mpost-0.3.ebuild: + x86 stable wrt bug #393879 + + 20 Dec 2011; Jeroen Roovers <jer@gentoo.org> eselect-mpost-0.3.ebuild: + Stable for HPPA (bug #393879). + + 17 Dec 2011; Agostino Sarubbo <ago@gentoo.org> eselect-mpost-0.3.ebuild: + Stable for AMD64, wrt bug #393879 + +*eselect-mpost-0.3 (09 Jan 2011) + + 09 Jan 2011; Alexis Ballier <aballier@gentoo.org> +files/mpost.eselect-0.3, + +eselect-mpost-0.3.ebuild: + Handle better the fmtutil-sys call and fix a typo + +*eselect-mpost-0.2 (06 Nov 2009) + + 06 Nov 2009; Ulrich Mueller <ulm@gentoo.org> +files/mpost.eselect-0.2, + +eselect-mpost-0.2.ebuild: + Version bump, bug 292107. + + 18 Mar 2009; Raúl Porcel <armin76@gentoo.org> eselect-mpost-0.1.ebuild: + alpha/arm/ia64/s390/sh stable wrt #253551 + + 11 Mar 2009; Markus Meier <maekke@gentoo.org> eselect-mpost-0.1.ebuild: + amd64 stable, bug #253551 + + 10 Mar 2009; Raúl Porcel <armin76@gentoo.org> eselect-mpost-0.1.ebuild: + Add ~arm/~s390/~sh + + 07 Mar 2009; Christian Faulhammer <fauli@gentoo.org> + eselect-mpost-0.1.ebuild: + x86 stable, bug 253551 + + 06 Mar 2009; Jeroen Roovers <jer@gentoo.org> eselect-mpost-0.1.ebuild: + Straight to stable for HPPA (bug #253551). + + 27 Feb 2009; Ferris McCormick <fmccor@gentoo.org> + eselect-mpost-0.1.ebuild: + Sparc stable, part of Bug #253551. + + 04 Oct 2008; Brent Baude <ranger@gentoo.org> eselect-mpost-0.1.ebuild: + Marking eselect-mpost-0.1 ~ppc for bug 237202 + + 26 Sep 2008; Alexis Ballier <aballier@gentoo.org> + eselect-mpost-0.1.ebuild: + keyword ~ppc64, working fine on a PowerMac 970 + + 24 Sep 2008; Raúl Porcel <armin76@gentoo.org> eselect-mpost-0.1.ebuild: + Add ~alpha/~ia64 wrt #237202 + + 11 Sep 2008; Markus Meier <maekke@gentoo.org> eselect-mpost-0.1.ebuild: + add ~x86, bug #237202 + + 09 Sep 2008; Ferris McCormick <fmccor@gentoo.org> + eselect-mpost-0.1.ebuild: + Add ~sparc keyword in preparation for Bug #237202. + +*eselect-mpost-0.1 (09 Sep 2008) + + 09 Sep 2008; Alexis Ballier <aballier@gentoo.org> + +files/mpost.eselect-0.1, +metadata.xml, +eselect-mpost-0.1.ebuild: + Initial import: manages /usr/bin/mpost symlinks to allow easy usage of + mplib's mpost. + diff --git a/app-eselect/eselect-mpost/eselect-mpost-0.1.ebuild b/app-eselect/eselect-mpost/eselect-mpost-0.1.ebuild new file mode 100644 index 000000000000..d3fcb995dab9 --- /dev/null +++ b/app-eselect/eselect-mpost/eselect-mpost-0.1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-mpost/eselect-mpost-0.1.ebuild,v 1.1 2015/03/31 16:51:56 ulm Exp $ + +inherit eutils + +DESCRIPTION="mpost module for eselect" +HOMEPAGE="http://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.0.5 + >=app-text/texlive-core-2008" + +src_install() { + local MODULEDIR="/usr/share/eselect/modules" + local MODULE="mpost" + dodir ${MODULEDIR} + insinto ${MODULEDIR} + newins "${FILESDIR}/${MODULE}.eselect-${PVR}" ${MODULE}.eselect || die "failed to install" +} diff --git a/app-eselect/eselect-mpost/eselect-mpost-0.2.ebuild b/app-eselect/eselect-mpost/eselect-mpost-0.2.ebuild new file mode 100644 index 000000000000..9d43e4e915ca --- /dev/null +++ b/app-eselect/eselect-mpost/eselect-mpost-0.2.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-mpost/eselect-mpost-0.2.ebuild,v 1.1 2015/03/31 16:51:56 ulm Exp $ + +inherit eutils + +DESCRIPTION="mpost module for eselect" +HOMEPAGE="http://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="mpost" + dodir ${MODULEDIR} + insinto ${MODULEDIR} + newins "${FILESDIR}/${MODULE}.eselect-${PVR}" ${MODULE}.eselect \ + || die "failed to install" +} diff --git a/app-eselect/eselect-mpost/eselect-mpost-0.3.ebuild b/app-eselect/eselect-mpost/eselect-mpost-0.3.ebuild new file mode 100644 index 000000000000..fa5fc782efa1 --- /dev/null +++ b/app-eselect/eselect-mpost/eselect-mpost-0.3.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-mpost/eselect-mpost-0.3.ebuild,v 1.1 2015/03/31 16:51:56 ulm Exp $ + +inherit eutils + +DESCRIPTION="mpost module for eselect" +HOMEPAGE="http://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="mpost" + dodir ${MODULEDIR} + insinto ${MODULEDIR} + newins "${FILESDIR}/${MODULE}.eselect-${PVR}" ${MODULE}.eselect \ + || die "failed to install" +} diff --git a/app-eselect/eselect-mpost/files/mpost.eselect-0.1 b/app-eselect/eselect-mpost/files/mpost.eselect-0.1 new file mode 100644 index 000000000000..ce02925f866d --- /dev/null +++ b/app-eselect/eselect-mpost/files/mpost.eselect-0.1 @@ -0,0 +1,153 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id: mpost.eselect-0.1,v 1.1 2015/03/31 16:51:56 ulm Exp $ + +DESCRIPTION="Manage /usr/bin/mpost implementations" +MAINTAINER="ml@gentoo.org" +SVN_DATE='$Date: 2015/03/31 16:51:56 $' +VERSION=$(svn_date_to_version "${SVN_DATE}" ) + +# find a list of mpost symlink targets, best first +find_targets() { + local f + for f in "${ROOT}"/usr/bin/mpost-*; do + if [[ -f ${f} ]] ; then + echo "${f##*/mpost-}" + fi + done | sort +} + +# find version number of currently symlinked version +identify_target() { + local f + f="$(canonicalise "${ROOT}"/usr/bin/mpost)" + echo "${f##*/mpost-}" +} + +# try to remove the mpost symlink +remove_symlinks() { + rm -f "${ROOT}"/usr/bin/mpost &>/dev/null +} + +# set the mpost 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/mpost-${target}" ]] ; then + remove_symlinks + ln -s "mpost-${target}" "${ROOT}/usr/bin/mpost" || \ + die "Could not set ${target} /usr/bin/mpost symlink" + echo "Updating TeX formats" + [ -z "${ROOT}" ] && fmtutil-sys --all &>/dev/null || write_warning_msg "Could not update TeX formats for some reason, mpost may not work properly." + else + die -q "Target \"${target}\" doesn't appear to be valid!" + fi +} + +### show action ### + +describe_show() { + echo "Show the current mpost version" +} + +do_show() { + [[ -z "${@}" ]] || die -q "Too many parameters" + + write_list_start "Current mpost verson:" + if [[ -L "${ROOT}/usr/bin/mpost" ]] ; then + write_kv_list_entry "$(identify_target)" "" + elif [[ -e "${ROOT}/usr/bin/mpost" ]] ; then + write_kv_list_entry "(not a symlink)" "" + else + write_kv_list_entry "(unset)" "" + fi +} + +### list action ### + +describe_list() { + echo "List available mpost versions" +} + +do_list() { + [[ -z "${@}" ]] || die -q "Too many parameters" + + local i targets current + targets=( $(find_targets ) ) + current=$(identify_target) + if [[ -n ${targets[@]} ]] ; then + for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do + [[ ${targets[${i}]} == ${current} ]] && \ + targets[${i}]="${targets[${i}]} $(highlight '*' )" + done + write_list_start "Available mpost versions:" + write_numbered_list "${targets[@]}" + else + write_kv_list_entry "(none found)" "" + fi +} + +### set action ### + +describe_set() { + echo "Set a new mpost version" +} + +describe_set_options() { + echo "target : Target version number or index from 'list' action" +} + +describe_set_parameters() { + echo "<target>" +} + +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/mpost" ]] ; 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/mpost" ]] ; then + die -q "${ROOT}/usr/bin/mpost 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 mpost 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/mpost" ]] ; then + [[ ${1} == "--if-unset" ]] && return + remove_symlinks || die -q "Can't remove existing symlink" + fi + if [[ -e "${ROOT}/usr/bin/mpost" ]] ; then + die -q "${ROOT}/usr/bin/mpost 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 +} + +# vim: set ft=eselect : diff --git a/app-eselect/eselect-mpost/files/mpost.eselect-0.2 b/app-eselect/eselect-mpost/files/mpost.eselect-0.2 new file mode 100644 index 000000000000..d11a009bdc0b --- /dev/null +++ b/app-eselect/eselect-mpost/files/mpost.eselect-0.2 @@ -0,0 +1,148 @@ +# -*-eselect-*- vim: ft=eselect +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id: mpost.eselect-0.2,v 1.1 2015/03/31 16:51:56 ulm Exp $ + +DESCRIPTION="Manage /usr/bin/mpost implementations" +MAINTAINER="ml@gentoo.org" +SVN_DATE='$Date: 2015/03/31 16:51:56 $' +VERSION=$(svn_date_to_version "${SVN_DATE}" ) + +# find a list of mpost symlink targets, best first +find_targets() { + local f + for f in "${ROOT}"/usr/bin/mpost-*; do + if [[ -f ${f} ]] ; then + echo "${f##*/mpost-}" + fi + done | sort +} + +# find version number of currently symlinked version +identify_target() { + local f + f="$(canonicalise "${ROOT}"/usr/bin/mpost)" + echo "${f##*/mpost-}" +} + +# try to remove the mpost symlink +remove_symlinks() { + rm -f "${ROOT}"/usr/bin/mpost &>/dev/null +} + +# set the mpost 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/mpost-${target}" ]] ; then + remove_symlinks + ln -s "mpost-${target}" "${ROOT}/usr/bin/mpost" || \ + die "Could not set ${target} /usr/bin/mpost symlink" + echo "Updating TeX formats" + [ -z "${ROOT}" ] && fmtutil-sys --all &>/dev/null || write_warning_msg "Could not update TeX formats for some reason, mpost may not work properly." + else + die -q "Target \"${target}\" doesn't appear to be valid!" + fi +} + +### show action ### + +describe_show() { + echo "Show the current mpost version" +} + +do_show() { + [[ -z "${@}" ]] || die -q "Too many parameters" + + write_list_start "Current mpost verson:" + if [[ -L "${ROOT}/usr/bin/mpost" ]] ; then + write_kv_list_entry "$(identify_target)" "" + elif [[ -e "${ROOT}/usr/bin/mpost" ]] ; then + write_kv_list_entry "(not a symlink)" "" + else + write_kv_list_entry "(unset)" "" + fi +} + +### list action ### + +describe_list() { + echo "List available mpost 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 mpost versions:" + write_numbered_list -m "(none found)" "${targets[@]}" +} + +### set action ### + +describe_set() { + echo "Set a new mpost version" +} + +describe_set_options() { + echo "target : Target version number or index from 'list' action" +} + +describe_set_parameters() { + echo "<target>" +} + +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/mpost" ]] ; 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/mpost" ]] ; then + die -q "${ROOT}/usr/bin/mpost 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 mpost 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/mpost" ]] ; then + [[ ${1} == "--if-unset" ]] && return + remove_symlinks || die -q "Can't remove existing symlink" + fi + if [[ -e "${ROOT}/usr/bin/mpost" ]] ; then + die -q "${ROOT}/usr/bin/mpost 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-mpost/files/mpost.eselect-0.3 b/app-eselect/eselect-mpost/files/mpost.eselect-0.3 new file mode 100644 index 000000000000..4ff262515d23 --- /dev/null +++ b/app-eselect/eselect-mpost/files/mpost.eselect-0.3 @@ -0,0 +1,148 @@ +# -*-eselect-*- vim: ft=eselect +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id: mpost.eselect-0.3,v 1.1 2015/03/31 16:51:56 ulm Exp $ + +DESCRIPTION="Manage /usr/bin/mpost implementations" +MAINTAINER="ml@gentoo.org" +SVN_DATE='$Date: 2015/03/31 16:51:56 $' +VERSION=$(svn_date_to_version "${SVN_DATE}" ) + +# find a list of mpost symlink targets, best first +find_targets() { + local f + for f in "${ROOT}"/usr/bin/mpost-*; do + if [[ -f ${f} ]] ; then + echo "${f##*/mpost-}" + fi + done | sort +} + +# find version number of currently symlinked version +identify_target() { + local f + f="$(canonicalise "${ROOT}"/usr/bin/mpost)" + echo "${f##*/mpost-}" +} + +# try to remove the mpost symlink +remove_symlinks() { + rm -f "${ROOT}"/usr/bin/mpost &>/dev/null +} + +# set the mpost 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/mpost-${target}" ]] ; then + remove_symlinks + ln -s "mpost-${target}" "${ROOT}/usr/bin/mpost" || \ + die "Could not set ${target} /usr/bin/mpost symlink" + echo "Updating TeX formats" + "${ROOT}"/usr/bin/fmtutil-sys --all &>/dev/null || write_warning_msg "Could not update TeX formats for some reason, mpost may not work properly." + else + die -q "Target \"${target}\" doesn't appear to be valid!" + fi +} + +### show action ### + +describe_show() { + echo "Show the current mpost version" +} + +do_show() { + [[ -z "${@}" ]] || die -q "Too many parameters" + + write_list_start "Current mpost version:" + if [[ -L "${ROOT}/usr/bin/mpost" ]] ; then + write_kv_list_entry "$(identify_target)" "" + elif [[ -e "${ROOT}/usr/bin/mpost" ]] ; then + write_kv_list_entry "(not a symlink)" "" + else + write_kv_list_entry "(unset)" "" + fi +} + +### list action ### + +describe_list() { + echo "List available mpost 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 mpost versions:" + write_numbered_list -m "(none found)" "${targets[@]}" +} + +### set action ### + +describe_set() { + echo "Set a new mpost version" +} + +describe_set_options() { + echo "target : Target version number or index from 'list' action" +} + +describe_set_parameters() { + echo "<target>" +} + +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/mpost" ]] ; 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/mpost" ]] ; then + die -q "${ROOT}/usr/bin/mpost 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 mpost 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/mpost" ]] ; then + [[ ${1} == "--if-unset" ]] && return + remove_symlinks || die -q "Can't remove existing symlink" + fi + if [[ -e "${ROOT}/usr/bin/mpost" ]] ; then + die -q "${ROOT}/usr/bin/mpost 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-mpost/metadata.xml b/app-eselect/eselect-mpost/metadata.xml new file mode 100644 index 000000000000..ba6a8a8800d5 --- /dev/null +++ b/app-eselect/eselect-mpost/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>tex</herd> +</pkgmetadata> |