Sunday, May 22, 2011

Lion Preview: Installing MacPorts

To use MacPorts on MAC OS X Lion you have to download and install MacPorts from the current SVN Trunk. 

Downloading Sources from SVN
Pick a location to store a working copy of the MacPorts code. For this example, /opt/mports will be used, but you can put the source anywhere. This example will create /opt/mports/trunk containing everything needed for MacPorts.

sudo mkdir -p /opt/mports
cd /opt/mports
sudo svn checkout http://svn.macports.org/repository/macports/trunk



Build and Install MacPorts
MacPorts uses autoconf and makefiles for installation. These commands will build and install MacPorts to /opt/local. You can add the --prefix option to ./configure to relocate MacPorts to another directory if needed.

cd trunk/base
sudo ./configure --enable-readline
sudo make install
sudo make distclean

That's all, enjoy your fresh MacPorts install ready to rock.

20 comments:

Shona said...

PFTFTFTFTFTFTFT MAC

Colin Biano said...

hey, the craigslist cow :D

CPH said...

Awesome!

princy gupta said...

coooolllll.....

Major.Mack said...

u huh

Fang said...

So with this you can install all kinds of things that would normally be a pain in the ass?

Bremsy said...

Fang exactly as far as I kno :]

Gzorzy said...

you should make your tutorials easier.

logo mess said...

SVN is great but really not that simple :D
i like the "elk" too know it already from an Linux distribution called MINT ;)

Zach said...

Thanks, I love using SVN for various things!

James said...

Good feature!

phthalo. said...

I have to admit I do not understand the purpose of this.

Spartan094 said...

Thanks for clearing this up. I understood it completely.

Justsayin' said...

Cool Thanks :)

Fortune said...

Does it automatically make ASCII character/creatures for you as well?

youarefuckingwrong said...

NDA, motherfucker.

Oh wait, you probably pirated it. Never mind.

mac-and-me said...

not pirated and this post don't violate the nda at all

hapticdata said...

If you are trying to install MacPorts after installing Lion, and you get an error message similar to "no C complier found in $PATH" It's because you need to update your developer tools. All of the developer tools are now included with XCode in the App Store (free).

albinoz said...

I using Lion GM and Xcode 4.2b3,
I can not access svn.
Downloaded from Snow, and cannot compile in Lion:

===> making install in tests
make[1]: Nothing to be done for `install'.
[ ! -f /opt/local/etc/macports/mp_version ] || rm -vf /opt/local/etc/macports/mp_version
/usr/bin/install -c -o root -g admin -m 444 setupenv.bash /opt/local/share/macports/
/usr/bin/install -c -o root -g admin -m 444 macports-pubkey.pem /opt/local/share/macports/
/usr/bin/tclsh src/upgrade_sources_conf_default.tcl "/opt/local"
/usr/bin/tclsh src/images_to_archives.tcl "/opt/local/share/macports/Tcl"
Warning: No index(es) found! Have you synced your source indexes?
No ports installed to convert.

Any help be appecied :)

albinoz said...

I using Lion GM and Xcode 4.2b3,
no svn acces ?
I Download from Snow svn, And have this error and no port installed:

===> making install in tests
make[1]: Nothing to be done for `install'.
[ ! -f /opt/local/etc/macports/mp_version ] || rm -vf /opt/local/etc/macports/mp_version
/usr/bin/install -c -o root -g admin -m 444 setupenv.bash /opt/local/share/macports/
/usr/bin/install -c -o root -g admin -m 444 macports-pubkey.pem /opt/local/share/macports/
/usr/bin/tclsh src/upgrade_sources_conf_default.tcl "/opt/local"
/usr/bin/tclsh src/images_to_archives.tcl "/opt/local/share/macports/Tcl"
Warning: No index(es) found! Have you synced your source indexes?
No ports installed to convert.

Any Help be apprecied :)