From 3f5f603d9cf1078f6ee4a27d6e3f846e53baa409 Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Tue, 15 Nov 2016 10:32:57 +0100
Subject: php-zendframework-zend-math: drop mcrypt BR

---
 php-zendframework-zend-math-pr24.patch | 31 +++++++++++++++++++++++++++++++
 php-zendframework-zend-math.spec       | 21 ++++++++++++++++++---
 2 files changed, 49 insertions(+), 3 deletions(-)
 create mode 100644 php-zendframework-zend-math-pr24.patch

diff --git a/php-zendframework-zend-math-pr24.patch b/php-zendframework-zend-math-pr24.patch
new file mode 100644
index 0000000..15db9cb
--- /dev/null
+++ b/php-zendframework-zend-math-pr24.patch
@@ -0,0 +1,31 @@
+From 16291e8a59c5791518eaaa7007e024ff2baed788 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Thu, 15 Sep 2016 15:09:10 +0200
+Subject: [PATCH] fix #23 missing method in HashTiming (RandomLib 1.2)
+
+---
+ Source/HashTiming.php | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/Source/HashTiming.php b/Source/HashTiming.php
+index a50ce43..63d2894 100644
+--- a/Source/HashTiming.php
++++ b/Source/HashTiming.php
+@@ -62,6 +62,17 @@ public static function getStrength()
+     }
+ 
+     /**
++     * If the source is currently available.
++     * Reasons might be because the library is not installed
++     *
++     * @return bool
++     */
++    public static function isSupported()
++    {
++        return true;
++    }
++
++    /**
+      * Generate a random string of the specified size
+      *
+      * @param int $size The size of the requested random string
diff --git a/php-zendframework-zend-math.spec b/php-zendframework-zend-math.spec
index 8600c6d..2c38af0 100644
--- a/php-zendframework-zend-math.spec
+++ b/php-zendframework-zend-math.spec
@@ -21,7 +21,7 @@
 
 Name:           php-%{gh_owner}-%{gh_project}
 Version:        2.7.0
-Release:        1%{?dist}
+Release:        3%{?dist}
 Summary:        Zend Framework %{library} component
 
 Group:          Development/Libraries
@@ -30,6 +30,9 @@ URL:            http://framework.zend.com/
 Source0:        %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
 Source1:        makesrc.sh
 
+# https://github.com/zendframework/zend-math/pull/24
+Patch0:         %{name}-pr24.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildArch:      noarch
 # Tests
@@ -40,8 +43,10 @@ BuildRequires:  php-gmp
 BuildRequires:  php-openssl
 BuildRequires:  php-pcre
 BuildRequires:  php-spl
+%if 0%{?fedora} < 25
 # test suite hangs without (need investigation)
 BuildRequires:  php-mcrypt
+%endif
 # From composer, "require-dev": {
 #        "fabpot/php-cs-fixer": "1.7.*",
 #        "ircmaxell/random-lib": "~1.1",
@@ -88,6 +93,9 @@ So far the supported functionalities are:
 %prep
 %setup -q -n %{gh_project}-%{gh_commit}
 
+cd src
+%patch0 -p1
+
 
 %build
 # Empty build section, nothing required
@@ -118,8 +126,8 @@ EOF
 %{_bindir}/phpunit --include-path=%{buildroot}%{php_home}
 
 # remirepo:3
-if which php70; then
-   php70 %{_bindir}/phpunit --include-path=%{buildroot}%{php_home}
+if which php71; then
+   php71 %{_bindir}/phpunit --include-path=%{buildroot}%{php_home}
 fi
 %else
 : Test suite disabled
@@ -140,6 +148,13 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Tue Nov 15 2016 Remi Collet <remi@fedoraproject.org> - 2.7.0-3
+- drop mcrypt build dependency
+
+* Thu Sep 15 2016 Remi Collet <remi@fedoraproject.org> - 2.7.0-2
+- fix FTBFS detected by Koschei, patch from
+  https://github.com/zendframework/zend-math/pull/24
+
 * Fri Apr  8 2016 Remi Collet <remi@fedoraproject.org> - 2.7.0-1
 - update to 2.7.0
 - add mandatory dependency on ircmaxell/random-lib
-- 
cgit