Changes between Initial Version and Version 1 of BinaryArchives


Ignore:
Timestamp:
May 11, 2014, 2:48:35 PM (10 years ago)
Author:
elelay (Eric Le Lay)
Comment:

describe binary archives

Legend:

Unmodified
Added
Removed
Modified
  • BinaryArchives

    v1 v1  
     1This page describes binary archives in MacPorts
     2
     3 * [#what What are binary archives?]
     4 * [#buildbot Where do I get them?]
     5 * [#enable How to enable binary archives?]
     6 * [#disable How to disable binary archives?]
     7 * [#blocks What prevents MacPorts from using binary archives?]
     8
     9 = [#=what 1.] What are binary archives? =
     10
     11> Binary archives allow MacPorts utilities to begin installation
     12> after the destroot phase and install and activate a port on the target system
     13(MacPorts guide)
     14
     15Using binary archives one doesn't have to compile the port oneself: it can be downloaded from the internet.
     16
     17 = [#=buildbots 2.] Where do I get them? =
     18
     19[http://build.macports.org Build bots] are part of the MacPorts infrastructure and automatically build all ports for a combination of OS versions
     20and architectures. Binary archives built from them are automatically available to you. You have nothing to do to get them.
     21
     22For instance, here are the archives built for the 2Pong port: http://packages.macports.org/2Pong/ .
     23As the time of writing there are archives for the 1.0.1a_0 version of 2Pong for Snow Leopard (Mac OS X 10.6.x, Darwin 10), Lion (Mac OS X 10.7.x, Darwin 11), Mountain Lion (Mac OS X 10.8.x, Darwin 12), Mavericks (Mac OS X 10.9.x, Darwin 13), all x86_64.
     24
     25You can set up your own binary archives server, see [wiki:archives archives].
     26
     27 = [#=enable 3.] How to enable binary archives? =
     28
     29 == set it globally by editing ${prefix}/etc/''macports.conf'' ==
     30
     31{{{
     32# When MacPorts should build ports from source.
     33# - ifneeded: Download binary archives if available; build from source
     34#   otherwise.
     35# - always: Always build from source; never try fetching archives.
     36# - never: Never build from source; try fetching archives and abort if
     37#   unavailable.
     38}}}
     39
     40So you'll want:
     41{{{
     42buildfromsource         ifneeded
     43}}}
     44
     45or (but then you'll get an error if you try to install a port at a version or with variants not available in the archives):
     46
     47{{{
     48buildfromsource         never
     49}}}
     50
     51 == specify it on the ''command line'' ==
     52
     53{{{
     54sudo port -b install ...
     55}}}
     56
     57 = How to disable binary archives? =
     58
     59 == disable it globally by editing ${prefix}/etc/''macports.conf'' ==
     60
     61{{{
     62buildfromsource         always
     63}}}
     64
     65 == specify it on the ''command line'' ==
     66
     67{{{
     68sudo port -s install ...
     69}}}
     70
     71 = [#=blocks 4.] What prevents MacPorts from using binary archives? =
     72
     73
     74You cannot use the standard binary archives if MacPorts is installed to a non default location.
     75
     76If you use "port -b install ..." you'll get the error message "Binary-only mode requested with no usable archive sites configured".
     77
     78You cannot use the standard binary archives for a non standard combination of variants.
     79
     80Archives must exist for your version of the OS and architecture (check http://packages.macports.org/NameOfThePort/ to see if it's available).
     81
     82
     83
     84 = [#=own 5.] How to use your own archives =
     85
     86See [wiki:archives archives].