exherbo-impulze/packages/mail-client/thunderbird/thunderbird-2.0.0.19.exheres-0

139 lines
3.8 KiB
Bash
Raw Normal View History

# Copyright 2008 Bernd Steinhauser <berniyh@exherbo.org>
# Distributed under the terms of the GNU General Public License v2
# this is a copy of Bernd Steinhausers exheres in mozilla.git
# with added enigmail support
require mozilla multilib
ENIGMAIL_PV=0.95.7
SUMMARY="Mozilla's standalone mail client"
DESCRIPTION="
"
HOMEPAGE="http://www.mozilla.com/en-US/products/thunderbird/"
DOWNLOADS="ftp://ftp.mozilla.org/pub/${PN}/releases/${PV}/source/${PNV}-source.tar.bz2
enigmail? ( http://www.mozilla-enigmail.org/download/source/enigmail-${ENIGMAIL_PV}.tar.gz )"
UPSTREAM_RELEASE_NOTES="${HOMEPAGE}/${PV}/releasenotes/"
LICENCES="MPL-1.1"
SLOT="0"
PLATFORMS="~amd64 ~x86"
MYOPTIONS="bindist enigmail ldap svg xinerama"
# libXIE?
# AC_CHECK_LIB(XIE, XieFloGeometry, [MOZ_XIE_LIBS="-lXIE"],,
# $XLIBS $XEXT_LIBS)
# AC_CHECK_HEADER(X11/extensions/XIElib.h)
# media-libs/libpng
DEPENDENCIES="
build:
dev-util/pkg-config
x11-proto/xextproto
xinerama? ( x11-proto/xineramaproto )
build+run:
dev-libs/libIDL
dev-libs/nspr
dev-libs/nss
media-libs/freetype
media-libs/jpeg
x11-libs/pango
x11-libs/cairo[svg?]
x11-libs/gtk+:2
x11-libs/libX11
x11-libs/libXext
x11-libs/libXt
x11-libs/libICE
x11-libs/libSM
xinerama? ( x11-libs/libXinerama )
"
WORK="${WORKBASE}"/build/mail
ECONF_SOURCE="${WORKBASE}"/mozilla
export MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1
enigmail_src_prepare() {
mv "${WORKBASE}/enigmail" "${WORKBASE}/mozilla/mailnews/extensions/enigmail/" || die "moving failed"
cd "${WORKBASE}/mozilla/mailnews/extensions/enigmail/" || die "cd failed"
expatch -p6 "${FILES}/enigmail-${ENIGMAIL_PV}-visibility_workaround.patch"
}
enigmail_src_configure() {
cd "${WORKBASE}/mozilla/mailnews/extensions/enigmail/" || die "cd failed"
./makemake -r -o "${WORK}" || die "makemake -r failed"
}
enigmail_src_compile() {
emake -C mailnews/extensions/enigmail/
}
enigmail_src_install() {
# taken from enigmail-0.95.7-r2.ebuild
local em_id=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' "${WORKBASE}/mozilla/mailnews/extensions/enigmail/package/install.rdf")
emake -C mailnews/extensions/enigmail/ xpi
unzip -d "${IMAGE}/usr/$(get_libdir)/${PN}/extensions/${em_id}" "${WORK}/dist/bin"/*xpi || die "unzip failed"
}
src_prepare() {
mozilla_src_prepare
sed -e "/^mozappdir/ c mozappdir = /usr/$(get_libdir)/${PN}" \
-i "${WORKBASE}"/mozilla/config/autoconf.mk.in || die "mozappdir sed failed."
cd "${ECONF_SOURCE}" || die "cd ${ECONF_SOURCE} failed"
expatch "${FILES}/${PNV}-nsAppRunner_empty_elif.patch"
option enigmail && enigmail_src_prepare
}
src_configure() {
export MOZ_OBJDIR=@TOPSRCDIR@/../build
export MOZ_CO_PROJECT=mail
export MOZ_BUILD_PROJECTS=mail
econf \
--enable-application=mail \
--enable-crypto \
--enable-freetype \
--enable-system-cairo \
--disable-mochitest \
--disable-gnomeui \
--disable-gnomevfs \
--disable-javaxpcom \
--disable-optimize \
--disable-strip \
--disable-xprint \
--with-system-nspr \
--with-system-nss \
--with-system-jpeg \
--with-system-png \
--with-system-zlib \
--with-libIDL \
--with-x \
$(option_enable ldap) \
$(option_enable ldap ldap-experimental) \
$(option_enable !bindist official-branding) \
$(option_enable svg) \
--with-default-mozilla-five-home=/usr/$(get_libdir)/${PN} \
--with-distribution-id=org.exherbo
option enigmail && enigmail_src_configure
}
src_compile() {
default
option enigmail && enigmail_src_compile
}
src_install() {
default
option enigmail && enigmail_src_install
}