Difference between revisions of "MacPorts"

From AwkwardTV
Jump to: navigation, search
m
m (Changed the way commands look and a few other things.)
 
Line 3: Line 3:
 
Obviously, this rough guide should be gradually fleshed out, time permitting, but the basic steps involved include:
 
Obviously, this rough guide should be gradually fleshed out, time permitting, but the basic steps involved include:
  
1. fetch the current MacPorts Release Candidate 2 source tarball using /usr/bin/curl:
+
1. Fetch the current MacPorts Release Candidate 2 source tarball using /usr/bin/curl:
  
<code>
+
$ curl -O http://svn.macosforge.org/repository/macports/downloads/MacPorts-1.4/MacPorts-1.4.0-rc2.tar.gz
$ curl -O http://svn.macosforge.org/repository/macports/downloads/MacPorts-1.4/MacPorts-1.4.0-rc2.tar.gz
 
</code>
 
  
 
2. Extract it to a suitable location with plenty of free disk space. We are going to be using the Media partiton in our example. The familiar MacPorts /opt/local filesystem hierarchy will be provided by a series of symbolic links.
 
2. Extract it to a suitable location with plenty of free disk space. We are going to be using the Media partiton in our example. The familiar MacPorts /opt/local filesystem hierarchy will be provided by a series of symbolic links.
  
<code>
+
$ mkdir -p /mnt/opt/local
$ mkdir -p /mnt/opt/local <br>
+
$ sudo ln -s /mnt/opt /opt
$ sudo ln -s /mnt/opt /opt <br>
+
$ cd /opt/local
$ cd /opt/local <br>
+
$ tar xzvf MacPorts-1.4.0-rc2.tar.gz
$ tar xzvf MacPorts-1.4.0-rc2.tar.gz <br>
 
</code>
 
  
 
3. If you haven't done so already, install Apple's Developer Tools for OSX, more specifically the gcc3/gcc4/as/cctools packages. The full XCode IDE isn't really needed at this point, if ever.
 
3. If you haven't done so already, install Apple's Developer Tools for OSX, more specifically the gcc3/gcc4/as/cctools packages. The full XCode IDE isn't really needed at this point, if ever.
Line 26: Line 22:
 
5. Bootstrap the MacPorts environment using its supplied GNU Autoconf/Automake script infrastructure
 
5. Bootstrap the MacPorts environment using its supplied GNU Autoconf/Automake script infrastructure
  
<code>
+
$ cd /opt/local/MacPorts-1.4.0-rc2
$ cd /opt/local/MacPorts-1.4.0-rc2 <br>
+
$ ./configure --help
$ ./configure --help <br>
+
$ ./configure
$ ./configure <br>
+
$ make
$ make <br>
+
$ sudo make install
$ sudo make install <br>
 
</code>
 
  
 
-kfm82
 
-kfm82
  
 
[[Category:Software]]
 
[[Category:Software]]

Latest revision as of 22:25, 10 May 2009

Since the issue of installing common *NiX shell tools and their assorted runtime dependencies arises in the early stages of the AppleTV development effort, it might make a lot of sense to get an up-to-date, native DarwinPorts / MacPorts bootstrap going. That way, one can be sure to generate exactly the kinds of binaries that are needed, no SSE3-specific, PowerPC-only or oversized fat binaries.

Obviously, this rough guide should be gradually fleshed out, time permitting, but the basic steps involved include:

1. Fetch the current MacPorts Release Candidate 2 source tarball using /usr/bin/curl:

$ curl -O http://svn.macosforge.org/repository/macports/downloads/MacPorts-1.4/MacPorts-1.4.0-rc2.tar.gz

2. Extract it to a suitable location with plenty of free disk space. We are going to be using the Media partiton in our example. The familiar MacPorts /opt/local filesystem hierarchy will be provided by a series of symbolic links.

$ mkdir -p /mnt/opt/local
$ sudo ln -s /mnt/opt /opt
$ cd /opt/local
$ tar xzvf MacPorts-1.4.0-rc2.tar.gz

3. If you haven't done so already, install Apple's Developer Tools for OSX, more specifically the gcc3/gcc4/as/cctools packages. The full XCode IDE isn't really needed at this point, if ever.

4. Satisfy initial MacPorts bootstrap build dependencies by verifying their existence on the AppleTV OSBoot partition. Take special care of the tcl(sh) path as explained in the ./configure --help section listed below. (This section needs more work!)

5. Bootstrap the MacPorts environment using its supplied GNU Autoconf/Automake script infrastructure

$ cd /opt/local/MacPorts-1.4.0-rc2
$ ./configure --help
$ ./configure
$ make
$ sudo make install

-kfm82