PEAR_PackageFileManager : The Definitive Guide |
Dealing with Architecture dependency to restrict a
package installation to a specific OS and processor architecture is
made with call to addArchDep() method.
For example, if we want to restrict a package installation on linux OS, and intel 8086 family processor, or on every architecture except Mac OS X (darwin), we should write :
Table 10.8. Arch installation condition
| PHP code | XML equivalent |
|---|---|
$p2->addArchDep('linux-*-i?86-*');
|
<dependencies>
<required>
<!-- ... -->
<arch>
<pattern>linux-*-i?86-*</pattern>
</arch>
</required>
</dependencies>
|
$p2->addArchDep('darwin', true);
|
<dependencies>
<required>
<!-- ... -->
<arch>
<pattern>darwin</pattern>
<conflicts />
</arch>
</required>
</dependencies>
|
| PEAR_PackageFileManager : The Definitive Guide | v 1.6.0 : November 17, 2006 |