This is needed for composer-1.2.2, bug 439206.
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
--- /dev/null
+DIST spdx-licenses-1.0.0.tar.gz 8244 SHA256 c292e3bfaa75b0e9b87b7426576a17390ca2f6df37ba002bd1d8561d0ffa4518 SHA512 1ef19555f252c5e03fe3b0376442f47bd50d894effa04bca58e7644e18fcc2a905239086d1aaf31277ce5928a7f9743e123c767e197c0fa063c015ad14851a14 WHIRLPOOL 6f69389f2fe5d55a729b10552cb2c54e8e6473fc5a9d9ace453de76f8bf6f89ae41135feeb89b833d025f8e4b25136730b4006ce0078eaceb236c5d1af52b7d2
--- /dev/null
+<?php
+/* Autoloader for composer/ca-bundle and its dependencies */
+
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+}
+
+\Fedora\Autoloader\Autoload::addPsr4('Composer\\Spdx\\', __DIR__);
--- /dev/null
+# Fix the path of res/
+
+--- ./src/SpdxLicenses.php 2015-07-15 19:38:14.000000000 +0200
++++ ./src/SpdxLicenses.php 2016-11-13 19:24:17.659442468 +0100
+@@ -170,7 +170,7 @@
+ private function loadLicenses()
+ {
+ if (null === $this->licenses) {
+- $jsonFile = file_get_contents(__DIR__ . '/../res/spdx-licenses.json');
++ $jsonFile = file_get_contents(__DIR__ . '/res/spdx-licenses.json');
+ $this->licenses = json_decode($jsonFile, true);
+ }
+ }
+@@ -178,7 +178,7 @@
+ private function loadExceptions()
+ {
+ if (null === $this->exceptions) {
+- $jsonFile = file_get_contents(__DIR__ . '/../res/spdx-exceptions.json');
++ $jsonFile = file_get_contents(__DIR__ . '/res/spdx-exceptions.json');
+ $this->exceptions = json_decode($jsonFile, true);
+ }
+ }
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>guillaumeseren@gmail.com</email>
+ <name>Guillaume Seren</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ Tools for working with the SPDX license list and validating licenses.
+ </longdescription>
+</pkgmetadata>
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+DESCRIPTION="Tools for working with the SPDX license list and validating licenses"
+HOMEPAGE="https://github.com/composer/spdx-licenses"
+SRC_URI="https://github.com/composer/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-lang/php:*
+ dev-php/fedora-autoloader"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-change-res-path.patch"
+)
+
+src_install() {
+ insinto "/usr/share/php/Composer/Spdx"
+ doins -r src/. res "${FILESDIR}"/autoload.php
+ dodoc README.md
+}