1 |
commit: f8beab2f41f763b95f33ad2f8478c2291cbc00f8 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 27 01:23:37 2017 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 27 12:16:31 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8beab2f |
7 |
|
8 |
dev-php/composer: version bump 1.3.1 -> 1.4.1. |
9 |
|
10 |
This commit adds composer-1.4.1 and removes the old composer-1.3.1 at |
11 |
the same time, allowing me to mess with the autoload.php in-flight. We |
12 |
had one patch that was giving us trouble with v1.4.1, and this new |
13 |
ebuild is an experiment to see if we can do away with it. Instead of |
14 |
installing to /usr/share/php/Composer, the new v1.4.1 will install to |
15 |
/usr/share/composer, and only create a symlink from /usr/bin/composer |
16 |
to the "real" executable under /usr/share. |
17 |
|
18 |
Since the executable loads everything via relative paths, having the |
19 |
"real" executable under /usr/share (with the rest of its stuff) allows |
20 |
composer to find what it's looking for out-of-the box, without us |
21 |
having to point it towards our particular install location. As a |
22 |
result, I've removed the one patch that did so, and I've updated |
23 |
autoload.php with the new path. |
24 |
|
25 |
Thanks are due to Guillaume Seren who did most of the prerequisite |
26 |
work and stayed on top of the pull request and bug. |
27 |
|
28 |
Gentoo-Bug: 613898 |
29 |
Closes: https://github.com/gentoo/gentoo/pull/4364 |
30 |
|
31 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
32 |
|
33 |
dev-php/composer/Manifest | 2 +- |
34 |
...composer-1.3.1.ebuild => composer-1.4.1.ebuild} | 22 ++++++----- |
35 |
dev-php/composer/files/autoload.php | 5 ++- |
36 |
dev-php/composer/files/composer-update-paths.patch | 46 ---------------------- |
37 |
4 files changed, 18 insertions(+), 57 deletions(-) |
38 |
|
39 |
diff --git a/dev-php/composer/Manifest b/dev-php/composer/Manifest |
40 |
index 623786d0634..aaf64094054 100644 |
41 |
--- a/dev-php/composer/Manifest |
42 |
+++ b/dev-php/composer/Manifest |
43 |
@@ -1 +1 @@ |
44 |
-DIST composer-1.3.1.tar.gz 1081862 SHA256 af40d800c8120c802f80c28cbd80824212111e62e3ef8b96a73ae639cff8f620 SHA512 3b8c4c708cd3b88b49574c691605ef42c2c083b300f910be3b897350c9c35d9f923f47cbcfa64e19d89c28079f0631350f30db747d89808183d20cb779895afb WHIRLPOOL 6545c1f38e11e4233c4ee6f257a8e0c090c2de2981ea9e00a7de54fe3d4337aaa16e1e873da7db2009ad355e3c6da4d7eb12eec81992233840b26bc2b1a0f373 |
45 |
+DIST composer-1.4.1.tar.gz 1090505 SHA256 27c0c134d6a151de8e552f4da98a2100973a64a33c462b14bd5cb463cee254dc SHA512 8fc1e53666151c2b029544216dfc842379763bd3e5085c15c118dfa8ca0da8559a48909cb5ee29f37f6ed07b7572375354a09bd160b9c0828fe40e809defd8a9 WHIRLPOOL 3104bbffc6e5241d052454169e88a0a167acf0229f1ed2fbf184eef9ccb5cd4ab00021be431b84389b40fe895fb1e560e8ecc2f7dd99f457c7190877a0fe107e |
46 |
|
47 |
diff --git a/dev-php/composer/composer-1.3.1.ebuild b/dev-php/composer/composer-1.4.1.ebuild |
48 |
similarity index 69% |
49 |
rename from dev-php/composer/composer-1.3.1.ebuild |
50 |
rename to dev-php/composer/composer-1.4.1.ebuild |
51 |
index 366cc6ed80a..90d53510da0 100644 |
52 |
--- a/dev-php/composer/composer-1.3.1.ebuild |
53 |
+++ b/dev-php/composer/composer-1.4.1.ebuild |
54 |
@@ -5,7 +5,7 @@ EAPI=6 |
55 |
|
56 |
DESCRIPTION="Dependency Manager for PHP" |
57 |
HOMEPAGE="https://github.com/composer/composer" |
58 |
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
59 |
+SRC_URI="${HOMEPAGE}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
60 |
|
61 |
LICENSE="MIT" |
62 |
SLOT="0" |
63 |
@@ -27,16 +27,20 @@ RDEPEND=" |
64 |
>=dev-php/symfony-finder-2.7.20 |
65 |
>=dev-php/symfony-process-2.8.12" |
66 |
|
67 |
-PATCHES=( |
68 |
- "${FILESDIR}/${PN}-update-paths.patch" |
69 |
-) |
70 |
- |
71 |
src_install() { |
72 |
- insinto "/usr/share/php/Composer/Composer" |
73 |
+ insinto "/usr/share/${PN}" |
74 |
|
75 |
# Composer expects the LICENSE file to be there, and the |
76 |
# easiest thing to do is to give it what it wants. |
77 |
- doins -r src/Composer/. res LICENSE "${FILESDIR}"/autoload.php |
78 |
- dobin bin/composer |
79 |
- dodoc README.md |
80 |
+ doins -r src res LICENSE |
81 |
+ |
82 |
+ insinto "/usr/share/${PN}/vendor" |
83 |
+ doins "${FILESDIR}"/autoload.php |
84 |
+ |
85 |
+ exeinto "/usr/share/${PN}/bin" |
86 |
+ doexe "bin/${PN}" |
87 |
+ dosym "/usr/share/${PN}/bin/${PN}" "/usr/bin/${PN}" |
88 |
+ |
89 |
+ dodoc CHANGELOG.md README.md doc/*.md |
90 |
+ dodoc -r doc/articles doc/faqs |
91 |
} |
92 |
|
93 |
diff --git a/dev-php/composer/files/autoload.php b/dev-php/composer/files/autoload.php |
94 |
index 5be766d60f4..30d8495a454 100644 |
95 |
--- a/dev-php/composer/files/autoload.php |
96 |
+++ b/dev-php/composer/files/autoload.php |
97 |
@@ -6,7 +6,10 @@ if (!class_exists('Fedora\\Autoloader\\Autoload', false)) { |
98 |
require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; |
99 |
} |
100 |
|
101 |
-\Fedora\Autoloader\Autoload::addPsr4('Composer\\', __DIR__); |
102 |
+\Fedora\Autoloader\Autoload::addPsr4( |
103 |
+ 'Composer\\', |
104 |
+ __DIR__ . '/../src/Composer' |
105 |
+); |
106 |
|
107 |
// Dependencies |
108 |
\Fedora\Autoloader\Dependencies::required(array( |
109 |
|
110 |
diff --git a/dev-php/composer/files/composer-update-paths.patch b/dev-php/composer/files/composer-update-paths.patch |
111 |
deleted file mode 100644 |
112 |
index 754cbabcbcf..00000000000 |
113 |
--- a/dev-php/composer/files/composer-update-paths.patch |
114 |
+++ /dev/null |
115 |
@@ -1,46 +0,0 @@ |
116 |
---- ./src/Composer/Autoload/AutoloadGenerator.php 2016-11-03 17:43:15.000000000 +0100 |
117 |
-+++ ./src/Composer/Autoload/AutoloadGenerator.php 2016-11-18 16:54:55.664985847 +0100 |
118 |
-@@ -291,7 +291,7 @@ |
119 |
- file_put_contents($targetDir.'/autoload_real.php', $this->getAutoloadRealFile(true, (bool) $includePathFileContents, $targetDirLoader, (bool) $includeFilesFileContents, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader, $staticPhpVersion)); |
120 |
- |
121 |
- $this->safeCopy(__DIR__.'/ClassLoader.php', $targetDir.'/ClassLoader.php'); |
122 |
-- $this->safeCopy(__DIR__.'/../../../LICENSE', $targetDir.'/LICENSE'); |
123 |
-+ $this->safeCopy('/usr/share/php/Composer/Composer/LICENSE', $targetDir.'/LICENSE'); |
124 |
- |
125 |
- if ($this->runScripts) { |
126 |
- $this->eventDispatcher->dispatchScript(ScriptEvents::POST_AUTOLOAD_DUMP, $this->devMode, array(), array( |
127 |
- |
128 |
---- ./tests/Composer/Test/Json/ComposerSchemaTest.php 2016-11-03 17:43:15.000000000 +0100 |
129 |
-+++ ./tests/Composer/Test/Json/ComposerSchemaTest.php 2016-11-20 18:27:43.169665101 +0100 |
130 |
-@@ -87,7 +87,7 @@ |
131 |
- |
132 |
- private function check($json) |
133 |
- { |
134 |
-- $schema = json_decode(file_get_contents(__DIR__ . '/../../../../res/composer-schema.json')); |
135 |
-+ $schema = json_decode(file_get_contents('/usr/share/php/Composer/Composer/res/composer-schema.json')); |
136 |
- $validator = new Validator(); |
137 |
- $validator->check(json_decode($json), $schema); |
138 |
- |
139 |
---- ./src/Composer/Json/JsonFile.php 2016-11-04 02:51:03.844719014 +0100 |
140 |
-+++ ./src/Composer/Json/JsonFile.php 2016-11-18 16:44:06.065969630 +0100 |
141 |
-@@ -156,7 +156,7 @@ |
142 |
- self::validateSyntax($content, $this->path); |
143 |
- } |
144 |
- |
145 |
-- $schemaFile = __DIR__ . '/../../../res/composer-schema.json'; |
146 |
-+ $schemaFile = '/usr/share/php/Composer/Composer/res/composer-schema.json'; |
147 |
- $schemaData = json_decode(file_get_contents($schemaFile)); |
148 |
- |
149 |
- if ($schema === self::LAX_SCHEMA) { |
150 |
- |
151 |
---- ./bin/composer 2016-11-18 15:56:40.615898592 +0100 |
152 |
-+++ ./bin/composer 2016-11-18 16:06:05.348912690 +0100 |
153 |
-@@ -5,7 +5,7 @@ |
154 |
- echo 'Warning: Composer should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL; |
155 |
- } |
156 |
- |
157 |
--require __DIR__.'/../src/bootstrap.php'; |
158 |
-+require '/usr/share/php/Composer/Composer/autoload.php'; |
159 |
- |
160 |
- use Composer\Console\Application; |
161 |
- |