Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 5 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.

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

This didn't quite work for me. The port distfiles ntfs-3g gives me

--->  Distfiles for ntfs-3g
[ntfs-3g_ntfsprogs-2012.1.15.tgz] /opt/local/var/macports/distfiles/ntfs-3g/ntfs-3g_ntfsprogs-2012.1.15.tgz
md5: 341acae00a290cab9b00464db65015cc
sha1: 8d55cf49afde172fefa369a0a85289e09c4d7bbb
rmd160: 4db6ea1025eedeee160a1cd4238d069a307b9b35
  http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2012.1.15.tgz
  http://distfiles.macports.org/ntfs-3g/ntfs-3g_ntfsprogs-2012.1.15.tgz
  http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/ntfs-3g/ntfs-3g_ntfsprogs-2012.1.15.tgz
  http://cjj.kr.distfiles.macports.org/ntfs-3g/ntfs-3g_ntfsprogs-2012.1.15.tgz
  http://fco.it.distfiles.macports.org/mirrors/macports-distfiles/ntfs-3g/ntfs-3g_ntfsprogs-2012.1.15.tgz
  http://her.gr.distfiles.macports.org/mirrors/macports/mpdistfiles/ntfs-3g/ntfs-3g_ntfsprogs-2012.1.15.tgz
  http://jog.id.distfiles.macports.org/macports/mpdistfiles/ntfs-3g/ntfs-3g_ntfsprogs-2012.1.15.tgz
  http://lil.fr.distfiles.macports.org/ntfs-3g/ntfs-3g_ntfsprogs-2012.1.15.tgz
  http://mse.uk.distfiles.macports.org/sites/distfiles.macports.org/ntfs-3g/ntfs-3g_ntfsprogs-2012.1.15.tgz
  http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/ntfs-3g/ntfs-3g_ntfsprogs-2012.1.15.tgz
  http://svn.macports.org/repository/macports/distfiles/ntfs-3g/ntfs-3g_ntfsprogs-2012.1.15.tgz

but when I execute sudo port install ntfs-3g it says

--->  Attempting to fetch ntfs-3g-2012.1.15_3.darwin_11.x86_64.tbz2 from http://packages.macports.org/ntfs-3g

To achieve the same result, I downloaded http://packages.macports.org/ntfs-3g/ntfs-3g-2012.1.15_3.darwin_11.x86_64.tbz2 and put it in /opt/local/var/macports/incoming/verified. sudo port install ntfs-3g then finds the file i have downloaded and does not try to download it again. I found the same with the llvm-3.1 package.

share|improve this answer
    
+1 - huge thanks. I was about to give up. –  Topher Hunt Apr 22 at 20:27

Try the following:

port rdeps "portname"

where "portname" is the name of the port. Go to the following link for more info:

https://trac.macports.org/wiki/FAQ

share|improve this answer
    
According to the FAQ you linked, rdep lists package dependencies, not files to download. –  Burhan Ali Aug 14 '13 at 21:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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