summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seren <guillaumeseren@gmail.com>2016-11-24 09:09:45 +0100
committerMichael Orlitzky <mjo@gentoo.org>2016-12-18 18:17:06 -0500
commitd2730461386a81b6b9ba2bce1104adf9c51169fb (patch)
tree8df0f8f12687b407159b343a59b6a82eeefc7c6c /dev-php/composer/files
parentdev-php/symfony-console: Add 2.7.9 version (diff)
downloadgentoo-d2730461386a81b6b9ba2bce1104adf9c51169fb.tar.gz
gentoo-d2730461386a81b6b9ba2bce1104adf9c51169fb.tar.bz2
gentoo-d2730461386a81b6b9ba2bce1104adf9c51169fb.zip
dev-php/composer: Add 1.2.2 version
This package is a source alternative to the phar one. It use dev-php/fedora-autoloader to provide a PSR4 loader, for itself (composer) and all the dependencies, bug 439206. Suggested-by: Michael Orlitzky <mjo@gentoo.org> Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'dev-php/composer/files')
-rw-r--r--dev-php/composer/files/autoload.php25
-rw-r--r--dev-php/composer/files/composer-update-paths.patch46
2 files changed, 71 insertions, 0 deletions
diff --git a/dev-php/composer/files/autoload.php b/dev-php/composer/files/autoload.php
new file mode 100644
index 000000000000..5be766d60f49
--- /dev/null
+++ b/dev-php/composer/files/autoload.php
@@ -0,0 +1,25 @@
+<?php
+/* Autoloader for composer and its dependencies */
+
+$vendorDir = '/usr/share/php';
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+}
+
+\Fedora\Autoloader\Autoload::addPsr4('Composer\\', __DIR__);
+
+// Dependencies
+\Fedora\Autoloader\Dependencies::required(array(
+ $vendorDir . '/JsonSchema/autoload.php',
+ $vendorDir . '/Composer/CaBundle/autoload.php',
+ $vendorDir . '/Composer/Semver/autoload.php',
+ $vendorDir . '/Composer/Spdx/autoload.php',
+ $vendorDir . '/Seld/JsonLint/autoload.php',
+ $vendorDir . '/Symfony/Component/Console/autoload.php',
+ $vendorDir . '/Symfony/Component/Finder/autoload.php',
+ $vendorDir . '/Symfony/Component/Process/autoload.php',
+ $vendorDir . '/Symfony/Component/Filesystem/autoload.php',
+ $vendorDir . '/Seld/PharUtils/autoload.php',
+ $vendorDir . '/Seld/CliPrompt/autoload.php',
+ $vendorDir . '/Psr/Log/autoload.php',
+));
diff --git a/dev-php/composer/files/composer-update-paths.patch b/dev-php/composer/files/composer-update-paths.patch
new file mode 100644
index 000000000000..754cbabcbcfe
--- /dev/null
+++ b/dev-php/composer/files/composer-update-paths.patch
@@ -0,0 +1,46 @@
+--- ./src/Composer/Autoload/AutoloadGenerator.php 2016-11-03 17:43:15.000000000 +0100
++++ ./src/Composer/Autoload/AutoloadGenerator.php 2016-11-18 16:54:55.664985847 +0100
+@@ -291,7 +291,7 @@
+ file_put_contents($targetDir.'/autoload_real.php', $this->getAutoloadRealFile(true, (bool) $includePathFileContents, $targetDirLoader, (bool) $includeFilesFileContents, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader, $staticPhpVersion));
+
+ $this->safeCopy(__DIR__.'/ClassLoader.php', $targetDir.'/ClassLoader.php');
+- $this->safeCopy(__DIR__.'/../../../LICENSE', $targetDir.'/LICENSE');
++ $this->safeCopy('/usr/share/php/Composer/Composer/LICENSE', $targetDir.'/LICENSE');
+
+ if ($this->runScripts) {
+ $this->eventDispatcher->dispatchScript(ScriptEvents::POST_AUTOLOAD_DUMP, $this->devMode, array(), array(
+
+--- ./tests/Composer/Test/Json/ComposerSchemaTest.php 2016-11-03 17:43:15.000000000 +0100
++++ ./tests/Composer/Test/Json/ComposerSchemaTest.php 2016-11-20 18:27:43.169665101 +0100
+@@ -87,7 +87,7 @@
+
+ private function check($json)
+ {
+- $schema = json_decode(file_get_contents(__DIR__ . '/../../../../res/composer-schema.json'));
++ $schema = json_decode(file_get_contents('/usr/share/php/Composer/Composer/res/composer-schema.json'));
+ $validator = new Validator();
+ $validator->check(json_decode($json), $schema);
+
+--- ./src/Composer/Json/JsonFile.php 2016-11-04 02:51:03.844719014 +0100
++++ ./src/Composer/Json/JsonFile.php 2016-11-18 16:44:06.065969630 +0100
+@@ -156,7 +156,7 @@
+ self::validateSyntax($content, $this->path);
+ }
+
+- $schemaFile = __DIR__ . '/../../../res/composer-schema.json';
++ $schemaFile = '/usr/share/php/Composer/Composer/res/composer-schema.json';
+ $schemaData = json_decode(file_get_contents($schemaFile));
+
+ if ($schema === self::LAX_SCHEMA) {
+
+--- ./bin/composer 2016-11-18 15:56:40.615898592 +0100
++++ ./bin/composer 2016-11-18 16:06:05.348912690 +0100
+@@ -5,7 +5,7 @@
+ echo 'Warning: Composer should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
+ }
+
+-require __DIR__.'/../src/bootstrap.php';
++require '/usr/share/php/Composer/Composer/autoload.php';
+
+ use Composer\Console\Application;
+