The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Getting started with MacPorts

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Bryan Liles

Posts: 228
Nickname: bryanl
Registered: May, 2008

Bryan Liles is the Principal Web Developer for Sourcefire, Inc.
Getting started with MacPorts Posted: Apr 6, 2009 5:42 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Bryan Liles.
Original Post: Getting started with MacPorts
Feed Title: Smarticus
Feed URL: http://smartic.us/feed/atom.xml
Feed Description: Ramblings of a ruby hacker
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Bryan Liles
Latest Posts From Smarticus

Advertisement

I think all Mac developers should get intimately familiar with MacPorts. It really is a pretty good package management system that works. Once you master the basics of installing software, you might ask yourself: What next? In this video, I highlight some features you might not know about.


Getting started with MacPorts from Bryan Liles on Vimeo.

Almost all Mac have multiple cores these days. Why aren’t you taking advantage of it when compiling with MacPorts? The buildmakejobs option in your MacPorts configuration (/opt/local/etc/macports/macports.conf on my box) allows you change the simultaneous jobs you can run at once. I normally use 2n+1 where n is the amount of CPU cores I have.

If long compile times are dragging you down, there are two potential solutions for this in your macports.conf. configureccache and configuredistcc might be just what you are looking for.

ccache caches your compiler output. This can mean huge time savings if you are just updating point releases.

distcc allows you to use other servers to assist you in compiling. I’m not 100% sure how to set this up, but I’m sure there is more information in the MacPorts documentation.

Before enabling ccache or distcc, you should install them using the port command.

Another cool thing you can do with MacPorts is to configure your own local repository. I normally do this when I have specific requirements about the applications I want installed. This situation last came up when I wanted a particular version of ruby.

To keep with the theme of making everything faster, easier and more efficient, I use an alias to install ports.

alias pi='sudo port -v install'

I use the -v because MacPorts is set up to be pretty quiet. Something about scroll lets me know progress is being made.

Finally, don’t forget to sync your ports often. You won’t know about the newest updates if you aren’t syncing often:

sudo port -v sync

And watch the scroll.

Read: Getting started with MacPorts

Topic: Code folding in vim Previous Topic   Next Topic Topic: Using ctags in vim

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use