diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-eselect/eselect-fontconfig | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-eselect/eselect-fontconfig')
5 files changed, 255 insertions, 0 deletions
diff --git a/app-eselect/eselect-fontconfig/Manifest b/app-eselect/eselect-fontconfig/Manifest new file mode 100644 index 000000000000..f2da7e7f4ee9 --- /dev/null +++ b/app-eselect/eselect-fontconfig/Manifest @@ -0,0 +1 @@ +DIST fontconfig.eselect-1.1.bz2 1713 SHA256 1ffe764cff192430f81b37a4e4cc8b7cc2596dca177f798b2ef68cc320f074a5 SHA512 3b5978e20009754f09cd39e39771e8151cbb7bda60378cda718182b2df2c267a64af5ead220a079fbeeffb30586bc432bbc83b94e4f910205c4a29040cd2ccbd WHIRLPOOL 196e444610717104cc011f0e65fc9b97ed79410a055e03bcfbc31ec85d4d2df9f0ef222d143202bfa1374e75fd88f3922df9d5ded6b4668a11a40418dc87f77e diff --git a/app-eselect/eselect-fontconfig/eselect-fontconfig-1.0.ebuild b/app-eselect/eselect-fontconfig/eselect-fontconfig-1.0.ebuild new file mode 100644 index 000000000000..c7bf1b974259 --- /dev/null +++ b/app-eselect/eselect-fontconfig/eselect-fontconfig-1.0.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DESCRIPTION="An eselect module to manage /etc/fonts/conf.d symlinks" +HOMEPAGE="http://www.gentoo.org" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" +IUSE="" + +DEPEND="" +RDEPEND="app-admin/eselect + >=media-libs/fontconfig-2.4" + +src_install() { + insinto /usr/share/eselect/modules + newins "${FILESDIR}/fontconfig.eselect-${PV}" fontconfig.eselect || die +} diff --git a/app-eselect/eselect-fontconfig/eselect-fontconfig-1.1.ebuild b/app-eselect/eselect-fontconfig/eselect-fontconfig-1.1.ebuild new file mode 100644 index 000000000000..4ed9efbb819f --- /dev/null +++ b/app-eselect/eselect-fontconfig/eselect-fontconfig-1.1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DESCRIPTION="An eselect module to manage /etc/fonts/conf.d symlinks" +HOMEPAGE="http://www.gentoo.org" +SRC_URI="mirror://gentoo/fontconfig.eselect-${PV}.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 m68k ~mips ~ppc ~ppc64 s390 sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +DEPEND="" +RDEPEND=">=app-admin/eselect-1.2.3 + >=media-libs/fontconfig-2.4" + +S=${WORKDIR} + +src_install() { + insinto /usr/share/eselect/modules + newins "${S}"/fontconfig.eselect-${PV} fontconfig.eselect || die +} diff --git a/app-eselect/eselect-fontconfig/files/fontconfig.eselect-1.0 b/app-eselect/eselect-fontconfig/files/fontconfig.eselect-1.0 new file mode 100644 index 000000000000..33888dbc8c2d --- /dev/null +++ b/app-eselect/eselect-fontconfig/files/fontconfig.eselect-1.0 @@ -0,0 +1,205 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DESCRIPTION="Manage fontconfig /etc/fonts/conf.d/ symlinks" +MAINTAINER="fonts@gentoo.org" +VERSION="1.0" + +find_targets() { + local targets bc x i=0 + bcdirs[i]="${ROOT}/etc/fonts/conf.avail/*.conf" + + if [[ -n "${ES_FONTCONFIG_DIRS}" ]] ; then + for x in ${ES_FONTCONFIG_DIRS} ; do + bcdirs[$((++i))]="${x}/*" + done + fi + + for bc in ${bcdirs[@]} ; do + [[ -e ${bc} && ${bc} != *~ ]] && targets="${targets}\n$(basename ${bc})" + done + + echo -ne ${targets} | sort -u +} + +is_enabled() { + bcdir="${ROOT}/etc/fonts/conf.d" + + [[ -e ${bcdir}/${1} ]] || return 1 + return 0 +} + +### list action ### + +describe_list() { + echo "List available fontconfig .conf files" +} + +do_list() { + local opts + targets=( $(find_targets) ) + write_list_start "Available fontconfig .conf files ( $(highlight '*') is enabled ):" + + if [[ -n "${targets[@]}" ]] ; then + for (( n = 0 ; n < ${#targets[@]} ; ++n )) ; do + is_enabled ${opts:-} ${targets[${n}]} && \ + targets[${n}]="${targets[${n}]} $(highlight '*')" + done + write_numbered_list "${targets[@]}" + else + write_kv_list_entry "(none found)" "" + fi + + return 0 +} + +### enable action ### + +describe_enable() { + echo "Enable specified fontconfig .conf file(s)" +} + +describe_enable_parameters() { + echo "<target>" +} + +describe_enable_options() { + echo "<target> : Target name or number (from 'list' action)" +} + +do_enable() { + local bc bcdir="${ROOT}/etc/fonts/conf.d" + + [[ -z ${1} ]] && die -q "You didn't specify any .conf files to enable" + + # create directory if necessary + if [[ ! -d ${bcdir} && -w $(dirname ${bcdir}) ]] ; then + mkdir ${bcdir} || die -q "Failed to create ${bcdir}" + elif [[ ! -d ${bcdir} ]] ; then + die -q "You don't have permission to create ${bcdir}" + fi + + # make sure we have proper permissions + [[ -w ${bcdir} ]] || \ + die -q "You don't have permission to write to ${bcdir}" + + targets=( $(find_targets) ) + + for bc in $@ ; do + local file target=${bc} + + is_number "${target}" && \ + target=${targets[$(( ${target} - 1 ))]} + + [[ -z "${target}" ]] && \ + die -q "Target \"${bc}\" doesn't appear to be valid!" + + bc=${target} + + # ignore any unrecognized options + [[ ${bc} == --* ]] && continue + + # what form is the argument in? + case "${bc}" in + # absolute path + /*) + file="${ROOT}/${bc}" + ;; + # relative path + */*) + file="${ROOT}/${PWD}/${bc}" + ;; + # no path + *) + # CWD + if [[ -f ${bc} ]] ; then + file="${ROOT}/${PWD}/${bc}" + # assume /etc/fonts/conf.avail + elif [[ -f ${ROOT}/etc/fonts/conf.avail/${bc} ]] + then + file="${ROOT}/etc/fonts/conf.avail/${bc}" + else + if [[ -n "${ES_FONTCONFIG_DIRS}" ]] ; then + for x in ${ES_FONTCONFIG_DIRS} ; do + [[ -f ${x}/${bc} ]] && file="${x}/${bc}" + done + fi + + [[ -e ${file} ]] || \ + file="${ROOT}/etc/fonts/conf.avail/${bc}" + fi + ;; + esac + + # does it exist? + if [[ ! -e ${file} ]] ; then + write_error_msg "${file} doesn't exist" + continue + fi + + # already installed? + if [[ -e ${bcdir}/$(basename ${bc}) ]] ; then + write_error_msg "$(basename ${bc}) is already installed" + continue + fi + + # finally, create the symlink + ln -s "${file}" "${bcdir}" || \ + die -q "Failed to create symlink from '${file}' to '${bcdir}'" + done +} + +### disable action ### + +describe_disable() { + echo "Disable specified fontconfig .conf file(s)" +} + +describe_disable_parameters() { + echo "<target>" +} + +describe_disable_options() { + echo "<target> : Target name or number (from 'list' action)" +} + + +do_disable() { + local bc bcdir="${ROOT}/etc/fonts/conf.d" + + [[ -z ${1} ]] && die -q "You didn't specify any .conf files to disable" + + targets=( $(find_targets) ) + + for bc in $@ ; do + local file target=${bc} + + is_number "${target}" && \ + target=${targets[$(( ${target} - 1 ))]} + + [[ -z "${target}" ]] && \ + die -q "Target \"${bc}\" doesn't appear to be valid!" + + bc=${target} + file="${bcdir}/${bc}" + + # ignore any unrecognized options + [[ ${bc} == --* ]] && continue + + # is in installed? + if [[ ! -e ${file} ]] ; then + write_error_msg "${bc} is not installed" + continue + fi + + # remove it if we have permissions + if [[ -w $(dirname ${file}) ]] ; then + rm "${file}" || die -q "Failed to remove ${file}" + else + die -q "You don't have permission to remove ${file}" + fi + done +} + +# vim: set ft=eselect : diff --git a/app-eselect/eselect-fontconfig/metadata.xml b/app-eselect/eselect-fontconfig/metadata.xml new file mode 100644 index 000000000000..64cc0b687d48 --- /dev/null +++ b/app-eselect/eselect-fontconfig/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>fonts</herd> +</pkgmetadata> |