Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-fontconfig/files/
Date: Sat, 27 Apr 2019 01:52:44
Message-Id: 1556329940.39eb65158a90a65f93e0dca3428a2447b14b60c4.bman@gentoo
1 commit: 39eb65158a90a65f93e0dca3428a2447b14b60c4
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Fri Apr 26 14:11:54 2019 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 27 01:52:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39eb6515
7
8 app-eselect/eselect-fontconfig: remove unused patch(es)
9
10 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
11 Closes: https://github.com/gentoo/gentoo/pull/11831
12 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
13
14 .../files/fontconfig.eselect-1.0 | 204 ---------------------
15 1 file changed, 204 deletions(-)
16
17 diff --git a/app-eselect/eselect-fontconfig/files/fontconfig.eselect-1.0 b/app-eselect/eselect-fontconfig/files/fontconfig.eselect-1.0
18 deleted file mode 100644
19 index 0215fe30038..00000000000
20 --- a/app-eselect/eselect-fontconfig/files/fontconfig.eselect-1.0
21 +++ /dev/null
22 @@ -1,204 +0,0 @@
23 -# Copyright 1999-2015 Gentoo Foundation
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -DESCRIPTION="Manage fontconfig /etc/fonts/conf.d/ symlinks"
27 -MAINTAINER="fonts@g.o"
28 -VERSION="1.0"
29 -
30 -find_targets() {
31 - local targets bc x i=0
32 - bcdirs[i]="${ROOT}/etc/fonts/conf.avail/*.conf"
33 -
34 - if [[ -n "${ES_FONTCONFIG_DIRS}" ]] ; then
35 - for x in ${ES_FONTCONFIG_DIRS} ; do
36 - bcdirs[$((++i))]="${x}/*"
37 - done
38 - fi
39 -
40 - for bc in ${bcdirs[@]} ; do
41 - [[ -e ${bc} && ${bc} != *~ ]] && targets="${targets}\n$(basename ${bc})"
42 - done
43 -
44 - echo -ne ${targets} | sort -u
45 -}
46 -
47 -is_enabled() {
48 - bcdir="${ROOT}/etc/fonts/conf.d"
49 -
50 - [[ -e ${bcdir}/${1} ]] || return 1
51 - return 0
52 -}
53 -
54 -### list action ###
55 -
56 -describe_list() {
57 - echo "List available fontconfig .conf files"
58 -}
59 -
60 -do_list() {
61 - local opts
62 - targets=( $(find_targets) )
63 - write_list_start "Available fontconfig .conf files ( $(highlight '*') is enabled ):"
64 -
65 - if [[ -n "${targets[@]}" ]] ; then
66 - for (( n = 0 ; n < ${#targets[@]} ; ++n )) ; do
67 - is_enabled ${opts:-} ${targets[${n}]} && \
68 - targets[${n}]="${targets[${n}]} $(highlight '*')"
69 - done
70 - write_numbered_list "${targets[@]}"
71 - else
72 - write_kv_list_entry "(none found)" ""
73 - fi
74 -
75 - return 0
76 -}
77 -
78 -### enable action ###
79 -
80 -describe_enable() {
81 - echo "Enable specified fontconfig .conf file(s)"
82 -}
83 -
84 -describe_enable_parameters() {
85 - echo "<target>"
86 -}
87 -
88 -describe_enable_options() {
89 - echo "<target> : Target name or number (from 'list' action)"
90 -}
91 -
92 -do_enable() {
93 - local bc bcdir="${ROOT}/etc/fonts/conf.d"
94 -
95 - [[ -z ${1} ]] && die -q "You didn't specify any .conf files to enable"
96 -
97 - # create directory if necessary
98 - if [[ ! -d ${bcdir} && -w $(dirname ${bcdir}) ]] ; then
99 - mkdir ${bcdir} || die -q "Failed to create ${bcdir}"
100 - elif [[ ! -d ${bcdir} ]] ; then
101 - die -q "You don't have permission to create ${bcdir}"
102 - fi
103 -
104 - # make sure we have proper permissions
105 - [[ -w ${bcdir} ]] || \
106 - die -q "You don't have permission to write to ${bcdir}"
107 -
108 - targets=( $(find_targets) )
109 -
110 - for bc in $@ ; do
111 - local file target=${bc}
112 -
113 - is_number "${target}" && \
114 - target=${targets[$(( ${target} - 1 ))]}
115 -
116 - [[ -z "${target}" ]] && \
117 - die -q "Target \"${bc}\" doesn't appear to be valid!"
118 -
119 - bc=${target}
120 -
121 - # ignore any unrecognized options
122 - [[ ${bc} == --* ]] && continue
123 -
124 - # what form is the argument in?
125 - case "${bc}" in
126 - # absolute path
127 - /*)
128 - file="${ROOT}/${bc}"
129 - ;;
130 - # relative path
131 - */*)
132 - file="${ROOT}/${PWD}/${bc}"
133 - ;;
134 - # no path
135 - *)
136 - # CWD
137 - if [[ -f ${bc} ]] ; then
138 - file="${ROOT}/${PWD}/${bc}"
139 - # assume /etc/fonts/conf.avail
140 - elif [[ -f ${ROOT}/etc/fonts/conf.avail/${bc} ]]
141 - then
142 - file="${ROOT}/etc/fonts/conf.avail/${bc}"
143 - else
144 - if [[ -n "${ES_FONTCONFIG_DIRS}" ]] ; then
145 - for x in ${ES_FONTCONFIG_DIRS} ; do
146 - [[ -f ${x}/${bc} ]] && file="${x}/${bc}"
147 - done
148 - fi
149 -
150 - [[ -e ${file} ]] || \
151 - file="${ROOT}/etc/fonts/conf.avail/${bc}"
152 - fi
153 - ;;
154 - esac
155 -
156 - # does it exist?
157 - if [[ ! -e ${file} ]] ; then
158 - write_error_msg "${file} doesn't exist"
159 - continue
160 - fi
161 -
162 - # already installed?
163 - if [[ -e ${bcdir}/$(basename ${bc}) ]] ; then
164 - write_error_msg "$(basename ${bc}) is already installed"
165 - continue
166 - fi
167 -
168 - # finally, create the symlink
169 - ln -s "${file}" "${bcdir}" || \
170 - die -q "Failed to create symlink from '${file}' to '${bcdir}'"
171 - done
172 -}
173 -
174 -### disable action ###
175 -
176 -describe_disable() {
177 - echo "Disable specified fontconfig .conf file(s)"
178 -}
179 -
180 -describe_disable_parameters() {
181 - echo "<target>"
182 -}
183 -
184 -describe_disable_options() {
185 - echo "<target> : Target name or number (from 'list' action)"
186 -}
187 -
188 -
189 -do_disable() {
190 - local bc bcdir="${ROOT}/etc/fonts/conf.d"
191 -
192 - [[ -z ${1} ]] && die -q "You didn't specify any .conf files to disable"
193 -
194 - targets=( $(find_targets) )
195 -
196 - for bc in $@ ; do
197 - local file target=${bc}
198 -
199 - is_number "${target}" && \
200 - target=${targets[$(( ${target} - 1 ))]}
201 -
202 - [[ -z "${target}" ]] && \
203 - die -q "Target \"${bc}\" doesn't appear to be valid!"
204 -
205 - bc=${target}
206 - file="${bcdir}/${bc}"
207 -
208 - # ignore any unrecognized options
209 - [[ ${bc} == --* ]] && continue
210 -
211 - # is in installed?
212 - if [[ ! -e ${file} ]] ; then
213 - write_error_msg "${bc} is not installed"
214 - continue
215 - fi
216 -
217 - # remove it if we have permissions
218 - if [[ -w $(dirname ${file}) ]] ; then
219 - rm "${file}" || die -q "Failed to remove ${file}"
220 - else
221 - die -q "You don't have permission to remove ${file}"
222 - fi
223 - done
224 -}
225 -
226 -# vim: set ft=eselect :