summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seren <guillaumeseren@gmail.com>2016-11-24 08:29:30 +0100
committerMichael Orlitzky <mjo@gentoo.org>2016-12-18 18:17:01 -0500
commit033f5d398db1fdcd4fa4b3b9437c89da097ddeb5 (patch)
tree7ba7548f2c2df34bfb06248c15a86db1157f5e64 /dev-php/jsonlint
parentdev-php/json-schema: Add 2.0.0 version (diff)
downloadgentoo-033f5d398db1fdcd4fa4b3b9437c89da097ddeb5.tar.gz
gentoo-033f5d398db1fdcd4fa4b3b9437c89da097ddeb5.tar.bz2
gentoo-033f5d398db1fdcd4fa4b3b9437c89da097ddeb5.zip
dev-php/jsonlint: Add 1.4.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/jsonlint')
-rw-r--r--dev-php/jsonlint/Manifest1
-rw-r--r--dev-php/jsonlint/files/autoload.php8
-rw-r--r--dev-php/jsonlint/jsonlint-1.4.0.ebuild41
-rw-r--r--dev-php/jsonlint/metadata.xml15
4 files changed, 65 insertions, 0 deletions
diff --git a/dev-php/jsonlint/Manifest b/dev-php/jsonlint/Manifest
new file mode 100644
index 000000000000..189838be97ba
--- /dev/null
+++ b/dev-php/jsonlint/Manifest
@@ -0,0 +1 @@
+DIST jsonlint-1.4.0.tar.gz 10893 SHA256 e97ff9b23037a2d6ec3d548a273c345dea097b66e72d5bb8b30e66ce765fe46d SHA512 29a23a86ece17f43a471ba8952785e820eff537ddce019935d776492a0d0ccf68c5f0e1f5f3d63b8b12efbe0acc1f7e3fa91d4b9d48bae2e1eec4f3c4b9094b1 WHIRLPOOL 90d08bbe063c61066e3a29ce391934e906ceaf9ae2e80ac67e57f94088e14f1dd27e1faf3f5331cb35c6b209a3e38f35634154cad5b9d80cd62389a0dfd99929
diff --git a/dev-php/jsonlint/files/autoload.php b/dev-php/jsonlint/files/autoload.php
new file mode 100644
index 000000000000..48ac68d82ab1
--- /dev/null
+++ b/dev-php/jsonlint/files/autoload.php
@@ -0,0 +1,8 @@
+<?php
+/* Autoloader for dev-php/jsonlint and its dependencies */
+
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+}
+
+\Fedora\Autoloader\Autoload::addPsr4('Seld\\JsonLint\\', __DIR__);
diff --git a/dev-php/jsonlint/jsonlint-1.4.0.ebuild b/dev-php/jsonlint/jsonlint-1.4.0.ebuild
new file mode 100644
index 000000000000..d580b8e0ed8e
--- /dev/null
+++ b/dev-php/jsonlint/jsonlint-1.4.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+DESCRIPTION="JSON Lint for PHP"
+HOMEPAGE="https://github.com/Seldaek/jsonlint"
+SRC_URI="https://github.com/Seldaek/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="test"
+
+RDEPEND="
+ dev-lang/php:*
+ dev-php/fedora-autoloader"
+DEPEND="
+ test? (
+ ${RDEPEND}
+ dev-php/phpunit )"
+
+src_prepare() {
+ default
+ if use test; then
+ cp "${FILESDIR}"/autoload.php "${S}"/autoload-test.php || die
+ sed -i -e "s:__DIR__:'${S}/src/Seld/JsonLint':" "${S}"/autoload-test.php || die
+ fi
+}
+
+src_install() {
+ insinto "/usr/share/php/Seld/JsonLint"
+ doins -r src/Seld/JsonLint/. "${FILESDIR}"/autoload.php
+ dodoc README.mdown
+}
+
+src_test() {
+ phpunit --bootstrap "${S}"/autoload-test.php || die "test suite failed"
+}
diff --git a/dev-php/jsonlint/metadata.xml b/dev-php/jsonlint/metadata.xml
new file mode 100644
index 000000000000..636d085e1bac
--- /dev/null
+++ b/dev-php/jsonlint/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>
+ Json linter, port of the JavaScript jsonlint library.
+ </longdescription>
+</pkgmetadata>