1.1 --- a/README Tue Feb 07 08:15:12 2012 +0000
1.2 +++ b/README Tue Sep 24 06:44:58 2013 +0100
1.3 @@ -55,26 +55,47 @@
1.4 Mac
1.5 ---
1.6
1.7 -The least intrusive means to build on a Mac is to use Homebrew:
1.8 +You will need the command line tools for any of the procedures described
1.9 +below. If you don't already have them, install Xcode (it's a free download).
1.10 +
1.11 +The simplest and least intrusive means to build on a Mac is to use Frau Sma's
1.12 +Homebrew formula. However, Homebrew is not compatible with Fink so if you
1.13 +have previously used Fink then you need an alternative solution, such as
1.14 +MacPorts (see below).
1.15 +
1.16 +It may also be possible to use Fink itself.
1.17 +
1.18 +Mac using Frau Sma's Homebrew formula
1.19 +-------------------------------------
1.20 +
1.21 +https://github.com/frau-sma/homebrew-bookloupe
1.22 +
1.23 +The README will be displayed by default. Follow its instructions to
1.24 +install bookloupe on your Mac.
1.25 +
1.26 +Creating statically linked binaries on a Mac using Homebrew
1.27 +-----------------------------------------------------------
1.28 +
1.29 +If you want to be able to distribute binaries of bookloupe to other Mac
1.30 +users, then they need to be statically (rather than dynamically) linked.
1.31 +Fundamentally this means that glib and its dependencies are included in
1.32 +the binary rather than being linked into the program by the Operating
1.33 +System each time it is run.
1.34
1.35 http://mxcl.github.com/homebrew/
1.36
1.37 -Install Homebrew according to its instructions.
1.38 +Install Homebrew according to its instructions. If you already had Homebrew
1.39 +before, make sure it's all up to date and “raring to brew.” For that, you
1.40 +want to run:
1.41
1.42 -If you are building bookloupe for your own use, you can use dynamic linking
1.43 -like this:
1.44 +$ brew update
1.45
1.46 -$ brew install glib
1.47 +and
1.48
1.49 -and then install bookloupe using:
1.50 +$ brew doctor
1.51
1.52 -$ ./configure
1.53 -$ make
1.54 -$ make install
1.55 -
1.56 -If you want to build bookloupe for other people to use, you will probably
1.57 -want to link staticly. To do this you need to edit the formula for glib
1.58 -and each of its dependencies (gettext and libffi) using something like:
1.59 +from your terminal. Then you need to edit the formula for glib and each of its
1.60 +dependencies (gettext and libffi at the time of writing) using something like:
1.61
1.62 $ brew edit gettext
1.63
1.64 @@ -107,4 +128,19 @@
1.65 when it is asked to prefer static libraries to dynamic ones.) Removing the
1.66 dynamic libraries first will solve this problem.
1.67
1.68 -It may also be possible to use fink or macports.
1.69 +Mac using MacPorts
1.70 +------------------
1.71 +
1.72 +Install MacPorts from http://www.macports.org/.
1.73 +
1.74 +Install pkgconfig (required to build glib) and then glib itself:
1.75 +
1.76 +$ sudo port install pkgconfig
1.77 +$ sudo port install glib2
1.78 +
1.79 +Then install bookloupe as normal, telling configure where to find glib's
1.80 +package configuration file:
1.81 +
1.82 +$ ./configure PKG_CONFIG_PATH=/opt/local/lib/pkgconfig
1.83 +$ make
1.84 +$ make install