dev-php/PHPMailer: another revision to sort out PHP extension deps.
authorMichael Orlitzky <mjo@gentoo.org>
Fri, 22 Dec 2017 04:01:37 +0000 (23:01 -0500)
committerMichael Orlitzky <mjo@gentoo.org>
Fri, 22 Dec 2017 04:26:59 +0000 (23:26 -0500)
Package-Manager: Portage-2.3.13, Repoman-2.3.3

dev-php/PHPMailer/PHPMailer-5.2.26-r2.ebuild [moved from dev-php/PHPMailer/PHPMailer-5.2.26-r1.ebuild with 62% similarity]

similarity index 62%
rename from dev-php/PHPMailer/PHPMailer-5.2.26-r1.ebuild
rename to dev-php/PHPMailer/PHPMailer-5.2.26-r2.ebuild
index 152762c2a1fb86c87e01fb77d076411133e7b471..1cd077177b3f525ba4db667f91ec858084c09556 100644 (file)
@@ -10,9 +10,26 @@ 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"
+IUSE="doc examples idn ssl"
 
-RDEPEND="dev-lang/php:*[ctype,filter,ssl]"
+# The ctype and filter extensions get used unconditionally, with no
+# fallback and no "extension missing" exception. All of the other
+# extensions are technically optional, depending on how you use
+# PHPMailer and whether or not you're willing to settle for fallback
+# implementations.
+#
+# The insane dependency string is to prevent the ctype and filter
+# extensions from being provided by one version (i.e. slot) of PHP,
+# while intl and unicode are provided by another.
+RDEPEND="
+       ssl? (
+               idn?  ( dev-lang/php:*[ctype,filter,intl,ssl,unicode] )
+               !idn? ( dev-lang/php:*[ctype,filter,ssl] )
+       )
+       !ssl? (
+               idn?  ( dev-lang/php:*[ctype,filter,intl,unicode] )
+               !idn? ( dev-lang/php:*[ctype,filter] )
+       )"
 DEPEND="${RDEPEND}
        doc? ( dev-php/phpDocumentor )"