Gentoo Archives: gentoo-commits

From: Brian Evans <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/PEAR-Validate/files/, dev-php/PEAR-Validate/
Date: Wed, 14 Feb 2018 17:53:02
Message-Id: 1518630757.852388e03888fafa383aaede9c8c564a6189344b.grknight@gentoo
1 commit: 852388e03888fafa383aaede9c8c564a6189344b
2 Author: Brian Evans <grknight <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 14 17:52:37 2018 +0000
4 Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 14 17:52:37 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=852388e0
7
8 dev-php/PEAR-Validate: Revbump for EAPI, eclass changes and add tests
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 .../PEAR-Validate/PEAR-Validate-0.8.5-r1.ebuild | 22 ++++++++++++++++++++++
13 .../PEAR-Validate/files/0.8.5-fix-test-php7.patch | 19 +++++++++++++++++++
14 2 files changed, 41 insertions(+)
15
16 diff --git a/dev-php/PEAR-Validate/PEAR-Validate-0.8.5-r1.ebuild b/dev-php/PEAR-Validate/PEAR-Validate-0.8.5-r1.ebuild
17 new file mode 100644
18 index 00000000000..e8e5e342cc5
19 --- /dev/null
20 +++ b/dev-php/PEAR-Validate/PEAR-Validate-0.8.5-r1.ebuild
21 @@ -0,0 +1,22 @@
22 +# Copyright 1999-2018 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +inherit php-pear-r2
28 +
29 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
30 +
31 +DESCRIPTION="Validation class"
32 +LICENSE="BSD"
33 +SLOT="0"
34 +IUSE="minimal test"
35 +
36 +DEPEND="test? ( dev-php/PEAR-PEAR dev-php/PEAR-Date )"
37 +RDEPEND="!minimal? ( dev-php/PEAR-Date )"
38 +PATCHES=( "${FILESDIR}/0.8.5-fix-test-php7.patch" )
39 +HTML_DOCS=( docs/Example_Locale.php docs/sample_multiple.php )
40 +
41 +src_test() {
42 + peardev run-tests tests || die
43 +}
44
45 diff --git a/dev-php/PEAR-Validate/files/0.8.5-fix-test-php7.patch b/dev-php/PEAR-Validate/files/0.8.5-fix-test-php7.patch
46 new file mode 100644
47 index 00000000000..069c5467d04
48 --- /dev/null
49 +++ b/dev-php/PEAR-Validate/files/0.8.5-fix-test-php7.patch
50 @@ -0,0 +1,19 @@
51 +From a22b5cf2c7e4b4cf366c311150721961d9b456ea Mon Sep 17 00:00:00 2001
52 +From: Christian Weiske <cweiske@×××××××.de>
53 +Date: Thu, 16 Jul 2015 00:38:55 +0200
54 +Subject: [PATCH] Make tests run on PHP 7
55 +
56 +diff --git a/Validate.php b/Validate.php
57 +index a8f621c..ea6cfa7 100644
58 +--- a/Validate.php
59 ++++ b/Validate.php
60 +@@ -583,7 +583,8 @@ function email($email, $options = null)
61 + if ($use_rfc822? Validate::__emailRFC822($email, $options) :
62 + preg_match($regex, $email)) {
63 + if ($check_domain && function_exists('checkdnsrr')) {
64 +- $domain = preg_replace('/[^-a-z.0-9]/i', '', array_pop(explode('@', $email)));
65 ++ $parts = explode('@', $email);
66 ++ $domain = preg_replace('/[^-a-z.0-9]/i', '', array_pop($parts));
67 + if (checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A')) {
68 + return true;
69 + }