Homebrew is a new package management system for OS X that supports formulas written in Ruby language. Here is quick HowTo about creating a new formula for file(1) (You can find the MacPort version here). First ask brew to create a new formula: $ brew create file-magic Then copy the following snippet and replace the file-magic.rb content with it. require...