summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seren <guillaumeseren@gmail.com>2016-11-24 08:33:47 +0100
committerMichael Orlitzky <mjo@gentoo.org>2016-12-18 18:17:01 -0500
commita78020686e96a4d276c3a38fc489e55ccea97dd7 (patch)
treed75dded485c9b7fa7122d590112eda6a6d4fd4c1 /dev-php/spdx-licenses
parentdev-php/jsonlint: Add 1.4.0 version (diff)
downloadgentoo-a78020686e96a4d276c3a38fc489e55ccea97dd7.tar.gz
gentoo-a78020686e96a4d276c3a38fc489e55ccea97dd7.tar.bz2
gentoo-a78020686e96a4d276c3a38fc489e55ccea97dd7.zip
dev-php/spdx-licenses: Add 1.0.0 version
This is needed for composer-1.2.2, bug 439206. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'dev-php/spdx-licenses')
-rw-r--r--dev-php/spdx-licenses/Manifest1
-rw-r--r--dev-php/spdx-licenses/files/autoload.php8
-rw-r--r--dev-php/spdx-licenses/files/spdx-licenses-change-res-path.patch22
-rw-r--r--dev-php/spdx-licenses/metadata.xml15
-rw-r--r--dev-php/spdx-licenses/spdx-licenses-1.0.0.ebuild27
5 files changed, 73 insertions, 0 deletions
diff --git a/dev-php/spdx-licenses/Manifest b/dev-php/spdx-licenses/Manifest
new file mode 100644
index 000000000000..5df1ea2e5885
--- /dev/null
+++ b/dev-php/spdx-licenses/Manifest
@@ -0,0 +1 @@
+DIST spdx-licenses-1.0.0.tar.gz 8244 SHA256 c292e3bfaa75b0e9b87b7426576a17390ca2f6df37ba002bd1d8561d0ffa4518 SHA512 1ef19555f252c5e03fe3b0376442f47bd50d894effa04bca58e7644e18fcc2a905239086d1aaf31277ce5928a7f9743e123c767e197c0fa063c015ad14851a14 WHIRLPOOL 6f69389f2fe5d55a729b10552cb2c54e8e6473fc5a9d9ace453de76f8bf6f89ae41135feeb89b833d025f8e4b25136730b4006ce0078eaceb236c5d1af52b7d2
diff --git a/dev-php/spdx-licenses/files/autoload.php b/dev-php/spdx-licenses/files/autoload.php
new file mode 100644
index 000000000000..6ebf96e7378c
--- /dev/null
+++ b/dev-php/spdx-licenses/files/autoload.php
@@ -0,0 +1,8 @@
+<?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__);
diff --git a/dev-php/spdx-licenses/files/spdx-licenses-change-res-path.patch b/dev-php/spdx-licenses/files/spdx-licenses-change-res-path.patch
new file mode 100644
index 000000000000..284cdddda95e
--- /dev/null
+++ b/dev-php/spdx-licenses/files/spdx-licenses-change-res-path.patch
@@ -0,0 +1,22 @@
+# 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);
+ }
+ }
diff --git a/dev-php/spdx-licenses/metadata.xml b/dev-php/spdx-licenses/metadata.xml
new file mode 100644
index 000000000000..36e603da564f
--- /dev/null
+++ b/dev-php/spdx-licenses/metadata.xml
@@ -0,0 +1,15 @@
+<?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>
diff --git a/dev-php/spdx-licenses/spdx-licenses-1.0.0.ebuild b/dev-php/spdx-licenses/spdx-licenses-1.0.0.ebuild
new file mode 100644
index 000000000000..da59be8de0b4
--- /dev/null
+++ b/dev-php/spdx-licenses/spdx-licenses-1.0.0.ebuild
@@ -0,0 +1,27 @@
+# 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
+}