-
Notifications
You must be signed in to change notification settings - Fork 142
Building bottles
Sevan Janiyan edited this page Mar 17, 2025
·
6 revisions
Bottles are especially helpful for Tigerbrew users since build times are so slow. We generally try to provide bottles for at least G4 Tiger, and may also build bottles for other platforms. Since we use "or later" bottles, G4 bottles will also be installed for G5 users if there are no G5-native bottles. Here's the steps for creating bottles that are usable by you and other users.
- Set
HOMEBREW_DEVELOPER=1in your environment. This will be necessary for some of the later commands, but it's also useful in general if you're going to be doing Tigerbrew dev work. - Install the formulae one at a time. (Don't let Tigerbrew install dependencies for you; this way, it's easier for you to make sure that every formula is built with the correct settings.)
- For each formula you're bottling, run
brew install $name --build-bottle --bottle-arch=g4. (You can substitute a different architecture for--bottle-archif building for something other than G4. Specifying it is good if you're building on G5 for an older architecture. SeeOPTIMIZATION_FLAGSin Library/Homebrew/os/mac/hardware.rb for possible values--bottle-archwill accept, compiler willing.) - After installation, run
brew test $name, and thenbrew linkage $nameto make sure it didn’t link against non-specified dependencies. (brew linkagewill warn about indirect dependencies that come from other packages in the tree. Those are safe to use; you can check the full dependency tree usingbrew deps --tree $nameto make sure.) - Run
brew bottleto generate the bottle file. At the moment it fails to preserve the arch info, so it assumes the arch you built for is the host arch; if building for something other than your native architecture, you'll need to manually rename it to put the correct arch in the filename. e.g fromxvid-1.3.7.tiger.bottle.tar.gztoxvid-1.3.7.tiger_altivec.bottle.tar.gz.
At some point it would be useful to fix this. - The bottles are then uploaded using the commandline
internetarchivePython tool. This can be installed usingpip3from thepython3formula. - Finally, once the bottle is uploaded, run
brew fetch $nameandbrew reinstall $nameto make sure it installs properly. It may take a few minutes for the bottle to become available after being uploaded.