73750fe3f91cd77f53c6019cde8667046d909306
[gentoo.git] / dev-php / PEAR-Text_Figlet / PEAR-Text_Figlet-1.0.2-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 MY_PN="${PN/PEAR-/}"
7 MY_P="${MY_PN}-${PV}"
8
9 DESCRIPTION="Render text using FIGlet fonts"
10 HOMEPAGE="https://pear.php.net/package/Text_Figlet"
11 SRC_URI="http://download.pear.php.net/package/${MY_P}.tgz"
12 LICENSE="PHP-3.01
13         examples? ( GPL-2+ OFL-1.1 )"
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 IUSE="examples"
17
18 RDEPEND="dev-lang/php:*
19         dev-php/PEAR-PEAR"
20
21 S="${WORKDIR}/${MY_P}"
22
23 src_install() {
24         dodoc docs/README.TXT
25
26         if use examples; then
27                 dodoc -r docs/examples
28
29                 # Earlier versions of this ebuild installed this font under
30                 # /usr/share/php/data, which is obviously the wrong place for
31                 # them, but is where we have configured PEAR's data_dir. The
32                 # fonts can be referenced by absolute path, however, and not
33                 # just by name. Since this font is used in the example -- and as
34                 # long as no one expects this *particular* font to work out of
35                 # the box -- installing it with the docs will suffice.
36                 #
37                 # The one consumer of this in the tree is PEAR-Text_CAPTCHA, and
38                 # it loads its fonts using an absolute path.
39                 dodoc fonts/makisupa.flf
40         fi
41
42         insinto /usr/share/php
43         doins -r Text
44 }