How to interface with require()

Usage: require <ROOTNAME> <MAJOR>[.REVISION]

Require will check for the skeleton that has the root name ROOTNAME. As described earlier, skeletons' root names do NOT contain a software version number or a package version number. So:

                    
require "@gtk.org/gtk" 1             # valid
require "@gtk.org/gtk" 1.2           # valid
require "@gtk.org/gtk:2.0.0:1" 1     # invalid

MAJOR and REVISION are of course the required major and revision numbers. If REVISION is not specified, then it is assumed to be zero.

However, sometimes a specific version of a library is specified (for whatever reason). Let's say GTK+ 1.2.5 specifically needed.

requireExact()

For the sake of keeping require() simple, we introduce a new function:

                        
requireExact <ROOTNAME> <VERSION>

VERSION is the software's version number. It may contain letters to a certain degree, the exact capabilities of autopackages version number comparison routines will be documented later.

And sometimes a version that's higher than a specific number is needed. Because of a bug in GTK+ 1.2, AbiWord will only work on GTK+ 1.2.5 or higher, even though the interface hasn't changed. So we introduce another function:

requireAtLeast()

                        
requireAtLeast <ROOTNAME> <VERSION>

This function is like require() , but also checks whether the software version of the software installed on the computer equals VERSION or is higher than VERSION.

It is the job of the skeleton file to accurately report what the version number of the installed software is, the test code should set the SOFTWARE_VERSIONS variable to the detected value, or empty if the version could not be located.