diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-eselect/eselect-fontconfig |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-eselect/eselect-fontconfig')
6 files changed, 286 insertions, 0 deletions
diff --git a/app-eselect/eselect-fontconfig/Manifest b/app-eselect/eselect-fontconfig/Manifest new file mode 100644 index 000000000000..03fd2fdd36bb --- /dev/null +++ b/app-eselect/eselect-fontconfig/Manifest @@ -0,0 +1,8 @@ +AUX fontconfig.eselect-1.0 4394 SHA256 1bb412ad385df4be8e3b475f556ec17ab6271640731d46d468b44b0a069e3259 SHA512 5ca29ddbb672193eac8edc1acdefee0f7924aaba23d8ce40317d3dacd339e820462382d3fdf233c2cf4e4b258a2956e7b86ec6f4f541876789ab234aeaa81f42 WHIRLPOOL 92f480bbdff686e4687a820618f422a8f2bd85c2bd43bb604f80f6fef1e441009712f1d682c18726faa2bfacd60519e31c0d630e02ad73099344a37dd3d18157 +DIST fontconfig.eselect-1.1.bz2 1713 SHA256 1ffe764cff192430f81b37a4e4cc8b7cc2596dca177f798b2ef68cc320f074a5 SHA512 3b5978e20009754f09cd39e39771e8151cbb7bda60378cda718182b2df2c267a64af5ead220a079fbeeffb30586bc432bbc83b94e4f910205c4a29040cd2ccbd WHIRLPOOL 196e444610717104cc011f0e65fc9b97ed79410a055e03bcfbc31ec85d4d2df9f0ef222d143202bfa1374e75fd88f3922df9d5ded6b4668a11a40418dc87f77e +EBUILD eselect-fontconfig-1.0.ebuild 551 SHA256 d4a32a2721ccc4a4dbfa76091aa7aef709bee8d91e387f66b2fa7f539e36e3fb SHA512 52eb2b736b3a8b20766c5929b25d9fe5c2869b42cfdbfc45b6f88f0f5dff9e868b24b34674e402028b2f4e102aa19c75662a7578777f843727dc5ab5ab83340b WHIRLPOOL 64a1be1aec855c682890e993e62e2733513481916f873fd35af39c83441cba0ca1d1da4d75ebf6a2ab349a1c94fdd3879b65cf28f925246d8de6e5dd149c67b6 +EBUILD eselect-fontconfig-1.1-r1.ebuild 801 SHA256 3ba30d02eb4f98f72de5cf827a8971350a61288661d72f84f7b05dcebc36a6c7 SHA512 66dc53bc45395877bb24091e1f86293147c2706619b8d70f45e2cb3b0c76cded73a58fca4a77f4618d84057ce89ceace70c007006f05937cb52ed53ed7e6123e WHIRLPOOL ee0865fc9bc0a4836d1cee32f237e4575b8292b90bde553f424fe48ce4e2a78ed3404432f786b825c9aeed3072cec4eaa72cf175ec1b148ec895f0790de610b5 +EBUILD eselect-fontconfig-1.1.ebuild 782 SHA256 4d35ee42cc046df5718b4a7e36740eb3f12c2040905dea78cbce5d17a636d935 SHA512 ca8389be9cc0142995cea604b14561d83c76a4653ff7f1c5c996523ab4a2ad81c7c682383932a79cff4731aafe9a9ad5ab7772f35a6b38c185497eca66df1dc6 WHIRLPOOL 39685d5d1bca2c98ece37682b1d70a9425964986ca068750446498e9098f5d408104031f7cd96fdd03388bcd4748229aeae4d14f7f00a7d6e928a191d72345cd +MISC ChangeLog 2801 SHA256 a4e9ba868781189bcfc6c4fc31766491864b47d4d08ae90c17a056ab921b2e10 SHA512 94be85ab1deb472d98c9fae7ec12daea9700139fa73c5e9d95bd2d591b3d1c1dabd28cdf22a2fba16249ce1718c1f78f58c5aa1a3efc332595f5eadec7256cb7 WHIRLPOOL 6367793d9a0994c4f49a0f06f586eb92348ef5d3bcd0ae245cd218b63d2b47e720e3cf6941e610757c47634441051b2b8361460036c4c6d80bf4102bbf967a28 +MISC ChangeLog-2015 3685 SHA256 79f58d66cbb47da2865dc11f251da13dfeaebd49f2739b5d98a5784e70fb060a SHA512 23f600d07fd2f8bcc8c05fc5985d6e1dcfad6b8dd25df24bb0f5a314acf7cdf783bf4f5b8bf89d546e442ac49f8edbd8b87c10481dbf75b542e7968fd7072fcb WHIRLPOOL bb11b2e44ff36bce096ba8f31c20ee48985b1132264f38f5adc1729695925d1f7662c25c8eb07184b5acef15d6e09baa6a497318cc8e660352e4228a294062c2 +MISC metadata.xml 238 SHA256 cf46d2323e696a19598784249ea645ab43f8ceb10f74695b01f22b28a5426142 SHA512 5ecba42349e9c39d750f007ac73f6100b85cf54174805a6673b0373434ea83c0f2b64c8a5b167e1fdd5a6c55d366f50cb9ba5a367b9d6dd8d53d797b8839fd5e WHIRLPOOL 22b60503d853ec644c97f4dd9c0627d0297224b22d9ee0ad5ba4597118210c3918510e3cf763e4ebd9b1f4fcd6c339de2d8c0e164cdc614b4c04fee6b7475f24 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..4aea1f15fd3b --- /dev/null +++ b/app-eselect/eselect-fontconfig/eselect-fontconfig-1.0.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +DESCRIPTION="An eselect module to manage /etc/fonts/conf.d symlinks" +HOMEPAGE="https://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-r1.ebuild b/app-eselect/eselect-fontconfig/eselect-fontconfig-1.1-r1.ebuild new file mode 100644 index 000000000000..d84940dd20cc --- /dev/null +++ b/app-eselect/eselect-fontconfig/eselect-fontconfig-1.1-r1.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="An eselect module to manage /etc/fonts/conf.d symlinks" +HOMEPAGE="https://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 ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~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 +} 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..7f7516bd8305 --- /dev/null +++ b/app-eselect/eselect-fontconfig/eselect-fontconfig-1.1.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +DESCRIPTION="An eselect module to manage /etc/fonts/conf.d symlinks" +HOMEPAGE="https://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 ~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..0215fe300388 --- /dev/null +++ b/app-eselect/eselect-fontconfig/files/fontconfig.eselect-1.0 @@ -0,0 +1,204 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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..cc081897d48c --- /dev/null +++ b/app-eselect/eselect-fontconfig/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>fonts@gentoo.org</email> + <name>Fonts</name> + </maintainer> +</pkgmetadata> |