1 |
commit: d3726d5022b3a9e70251ef93641ddaaef1e65f38 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 20 17:09:32 2017 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 20 17:09:32 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3726d50 |
7 |
|
8 |
app-misc/figlet: Fix bash completion for font directories with spaces in their names (bug #417947 by poletti.marco). |
9 |
|
10 |
Package-Manager: Portage-2.3.14, Repoman-2.3.6 |
11 |
|
12 |
app-misc/figlet/figlet-2.2.5-r1.ebuild | 38 ++++++++++++++++++++++++ |
13 |
app-misc/figlet/files/figlet.bashcomp-r1 | 51 ++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 89 insertions(+) |
15 |
|
16 |
diff --git a/app-misc/figlet/figlet-2.2.5-r1.ebuild b/app-misc/figlet/figlet-2.2.5-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..5544037f086 |
19 |
--- /dev/null |
20 |
+++ b/app-misc/figlet/figlet-2.2.5-r1.ebuild |
21 |
@@ -0,0 +1,38 @@ |
22 |
+# Copyright 1999-2017 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=6 |
26 |
+inherit eutils bash-completion-r1 toolchain-funcs |
27 |
+ |
28 |
+DESCRIPTION="program for making large letters out of ordinary text" |
29 |
+HOMEPAGE="http://www.figlet.org/" |
30 |
+SRC_URI="ftp://ftp.figlet.org/pub/figlet/program/unix/${P}.tar.gz" |
31 |
+ |
32 |
+LICENSE="BSD" |
33 |
+SLOT="0" |
34 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
35 |
+ |
36 |
+src_compile() { |
37 |
+ emake clean |
38 |
+ emake \ |
39 |
+ CC="$(tc-getCC)" \ |
40 |
+ LD="$(tc-getCC)" \ |
41 |
+ CFLAGS="${CFLAGS}" \ |
42 |
+ LDFLAGS="${LDFLAGS}" \ |
43 |
+ prefix="${EPREFIX}/usr" \ |
44 |
+ all |
45 |
+} |
46 |
+ |
47 |
+src_install() { |
48 |
+ emake \ |
49 |
+ DESTDIR="${D}" \ |
50 |
+ BINDIR="${EPREFIX}/usr/bin" \ |
51 |
+ MANDIR="${EPREFIX}/usr/share/man" \ |
52 |
+ prefix="${EPREFIX}/usr" \ |
53 |
+ install |
54 |
+ |
55 |
+ doman chkfont.6 figlet.6 figlist.6 showfigfonts.6 |
56 |
+ dodoc README figfont.txt |
57 |
+ |
58 |
+ newbashcomp "${FILESDIR}"/figlet.bashcomp-r1 figlet |
59 |
+} |
60 |
|
61 |
diff --git a/app-misc/figlet/files/figlet.bashcomp-r1 b/app-misc/figlet/files/figlet.bashcomp-r1 |
62 |
new file mode 100644 |
63 |
index 00000000000..cf224dbde3f |
64 |
--- /dev/null |
65 |
+++ b/app-misc/figlet/files/figlet.bashcomp-r1 |
66 |
@@ -0,0 +1,51 @@ |
67 |
+# Copyright 1999-2017 Gentoo Foundation |
68 |
+# Distributed under the terms of the GNU General Public License v2 |
69 |
+ |
70 |
+# bash command-line completion for figlet |
71 |
+# author: Aaron Walker <ka0ttic@g.o> |
72 |
+ |
73 |
+_figlet() { |
74 |
+ local cur prev opts x |
75 |
+ COMPREPLY=() |
76 |
+ cur="${COMP_WORDS[COMP_CWORD]}" |
77 |
+ prev="${COMP_WORDS[COMP_CWORD-1]}" |
78 |
+ opts="-f -d -c -l -r -x -t -w -p -n -D -E -C -N -s -S -k -W -o \ |
79 |
+ -m -v -I -L -R -X" |
80 |
+ |
81 |
+ if [[ "${cur}" == -* || ${COMP_CWORD} -eq 1 ]] ; then |
82 |
+ COMPREPLY=( $(compgen -W "${opts}" -- $cur) ) |
83 |
+ return 0 |
84 |
+ fi |
85 |
+ |
86 |
+ case "${prev}" in |
87 |
+ -f) |
88 |
+ COMPREPLY=( $(compgen -f -- $cur) \ |
89 |
+ $(compgen -W "$(\ |
90 |
+ for x in /usr/share/figlet/*.flf ; do \ |
91 |
+ [[ -f "${x}" ]] && { local y=${x##*/} ; echo ${y%.*} ; } \ |
92 |
+ done)" -- $cur) ) |
93 |
+ ;; |
94 |
+ -d) |
95 |
+ _filedir -d |
96 |
+ ;; |
97 |
+ -C) |
98 |
+ COMPREPLY=( $(compgen -f -- $cur) \ |
99 |
+ $(compgen -W "$(\ |
100 |
+ for x in /usr/share/figlet/*.flc ; do \ |
101 |
+ [[ -f "${x}" ]] && { local y=${x##*/} ; echo ${y%.*} ; } \ |
102 |
+ done)" -- $cur) ) |
103 |
+ ;; |
104 |
+ -m) |
105 |
+ COMPREPLY=( $(compgen -W "$(\ |
106 |
+ for ((x = 1 ; x < 64 ; x++)) ; do \ |
107 |
+ echo ${x} ; \ |
108 |
+ done)" ) ) |
109 |
+ ;; |
110 |
+ -I) |
111 |
+ COMPREPLY=( $(compgen -W "-1 0 1 2 3 4" -- $cur) ) |
112 |
+ ;; |
113 |
+ esac |
114 |
+} |
115 |
+complete -o filenames -F _figlet figlet |
116 |
+ |
117 |
+# vim: set ft=sh tw=80 sw=4 et : |