1
0
Fork 0

Allow specifying HHVM as a dependency

pull/2333/head
Nils Adermann 2013-10-14 14:47:55 -07:00
parent cd209e3180
commit 4c8e8ca702
1 changed files with 14 additions and 0 deletions

View File

@ -144,5 +144,19 @@ class PlatformRepository extends ArrayRepository
$lib->setDescription('The '.$name.' PHP library');
parent::addPackage($lib);
}
if (defined('HHVM_VERSION')) {
try {
$prettyVersion = HHVM_VERSION;
$version = $versionParser->normalize($prettyVersion);
} catch (\UnexpectedValueException $e) {
$prettyVersion = preg_replace('#^([^~+-]+).*$#', '$1', HHVM_VERSION);
$version = $versionParser->normalize($prettyVersion);
}
$hhvm = new CompletePackage('hhvm', $version, $prettyVersion);
$hhvm->setDescription('The HHVM Runtime (64bit)');
parent::addPackage($hhvm);
}
}
}