I want to install some software in Mac using 'port install software-name' but some software come with very big package and I don't have a stable connection. I want to download the port file using a download manager and then have port install the software using the downloaded file. Is it possible? How?

link|improve this question

41% accept rate
feedback

1 Answer

up vote 2 down vote accepted

For test purposes, I'll use the octave port. List the distfiles required for the port by running port distfiles octave. You'll get the following output:

--->  Distfiles for octave
[octave-3.2.4.tar.gz] /opt/local/var/macports/distfiles/octave/octave-3.2.4.tar.gz
 md5: 90c39fa9e241ad2e978bcee4682a2ba9
 sha1: 93b81fc300bc5e27e88b6668ef0622f29898dfd2
 rmd160: 13b2198db1b8684229d2ba787ebbedd8e50a518c
  http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/octave/octave-3.2.4.tar.gz
  http://mirrors.kernel.org/gnu/octave/octave-3.2.4.tar.gz
  http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/octave/octave-3.2.4.tar.gz
  …
  http://lil.fr.distfiles.macports.org/octave/octave-3.2.4.tar.gz
  http://sea.us.distfiles.macports.org/macports/mpdistfiles/octave/octave-3.2.4.tar.gz
  http://svn.macports.org/repository/macports/distfiles/octave/octave-3.2.4.tar.gz

Inside the square brackets is the name of the file to download, followed by the path that MacPorts will search for the file. The links below that are a number of mirrors you could download from using your download manager. Go to /opt/local/var/macports/distfiles and create a directory called octave if it doesn't exist. Put the downloaded source package in that folder. Proceed to install using sudo port install octave.

Make sure that you have all the distfiles belonging to a given port as many ports have more than one.

link|improve this answer
Awesome trick. Thanks alot. – Phuong Nguyen Sep 20 '10 at 11:22
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.