summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-phpunit-phploc.spec11
-rw-r--r--phploc-rpm.patch27
2 files changed, 22 insertions, 16 deletions
diff --git a/php-phpunit-phploc.spec b/php-phpunit-phploc.spec
index 4eb3640..6f7fd2a 100644
--- a/php-phpunit-phploc.spec
+++ b/php-phpunit-phploc.spec
@@ -1,4 +1,4 @@
-# spec file for php-phpunit-phploc
+# remirepo/fedora spec file for php-phpunit-phploc
#
# Copyright (c) 2009-2015 Guillaume Kulakowski, Christof Damian, Remi Collet
#
@@ -7,7 +7,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit a47a7c4758bdfb7cebbb1ccaa2c9df882b10db7f
+%global gh_commit d6b05c9072ed7ec3e365722d129f220c24aa90f1
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project phploc
@@ -17,7 +17,7 @@
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
Name: php-phpunit-phploc
-Version: 2.1.1
+Version: 2.1.2
Release: 1%{?dist}
Summary: A tool for quickly measuring the size of a PHP project
@@ -55,6 +55,7 @@ BuildRequires: php-symfony-console < 3
# "sebastian/version": "~1.0.3",
# "symfony/console": "~2.5"
Requires: php(language) >= 5.4
+Requires: php-cli
Requires: php-composer(sebastian/finder-facade) >= 1.1
Requires: php-composer(sebastian/finder-facade) < 2
Requires: php-composer(sebastian/git) >= 2.0
@@ -131,6 +132,10 @@ fi
%changelog
+* Tue May 26 2015 Remi Collet <remi@fedoraproject.org> - 2.1.2-1
+- update to 2.1.2
+- ensure compatibility with SCL
+
* Mon Apr 13 2015 Remi Collet <remi@fedoraproject.org> - 2.1.1-1
- update to 2.1.1
diff --git a/phploc-rpm.patch b/phploc-rpm.patch
index 62f5c6b..414b0f3 100644
--- a/phploc-rpm.patch
+++ b/phploc-rpm.patch
@@ -1,16 +1,10 @@
diff -up ./phploc.rpm ./phploc
---- ./phploc.rpm 2015-03-11 07:14:28.241134864 +0100
-+++ ./phploc 2015-03-11 07:16:29.647622059 +0100
-@@ -1,4 +1,4 @@
--#!/usr/bin/env php
-+#!/usr/bin/php
- <?php
- /*
- * This file is part of PHPLOC.
-@@ -9,23 +9,7 @@
+--- ./phploc.rpm 2015-05-26 16:03:47.000000000 +0200
++++ ./phploc 2015-05-26 19:14:44.687212792 +0200
+@@ -9,23 +9,16 @@
* file that was distributed with this source code.
*/
-
+
-$loaded = false;
-
-foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
@@ -19,8 +13,15 @@ diff -up ./phploc.rpm ./phploc
- $loaded = true;
- 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);
+
-if (!$loaded) {
- die(
- 'You need to set up the project dependencies using the following commands:' . PHP_EOL .
@@ -29,6 +30,6 @@ diff -up ./phploc.rpm ./phploc
- );
-}
+require 'SebastianBergmann/PHPLOC/autoload.php';
-
+
$application = new SebastianBergmann\PHPLOC\CLI\Application;
$application->run();