Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
fuss:homebrew [2016/09/22 09:29] – [Install Packages with Custom Compilation Flags] officefuss:homebrew [2022/04/19 08:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== 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'':
 +
 +<code>
 +module MacCPUs
 +  OPTIMIZATION_FLAGS = {
 +    ...
 +    :core2 => -march=nocona,
 +    ...
 +  }
 +</code>
 +
 +====== 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:
 +<code bash>
 +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
 +</code>
 +
 +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 [[http://blog.strug.de/2012/06/my-homebrew-multi-user-setup/|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 <key>S-Command-g</key> 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.
 +
 +{{fuss:fuss_homebrew_addusers.png?512}}
 +
 +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:
 +<code bash>
 +brew doctor
 +</code>
 +
 +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:
 +<code bash>
 +brew install ffmpeg --with-libvorbis
 +</code>
 +
 +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:
 +<code bash>
 +brew options ffmpeg
 +</code>
 +which will list the compile-time options for ''ffmpeg''.

fuss/homebrew.1474536567.txt.bz2 · Last modified: 2016/09/22 09:29 by office

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


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