Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify which version to install with macports

I would like to install a specific version of gdb and gcc with macports on mac os x leopard, not the last one, but the 6.8 for gdb. Is it possible?

like image 500
Open the way Avatar asked Mar 08 '11 16:03

Open the way


2 Answers

As I just came across this question when trying to figure out how to download an older version of curl, I thought I'd share an update:

The currently accepted answer did not work for me any longer. This is with MacPorts 2.2.0. What I did was the following.

I started following the directions located here. I ended up using the SVN method, since the first method didn't work. What I didn't realize is that I was missing a critical step.

I found another post that suggested moving the downloaded directory to /private/tmp. After doing this, I cd into the new directory and after a sudo port install I was able to install the older version.

I am on a Mac running OS X 10.8, so your mileage may vary.

like image 169
Adam Nutt Avatar answered Oct 23 '22 14:10

Adam Nutt


It is possible. It's just convoluted and tedious. It's listed in the documentation these days.

Steps

Go to macports trac and find the package you're looking for. This is the link for subversion, which is the package I'll be using in the example.

Click the PortFile Click the portfile

Click Revision Log (top right) Click the revision log

Pour through the revisions until you find the version you're looking for. Remember the revision number. Finding the version in the revision log

In this example I'm looking for version 1.7 of subversion.

With that revision number noted. You need to checkout the version of that subdirectory at that revision.

cd /tmp
svn co http://svn.macports.org/repository/macports/trunk/dports/devel/subversion --revision 106629

Then cd into the folder and run the install

cd subversion
sudo port install

Then it should become selected by default. You can check with

sudo port installed subversion
The following ports are currently installed:
  subversion @1.7.10_0 (active)
  subversion @1.8.8_0
  subversion @1.8.10_0
like image 35
jmathew Avatar answered Oct 23 '22 15:10

jmathew