summaryrefslogtreecommitdiffstats
path: root/php-pdepend-PHP-Depend-rpm.patch
blob: 845b1626a82b294e9be70ccecb4eeedb86758e9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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) {