diff options
Diffstat (limited to 'dev-php/PHPMailer/PHPMailer-5.2.26.ebuild')
-rw-r--r-- | dev-php/PHPMailer/PHPMailer-5.2.26.ebuild | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/dev-php/PHPMailer/PHPMailer-5.2.26.ebuild b/dev-php/PHPMailer/PHPMailer-5.2.26.ebuild new file mode 100644 index 000000000000..aad616dc2ce2 --- /dev/null +++ b/dev-php/PHPMailer/PHPMailer-5.2.26.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Full-featured email creation and transfer class for PHP" +HOMEPAGE="https://github.com/PHPMailer/PHPMailer" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc +examples" + +# The ctype and filter dependencies can be verified by grepping the +# code... composer.json isn't always up-to-date. +RDEPEND="dev-lang/php:*[ctype,filter]" +DEPEND="${RDEPEND} + doc? ( dev-php/phpDocumentor )" + +src_compile(){ + if use doc; then + phpdoc --filename="class.*.php" \ + --target="./html" \ + --cache-folder="${T}" \ + --title="${PN}" \ + --sourcecode \ + --force \ + --progressbar \ + || die "failed to generate API documentation" + fi +} + +src_install(){ + # To help out the Composer kids, most of the documentation and + # tests are missing from the release tarballs. + insinto "/usr/share/php/${PN}" + doins -r *.php language extras + + use examples && dodoc -r examples + use doc && dodoc -r html/* +} + +pkg_postinst(){ + elog "${PN} has been installed in /usr/share/php/${PN}/." + elog "To use it in a script, require('${PN}/${PN}Autoload.php')," + elog "and then use the ${PN} class normally. Most of the examples in" + elog "the documentation should work without further modification." +} |