<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="1">
    <title>MacPorts</title>
    <options customize="never"__ARCHS__/>
    <allowed-os-versions><os-version min="__XVERS__" before="__NEXT_XVERS__"/></allowed-os-versions>
    <installation-check script="InstallationCheck();"/>
    <script><![CDATA[
function InstallationCheck () {
    if (system.compareVersions(system.version.ProductVersion, "__XVERS__") < 0
        || system.compareVersions(system.version.ProductVersion, "__NEXT_XVERS__") >= 0) {
        my.result.message = "This package is meant to be installed on macOS __XVERS__.";
        my.result.type = 'Fatal';
        return false;
    }
    if (system.files.fileExistsAtPath('__PREFIX__/etc/ports/dp_version')) {
        my.result.message = "Your existing MacPorts or DarwinPorts installation is too old to be upgraded by this installer. Please install MacPorts 1.7.1 first.";
        my.result.type = 'Fatal';
        return false;
    }
    if (!system.files.fileExistsAtPath('/usr/bin/xcodebuild')) {
        my.result.message = "Xcode is not installed, or was installed without __XCODECLITOOLS__.";
        my.result.type = 'Warn';
        return false;
    }
    return true;
}
    ]]>
    </script>
    <background file="background.tiff" mime-type="image/tiff" alignment="bottomleft" scaling="none"/>
    <license mime-type="text/html" file="License.html"/>
    <readme mime-type="text/rtf" file="ReadMe.rtf"/>
    <welcome mime-type="text/html" file="Welcome.html"/>
    <choices-outline>
        <line choice="default">
            <line choice="org.macports.MacPorts"/>
        </line>
    </choices-outline>
    <choice id="default"/>
    <choice id="org.macports.MacPorts" visible="false">
        <pkg-ref id="org.macports.MacPorts"/>
    </choice>
    <pkg-ref id="org.macports.MacPorts">MacPorts-__VERSION__-component.pkg</pkg-ref>
</installer-gui-script>
