Claws Mail on Mac OS X - developpers page
This page is in development. Last update : 26 june 2007
note
- This page contains my (successful) attempts to compile, run and package Claws Mail on Mac OS X
Sorry for you intel guys, I have only an old ibook G4 ppc laptop, which is quite slow (800Mhz). So development is not fast, and I'm unable to provide universal binaries. You can help by buying me an intel based mac! :)
- I now have a fast Intel based MacBook Pro, so I'm compiling intel binaries
Compile Claws Mail against Apple X11
- These are quick notes, not yet formated
- install Apple X11
- install Xcode X11 SDK
- download/untar gtk-2.6.10, and all its dependancies (not the latest versions)
- pkg-config
- gettext
- export PATH="$PATH:/usr/local/bin"
- glib-2.0 >= 2.6.0 atk >= 1.0.1
- jpeg (had to run sudo ranlib /usr/local/lib/libjpeg.a ), png
- sudo ln -s /usr/X11R6/lib/pkgconfig/fontconfig.pc /usr/local/lib/pkgconfig
- sudo ln -s /usr/X11R6/lib/pkgconfig/xft.pc /usr/local/lib/pkgconfig/
- sudo ln -s /usr/X11R6/bin/xft-config /usr/local/bin/
- download freetype2, install
- pango
- sudo ln -s /usr/X11R6/lib/pkgconfig/xcursor.pc /usr/local/lib/pkgconfig/
- gtk+-2.6.10 --without-libtiff
- libetpan-0.49.tar.gz
- sudo ln -s /usr/include/openssl /usr/local/include
- sudo ln -s /usr/lib/pkgconfig/openssl.pc /usr/local/lib/pkgconfig/
- claws : ./configure --disable-spamassassin-plugin --disable-dillo-viewer-plugin --disable-trayicon-plugin --disable-bogofilter-plugin
- vim gtk/gtkclist.h, add #include <glib/gmem.h>
Compile Claws Mail using Fink
- install fink
- download and untar Claws Mail sources from there.
- the way to go is to run the ./configure script, then using fink, install missing packages needed for the compilation. Some needed software are available only in unstable, so you need to enable unstable packages in the fink pref. This gave me :
- make (binary)
- pkgconfig (binary)
- xorg (binary)
- glib2-dev (compiled from source)
- glib (not the version 2, needed for glib-config)
- gtk2-dev : you'll need version > 2.6,
- Claws Mail needs etpan, but there is no fink package. Darwin Ports provides one, but let's compile it from the sources directly. Get the tarball at etpan homepage
- compile libetpan with : ./configure --prefix=/sw && make && sudo make install
- If you need the SSL support (fot IMAPS for instance), install openssl-dev, via Fink, but before that, make sure you enable "Use unstable cryptography packages" in the Fink preferences
- you may want to install/compile other library if you need them in claws. Use ./configure --help to get the list of available options.
The configure script doesn't look for the gtk2, glib and other includes in the right location. one solution is to make symlinks, but wwp proposed adding the include dires in the CFLAGS env var. The configure script doesn't have the options to add includedirs. You might have to add more include dirs depending on your options and lib versions. Check config.log if configure fails
Now run the configure :
CFLAGS="$CFLAGS -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0 -I/sw/include/gtk+-2.0 -I/sw/lib/gtk+-2.0" ./configure --prefix=/sw --disable-spamassassin-plugin --disable-dillo-viewer-plugin --disable-trayicon-plugin --disable-bogofilter-plugin
If the ./configure runs well, it'll output this
claws-mail 2.9.1
JPilot : no
LDAP : yes
OpenSSL : no
iconv : yes
compface : no
IPv6 : yes
GNU/aspell : no
IMAP4 : yes
Crash dialog : no
Libgnomeprint : no
LibSM : no
Manual : yes
Plugins :
Maemo build : no
Config dir : .claws-mail
The binary will be installed in /sw/bin
Now let's buid Claws :
make
And install it :
sudo make install
if everything compiled correctly, you should be able to run claws-mail. How? You first need to start X, and from within, start claws-mail. As we installed the fink X server, you have to run startx
, and within an xterm, run claws-mail
. Success! Claws Mail will appear.
In the next post we'll see how to compile against the Apple X11 server.
Bundle Creation
Having claws mail running from an xterm is great, but it's better if it can
be integrated a bit more with the rest. I tried several way to create a proper
.app bundle. Here is what worked :
Download and instal Platypus
Use it to create a basic bundle launching a shell script
you should be able to have a basic bundle by addind exec /usr/local/bin/claws-mail
in the script
But what we want is to embbed claws-mail in the bundle
Get the Gimp.app bundle, and look at how they did
Copy/paste the script and bin/gimp.sh and adapt it to claws mail
Reuse the get_display.sh
add a proper icon, and pray a bit
use the disk utility to build a dmg.