[packages/php-pecl-mongodb] it still compiles with php 5.4, so allow building it
glen
glen at pld-linux.org
Mon Apr 2 22:36:39 CEST 2018
commit ee0b9bb48f54d8573bf25f5f70457db9e5184591
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Mon Apr 2 23:36:18 2018 +0300
it still compiles with php 5.4, so allow building it
php-pecl-mongodb.spec | 2 ++
php-version.patch | 13 +++++++++++++
2 files changed, 15 insertions(+)
---
diff --git a/php-pecl-mongodb.spec b/php-pecl-mongodb.spec
index 76d5aa7..b0c716c 100644
--- a/php-pecl-mongodb.spec
+++ b/php-pecl-mongodb.spec
@@ -19,6 +19,7 @@ License: Apache v2.0
Group: Development/Languages/PHP
Source0: https://pecl.php.net/get/%{modname}-%{version}.tgz
# Source0-md5: 28084c896be33df1ca268898646b7e32
+Patch0: php-version.patch
Source1: mongodb.ini
URL: https://pecl.php.net/package/mongodb
BuildRequires: %{php_name}-cli
@@ -50,6 +51,7 @@ MongoDB driver.
%prep
%setup -qc
mv %{modname}-%{version}/* .
+%patch0 -p1
%if %{without bundled}
# Ensure we use system library
diff --git a/php-version.patch b/php-version.patch
new file mode 100644
index 0000000..35d87a0
--- /dev/null
+++ b/php-version.patch
@@ -0,0 +1,13 @@
+--- php54-pecl-mongodb-1.4.2/config.m4~ 2018-03-06 22:50:22.000000000 +0200
++++ php54-pecl-mongodb-1.4.2/config.m4 2018-04-02 23:07:46.043110993 +0300
+@@ -86,8 +86,8 @@
+ PHP_MONGODB_FOUND_VERSION=`${PHP_CONFIG} --version`
+ PHP_MONGODB_FOUND_VERNUM=`echo "${PHP_MONGODB_FOUND_VERSION}" | $AWK 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 100 + [$]2) * 100 + [$]3;}'`
+ AC_MSG_RESULT($PHP_MONGODB_FOUND_VERSION)
+- if test "$PHP_MONGODB_FOUND_VERNUM" -lt "50500"; then
+- AC_MSG_ERROR([not supported. Need a PHP version >= 5.5.0 (found $PHP_MONGODB_FOUND_VERSION)])
++ if test "$PHP_MONGODB_FOUND_VERNUM" -lt "50400"; then
++ AC_MSG_ERROR([not supported. Need a PHP version >= 5.4.0 (found $PHP_MONGODB_FOUND_VERSION)])
+ fi
+
+ PHP_ARG_ENABLE([developer-flags],
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-mongodb.git/commitdiff/ee0b9bb48f54d8573bf25f5f70457db9e5184591
More information about the pld-cvs-commit
mailing list