Changes between Version 3 and Version 4 of howto/buildUniversal


Ignore:
Timestamp:
May 24, 2008, 5:37:57 AM (16 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

typos, style, etc

Legend:

Unmodified
Added
Removed
Modified
  • howto/buildUniversal

    v3 v4  
    33= How to build Universal Binaries =
    44
    5  * Audience: Users with PowerPC and Intel based macs who want to compile ports only once
     5 * Audience: Users with both PowerPC- and Intel-based Macs who want to compile ports only once
    66 * Requires: MacPorts >=1.6.0
    77
    88== Introduction ==
    99
    10 Most ports in MacPorts ports tree can use the +universal variant, which enables compiling the binaries for both PowerPC and Intel architectures. This means the resulting ports can be used both on Intel based and PowerPC based machines. This HOWTO shows how to compile ports with the +universal variant. It also gives some indications as to how to use these ports on different machines, so as to compile ports only once, on the fastest of two machines, for instance.
     10Most ports in the MacPorts ports tree can use the +universal variant, which enables compiling the binaries for both PowerPC and Intel architectures. This means the resulting ports can be used on both Intel-based and PowerPC-based Macs. This HOWTO shows how to compile ports with the +universal variant. It also gives some indications as to how to use these ports on different machines, so as to compile ports only once, on the fastest of two machines, for instance.
    1111
    1212== The +universal variant ==
    1313
    14 MacPorts, by default, builds ports that work only on the current local architecture. Building a port with the +universal variant is simple. Just specify it when installing the port :
     14MacPorts, by default, builds ports that work only on the current local architecture. Building with the +universal variant changes this to always include both Intel and PowerPC code, regardless of whether you're currently on an Intel or PowerPC Mac. Building a port with the +universal variant is simple. Just specify it when installing the port:
    1515
    1616{{{
     
    2424=== '''Building all ports universal''' : edit variants.conf ===
    2525
    26 You can add +universal to your /opt/local/etc/macports/variants.conf to ask MacPorts to build all ports you install with that variant, without having to remember to type it at every install command. However, some ports have not yet been tested as universal binaries and may not build properly. Or they may build but then not work on the foreign architecture. For some ports the universal variant has been expressly disabled, either because no way has been found to make it possible, or because nobody has yet tried to make it possible. If you encounter such a port, you can search the trac tickets and macports' mailing lists for additional information.
     26You can add +universal to your `/opt/local/etc/macports/variants.conf` to ask MacPorts to build all ports you install with that variant, without having to remember to type it at every install command. However, some ports have not yet been tested as universal binaries and may not build properly. Or they may build but then not work on the foreign architecture. For some ports the universal variant has been expressly disabled, either because no way has been found to make it possible, or because nobody has yet tried to make it possible. If you encounter such a port, you can search the Trac tickets and the mailing lists to see if this is already being addressed. If not, you can file a ticket.
    2727
    28 === Using the ports on two different macs ===
     28=== Using the ports on two different Macs ===
    2929
    30 Using the +universal variant is mainly useful if you intend to compile the ports on one machine to use them on another, for instance if you want to avoid hogging your main machine, or have a fast machine and a slow one. If you want to use the macports ports from one computer on another, it is best to transfer the entire MacPorts installation from the mac that compiles the ports to the other mac. That is, take all of /opt/local on the Mac in charge of building ports, and copy it to the other using rsync or as a tarball. You might exclude the /opt/local/var/macports/distfiles directory to save space if desired.
     30Using the +universal variant is mainly useful if you intend to compile the ports on one machine and use them on another, for instance if you want to avoid hogging your main machine, or have a fast machine and a slow one. If you want to use the ports from one computer on another, it's best to transfer the entire MacPorts installation from the Mac that compiles the ports to the other Mac. That is, take all of /opt/local on the Mac in charge of building ports, and copy it to the other using rsync or as a tarball. You might exclude the `/opt/local/var/macports/distfiles` directory to save space if desired.
    3131
    32 It is not recommended to attempt to build a port with the +universal on the first mac and then copy just that port's files to the other machine. For one thing the port may have dependencies on other ports. For another, MacPorts on the secondary machine wouldn't know that you had copied these items, "port installed" wouldn't show it as installed, etc.
     32It is not recommended to attempt to build a port with the +universal on the first Mac and then copy just that port's files to the other machine. For one thing the port may have dependencies on other ports. For another, MacPorts on the secondary machine wouldn't know that you had copied these items, `port installed` wouldn't show the port as installed, etc.
    3333
    34 If you choose to use ports built on one mac on another, bost must have the same major version of Mac OS X installed, preferably the same version entirely, and should have the same version of Xcode too. For example both must be running Tiger with Xcode 2.5, or both must be running Leopard with Xcode 3.0. Don't attempt this if they're running different major versions.
     34If you choose to use ports built on one Mac on another, bost must have the same major version of Mac OS X installed, preferably the same version entirely, and should have the same version of Xcode too. For example both must be running Tiger with Xcode 2.5, or both must be running Leopard with Xcode 3.0. Don't attempt this if they're running different major versions.
    3535
    36 == Building Macports itself universally ==
     36== Building MacPorts itself universally ==
    3737
    38 MacPorts itself (i.e. the port command) is universal when installed from the MacPorts installation disk image. It is not universal after doing a selfupdate, which means that rsyncing the entire /opt/local directory may present some problems when attempting to use the port command on the "mirror" mac.
     38MacPorts itself (i.e. the `port` command) is universal when installed from the MacPorts installation disk image. It is not universal after doing a `port selfupdate`, which means that rsyncing the entire `/opt/local` directory may present some problems when attempting to use the port command on the other mac.
    3939
    4040=== Notes ===
    4141
    42 The '''Building Macports universally''' section raises the problem of building MacPorts itself universally. Solutions to this problem are being discussed: [http://lists.macosforge.org/pipermail/macports-users/2008-May/010287.html].
     42The '''Building MacPorts itself universally''' section raises the problem of building MacPorts itself universally. Solutions to this problem are being discussed: [http://lists.macosforge.org/pipermail/macports-users/2008-May/010287.html].
    4343
    4444[wiki:howto <- Back to the HOWTO section]