# $Id$ PNAME="mozilla-thunderbird" PVER="2.0.0.22" PBUILD="r1" PCATEGORIE="net-mail" STATE="unstable" DESCRIPTION="Thunderbird is Mozilla's next generation e-mail client." HOMEPAGE="http://www.mozilla.org/products/thunderbird/" DEPEND=">= x11-libs/libXrender-0.9 >= x11-libs/libXt-1 >= x11-libs/libXmu-1 >= sys-libs/zlib-1.2.3 >= media-libs/libmng-1.0.10 >= media-libs/fontconfig-2.6 >= media-libs/libjpeg-6b >= media-libs/libpng-1.2.34 >= dev-libs/glib2-2.20 >= dev-libs/expat-2 >= dev-libs/libidl-0.8.13 >= app-arch/zip-3 >= app-arch/unzip-5.52 >= x11-libs/pango-1.24 >= x11-libs/gtk2+-2.16 >= x11-libs/cairo-1.8 >= app-crypt/gnupg-2 >= dev-libs/nspr-4.8 >= dev-libs/nss-3.12.3" SDEPEND=">= x11-proto/xineramaproto-1 >= dev-util/pkgconfig-0.23 >= sys-dev/autoconf-4 >= sys-dev/automake-3 >= sys-apps/sed-4" SRCFILE="thunderbird-${PVER}-source.tar.bz2" SRCDIR="${BUILDDIR}/mozilla" SRC_ENIGMAIL="enigmail-0.95.7.tar.gz" sminclude mozilla mtools SRC_URI=( ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/${PVER}/source/${SRCFILE} http://www.mozilla-enigmail.org/download/source/${SRC_ENIGMAIL} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRC_ENIGMAIL} mirror://${PNAME}/menu/thunderbird.png mirror://${PNAME}/menu/thunderbird.desktop mirror://${PNAME}/mozilla-firefox-1.5.0-embed-typeaheadfind.patch mirror://${PNAME}/mozilla-firefox-1.5.0.11-pkgconfig.patch mirror://${PNAME}/mozilla-firefox-2.0.0.5-libdeps.patch mirror://${PNAME}/mozilla-firefox-2.0.0.5-asneeded.patch mirror://${PNAME}/mozilla-firefox-2.0.0.5-respect-host-variable.patch mirror://${PNAME}/mozilla-firefox-2.0.0.5-rpath-3.patch mirror://${PNAME}/mozilla-firefox-2.0.0.5-pango-cursor.patch mirror://${PNAME}/mozilla-thunderbird-2.0.0.6-language.patch ) # we are building thunderbird export MOZ_CO_PROJECT=mail # set by configure (plus USE_AUTOCONF=1), but useful for NSPR export MOZILLA_CLIENT=1 export BUILD_OPT=1 export NO_STATIC_LIB=1 export USE_PTHREADS=1 # now strip optimization from CFLAGS so it doesn't end up in the # compile string export CFLAGS="${CFLAGS/-O*/}" export CXXFLAGS="${CFLAGS}" # needed to build without warnings on gcc-3 export CXXFLAGS="${CXXFLAGS} -Wno-deprecated" src_prepare() { munpack ${SRCFILE} || die # enigmail plugin munpack ${SRC_ENIGMAIL} ${SRCDIR}/mailnews/extensions ||die cd ${SRCDIR} # patches, patches, patches # fix linking issues against pango # https://bugzilla.mozilla.org/show_bug.cgi?id=344821 mpatch mozilla-firefox-2.0.0.5-libdeps.patch || die # use as-needed with newer binutils # https://bugzilla.mozilla.org/show_bug.cgi?id=311236 mpatch mozilla-firefox-2.0.0.5-asneeded.patch || die # fixes typeahead and gtk fixes for embeded firefox browsers mpatch mozilla-firefox-1.5.0-embed-typeaheadfind.patch || die # fix pkgconfig pathes mpatch mozilla-firefox-1.5.0.11-pkgconfig.patch || die # fix some compile issues on multilib systems mpatch mozilla-firefox-2.0.0.5-respect-host-variable.patch || die mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die # fix pango-cursor issues mpatch mozilla-firefox-2.0.0.5-pango-cursor.patch || die # enable variable languages via environment vars mpatch mozilla-thunderbird-2.0.0.6-language.patch || die export WANT_AUTOCONF="2.1" autoconf || die # rebuild makefiles cd ${SRCDIR}/mailnews/extensions/enigmail || die makemake2 || die } src_compile() { cd ${SRCDIR} # setup .mozconfig cp mail/config/mozconfig .mozconfig || die # where shall the files go ? mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-thunderbird # set optimization level based on CFLAGS if [[ ${ARCH} = x86_64 ]] then # opts may cause segfaults on 64bit arches mozconf_add --enable-optimize=-O1 export CFLAGS="${CFLAGS} -fPIC" export CXXFLAGS="${CXXFLAGS} -fPIC" else mozconf_add --enable-optimize=-O2 fi # enable compat mode for plugins build with gcc2 mozconf_add --enable-old-abi-compat-wrappers # we don't need the installer mozconf_add --disable-installer # issue all warnings demanded by strict ANSI C mozconf_add --disable-pedantic # enable crypto support (Personal Security Manager) mozconf_add --enable-crypto # want system jpeg, pngm, zlib, nspr and nss mozconf_add --with-system-jpeg mozconf_add --with-system-png mozconf_add --with-system-zlib mozconf_add --with-system-nspr mozconf_add --with-system-nss # enable gtk2 as default mozconf_add --enable-default-toolkit=gtk2 # no ipv6 support mozconf_add --enable-ipv6 # want xinerama mozconf_add --enable-xinerama # no xprint ? mozconf_add --disable-xprint # >= firefox-1.0.7 should use xft + pango, svg with cairo mozconf_add --disable-freetype2 mozconf_add --enable-xft mozconf_add --enable-pango mozconf_add --enable-system-cairo mozconf_add --enable-svg mozconf_add --enable-canvas # enable all image encoders mozconf_add --enable-image-encoder=all # disable debug build && enable stripping mozconf_add --disable-debug mozconf_add --disable-tests mozconf_add --enable-reorder mozconf_add --enable-strip mozconf_add --enable-strip-libs if [[ ${ARCH} = i*86 ]] then # optimze build for x86 mozconf_add --enable-elf-dynstr-gc fi # no ldap mozconf_add --disable-ldap mozconf_add --disable-ldap-experimental # enable default extensions mozconf_add --enable-extensions=default # resolve multiple --enable-extensions down to one rebuild_extension_list # now run configure mconfigure || die # removes extraneous CFLAGS # to reduce RAM requirements while compiling mozilla_remove_cflags || die mmake || die # enigmail doesn't like visibility_hidden, so we remove the macros rm config/gcc_hidden.h || die touch config/gcc_hidden.h || die # build enigmail mmake -j1 -C mailnews/extensions/enigmail || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /usr/bin || die minstalldir /usr/$(mlibdir)/pkgconfig || die minstalldir /usr/$(mlibdir)/mozilla-thunderbird || die minstalldir /usr/share/applications || die # install binaries cp -RL --no-preserve=links ${SRCDIR}/dist/bin/* \ ${BINDIR}/usr/$(mlibdir)/mozilla-thunderbird || die # fix permissions mchown -R root:root /usr/$(mlibdir)/mozilla-thunderbird || die # bins mlink /usr/$(mlibdir)/mozilla-thunderbird/thunderbird /usr/bin/thunderbird || die # vendor information msetpref general.useragent.vendor Magellan-Linux || die # install pkgconfig files (at last needed by epiphany) minstallfile build/unix/thunderbird-\*.pc /usr/$(mlibdir)/pkgconfig || die # menu entries minstallpixmap thunderbird.png || die minstallfile -s thunderbird.desktop /usr/share/applications || die } postinstall() { # update environment; needed for REGXPCOM env-rebuild source ${MROOT}/etc/profile # thunderbirds mozilla_five_home export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/mozilla-thunderbird" # register thunderbird echo "Registering Components and Chrome..." HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regxpcom # HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regchrome # fix permissions of component registry chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat # fix directory permissions find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || : # fix permissions on chrome files find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || : }