X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fpharext%2FSourceDir%2FPecl.php;h=d21a0e0de313a5155a48bb88424ef377dea80769;hb=13b5b8aa4efa126f7e34943b42011f43e09bbde9;hp=a9150ced7b0904adfc0fa27fe21186c1c75cd91e;hpb=26683702fdc53d2431ae2bc5081439ac12685d1b;p=pharext%2Fpharext diff --git a/src/pharext/SourceDir/Pecl.php b/src/pharext/SourceDir/Pecl.php index a9150ce..d21a0e0 100644 --- a/src/pharext/SourceDir/Pecl.php +++ b/src/pharext/SourceDir/Pecl.php @@ -33,10 +33,13 @@ class Pecl implements \IteratorAggregate, SourceDir * @see \pharext\SourceDir::__construct() */ public function __construct(Command $cmd, $path) { - if (!realpath("$path/package.xml")) { + if (realpath("$path/package2.xml")) { + $sxe = simplexml_load_file("$path/package2.xml"); + } elseif (realpath("$path/package.xml")) { + $sxe = simplexml_load_file("$path/package.xml"); + } else { throw new \Exception("Missing package.xml in $path"); } - $sxe = simplexml_load_file("$path/package.xml"); $sxe->registerXPathNamespace("pecl", $sxe->getDocNamespaces()[""]); $args = $cmd->getArgs(); @@ -86,7 +89,7 @@ class Pecl implements \IteratorAggregate, SourceDir * @return string */ private static function loadHook($configure, $dependencies) { - return include __DIR__."/../pharext_install.tpl.php"; + return include __DIR__."/../../pharext_install.tpl.php"; } /**