Getting Homebrew to Work on Leopard

Leopard uses Xcode 3.1.4 that bundles gcc version 4.0.1 that, in turn does not support homebrew's -march=core2 default optimization flag for all packages. To get homebrew to work on OSX Leopard and possibly Tiger, edit /usr/local/Library/Homebrew/os/mac/hardware.rb to change the architecture from core2 to nocona:

module MacCPUs
  OPTIMIZATION_FLAGS = {
    ...
    :core2 => -march=nocona,
    ...
  }

Installing Packages with Custom Compile Options

Sometimes the default compile flags supplied in the configure stage are not sufficient and you need to build a package with a custom configuration. For example, in order to compile ffmpeg with all options, issue:

brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools

In case the package is already installed, substitute install by reinstall.

Granting Multiple Users Access to Homebrew

Homebrew on OSX installs in /usr/local but it installs everything under a single user such that other users will have difficulties installing packages themselves. There have been similar setups for granting other users access to the same installation but a better method of creating such a setup is to use OSX ACLs instead of messing around with Unix permissions.

You can change the ACLs for the entire /usr/local/ directory by pressing Shift++G and entering /usr which will take you to the upper directory from local. After that, right-click local and pick Get Info… from the menu.

On the pop-up pane, select the + button at the bottom and add the groups or users that you would like to have access to the Homebrew installation. After that, click the gear icon right next to the + button and select Apply to enclosed items…. That will make the permissions propagate from the directory you selected to the entire subtree of directories.

This will have to be performed for the directories:

  • /usr/local
  • /Library/Caches/Homebrew

After which you should be able to issue:

brew doctor

for any of the users you have added to check that everything is in order.

Install Packages with Custom Compilation Flags

Suppose you would want to install ffmpeg with libvorbis support, you would run the command:

brew install ffmpeg --with-libvorbis

which will add the –with-libvorbis compile option and install ffmpeg with libvorbis support.

If you would like to query a formula for available compile-time options, you would run:

brew options ffmpeg

which will list the compile-time options for ffmpeg.


fuss/homebrew.txt · Last modified: 2017/02/22 18:30 (external edit)

Access website using Tor Access website using i2p


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy and plagiarism pages.