1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00

Workaround for broken FilesystemIterator class in recent 10-stable

This commit is contained in:
Martin Matuska 2014-09-03 10:40:51 +00:00
parent 112b15831f
commit b01cc3dbfd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=367185
3 changed files with 40 additions and 0 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= Horde_Pack
PORTVERSION= 1.0.3
PORTREVISION= 1
CATEGORIES= archivers www pear
PKGNAMEPREFIX= pear-
@ -11,6 +12,8 @@ COMMENT= Horde Pack Utility
USE_HORDE_RUN= Horde_Compress_Fast \
Horde_Exception
PATCH_WRKSRC= ${WRKDIR}
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/devel/pear-channel-horde/bsd.horde.mk"
.include <bsd.port.post.mk>

View File

@ -0,0 +1,26 @@
--- Horde_Pack-1.0.3/lib/Horde/Pack.php.orig 2014-09-03 12:17:27.201458631 +0200
+++ Horde_Pack-1.0.3/lib/Horde/Pack.php 2014-09-03 12:19:10.869687370 +0200
@@ -49,18 +49,19 @@
public function __construct()
{
if (empty(self::$_drivers)) {
- $fi = new FilesystemIterator(__DIR__ . '/Pack/Driver');
$class_prefix = __CLASS__ . '_Driver_';
- foreach ($fi as $val) {
- if ($val->isFile()) {
- $cname = $class_prefix . $val->getBasename('.php');
+ $handle = opendir(__DIR__ . '/Pack/Driver');
+ while ($val = readdir($handle)) {
+ if (is_file(__DIR__ . '/Pack/Driver/' . $val)) {
+ $cname = $class_prefix . basename($val,'.php');
if (class_exists($cname) && $cname::supported()) {
$ob = new $cname();
self::$_drivers[$ob->id] = $ob;
}
}
}
+ closedir($handle);
krsort(self::$_drivers, SORT_NUMERIC);

View File

@ -0,0 +1,11 @@
--- package.xml.bak 2014-09-03 12:17:12.089477176 +0200
+++ package.xml 2014-09-03 12:20:36.548435330 +0200
@@ -35,7 +35,7 @@
<file baseinstalldir="/" md5sum="c5ee864bfd2d2b866d82bf6f942743ad" name="lib/Horde/Pack/Autodetermine.php" role="php" />
<file baseinstalldir="/" md5sum="c5d6ea0030d659ee75755f5a14bf9153" name="lib/Horde/Pack/Driver.php" role="php" />
<file baseinstalldir="/" md5sum="70194aa896444794e78e6b85d6f3d1ec" name="lib/Horde/Pack/Exception.php" role="php" />
- <file baseinstalldir="/" md5sum="6930e9f26cb49ac7eae3acce808d07cb" name="lib/Horde/Pack.php" role="php" />
+ <file baseinstalldir="/" md5sum="13838721e5bf193fa12735c737e52deb" name="lib/Horde/Pack.php" role="php" />
<file baseinstalldir="/" md5sum="cb37ee0c475c196a91fed183ca326ff7" name="test/Horde/Pack/Driver/IgbinaryTest.php" role="test" />
<file baseinstalldir="/" md5sum="1b1d681efa25b37cc51a2e322874d2e1" name="test/Horde/Pack/Driver/JsonTest.php" role="test" />
<file baseinstalldir="/" md5sum="b1176a21c9c2fb833dae0e1b07df8d97" name="test/Horde/Pack/Driver/MsgpackserializeTest.php" role="test" />