summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2015-03-31 16:58:42 +0000
committerUlrich Müller <ulm@gentoo.org>2015-03-31 16:58:42 +0000
commit37bac0fb2d369e1ee1670df2df1bb5aeea599ddc (patch)
treeeba61bab332516cf3c77cca386465d1ecb9eed4c /app-eselect/eselect-mpost
parentVersion bump. (diff)
downloadhistorical-37bac0fb2d369e1ee1670df2df1bb5aeea599ddc.tar.gz
historical-37bac0fb2d369e1ee1670df2df1bb5aeea599ddc.tar.bz2
historical-37bac0fb2d369e1ee1670df2df1bb5aeea599ddc.zip
Move package from app-admin to app-eselect category.
Package-Manager: portage-2.2.18/cvs/Linux x86_64 RepoMan-Options: --force Manifest-Sign-Key: 0x9433907D693FB5B8!
Diffstat (limited to 'app-eselect/eselect-mpost')
-rw-r--r--app-eselect/eselect-mpost/ChangeLog82
-rw-r--r--app-eselect/eselect-mpost/Manifest25
-rw-r--r--app-eselect/eselect-mpost/eselect-mpost-0.1.ebuild28
-rw-r--r--app-eselect/eselect-mpost/eselect-mpost-0.2.ebuild29
-rw-r--r--app-eselect/eselect-mpost/eselect-mpost-0.3.ebuild29
-rw-r--r--app-eselect/eselect-mpost/files/mpost.eselect-0.1153
-rw-r--r--app-eselect/eselect-mpost/files/mpost.eselect-0.2148
-rw-r--r--app-eselect/eselect-mpost/files/mpost.eselect-0.3148
-rw-r--r--app-eselect/eselect-mpost/metadata.xml5
9 files changed, 647 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/Manifest b/app-eselect/eselect-mpost/Manifest
new file mode 100644
index 000000000000..03be06c0500f
--- /dev/null
+++ b/app-eselect/eselect-mpost/Manifest
@@ -0,0 +1,25 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX mpost.eselect-0.1 3892 SHA256 8a3c899f4509a141400ecc2c8e32828334f9ea88bc66a83870e75e285bdffc49 SHA512 78f2ed4a47418bf9008f2518ba54f75505b727613e5f269ef4604ecf3e5757bfb3a8d149fd2e00c1baec54b748bebcc996fa17836321ce3b7787f12b14652a36 WHIRLPOOL 2efdb3dce665c1f243e1f80ff6c10de74fa1383372d13d19317cac85b28b8fa1af7339d0c777bd01e79ac57834603ab7b162e41ed904823022c46db2f5329db5
+AUX mpost.eselect-0.2 3790 SHA256 f28499865f1dcc9f06a47bc4abc25047c76eb6051c9350b628358326491c5207 SHA512 a1e73270a1b498037aaf87b32b9bfef6114b2aada917b285a1ee9d6832c3072c170ccfc4d56bb87a415450f1a103a05214f052521645efdc1d5b0594b04cdf9b WHIRLPOOL 5ce453ce9375f9118ab9e120508d8ba9dfc7eaa95a8b80680e1501c16dd0508b57045cd2960a86d8dc4da42f07899eed982ade6c8731e36d0392bb6bfeb76045
+AUX mpost.eselect-0.3 3789 SHA256 2fe81ca1c2360a05efcc7cdfd9046ceca16d262a99ec077271f2ffb994246290 SHA512 73addd5ef0d5169a1fd7ab3d7bc401588f362b29987f7ea294efc007a3e5e310e516567af546d9cfd6458b9570e1037e0a3aa57cb2eac953275b4de2c45cc60e WHIRLPOOL 14d9dacbdde23a7d06e78de40ae9efe6caa0d9035ce053c4977b7bae3edf5d0f19e6287782fcead7eff7814478fea669e3fb686047570db75dfe9d5f7049a00a
+EBUILD eselect-mpost-0.1.ebuild 859 SHA256 984fa53e19d65a2d1165299f2f63da03eb7636a93b52fb0a24f24e326d5a47ef SHA512 963ea039e69184945b9443605adcee1bd3089ac156c0cc2f40b9e9ae836d2e2954d51ce6f5cebf01a3f03427d9e3a3cb08a3ec5967c759606e9fcc484d2c2ccf WHIRLPOOL c7956948ef6a6fe8191842ae007e8fb4d1fa2eea5329bde43f8662f153c747021a80fd5b86c0e151e97a9f3b6cf1b1229bcfb289cd854376090df3dc111b4e73
+EBUILD eselect-mpost-0.2.ebuild 872 SHA256 7cc9ac08ffd18e804caf1ddc8b48a323417e9f1edeb5832c972fc4a54c6a6ac9 SHA512 aef291da53da346dbefb989fb8ab0377b87973ed5b145b8919cbf90a961538e6526f1724e94b01afde66205318674a532a46e033a8016866f816695cc83ddae1 WHIRLPOOL e943a93f39e9f7918141432f4f542f3eec560fccc0801c2c1dd661874632aebdf7af254ec1dce641154e802c4b14a210c8e112d777fc0071299cf2ea6e9be318
+EBUILD eselect-mpost-0.3.ebuild 863 SHA256 0da37984c16b3268dcc0feef025998819bd4f9022ba762593d5de81dbb5ec287 SHA512 291773d259bedea0c0d485d6131ba5daca031a8a5daa3439977b8f9269937a8fd3fa222a2cedfe31614718bcf4edbe69b5232eb557c563ab3247de45efec526e WHIRLPOOL 0c89a2695c605598d7ba0d364519a858631454854750e8c0dab35a107384efbb9f3748cc522723472fddeee8dd60a60b6dd2f8041b953633fffc4fb036381707
+MISC ChangeLog 2922 SHA256 73c73ffe55fe961d46f3797c8ecede1b867e2e617b10697c5159223c44a9f998 SHA512 b6f20310202a762e6762e64b3bc26919340406c3032a9cb199799bd4aa174e48b67ee3ce473fbb108e9f66623597e7bb9fe7ed4e5e63f74d1b5165e37ee4ca7c WHIRLPOOL 3caf77a1e80688a2a67a60e4456ab1543f79e31ee5afb488d572ccb5d1a212cfedf334336ff1db1ddf1dd6f95eed20d6a733d2e4e6004f5d05c3ff416bc15a4b
+MISC metadata.xml 156 SHA256 b4971b8472ab3fe4fbfe41b331a79193ca19e86c08d055ad1c20eaf9e04b79b6 SHA512 cecee760dd314c182191a282255f2415e479a8cc6cab9cb664e5b82d52b700a3444aa0d33b30a721a756e432819decc8c92588c769ea6fd33dabe9adc16d75c0 WHIRLPOOL 88a15092b616df72dd0ae91d89c80d852ad49ab9fee8a9688f3a1be59c365cc3dc77e90be68b5c4ec9cc1dc9885e06e723abc96830df4d0628df8c97f8b2a332
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iQGcBAEBCAAGBQJVGtCwAAoJEJQzkH1pP7W44RQL/ib1U0so4SHZ4Nn9PZYBX9sb
+BnZB30a2gNYQpQSccetKYuSOFB+GRBg5RFnG8sggH2tTUscIlsS6LaJ8KXHuHvu4
+EeCLbQfRO5Wcde7nOMbkocH9JrLkb72HhjFudAOXjofHGL8gjuIfZf5UlK/9cg0t
+odU29lOXcp0piJlbarSqvGELj2wX0kKpLT0hNiX7hVxJJKAtOsSWJrNUCxIw5eMk
+c3g0KUS1RlyM8TDwySDl852f/Xk7YUfmZtKpvuMyZjun667Oc7GXomuYlKWxhTSP
+jMrNpOpshDvEzJ+5G3GPkDF/xRS4+feXAwOgK7/9/1QIK/ms9jo8XB0ODDnF7FQs
+NJ/yfApkWM2/zPhLt8JGLMSpKHaVP2dhcEFiez/bShrOhXst9zL5ShSt8+ujD0kh
+bLr5xsMgRnNY/lroH/OIZCojL6K6V75yvM47o248ZPOSAuRCgGYElxKaMW9/CKNb
+cF+thSFToyV3AkGfXxSOXONIRKsbCt8PdGRq6/6YfA==
+=wE3I
+-----END PGP SIGNATURE-----
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>