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-mpost/Manifest | 5 + app-eselect/eselect-mpost/eselect-mpost-0.3.ebuild | 28 ++++ app-eselect/eselect-mpost/files/mpost.eselect-0.3 | 147 +++++++++++++++++++++ app-eselect/eselect-mpost/metadata.xml | 8 ++ 4 files changed, 188 insertions(+) create mode 100644 app-eselect/eselect-mpost/Manifest create mode 100644 app-eselect/eselect-mpost/eselect-mpost-0.3.ebuild create mode 100644 app-eselect/eselect-mpost/files/mpost.eselect-0.3 create mode 100644 app-eselect/eselect-mpost/metadata.xml (limited to 'app-eselect/eselect-mpost') diff --git a/app-eselect/eselect-mpost/Manifest b/app-eselect/eselect-mpost/Manifest new file mode 100644 index 000000000000..ca9e8c790b93 --- /dev/null +++ b/app-eselect/eselect-mpost/Manifest @@ -0,0 +1,5 @@ +AUX mpost.eselect-0.3 3728 SHA256 6ce0cf1c349b1613ca10ca9b7eb9cec29bf25334c91c3f8dfee33523b25425fb SHA512 b2cd807c3ebf7933410dddc9a56129a6ecb284cb163510aac7340ca44ce4dd42e69953b24e002da3898b3961f2a661a27615fefec79b5ffed04dac5637c41b01 WHIRLPOOL 0b6e164451fd0fdac180bbd3c3a58b9f6eaf51b56734b703c981ec9ae84145a3f0891f2053a80a8474a5666d42973dd52d3040dd4bdb4d098240456cd1f62383 +EBUILD eselect-mpost-0.3.ebuild 742 SHA256 2f83d549f3f1c87329f44ec67a6cf8aaae4c9d89b634782696f6be964ba4a58a SHA512 a67e2fba0ff1a760a5ef38ee3f6d274dfb58c959ccd74e0b3fd2b83dea5aa53c5e92b637bca0411585c6d34777b35a52cd1f7b18bdc7a74d6805685caca53834 WHIRLPOOL 3e18f2bd53bc42ce92f3fb6817eab5e33dd7e67a5131cc12a1c9a64c86ebe90b5aaf9bb07969de68465fc838b29015bc0a1220de0c4461bb61217132663a330d +MISC ChangeLog 2935 SHA256 ac4c225ab3b91e910ef3baf315114a3f9a34fb1269977c008a2f785bc76f1360 SHA512 6543859264380eabbe1c356012a29ce3048ac61ed95a1dac43147afa2e08a32553eaa0acb21ccb107c4d023896148c5820350676ffac83215f2ca660920acbeb WHIRLPOOL a5e48cf57381f3bd5c9b9bae5d49365c3d8d4f5b4695cc20407dde27267f22dbb4eacd7baa73ba2d8b1346b28488c342e7dfd65c497a8954afd20b954e17a3fd +MISC ChangeLog-2015 2922 SHA256 73c73ffe55fe961d46f3797c8ecede1b867e2e617b10697c5159223c44a9f998 SHA512 b6f20310202a762e6762e64b3bc26919340406c3032a9cb199799bd4aa174e48b67ee3ce473fbb108e9f66623597e7bb9fe7ed4e5e63f74d1b5165e37ee4ca7c WHIRLPOOL 3caf77a1e80688a2a67a60e4456ab1543f79e31ee5afb488d572ccb5d1a212cfedf334336ff1db1ddf1dd6f95eed20d6a733d2e4e6004f5d05c3ff416bc15a4b +MISC metadata.xml 245 SHA256 b3de478821488be2cdc91b078e21c911dc384af882c5c44631a47dfa91516dc8 SHA512 1653777623e2c15e1ce13229e396723b2cc9c214983e0f8592de98c01a31badc6c38c6735ed44f937d145883b43fb6f049af3eddb9ff96b18c96ccf8f67dd690 WHIRLPOOL 701a78fc2214f5fd4bd781477f85e87e716b8d76ea831a0fa4afc8871c4286cc363679f1ff4f844555ad4f77cc7265208b83e805f56c22fc4baeed1062280c08 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..72105888040d --- /dev/null +++ b/app-eselect/eselect-mpost/eselect-mpost-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="mpost 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="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.3 b/app-eselect/eselect-mpost/files/mpost.eselect-0.3 new file mode 100644 index 000000000000..4b772d175000 --- /dev/null +++ b/app-eselect/eselect-mpost/files/mpost.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/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 "" +} + +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..13170c3184d8 --- /dev/null +++ b/app-eselect/eselect-mpost/metadata.xml @@ -0,0 +1,8 @@ + + + + + tex@gentoo.org + Gentoo TeX Project + + -- cgit v1.2.3