1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 DESCRIPTION="Full-featured email creation and transfer class for PHP"
7 HOMEPAGE="https://github.com/PHPMailer/PHPMailer"
8 SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12 KEYWORDS="~amd64 ~x86"
14 # To help out the Composer children, the tests and examples are missing
15 # from the release tarballs.
18 # The ctype and filter extensions get used unconditionally, with no
19 # fallback and no "extension missing" exception. All of the other
20 # extensions are technically optional, depending on how you use
21 # PHPMailer and whether or not you're willing to settle for fallback
24 # The insane dependency string is to prevent the ctype and filter
25 # extensions from being provided by one version (i.e. slot) of PHP,
26 # while intl and unicode are provided by another.
29 idn? ( dev-lang/php:*[ctype,filter,intl,ssl,unicode] )
30 !idn? ( dev-lang/php:*[ctype,filter,ssl] )
33 idn? ( dev-lang/php:*[ctype,filter,intl,unicode] )
34 !idn? ( dev-lang/php:*[ctype,filter] )
36 BDEPEND="doc? ( dev-php/phpDocumentor )"
39 # OAuth.php relies on a (now non-nonexistent) autoloader. We remove
40 # it early so that we don't generate documentation for it later on.
41 rm src/OAuth.php || die 'failed to remove src/OAuth.php'
47 phpdoc --filename="src/*.php" \
49 --cache-folder="${T}" \
54 || die "failed to generate API documentation"
59 # The PHPMailer class loads its language files
60 # using a relative path, so we need to keep the "src" here.
61 insinto "/usr/share/php/${PN}"
64 dodoc README.md SECURITY.md
65 use doc && dodoc -r html/*
69 elog "${PN} has been installed in /usr/share/php/${PN}/."
70 elog "Upstream no longer provides an autoloader, so you will need"
71 elog "to include each source file (for example: PHPMailer.php,"
72 elog "Exception.php,...) that you need."