summaryrefslogtreecommitdiffstats
path: root/php-pdepend-PHP-Depend-rpm.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-07-02 08:54:29 +0200
committerRemi Collet <fedora@famillecollet.com>2015-07-02 08:54:29 +0200
commitcf0989b01ac6df63062549068842c62033bff644 (patch)
tree9ad67f0a44f6754a61ab0e26c048fac3ce866a76 /php-pdepend-PHP-Depend-rpm.patch
parent760a7e19bd21d173d023d06e26fb88d5b8f1e7f7 (diff)
php-pdepend-PHP-Depend: 2.1.0
Diffstat (limited to 'php-pdepend-PHP-Depend-rpm.patch')
-rw-r--r--php-pdepend-PHP-Depend-rpm.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/php-pdepend-PHP-Depend-rpm.patch b/php-pdepend-PHP-Depend-rpm.patch
new file mode 100644
index 0000000..845b162
--- /dev/null
+++ b/php-pdepend-PHP-Depend-rpm.patch
@@ -0,0 +1,46 @@
+diff -up src/bin/pdepend.rpm src/bin/pdepend
+--- src/bin/pdepend.rpm 2015-07-02 08:09:31.386769752 +0200
++++ src/bin/pdepend 2015-07-02 08:09:38.708807234 +0200
+@@ -43,17 +43,7 @@
+
+ use PDepend\TextUI\Command;
+
+-// PEAR/svn workaround
+-if (strpos('@php_bin@', '@php_bin') === 0) {
+- set_include_path('.' . PATH_SEPARATOR . dirname(__FILE__) . '/../main/php');
+-}
+-
+-// check for pdepend installed as composer package
+-if (file_exists(__DIR__ . '/../../../../autoload.php')) {
+- require_once __DIR__ . '/../../../../autoload.php';
+-} else {
+- require_once __DIR__ . '/../../vendor/autoload.php';
+-}
++require '/usr/share/php/PDepend/autoload.php';
+
+ // Allow as much memory as possible by default
+ if (extension_loaded('suhosin') && is_numeric(ini_get('suhosin.memory_limit'))) {
+diff -up src/main/php/PDepend/Application.php.rpm src/main/php/PDepend/Application.php
+--- src/main/php/PDepend/Application.php.rpm 2015-07-02 08:26:18.911899973 +0200
++++ src/main/php/PDepend/Application.php 2015-07-02 08:27:25.327236899 +0200
+@@ -136,7 +136,7 @@ class Application
+ $container->prependExtensionConfig('pdepend', array());
+ $container->addCompilerPass(new DependencyInjection\Compiler\ProcessListenerPass());
+
+- $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../../../resources'));
++ $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../../php-pdepend-PHP-Depend/resources'));
+
+ foreach ($extensions as $extension) {
+ $container->registerExtension($extension);
+diff -up src/main/php/PDepend/DependencyInjection/PdependExtension.php.rpm src/main/php/PDepend/DependencyInjection/PdependExtension.php
+--- src/main/php/PDepend/DependencyInjection/PdependExtension.php.rpm 2015-07-02 08:27:39.270307644 +0200
++++ src/main/php/PDepend/DependencyInjection/PdependExtension.php 2015-07-02 08:29:02.808731429 +0200
+@@ -80,7 +80,7 @@ class PdependExtension extends SymfonyEx
+ $configuration = new Configuration($extensionManager->getActivatedExtensions());
+ $config = $this->processConfiguration($configuration, $configs);
+
+- $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../../../resources'));
++ $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../../../php-pdepend-PHP-Depend/resources'));
+ $loader->load('services.xml');
+
+ foreach ($extensionManager->getActivatedExtensions() as $extension) {