diff -r 05d082ebf685 -r d13e2582c2b5 README --- a/README Tue Feb 07 08:15:12 2012 +0000 +++ b/README Tue Sep 24 06:44:58 2013 +0100 @@ -55,26 +55,47 @@ Mac --- -The least intrusive means to build on a Mac is to use Homebrew: +You will need the command line tools for any of the procedures described +below. If you don't already have them, install Xcode (it's a free download). + +The simplest and least intrusive means to build on a Mac is to use Frau Sma's +Homebrew formula. However, Homebrew is not compatible with Fink so if you +have previously used Fink then you need an alternative solution, such as +MacPorts (see below). + +It may also be possible to use Fink itself. + +Mac using Frau Sma's Homebrew formula +------------------------------------- + +https://github.com/frau-sma/homebrew-bookloupe + +The README will be displayed by default. Follow its instructions to +install bookloupe on your Mac. + +Creating statically linked binaries on a Mac using Homebrew +----------------------------------------------------------- + +If you want to be able to distribute binaries of bookloupe to other Mac +users, then they need to be statically (rather than dynamically) linked. +Fundamentally this means that glib and its dependencies are included in +the binary rather than being linked into the program by the Operating +System each time it is run. http://mxcl.github.com/homebrew/ -Install Homebrew according to its instructions. +Install Homebrew according to its instructions. If you already had Homebrew +before, make sure it's all up to date and “raring to brew.” For that, you +want to run: -If you are building bookloupe for your own use, you can use dynamic linking -like this: +$ brew update -$ brew install glib +and -and then install bookloupe using: +$ brew doctor -$ ./configure -$ make -$ make install - -If you want to build bookloupe for other people to use, you will probably -want to link staticly. To do this you need to edit the formula for glib -and each of its dependencies (gettext and libffi) using something like: +from your terminal. Then you need to edit the formula for glib and each of its +dependencies (gettext and libffi at the time of writing) using something like: $ brew edit gettext @@ -107,4 +128,19 @@ when it is asked to prefer static libraries to dynamic ones.) Removing the dynamic libraries first will solve this problem. -It may also be possible to use fink or macports. +Mac using MacPorts +------------------ + +Install MacPorts from http://www.macports.org/. + +Install pkgconfig (required to build glib) and then glib itself: + +$ sudo port install pkgconfig +$ sudo port install glib2 + +Then install bookloupe as normal, telling configure where to find glib's +package configuration file: + +$ ./configure PKG_CONFIG_PATH=/opt/local/lib/pkgconfig +$ make +$ make install