-
Notifications
You must be signed in to change notification settings - Fork 130
Building bottles
Sevan Janiyan edited this page Jan 5, 2025
·
5 revisions
Bottles are especially helpful for Tigerberw 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=1
in 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-arch
if building for something other than G4. Specifying it is good if you're building on G5 for an older architecture. SeeOPTIMIZATION_FLAGS
in Library/Homebrew/os/mac/hardware.rb for possible values--bottle-arch
will accept, compiler willing.) - After installation, run
brew test $name
, and thenbrew linkage $name
to make sure it didn’t link against non-specified dependencies. (brew linkage
will 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 $name
to make sure.) - Run
brew bottle
to 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.gz
toxvid-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
internetarchive
Python tool. This can be installed usingpip3
from thepython3
formula. - Finally, once the bottle is uploaded, run
brew fetch $name
andbrew reinstall $name
to make sure it installs properly. It may take a few minutes for the bottle to become available after being uploaded.