Changes between Version 13 and Version 14 of UsingMacPortsQuickStart


Ignore:
Timestamp:
Oct 16, 2010, 9:45:23 AM (14 years ago)
Author:
raimue (Rainer Müller)
Comment:

php5 does not use variants anymore, switch to vim as example

Legend:

Unmodified
Added
Removed
Modified
  • UsingMacPortsQuickStart

    v13 v14  
    4040To find out what software is available within the MacPorts infrastructure, you can view our [http://www.macports.org/ports.php Available Ports] page, Trac's [source:trunk/dports source browser] directly or run a quick search using MacPorts itself. For instance, if you wanted to search for the PHP language:
    4141
    42 `port search php`
     42`port search vim`
    4343
    4444This will output a list of results where each item looks as the following:
    4545
    4646{{{
    47 php5 @5.2.9 (www, lang, php)
    48     PHP: Hypertext Preprocessor
     47vim @7.3.21 (editors)
     48    Vi "workalike" with many additional features
    4949}}}
    5050
    5151For more info on a port:
    5252
    53 `port info php5`
     53`port info vim`
    5454
    5555== Variants ==
     
    5757You may notice that info on several ports provides a list of Variants. You can also produce this same list using the "variants" action:
    5858
    59 `port variants php5`
     59`port variants vim`
    6060
    61 Variants are options that can be built into your install of the port. If you have ever compiled software by hand, you'll know that these options can be set via configure script arguments (e.g. `./configure --prefix=/opt/local`). It can be confusing to figure out what each variant enables, but if you are confused you can send a question to one of the  [http://www.macports.org/contact.php#Lists MacPorts mailing lists]. The variants for PHP 5 include specifying operating system version (overriding what the install will automatically attempt to determine for itself), modules for Apache 1.x, 2.x, and support for MySQL 3.x, 4.x, 5.x, or PostgreSQL.
     61Variants are options that can be built into your install of the port. If you have ever compiled software by hand, you'll know that these options can be set via configure script arguments (e.g. `./configure --prefix=/opt/local`). It can be confusing to figure out what each variant enables, but if you are confused you can send a question to one of the  [http://www.macports.org/contact.php#Lists MacPorts mailing lists]. The variants for vim include specifying a feature set (+huge, +big, +small or +tiny) or different languages for scripting (+perl, +python26, +python27, +ruby, etc.).
    6262
    6363== Installing ports ==
    6464
    65 To install PHP 5 with support for Apache 2.x and MySQL 5.x, issue the following command:
     65To install vim with support for python 2.6 and the huge feature set, issue the following command:
    6666
    67 `sudo port install php5 +apache2 +mysql5`
     67`sudo port install vim +python26 +huge`
    6868
    69 This command will download, compile, and install the PHP 5 port from the official PHP website with the specified build options. Since it will take a while to build and install several ports including all versions of PHP, you might want to include the `-v` flag so that you have evidence that the build is in progress:
     69This command will download, compile, and install the vim port from the vim website with the specified build options. Since it will take a while to build and install several ports, you might want to include the `-v` flag so that you have evidence that the build is in progress:
    7070
    71 `sudo port -v install php5 +apache2 +mysql5`
     71`sudo port -v install vim +python26 +huge`
    7272
    7373You may notice that MacPorts will build software that you didn't specifically request. This will occur if the port you originally requested has other ports marked as dependencies. Even if the software already exists without OS X, remember the whole MacPorts self-contained design approach. Some recreation of existing software may be necessary to produce a functional self-contained environment.