Changes between Version 13 and Version 14 of UsingMacPortsQuickStart
- Timestamp:
- Oct 16, 2010, 9:45:23 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsingMacPortsQuickStart
v13 v14 40 40 To 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: 41 41 42 `port search php`42 `port search vim` 43 43 44 44 This will output a list of results where each item looks as the following: 45 45 46 46 {{{ 47 php5 @5.2.9 (www, lang, php)48 PHP: Hypertext Preprocessor47 vim @7.3.21 (editors) 48 Vi "workalike" with many additional features 49 49 }}} 50 50 51 51 For more info on a port: 52 52 53 `port info php5`53 `port info vim` 54 54 55 55 == Variants == … … 57 57 You may notice that info on several ports provides a list of Variants. You can also produce this same list using the "variants" action: 58 58 59 `port variants php5`59 `port variants vim` 60 60 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.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 vim include specifying a feature set (+huge, +big, +small or +tiny) or different languages for scripting (+perl, +python26, +python27, +ruby, etc.). 62 62 63 63 == Installing ports == 64 64 65 To install PHP 5 with support for Apache 2.x and MySQL 5.x, issue the following command:65 To install vim with support for python 2.6 and the huge feature set, issue the following command: 66 66 67 `sudo port install php5 +apache2 +mysql5`67 `sudo port install vim +python26 +huge` 68 68 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:69 This 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: 70 70 71 `sudo port -v install php5 +apache2 +mysql5`71 `sudo port -v install vim +python26 +huge` 72 72 73 73 You 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.