summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hill <dirtyepic@gentoo.org>2007-07-28 02:50:13 +0000
committerRyan Hill <dirtyepic@gentoo.org>2007-07-28 02:50:13 +0000
commit52e7cf8a554c5d2ad622518cc3afd5489539b086 (patch)
tree3a303ab56173039415e32d5efd843b0a9b4f490a /app-admin/eselect-fontconfig
parentdev-python/pyunit removal, see #145154 for reference (diff)
downloadgentoo-2-52e7cf8a554c5d2ad622518cc3afd5489539b086.tar.gz
gentoo-2-52e7cf8a554c5d2ad622518cc3afd5489539b086.tar.bz2
gentoo-2-52e7cf8a554c5d2ad622518cc3afd5489539b086.zip
Initial import. Many thanks to Cardoe for contributing the module.
(Portage version: 2.1.3_rc9)
Diffstat (limited to 'app-admin/eselect-fontconfig')
-rw-r--r--app-admin/eselect-fontconfig/ChangeLog11
-rw-r--r--app-admin/eselect-fontconfig/Manifest19
-rw-r--r--app-admin/eselect-fontconfig/eselect-fontconfig-1.0.ebuild21
-rw-r--r--app-admin/eselect-fontconfig/files/digest-eselect-fontconfig-1.00
-rw-r--r--app-admin/eselect-fontconfig/files/fontconfig.eselect-1.0205
-rw-r--r--app-admin/eselect-fontconfig/metadata.xml5
6 files changed, 261 insertions, 0 deletions
diff --git a/app-admin/eselect-fontconfig/ChangeLog b/app-admin/eselect-fontconfig/ChangeLog
new file mode 100644
index 000000000000..5181f44159ea
--- /dev/null
+++ b/app-admin/eselect-fontconfig/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for app-admin/eselect-fontconfig
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-fontconfig/ChangeLog,v 1.1 2007/07/28 02:50:13 dirtyepic Exp $
+
+*eselect-fontconfig-1.0 (28 Jul 2007)
+
+ 28 Jul 2007; Ryan Hill <dirtyepic@gentoo.org>
+ +files/fontconfig.eselect-1.0, +metadata.xml,
+ +eselect-fontconfig-1.0.ebuild:
+ Initial import. Many thanks to Cardoe for contributing the module.
+
diff --git a/app-admin/eselect-fontconfig/Manifest b/app-admin/eselect-fontconfig/Manifest
new file mode 100644
index 000000000000..db785ed0732e
--- /dev/null
+++ b/app-admin/eselect-fontconfig/Manifest
@@ -0,0 +1,19 @@
+AUX fontconfig.eselect-1.0 4407 RMD160 2208305864a33fa9b8aff1ddd8083a3af2ecb663 SHA1 46f58c586bed3e4e91dd528e0a5506cb4d754c3b SHA256 6b4ae0041c2763f0e204b7ea1a2227b1afda3cf02f9bc56fa2ac596831e11977
+MD5 d1122ae8f87c522c3f7c6f03a8d4e69a files/fontconfig.eselect-1.0 4407
+RMD160 2208305864a33fa9b8aff1ddd8083a3af2ecb663 files/fontconfig.eselect-1.0 4407
+SHA256 6b4ae0041c2763f0e204b7ea1a2227b1afda3cf02f9bc56fa2ac596831e11977 files/fontconfig.eselect-1.0 4407
+EBUILD eselect-fontconfig-1.0.ebuild 478 RMD160 2ccad316b0f63f2e60071789feec1ad3a6324fdc SHA1 2aa3ee56b246cb58606df73befa60f3308d8fae4 SHA256 3060a99a9c33fceb3ffb318a931f94de1730408c7a4e25c26002e83ca8c6addf
+MD5 2e027c58f58dc8547c4658b915be2922 eselect-fontconfig-1.0.ebuild 478
+RMD160 2ccad316b0f63f2e60071789feec1ad3a6324fdc eselect-fontconfig-1.0.ebuild 478
+SHA256 3060a99a9c33fceb3ffb318a931f94de1730408c7a4e25c26002e83ca8c6addf eselect-fontconfig-1.0.ebuild 478
+MISC ChangeLog 369 RMD160 65c5c67ba4b205aadcd8437a1f4f419674541750 SHA1 dad5b5859a86faaba298ed4767ef088bfe2701fa SHA256 f706962de1f561b3f01b1a8707c269e457351522f531e51b404695498caf271e
+MD5 1fd9e848b03994ce802de07421cea01d ChangeLog 369
+RMD160 65c5c67ba4b205aadcd8437a1f4f419674541750 ChangeLog 369
+SHA256 f706962de1f561b3f01b1a8707c269e457351522f531e51b404695498caf271e ChangeLog 369
+MISC metadata.xml 159 RMD160 e9d6dae6266cd59331aaa78481fd5a67fc2ed725 SHA1 152e7ea08489d788f3f1c4c59be552a5f94b2d02 SHA256 952d89bc3335f3d2f69460945016b173913db58759fe7d906f3927909120c890
+MD5 13b29d06e2f61f5dfba17f43d065cb1a metadata.xml 159
+RMD160 e9d6dae6266cd59331aaa78481fd5a67fc2ed725 metadata.xml 159
+SHA256 952d89bc3335f3d2f69460945016b173913db58759fe7d906f3927909120c890 metadata.xml 159
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-eselect-fontconfig-1.0 0
+RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-eselect-fontconfig-1.0 0
+SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-eselect-fontconfig-1.0 0
diff --git a/app-admin/eselect-fontconfig/eselect-fontconfig-1.0.ebuild b/app-admin/eselect-fontconfig/eselect-fontconfig-1.0.ebuild
new file mode 100644
index 000000000000..b3b4dd0d6473
--- /dev/null
+++ b/app-admin/eselect-fontconfig/eselect-fontconfig-1.0.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-fontconfig/eselect-fontconfig-1.0.ebuild,v 1.1 2007/07/28 02:50:13 dirtyepic Exp $
+
+DESCRIPTION="An eselect module to manage /etc/fonts/conf.d symlinks."
+HOMEPAGE="http://www.gentoo.org"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+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-admin/eselect-fontconfig/files/digest-eselect-fontconfig-1.0 b/app-admin/eselect-fontconfig/files/digest-eselect-fontconfig-1.0
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/app-admin/eselect-fontconfig/files/digest-eselect-fontconfig-1.0
diff --git a/app-admin/eselect-fontconfig/files/fontconfig.eselect-1.0 b/app-admin/eselect-fontconfig/files/fontconfig.eselect-1.0
new file mode 100644
index 000000000000..ab0a10a836d4
--- /dev/null
+++ b/app-admin/eselect-fontconfig/files/fontconfig.eselect-1.0
@@ -0,0 +1,205 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-fontconfig/files/fontconfig.eselect-1.0,v 1.1 2007/07/28 02:50:13 dirtyepic Exp $
+
+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-admin/eselect-fontconfig/metadata.xml b/app-admin/eselect-fontconfig/metadata.xml
new file mode 100644
index 000000000000..64cc0b687d48
--- /dev/null
+++ b/app-admin/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>