diff options
author | Ben de Groot <yngwin@gmail.com> | 2012-07-23 18:50:58 +0800 |
---|---|---|
committer | Ben de Groot <yngwin@gmail.com> | 2012-07-23 18:50:58 +0800 |
commit | 7f54602764865c6bebda162b10a5b3cd49ec3f8b (patch) | |
tree | 1b3de380546f2e503f77c3a0774c864bdb6514d5 /app-admin | |
parent | media-sound/coquillo has been moved to official tree (diff) | |
download | betagarden-7f54602764865c6bebda162b10a5b3cd49ec3f8b.tar.gz betagarden-7f54602764865c6bebda162b10a5b3cd49ec3f8b.tar.bz2 betagarden-7f54602764865c6bebda162b10a5b3cd49ec3f8b.zip |
Add infinality font patches and eselect module
Diffstat (limited to 'app-admin')
3 files changed, 133 insertions, 0 deletions
diff --git a/app-admin/eselect-infinality/Manifest b/app-admin/eselect-infinality/Manifest new file mode 100644 index 0000000..f42787f --- /dev/null +++ b/app-admin/eselect-infinality/Manifest @@ -0,0 +1,2 @@ +AUX infinality.eselect-20120618 2784 SHA256 5ef2804536cfab3e35bc905cbe895caa3d2e3baf6fea0d156dcd85857c6be3c7 SHA512 6bab80aa951f6dec706337bca9770d43b9afae57ae566b2f6245005150be372ceced01e4170b904f5e3d03ffa97313117f8c28d72e16c0b17bcf7a60e969ecd2 WHIRLPOOL 78920c08e0d3273897d95aa7f1f593b3cb033386c666c30940e4433adf45e318b57b266c7de8625f3b7923712fb8195e6586d2b17dba47edbc3482f589de5c7a +EBUILD eselect-infinality-20120618.ebuild 594 SHA256 93dc4ad6a5682ee7e3f81e76a1705c938d2a960ea9608bbe6f9d29dc2e3853c3 SHA512 982cc1299e68687bf21dc5f93c69d70b0e605704b5402f30720fd98e3975f425c9e631de294e33ac925a5111674e220809c344a276cb1d6ccb4d167e0a8c7ae5 WHIRLPOOL 5210a752aac41a56c9ed3278d2b8e4ac236beb24ff3c2d2b980a78895dc319f2609237b5085995c3e624eacb9c6aba58d63ee2d378e5e1089d508cefea0b28bc diff --git a/app-admin/eselect-infinality/eselect-infinality-20120618.ebuild b/app-admin/eselect-infinality/eselect-infinality-20120618.ebuild new file mode 100644 index 0000000..54700f1 --- /dev/null +++ b/app-admin/eselect-infinality/eselect-infinality-20120618.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +DESCRIPTION="Eselect module to choose an infinality font rendering style" +HOMEPAGE="https://github.com/MeisterP/infinality-overlay" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="app-admin/eselect" + +src_unpack() { + mkdir "${S}" +} + +src_install() { + insinto "/usr/share/eselect/modules" + newins "${FILESDIR}"/infinality.eselect-"${PV}" infinality.eselect +} + +pkg_postinst() { + elog "Use eselect infinality to select a rendering style" +} diff --git a/app-admin/eselect-infinality/files/infinality.eselect-20120618 b/app-admin/eselect-infinality/files/infinality.eselect-20120618 new file mode 100644 index 0000000..c8fe0a5 --- /dev/null +++ b/app-admin/eselect-infinality/files/infinality.eselect-20120618 @@ -0,0 +1,102 @@ +# -*-eselect-*- vim: ft=eselect +# Copyright 2005-2012 Gentoo Foundation +# Distributed under the terms of the GNU GPL version 2 or later + +DESCRIPTION="Manage the /etc/fonts/infinality/conf.d symlink" +MAINTAINER="poncho@spahan.ch" +VERSION="20120618" + +# find a list of symlink targets +find_targets() { + local f + for f in "${EROOT}"/etc/fonts/infinality/styles.conf.avail/*; do + [[ -d ${f} ]] && basename "${f}" + done +} + +# remove the symlink +remove_symlink() { + rm "${EROOT}/etc/fonts/infinality/conf.d" +} + +# set the symlink +set_symlink() { + local target=$1 + + if is_number "${target}"; then + local targets=( $(find_targets) ) + target=${targets[target-1]} + fi + + [[ -z ${target} || ! -d ${EROOT}/etc/fonts/infinality/styles.conf.avail/${target} ]] \ + && die -q "Target \"$1\" doesn't appear to be valid!" + + ln -s "styles.conf.avail/${target}" "${EROOT}/etc/fonts/infinality/conf.d" + echo "Selected style: ${target}" + echo "You should update /etc/env.d/99lcdfilter to match your current style" +} + +### show action ### + +describe_show() { + echo "Show the current style symlink" +} + +do_show() { + write_list_start "Current style symlink:" + if [[ -L ${EROOT}/etc/fonts/infinality/conf.d ]]; then + local style=$(canonicalise "${EROOT}/etc/fonts/infinality/conf.d") + write_kv_list_entry "${style}" "" + else + write_kv_list_entry "(unset)" "" + fi +} + +### list action ### + +describe_list() { + echo "List available styles" +} + +do_list() { + local i targets=( $(find_targets) ) + + write_list_start "Available styles:" + for (( i = 0; i < ${#targets[@]}; i++ )); do + # highlight the target where the symlink is pointing to + [[ ${targets[i]} = \ + $(basename "$(canonicalise "${EROOT}/etc/fonts/infinality/conf.d")") ]] \ + && targets[i]=$(highlight_marker "${targets[i]}") + done + write_numbered_list -m "(none found)" "${targets[@]}" +} + +### set action ### + +describe_set() { + echo "Set a new style" +} + +describe_set_parameters() { + echo "<target>" +} + +describe_set_options() { + echo "target : Target name or number (from 'list' action)" +} + +do_set() { + [[ -z $1 ]] && die -q "You didn't tell me what to set the symlink to" + [[ $# -gt 1 ]] && die -q "Too many parameters" + + if [[ -L ${EROOT}/etc/fonts/infinality/conf.d ]]; then + # existing symlink + remove_symlink || die -q "Couldn't remove existing symlink" + set_symlink "$1" || die -q "Couldn't set a new symlink" + elif [[ -e ${EROOT}/etc/fonts/infinality/conf.d ]]; then + # we have something strange + die -q "${EROOT}/etc/fonts/infinality/conf.d exists but is not a symlink" + else + set_symlink "$1" || die -q "Couldn't set a new symlink" + fi +} |