New dependencies build script
Ryan Govostes
rgovostes at gmail.com
Tue May 19 04:53:27 UTC 2009
I spent a few hours last night writing a new dependencies build
script. You can get a non-finished version at
http://rgov.org/adium/Dependencies.zip
Here are the main improvements:
1) It's a single script, not shattered into a dozen pieces. So far,
that is!
2) Each dependency's build routine is a self-contained, and I define a
lot of convenience functions so that they're relatively succinct. The
download URLs are inline (part of the build routine), and will
download automatically if the source is not already found. The source
directory names are independent of the download URL, so we can update
the URL and everything Just Works.
3) The build instructions are better! Universal Binaries are compiled
correctly, and I'm writing patches to eliminate a lot of the built
components we don't use. In general, we're building less, and this
will lead to better incremental build support.
Here's an example:
build_pkgconfig() {
prereq "pkg-config" \
"http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz"
quiet pushd "$ROOTDIR/source/pkg-config"
if needsconfigure $@; then
status "Configuring pkg-config"
./configure --prefix="$ROOTDIR/build"
fi
status "Building and installing pkg-config"
make
make install
quiet popd
}
Here's what I have done:
1) All the downloads are coded up, including libpurple's crazy
monotone checkout process. If you already have libpurple checked out,
the next time around it will pull the latest version.
2) pkg-config builds for the native platform (per the notes in the
original build script) and gettext builds for i386, x86-64, and i386.
3) It will only configure if there's no config.status file in the top
level of the source directory, or if you pass in --configure.
Here's what I plan on doing:
1) Finish coding up all the dependencies, of course. The current one
I'm stuck on is glib, which David said he had problems with compiling
64-bit. Once this is addressed, we should be able to build all of the
dependencies for 64-bit, and Adium will be 64-bit ready.
2) Come up with a better way to do patches---probably involving
unpatching (without confusing gmake) after the build is complete.
3) I may want to split up each component into a series of functions
like fetch_x, config_x, patch_x, build_x, so that you can pick and
choose which operations you want. Is there any reason to do this?
4) Make an options system for build.sh to allow tweaking as necessary,
specifically so we can use Xcode to wrap the build scripts.
Waste of time? Bad design?
Regards,
Ryan Govostes
More information about the devel
mailing list