summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-05-26 19:46:44 +0200
committerRemi Collet <fedora@famillecollet.com>2015-05-26 19:46:44 +0200
commit25759d715a2ba0d71b8dd36e0633f5cef65fc4e5 (patch)
tree6e297668223cd4973fdd113cae8f59e1064caabb
parent24a5f7d8bf23dbdd713da4ee2eba0584cd4ff080 (diff)
php-phpunit-PHPUnit: ensure compat. with RHSCL
-rw-r--r--php-phpunit-PHPUnit.spec5
-rw-r--r--phpunit-rpm.patch19
2 files changed, 17 insertions, 7 deletions
diff --git a/php-phpunit-PHPUnit.spec b/php-phpunit-PHPUnit.spec
index 98ff086..21bac74 100644
--- a/php-phpunit-PHPUnit.spec
+++ b/php-phpunit-PHPUnit.spec
@@ -18,7 +18,7 @@
Name: php-phpunit-PHPUnit
Version: 4.6.7
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The PHP Unit Testing framework
Group: Development/Libraries
@@ -204,6 +204,9 @@ fi
%changelog
+* Tue May 26 2015 Remi Collet <remi@fedoraproject.org> - 4.6.7-3
+- ensure compatibility with SCL
+
* Tue May 26 2015 Remi Collet <remi@fedoraproject.org> - 4.6.7-2
- detect and redirect to composer installed version #1157910
diff --git a/phpunit-rpm.patch b/phpunit-rpm.patch
index 7392971..46fd1ea 100644
--- a/phpunit-rpm.patch
+++ b/phpunit-rpm.patch
@@ -1,7 +1,6 @@
-diff -up ./phpunit.rpm ./phpunit
---- ./phpunit.rpm 2015-01-17 12:24:41.000000000 +0100
-+++ ./phpunit 2015-01-18 08:52:50.896228541 +0100
-@@ -13,22 +13,11 @@
+--- ./phpunit.rpm 2015-05-25 07:18:18.000000000 +0200
++++ ./phpunit 2015-05-26 19:43:34.101986869 +0200
+@@ -13,22 +13,21 @@
ini_set('date.timezone', 'UTC');
}
@@ -10,8 +9,15 @@ diff -up ./phpunit.rpm ./phpunit
- define('PHPUNIT_COMPOSER_INSTALL', $file);
- break;
- }
--}
--
++// Ensure correct include_path for RHSCL
++$inc = get_include_path();
++$dirs = explode(':', $inc);
++if (!in_array('/usr/share/php', $dirs)) {
++ $dirs[] = '/usr/share/php';
++ set_include_path(implode(':', $dirs));
+ }
++unset ($inc, $dirs);
+
-unset($file);
-
-if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
@@ -21,6 +27,7 @@ diff -up ./phpunit.rpm ./phpunit
- 'php composer.phar install' . PHP_EOL
- );
- die(1);
++// Libraries PATH
+if (file_exists('./vendor/phpunit/phpunit/phpunit') && file_exists('./vendor/autoload.php')) {
+ echo "\n==== Redirecting to composer installed version in vendor/phpunit ====\n\n";
+ define ('PHPUNIT_COMPOSER_INSTALL', realpath('./vendor/autoload.php'));