dev-php/phpmd: replace v1.5.0 with v2.5.0.
authorMichael Orlitzky <mjo@gentoo.org>
Fri, 6 Jan 2017 04:33:18 +0000 (23:33 -0500)
committerMichael Orlitzky <mjo@gentoo.org>
Fri, 6 Jan 2017 04:33:35 +0000 (23:33 -0500)
Package-Manager: portage-2.3.0

dev-php/phpmd/Manifest
dev-php/phpmd/files/autoload.php [new file with mode: 0644]
dev-php/phpmd/files/channel.xml [deleted file]
dev-php/phpmd/metadata.xml
dev-php/phpmd/phpmd-1.5.0.ebuild [deleted file]
dev-php/phpmd/phpmd-2.5.0.ebuild [new file with mode: 0644]

index 3f9ba7cb833828580e9423f5f41e6eb27e4c4d6d..4f133729444bde82469595a9698ecaec10b434b5 100644 (file)
@@ -1 +1 @@
-DIST PHP_PMD-1.5.0.tgz 49534 SHA256 fd6533e6c794eb33422a301269fa928b124df6fc555c8d4b8786bdcb9b49529c SHA512 6846be145e3c52e2fc687aa910a3de8080e9cbdf56e88039077eceae59459fb4c833d61dccfffa68a8098abdb4b3c17c837398329216f8afa9f4b1ed41ce6e2d WHIRLPOOL 1269df2e60e0b2815d94c4d33a1af07c864bdf4b267bd1955f530afffca43da5fa2415936a7041fb2fae6d8b652c4f5be9aa3e801823734c1349b9964f1e2672
+DIST phpmd-2.5.0.tar.gz 56360 SHA256 1c35a200f2cfcfb8266cd01d710000943bc9db4205d842d802c726ed98bb872d SHA512 93e5eac4755ce9dbe003935a5768c2798f13c3a40d5a7c188d3a70edc1fe76646b72144a62f943f3fc95f83131f96b315a63e327971c3c4404d600fcd5f43d18 WHIRLPOOL de2a70f0766f68d08e56f2885f8d94d5d6bdc2281eb8da2ea687f1298bc7d9cb761fb08230f0b5719f7e3b03b3739c8cda48c44e35c90e5dff2d0a219c84ece7
diff --git a/dev-php/phpmd/files/autoload.php b/dev-php/phpmd/files/autoload.php
new file mode 100644 (file)
index 0000000..b0fa476
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+  require_once('/usr/share/php/Fedora/Autoloader/autoload.php');
+}
+
+\Fedora\Autoloader\Autoload::addPsr4(
+  'PHPMD\\',
+  __DIR__ . '/../src/main/php/PHPMD'
+);
+
+
+\Fedora\Autoloader\Dependencies::required(
+  array('/usr/share/phpdepend/vendor/autoload.php')
+);
diff --git a/dev-php/phpmd/files/channel.xml b/dev-php/phpmd/files/channel.xml
deleted file mode 100644 (file)
index 148ac19..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/channel-1.0 http://pear.php.net/dtd/channel-1.0.xsd">
-    <name>pear.phpmd.org</name>
-    <summary>PHP Mess Detector PEAR channel</summary>
-    <suggestedalias>phpmd</suggestedalias>
-    <servers>
-        <primary>
-            <rest>
-                <baseurl type="REST1.0">http://pear.phpmd.org//rest/</baseurl>
-                <baseurl type="REST1.1">http://pear.phpmd.org//rest/</baseurl>
-                <baseurl type="REST1.2">http://pear.phpmd.org//rest/</baseurl>
-                <baseurl type="REST1.3">http://pear.phpmd.org//rest/</baseurl>
-            </rest>
-        </primary>
-    </servers>
-</channel>
\ No newline at end of file
index 80451262f372a611e3fb84895911839c642141fb..133c28059f56fdfc046403798714d5f7a13d9dea 100644 (file)
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer type="project">
-<email>php-bugs@gentoo.org</email>
-<name>PHP</name>
-</maintainer>
-<longdescription lang="en">
-PHP mess detector
-</longdescription>
+  <maintainer type="project">
+    <email>php-bugs@gentoo.org</email>
+    <name>PHP</name>
+  </maintainer>
+  <upstream>
+    <remote-id type="github">phpmd/phpmd</remote-id>
+  </upstream>
 </pkgmetadata>
diff --git a/dev-php/phpmd/phpmd-1.5.0.ebuild b/dev-php/phpmd/phpmd-1.5.0.ebuild
deleted file mode 100644 (file)
index 37ab527..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-PHP_PEAR_CHANNEL="${FILESDIR}/channel.xml"
-PHP_PEAR_PN="PHP_PMD"
-PHP_PEAR_URI="pear.phpmd.org"
-
-inherit php-pear-lib-r1
-
-DESCRIPTION="PHP mess detector"
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-HOMEPAGE="http://www.phpmd.org"
-
-RDEPEND="${RDEPEND}
-       >=dev-php/phpdepend-1.1.1"
diff --git a/dev-php/phpmd/phpmd-2.5.0.ebuild b/dev-php/phpmd/phpmd-2.5.0.ebuild
new file mode 100644 (file)
index 0000000..8dcd42b
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+DESCRIPTION="PHP mess detector"
+HOMEPAGE="http://www.phpmd.org/"
+
+# The test suite is absent from the release tarballs because
+# the only build system that Composer understands is "cp -r".
+# To obtain the tests, we would need to grab a VCS snapshot.
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/php[xml]
+       dev-php/phpdepend"
+
+src_install() {
+       dodoc AUTHORS.rst CHANGELOG CONTRIBUTING.md README.rst
+
+       # The executable will only look for autoload.php in one place, so we
+       # create an (otherwise pointless) vendor directory to house it.
+       insinto "/usr/share/${PN}/vendor"
+       doins "${FILESDIR}/autoload.php"
+
+       insinto "/usr/share/${PN}/src"
+       doins -r src/main
+
+       # The executable uses relative include paths, so the one users will
+       # actually run needs to be symlinked into the source tree.
+       exeinto "/usr/share/${PN}/src/bin"
+       doexe "src/bin/${PN}"
+       dosym "/usr/share/${PN}/src/bin/${PN}" "/usr/bin/${PN}"
+}