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?
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.
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 Revision Log (top right)
Pour through the revisions until you find the version you're looking for. Remember the revision number.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With