+sharedInstance
Returns an MPMacPorts object that represents the MacPorts system on user's machine.
-sync
Synchronizes the ports tree without checking for upgrades to the MacPorts base.
-selfUpdate
Synchronizes the ports tree and checks for upgrades to MacPorts base.
-search:
Returns an NSDictionary of ports. Calls [self search:query caseSensiitve:YES].
-search:caseSensitive:
Returns an NSDictionary of ports. Calls [self search:query caseSensitive:sensitivity matchStyle:@"regex"].
-search:caseSensitive:matchStyle:
Returns an NSDictionary of ports. Calls [self search:query caseSensitive:sensitivity matchStyle:style field:@"name"].
-search:caseSensitive:matchStyle:field:
Returns an NSDictionary of ports
-depends:
Returns an NSArray of NSString port names that a port depends on
-exec:withTarget:withOptions:withVariants:
Executes specific target of given MPPort
-prefix
Returns the NSString path to the directory where ports are installed.
-sources:
Returns an NSArray of NSStrings for the paths to MacPorts sources or port trees
-sources
Returns an NSArray of NSStrings of paths to various port trees enabled on User's system
-pathToPortIndex:
Returns the NSURL of the portIndex file on this MacPorts system for a given ports tree
-version
Returns an NSString indicating the version of the currently running MacPorts system

sharedInstance


Returns an MPMacPorts object that represents the MacPorts system on user's machine.

+ (MPMacPorts *)sharedInstance; 


sync


Synchronizes the ports tree without checking for upgrades to the MacPorts base.

- (void)sync; 


selfUpdate


Synchronizes the ports tree and checks for upgrades to MacPorts base.

- (void)selfUpdate; 
Discussion

The selfupdate port command is available only on Mac OS X systems.


search:


Returns an NSDictionary of ports. Calls [self search:query caseSensiitve:YES].

- (NSDictionary *)search:(NSString *)query; 
Parameters
query
An NSString containing name or partial name of port being searched.
Discussion

The keys are NSString names of the ports whilst the values are the respective MPPort objects


search:caseSensitive:


Returns an NSDictionary of ports. Calls [self search:query caseSensitive:sensitivity matchStyle:@"regex"].

- (NSDictionary *)search:(NSString *)query caseSensitive:(BOOL)sensitivity; 
Parameters
query
An NSString containing name (full or parital) of port being searched.
sensitivity
A Boolean value indicating whether or not the search should be case sensitive
Discussion

The keys are NSString names of the ports whilst the values are the respective MPPort objects


search:caseSensitive:matchStyle:


Returns an NSDictionary of ports. Calls [self search:query caseSensitive:sensitivity matchStyle:style field:@"name"].

- (NSDictionary *)search:(NSString *)query caseSensitive:(BOOL)sensitivity 
        matchStyle:(NSString *)style; 
Parameters
query
An NSString containing name (full or parital) of port being searched.
sensitivity
A Boolean value indicating whether or not the search should be case sensitive
style
Search style for query
Discussion

The keys are NSString names of the ports whilst the values are the respective MPPort objects


search:caseSensitive:matchStyle:field:


Returns an NSDictionary of ports

- (NSDictionary *)search:(NSString *)query caseSensitive:(BOOL)sensitivity 
        matchStyle:(NSString *)style field:(NSString *)fieldName; 
Parameters
query
An NSString containing name (full or parital) of port being searched.
sensitivity
A Boolean value indicating whether or not the search should be case sensitive
style
Search style for query
fieldName
Field for port query
Discussion

The keys are NSString names of the ports whilst the values are the respective MPPort objects


depends:


Returns an NSArray of NSString port names that a port depends on

- (NSArray *)depends:(MPPort *)port; 
Parameters
port
The MPPort whose dependecies is being sought


exec:withTarget:withOptions:withVariants:


Executes specific target of given MPPort

- (void)exec:(MPPort *)port withTarget:(NSString *)target 
        withOptions:(NSArray *)options withVariants:(NSArray *)variants; 
Parameters
port
The MPPort whose target will be executed
target
The NSString representing a given target
options
An NSArray of NSStrings of options for executing this target
variants
An NSArray of NSStrings of variants for executing this target
Discussion

See -exec: withOptions: withVariants: in MPPort for discussion of this method.


prefix


Returns the NSString path to the directory where ports are installed.

- (NSString *)prefix; 


sources:


Returns an NSArray of NSStrings for the paths to MacPorts sources or port trees

- (NSArray *)sources:(BOOL)refresh; 
Parameters
refresh
A boolean indicating whether or not to refresh the NSArray of port trees
Discussion

A refresh value of YES will refresh the ports tree whilst a value of NO will not refresh the tree.


sources


Returns an NSArray of NSStrings of paths to various port trees enabled on User's system

- (NSArray *)sources; 
Discussion

These file paths are listed in opt/local/etc/macports/sources.conf. Each port tree contains the different files for each port.


pathToPortIndex:


Returns the NSURL of the portIndex file on this MacPorts system for a given ports tree

- (NSURL *)pathToPortIndex:(NSString *)source; 
Parameters
source
An NSString containing the file path to the ports tree
Discussion

The PortIndex is a list of serialized Tcl key-value lists, one list per line. This is where ports are searched for.


version


Returns an NSString indicating the version of the currently running MacPorts system

- (NSString *)version; 

Last Updated: Sunday, July 13, 2008