Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Sep 2012 03:29:58 GMT
From:      svn-freebsd-gecko@chruetertee.ch
To:        freebsd-gecko@freebsd.org
Subject:   [SVN-Commit] r1034 - in trunk: . mail/thunderbird mail/thunderbird-esr www/firefox www/seamonkey
Message-ID:  <201209280329.q8S3TwMN068261@trillian.chruetertee.ch>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Sep 28 03:29:58 2012
New Revision: 1034

Log:
integrate enigmail into thunderbird/seamonkey ports

Submitted by:	ale (earlier version)
Tested by:	flo

Modified:
   trunk/Gecko_ChangeLog
   trunk/Gecko_TODO
   trunk/mail/thunderbird-esr/Makefile
   trunk/mail/thunderbird-esr/distinfo
   trunk/mail/thunderbird/Makefile
   trunk/mail/thunderbird/distinfo
   trunk/www/firefox/Makefile.options
   trunk/www/seamonkey/Makefile
   trunk/www/seamonkey/distinfo

Modified: trunk/Gecko_ChangeLog
==============================================================================
--- trunk/Gecko_ChangeLog	Tue Sep 25 07:02:58 2012	(r1033)
+++ trunk/Gecko_ChangeLog	Fri Sep 28 03:29:58 2012	(r1034)
@@ -1,4 +1,5 @@
 16.0:
+- integrate enigmail into thunderbird/seamonkey
 - switch firefox 16.0 and seamonkey 2.13 to ALSA by default for better
   latency during pause and seeking with HTML5 video
 - remove fedisableexcept() hacks, obsolete since FreeBSD 4.0

Modified: trunk/Gecko_TODO
==============================================================================
--- trunk/Gecko_TODO	Tue Sep 25 07:02:58 2012	(r1033)
+++ trunk/Gecko_TODO	Fri Sep 28 03:29:58 2012	(r1034)
@@ -7,7 +7,6 @@
 - add BlueGriffon to replace www/kompozer
 - switch to system libxul (needs slaves with common patches);
   a Debian patch to reduce configure time can be useful
-- integrate enigmail into thunderbird/seamonkey
 - move duplicated `>=' deps into bsd.gecko.mk (system libxul?)
 - push @plt/.hidden patch for JS upstream (needs a test case)
 - push system db(3) patch upstream

Modified: trunk/mail/thunderbird-esr/Makefile
==============================================================================
--- trunk/mail/thunderbird-esr/Makefile	Tue Sep 25 07:02:58 2012	(r1033)
+++ trunk/mail/thunderbird-esr/Makefile	Fri Sep 28 03:29:58 2012	(r1034)
@@ -10,7 +10,8 @@
 CATEGORIES=	mail ipv6
 MASTER_SITES=	${MASTER_SITE_MOZILLA}
 MASTER_SITE_SUBDIR=	${PORTNAME}/releases/${DISTVERSION}esr/source
-DISTNAME=	${PORTNAME}-${DISTVERSION}esr.source
+DISTFILES=	${PORTNAME}-${DISTVERSION}esr.source${EXTRACT_SUFX}
+EXTRACT_ONLY=	${PORTNAME}-${DISTVERSION}esr.source${EXTRACT_SUFX}
 
 MAINTAINER=	gecko@FreeBSD.org
 COMMENT=	Mozilla Thunderbird is standalone mail and news that stands above
@@ -21,6 +22,8 @@
 		cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
 		unzip:${PORTSDIR}/archivers/unzip
 
+EM_VERSION=	1.4.4
+
 USE_AUTOTOOLS=	autoconf213:env
 LATEST_LINK=	thunderbird-esr
 USE_GECKO=	gecko
@@ -51,7 +54,8 @@
 SYSTEM_PREFS=	${FAKEDIR}/lib/${PORTNAME}/defaults/pref/${PORTNAME}.js
 MOZ_PIS_SCRIPTS=moz_pis_S50cleanhome
 
-OPTIONS_DEFINE=	LIGHTNING
+OPTIONS_DEFINE=	ENIGMAIL LIGHTNING
+OPTIONS_DEFAULT=ENIGMAIL
 
 .include "${.CURDIR}/../../www/firefox/Makefile.options"
 .include <bsd.port.pre.mk>
@@ -59,6 +63,8 @@
 WRKSRC=		${WRKDIR}/comm-esr10
 MOZSRC:=	${WRKSRC}/mozilla
 
+XPI_LIBDIR=	${PREFIX}/lib/xpi
+
 .if ${ARCH} == amd64
 CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
 .elif ${ARCH} == powerpc64
@@ -78,12 +84,25 @@
 CFLAGS+=	-Wno-return-type-c-linkage
 .endif
 
+.if ${PORT_OPTIONS:MENIGMAIL}
+MASTER_SITES+=	http://www.enigmail.net/download/source/:enigmail
+DISTFILES+=	${EM_DISTFILE}:enigmail
+RUN_DEPENDS+=	gpg:${PORTSDIR}/security/gnupg
+EM_DISTNAME=	enigmail-${EM_VERSION}
+EM_DISTFILE=	${EM_DISTNAME}.tar.gz
+EM_XPI_FILE=	${MOZ_OBJDIR}/mozilla/dist/bin/${EM_DISTNAME}-freebsd-${ARCH:S/amd64/x86_64/}.xpi
+EM_ORIG_ID=	{847b3a00-7ab1-11d4-8f02-006008948af5}
+EM_ID=		${PORTNAME}@mozilla-enigmail.org
+EM_ID_RFILES=	${XPI_LIBDIR}/${EM_ID}/install.rdf \
+		${XPI_LIBDIR}/${EM_ID}/components/enigmail.js \
+		${XPI_LIBDIR}/${EM_ID}/modules/enigmailCommon.jsm
+.endif
+
 .if ${PORT_OPTIONS:MLIGHTNING}
 MOZ_OPTIONS+=	--enable-calendar
 MOZ_MK_OPTIONS+=	MOZ_CO_PROJECT=calendar
 LIGHTNING_DIR=	share/lightning
 XPI_FILE=	${MOZ_OBJDIR}/mozilla/dist/xpi-stage/lightning.xpi
-XPI_LIBDIR=	${PREFIX}/lib/xpi
 XPI_ORIG_ID=	{e2fda1a4-762b-4020-b5ad-a41df1933103}
 XPI_ID=		lightning@thunderbird.mozilla.org
 .else
@@ -93,16 +112,37 @@
 post-extract:
 	@${SED} -e 's|@PORTNAME_ICON@|${PORTNAME_ICON}|;s|@MOZILLA@|${MOZILLA}|' \
 		<${FILESDIR}/thunderbird.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop
+.if ${PORT_OPTIONS:MENIGMAIL}
+	@${TAR} -xf ${_DISTDIR}/${EM_DISTFILE} \
+		-C ${WRKSRC}/mailnews/extensions
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 		${WRKSRC}/mail/app/nsMailApp.cpp
+.if ${PORT_OPTIONS:MENIGMAIL}
+	@${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},' \
+		${WRKSRC}/mailnews/extensions/enigmail/makemake
+	@${REINPLACE_CMD} -e '/^xpi/s/$$/ all/' \
+		-e '/^XPI_MODULE_VERS/s/= .*/= ${EM_VERSION}/' \
+		${WRKSRC}/mailnews/extensions/enigmail/Makefile.in
+	@${REINPLACE_CMD} -e '/em:version/s,>[^<]*<,>${EM_VERSION}<,' \
+		${WRKSRC}/mailnews/extensions/enigmail/package/install.rdf
+.endif
 
 pre-configure:
 	(cd ${WRKSRC} && ${AUTOCONF})
 	(cd ${MOZSRC} && ${AUTOCONF})
 	(cd ${MOZSRC}/js/src/ && ${AUTOCONF})
 
+.if ${PORT_OPTIONS:MENIGMAIL}
+post-build:
+	cd ${WRKSRC}/mailnews/extensions/enigmail && \
+		./makemake -r -o ${MOZ_OBJDIR}
+	${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS} all xpi \
+		-C ${MOZ_OBJDIR}/mailnews/extensions/enigmail
+.endif
+
 port-pre-install:
 	${MKDIR} ${FAKEDIR}/lib/${PORTNAME}/defaults
 
@@ -130,7 +170,25 @@
 	@${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/thunderbird/extensions/${XPI_ID}' >> ${TMPPLIST}
 	@(cd ${XPI_LIBDIR}; ${FIND} ${XPI_ID} -type d) | ${SORT} -r | \
 		${SED} -ne 's,^,@dirrm lib/xpi/,p' >> ${TMPPLIST}
-	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks/thunderbird 2>/dev/null || true' >> ${TMPPLIST}
+.endif
+.if ${PORT_OPTIONS:MENIGMAIL}
+	@${MKDIR} ${XPI_LIBDIR}/${EM_ID} ${XPI_LIBDIR}/symlinks/${PORTNAME}
+	@(cd ${XPI_LIBDIR}/${EM_ID}; ${TAR} -xf ${EM_XPI_FILE})
+	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${EM_ID}
+	@${REINPLACE_CMD} -i "" "s/${EM_ORIG_ID}/${EM_ID}/" ${EM_ID_RFILES}
+	@${CHMOD} -R a+rX,go-w ${XPI_LIBDIR}/${EM_ID}
+	@${LN} -sf ${XPI_LIBDIR}/${EM_ID} ${LOCALBASE}/lib/${PORTNAME}/extensions 2>/dev/null || true
+	@${LN} -sf ${XPI_LIBDIR}/${EM_ID} ${XPI_LIBDIR}/symlinks/${PORTNAME} 2>/dev/null || true
+	@(cd ${XPI_LIBDIR}; ${FIND} ${EM_ID} -not -type d) | ${SORT} | \
+		${SED} -ne 's,^,lib/xpi/,p' >> ${TMPPLIST}
+	@${ECHO_CMD} 'lib/xpi/symlinks/${PORTNAME}/${EM_ID}' >> ${TMPPLIST}
+	@${ECHO_CMD} '@exec ${LN} -sf %D/lib/xpi/${EM_ID} ${LOCALBASE}/lib/${PORTNAME}/extensions 2>/dev/null || true' >> ${TMPPLIST}
+	@${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/${PORTNAME}/extensions/${EM_ID}' >> ${TMPPLIST}
+	@(cd ${XPI_LIBDIR}; ${FIND} ${EM_ID} -type d) | ${SORT} -r | \
+		${SED} -ne 's,^,@dirrm lib/xpi/,p' >> ${TMPPLIST}
+.endif
+.if ${PORT_OPTIONS:MLIGHTNING} || ${PORT_OPTIONS:MENIGMAIL}
+	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks/${PORTNAME} 2>/dev/null || true' >> ${TMPPLIST}
 	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks 2>/dev/null || true' >> ${TMPPLIST}
 	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi 2>/dev/null || true' >> ${TMPPLIST}
 .endif

Modified: trunk/mail/thunderbird-esr/distinfo
==============================================================================
--- trunk/mail/thunderbird-esr/distinfo	Tue Sep 25 07:02:58 2012	(r1033)
+++ trunk/mail/thunderbird-esr/distinfo	Fri Sep 28 03:29:58 2012	(r1034)
@@ -1,2 +1,4 @@
 SHA256 (thunderbird-10.0.7esr.source.tar.bz2) = 994ca16a01e4446747b54b1b5fb2bda11aec2c92359571bffa0f6c8e45f27c35
 SIZE (thunderbird-10.0.7esr.source.tar.bz2) = 97590919
+SHA256 (enigmail-1.4.4.tar.gz) = ec62bb701968f72ad35546660132e6e47d4ebe684df1d27fc615cb9010a203b8
+SIZE (enigmail-1.4.4.tar.gz) = 1269444

Modified: trunk/mail/thunderbird/Makefile
==============================================================================
--- trunk/mail/thunderbird/Makefile	Tue Sep 25 07:02:58 2012	(r1033)
+++ trunk/mail/thunderbird/Makefile	Fri Sep 28 03:29:58 2012	(r1034)
@@ -10,7 +10,8 @@
 CATEGORIES=	mail ipv6
 MASTER_SITES=	${MASTER_SITE_MOZILLA}
 MASTER_SITE_SUBDIR=	${PORTNAME}/releases/${DISTVERSION}/source
-DISTNAME=	${PORTNAME}-${DISTVERSION}.source
+DISTFILES=	${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX}
+EXTRACT_ONLY=	${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX}
 
 MAINTAINER=	gecko@FreeBSD.org
 COMMENT=	Mozilla Thunderbird is standalone mail and news that stands above
@@ -22,6 +23,8 @@
 		cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
 		unzip:${PORTSDIR}/archivers/unzip
 
+EM_VERSION=	1.4.4
+
 USE_AUTOTOOLS=	autoconf213:env
 USE_PYTHON_BUILD=yes
 USE_GECKO=	gecko
@@ -52,7 +55,8 @@
 SYSTEM_PREFS=	${FAKEDIR}/lib/${PORTNAME}/defaults/pref/${PORTNAME}.js
 MOZ_PIS_SCRIPTS=moz_pis_S50cleanhome
 
-OPTIONS_DEFINE=	GSTREAMER LIGHTNING
+OPTIONS_DEFINE=	ENIGMAIL GSTREAMER LIGHTNING
+OPTIONS_DEFAULT=ENIGMAIL
 
 .include "${.CURDIR}/../../www/firefox/Makefile.options"
 .include <bsd.port.pre.mk>
@@ -60,6 +64,8 @@
 WRKSRC=		${WRKDIR}/comm-beta
 MOZSRC:=	${WRKSRC}/mozilla
 
+XPI_LIBDIR=	${PREFIX}/lib/xpi
+
 .if ${ARCH} == amd64
 CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
 .elif ${ARCH} == powerpc64
@@ -75,12 +81,25 @@
 BUILD_DEPENDS+=	yasm:${PORTSDIR}/devel/yasm
 .endif
 
+.if ${PORT_OPTIONS:MENIGMAIL}
+MASTER_SITES+=	http://www.enigmail.net/download/source/:enigmail
+DISTFILES+=	${EM_DISTFILE}:enigmail
+RUN_DEPENDS+=	gpg:${PORTSDIR}/security/gnupg
+EM_DISTNAME=	enigmail-${EM_VERSION}
+EM_DISTFILE=	${EM_DISTNAME}.tar.gz
+EM_XPI_FILE=	${MOZ_OBJDIR}/mozilla/dist/bin/${EM_DISTNAME}-freebsd-${ARCH:S/amd64/x86_64/}.xpi
+EM_ORIG_ID=	{847b3a00-7ab1-11d4-8f02-006008948af5}
+EM_ID=		${PORTNAME}@mozilla-enigmail.org
+EM_ID_RFILES=	${XPI_LIBDIR}/${EM_ID}/install.rdf \
+		${XPI_LIBDIR}/${EM_ID}/components/enigmail.js \
+		${XPI_LIBDIR}/${EM_ID}/modules/enigmailCommon.jsm
+.endif
+
 .if ${PORT_OPTIONS:MLIGHTNING}
 MOZ_OPTIONS+=	--enable-calendar
 MOZ_MK_OPTIONS+=	MOZ_CO_PROJECT=calendar
 LIGHTNING_DIR=	share/lightning
 XPI_FILE=	${MOZ_OBJDIR}/mozilla/dist/xpi-stage/lightning.xpi
-XPI_LIBDIR=	${PREFIX}/lib/xpi
 XPI_ORIG_ID=	{e2fda1a4-762b-4020-b5ad-a41df1933103}
 XPI_ID=		lightning@thunderbird.mozilla.org
 .else
@@ -90,16 +109,37 @@
 post-extract:
 	@${SED} -e 's|@PORTNAME_ICON@|${PORTNAME_ICON}|;s|@MOZILLA@|${MOZILLA}|' \
 		<${FILESDIR}/thunderbird.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop
+.if ${PORT_OPTIONS:MENIGMAIL}
+	@${TAR} -xf ${_DISTDIR}/${EM_DISTFILE} \
+		-C ${WRKSRC}/mailnews/extensions
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 		${WRKSRC}/mail/app/nsMailApp.cpp
+.if ${PORT_OPTIONS:MENIGMAIL}
+	@${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},' \
+		${WRKSRC}/mailnews/extensions/enigmail/makemake
+	@${REINPLACE_CMD} -e '/^xpi/s/$$/ all/' \
+		-e '/^XPI_MODULE_VERS/s/= .*/= ${EM_VERSION}/' \
+		${WRKSRC}/mailnews/extensions/enigmail/Makefile.in
+	@${REINPLACE_CMD} -e '/em:version/s,>[^<]*<,>${EM_VERSION}<,' \
+		${WRKSRC}/mailnews/extensions/enigmail/package/install.rdf
+.endif
 
 pre-configure:
 	(cd ${WRKSRC} && ${AUTOCONF})
 	(cd ${MOZSRC} && ${AUTOCONF})
 	(cd ${MOZSRC}/js/src/ && ${AUTOCONF})
 
+.if ${PORT_OPTIONS:MENIGMAIL}
+post-build:
+	cd ${WRKSRC}/mailnews/extensions/enigmail && \
+		./makemake -r -o ${MOZ_OBJDIR}
+	${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS} all xpi \
+		-C ${MOZ_OBJDIR}/mailnews/extensions/enigmail
+.endif
+
 port-pre-install:
 	${MKDIR} ${FAKEDIR}/lib/${PORTNAME}/defaults
 
@@ -127,7 +167,25 @@
 	@${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/thunderbird/extensions/${XPI_ID}' >> ${TMPPLIST}
 	@(cd ${XPI_LIBDIR}; ${FIND} ${XPI_ID} -type d) | ${SORT} -r | \
 		${SED} -ne 's,^,@dirrm lib/xpi/,p' >> ${TMPPLIST}
-	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks/thunderbird 2>/dev/null || true' >> ${TMPPLIST}
+.endif
+.if ${PORT_OPTIONS:MENIGMAIL}
+	@${MKDIR} ${XPI_LIBDIR}/${EM_ID} ${XPI_LIBDIR}/symlinks/${PORTNAME}
+	@(cd ${XPI_LIBDIR}/${EM_ID}; ${TAR} -xf ${EM_XPI_FILE})
+	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${EM_ID}
+	@${REINPLACE_CMD} -i "" "s/${EM_ORIG_ID}/${EM_ID}/" ${EM_ID_RFILES}
+	@${CHMOD} -R a+rX,go-w ${XPI_LIBDIR}/${EM_ID}
+	@${LN} -sf ${XPI_LIBDIR}/${EM_ID} ${LOCALBASE}/lib/${PORTNAME}/extensions 2>/dev/null || true
+	@${LN} -sf ${XPI_LIBDIR}/${EM_ID} ${XPI_LIBDIR}/symlinks/${PORTNAME} 2>/dev/null || true
+	@(cd ${XPI_LIBDIR}; ${FIND} ${EM_ID} -not -type d) | ${SORT} | \
+		${SED} -ne 's,^,lib/xpi/,p' >> ${TMPPLIST}
+	@${ECHO_CMD} 'lib/xpi/symlinks/${PORTNAME}/${EM_ID}' >> ${TMPPLIST}
+	@${ECHO_CMD} '@exec ${LN} -sf %D/lib/xpi/${EM_ID} ${LOCALBASE}/lib/${PORTNAME}/extensions 2>/dev/null || true' >> ${TMPPLIST}
+	@${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/${PORTNAME}/extensions/${EM_ID}' >> ${TMPPLIST}
+	@(cd ${XPI_LIBDIR}; ${FIND} ${EM_ID} -type d) | ${SORT} -r | \
+		${SED} -ne 's,^,@dirrm lib/xpi/,p' >> ${TMPPLIST}
+.endif
+.if ${PORT_OPTIONS:MLIGHTNING} || ${PORT_OPTIONS:MENIGMAIL}
+	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks/${PORTNAME} 2>/dev/null || true' >> ${TMPPLIST}
 	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks 2>/dev/null || true' >> ${TMPPLIST}
 	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi 2>/dev/null || true' >> ${TMPPLIST}
 .endif

Modified: trunk/mail/thunderbird/distinfo
==============================================================================
--- trunk/mail/thunderbird/distinfo	Tue Sep 25 07:02:58 2012	(r1033)
+++ trunk/mail/thunderbird/distinfo	Fri Sep 28 03:29:58 2012	(r1034)
@@ -1,2 +1,4 @@
 SHA256 (thunderbird-16.0b2.source.tar.bz2) = bba7d79e2939806c027ac82592c408ea815d3094a70f8f277b959966d1baa511
 SIZE (thunderbird-16.0b2.source.tar.bz2) = 111787029
+SHA256 (enigmail-1.4.4.tar.gz) = ec62bb701968f72ad35546660132e6e47d4ebe684df1d27fc615cb9010a203b8
+SIZE (enigmail-1.4.4.tar.gz) = 1269444

Modified: trunk/www/firefox/Makefile.options
==============================================================================
--- trunk/www/firefox/Makefile.options	Tue Sep 25 07:02:58 2012	(r1033)
+++ trunk/www/firefox/Makefile.options	Fri Sep 28 03:29:58 2012	(r1034)
@@ -12,8 +12,9 @@
 OPTIONS_MULTI+=		GNOME
 OPTIONS_MULTI_GNOME=	GCONF GIO GNOMEUI GNOMEVFS2
 
+ENIGMAIL_DESC?=		Enigmail extension
 GIO_DESC?=		GIO for file I/O # move to bsd.options.desc.mk
 GNOMEUI_DESC?=		libgnomeui support module
+LIBPROXY_DESC?=		Proxy support via libproxy
 LIGHTNING_DESC?=	Calendar extension
 LOGGING_DESC?=		Additional log messages
-LIBPROXY_DESC?=		Proxy support via libproxy

Modified: trunk/www/seamonkey/Makefile
==============================================================================
--- trunk/www/seamonkey/Makefile	Tue Sep 25 07:02:58 2012	(r1033)
+++ trunk/www/seamonkey/Makefile	Fri Sep 28 03:29:58 2012	(r1034)
@@ -10,7 +10,8 @@
 CATEGORIES?=	www ipv6
 MASTER_SITES=	${MASTER_SITE_MOZILLA_EXTENDED}
 MASTER_SITE_SUBDIR=	seamonkey/releases/${DISTVERSION}/source
-DISTNAME=	seamonkey-${DISTVERSION}.source
+DISTFILES=	seamonkey-${DISTVERSION}.source${EXTRACT_SUFX}
+EXTRACT_ONLY=	seamonkey-${DISTVERSION}.source${EXTRACT_SUFX}
 
 MAINTAINER=	gecko@FreeBSD.org
 COMMENT=	The open source, standards compliant web browser
@@ -21,6 +22,8 @@
 		${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 \
 		unzip:${PORTSDIR}/archivers/unzip
 
+EM_VERSION=	1.4.4
+
 USE_AUTOTOOLS=	autoconf213:env
 USE_PYTHON_BUILD=yes
 USE_BZIP2=	yes
@@ -45,8 +48,8 @@
 
 NOT_FOR_ARCHS=	ia64
 
-OPTIONS_DEFINE=	CHATZILLA COMPOSER GSTREAMER LDAP LIGHTNING MAILNEWS
-OPTIONS_DEFAULT=CHATZILLA COMPOSER LDAP MAILNEWS
+OPTIONS_DEFINE=	CHATZILLA COMPOSER ENIGMAIL GSTREAMER LDAP LIGHTNING MAILNEWS
+OPTIONS_DEFAULT=CHATZILLA COMPOSER ENIGMAIL LDAP MAILNEWS
 
 CHATZILLA_DESC?=Chatzilla IRC module
 COMPOSER_DESC?=	HTML Composer module
@@ -62,6 +65,8 @@
 WRKSRC=		${WRKDIR}/comm-beta
 MOZSRC:=	${WRKSRC}/mozilla
 
+XPI_LIBDIR=	${PREFIX}/lib/xpi
+
 .if ${ARCH} == amd64
 CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
 .elif ${ARCH} == powerpc64
@@ -84,6 +89,19 @@
 .else
 MOZ_OPTIONS+=	--enable-ldap --enable-mailnews
 .endif
+.if ${PORT_OPTIONS:MENIGMAIL}
+MASTER_SITES+=	http://www.enigmail.net/download/source/:enigmail
+DISTFILES+=	${EM_DISTFILE}:enigmail
+RUN_DEPENDS+=	gpg:${PORTSDIR}/security/gnupg
+EM_DISTNAME=	enigmail-${EM_VERSION}
+EM_DISTFILE=	${EM_DISTNAME}.tar.gz
+EM_XPI_FILE=	${MOZ_OBJDIR}/mozilla/dist/bin/${EM_DISTNAME}-freebsd-${ARCH:S/amd64/x86_64/}.xpi
+EM_ORIG_ID=	{847b3a00-7ab1-11d4-8f02-006008948af5}
+EM_ID=		${PORTNAME}@mozilla-enigmail.org
+EM_ID_RFILES=	${XPI_LIBDIR}/${EM_ID}/install.rdf \
+		${XPI_LIBDIR}/${EM_ID}/components/enigmail.js \
+		${XPI_LIBDIR}/${EM_ID}/modules/enigmailCommon.jsm
+.endif
 .endif
 .if ${PORT_OPTIONS:MCHATZILLA}
 MOZ_EXTENSIONS:=	${MOZ_EXTENSIONS},irc
@@ -102,13 +120,18 @@
 MOZ_MK_OPTIONS+=	MOZ_CO_PROJECT=calendar
 LIGHTNING_DIR=	share/lightning
 XPI_FILE=	${MOZ_OBJDIR}/mozilla/dist/xpi-stage/lightning.xpi
-XPI_LIBDIR=	${PREFIX}/lib/xpi
 XPI_ORIG_ID=	{e2fda1a4-762b-4020-b5ad-a41df1933103}
 XPI_ID=		lightning@seamonkey.mozilla.org
 .else
 MOZ_OPTIONS+=	--disable-calendar
 .endif
 
+.if ${PORT_OPTIONS:MMAILNEWS} && ${PORT_OPTIONS:MENIGMAIL}
+post-extract:
+	@${TAR} -xf ${_DISTDIR}/${EM_DISTFILE} \
+		-C ${WRKSRC}/mailnews/extensions
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 		${WRKSRC}/suite/app/nsSuiteApp.cpp
@@ -117,11 +140,29 @@
 	@${SED} -e 's|%%MOZILLA%%|${MOZILLA}|g' \
 		< ${FILESDIR}/seamonkey.desktop.in > \
 		${WRKDIR}/${MOZILLA}.desktop
+.if ${PORT_OPTIONS:MMAILNEWS} && ${PORT_OPTIONS:MENIGMAIL}
+	@${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},' \
+		${WRKSRC}/mailnews/extensions/enigmail/makemake
+	@${REINPLACE_CMD} -e '/^xpi/s/$$/ all/' \
+		-e '/^XPI_MODULE_VERS/s/= .*/= ${EM_VERSION}/' \
+		${WRKSRC}/mailnews/extensions/enigmail/Makefile.in
+	@${REINPLACE_CMD} -e '/em:version/s,>[^<]*<,>${EM_VERSION}<,' \
+		${WRKSRC}/mailnews/extensions/enigmail/package/install.rdf
+.endif
+
 pre-configure:
 	(cd ${WRKSRC} && ${AUTOCONF})
 	(cd ${MOZSRC} && ${AUTOCONF})
 	(cd ${MOZSRC}/js/src/ && ${AUTOCONF})
 
+.if ${PORT_OPTIONS:MMAILNEWS} && ${PORT_OPTIONS:MENIGMAIL}
+post-build:
+	cd ${WRKSRC}/mailnews/extensions/enigmail && \
+		./makemake -r -o ${MOZ_OBJDIR}
+	${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS} all xpi \
+		-C ${MOZ_OBJDIR}/mailnews/extensions/enigmail
+.endif
+
 pre-install:
 	${ECHO_CMD} share/applications/${MOZILLA}.desktop >> ${PLIST}
 	${ECHO_CMD} "@unexec ${RMDIR} %D/share/applications 2>/dev/null || ${TRUE}" >> ${PLIST}
@@ -149,7 +190,25 @@
 	@${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/seamonkey/extensions/${XPI_ID}' >> ${TMPPLIST}
 	@(cd ${XPI_LIBDIR}; ${FIND} ${XPI_ID} -type d) | ${SORT} -r | \
 		${SED} -ne 's,^,@dirrm lib/xpi/,p' >> ${TMPPLIST}
-	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks/seamonkey 2>/dev/null || true' >> ${TMPPLIST}
+.endif
+.if ${PORT_OPTIONS:MMAILNEWS} && ${PORT_OPTIONS:MENIGMAIL}
+	@${MKDIR} ${XPI_LIBDIR}/${EM_ID} ${XPI_LIBDIR}/symlinks/${PORTNAME}
+	@(cd ${XPI_LIBDIR}/${EM_ID}; ${TAR} -xf ${EM_XPI_FILE})
+	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${EM_ID}
+	@${REINPLACE_CMD} -i "" "s/${EM_ORIG_ID}/${EM_ID}/" ${EM_ID_RFILES}
+	@${CHMOD} -R a+rX,go-w ${XPI_LIBDIR}/${EM_ID}
+	@${LN} -sf ${XPI_LIBDIR}/${EM_ID} ${LOCALBASE}/lib/${PORTNAME}/extensions 2>/dev/null || true
+	@${LN} -sf ${XPI_LIBDIR}/${EM_ID} ${XPI_LIBDIR}/symlinks/${PORTNAME} 2>/dev/null || true
+	@(cd ${XPI_LIBDIR}; ${FIND} ${EM_ID} -not -type d) | ${SORT} | \
+		${SED} -ne 's,^,lib/xpi/,p' >> ${TMPPLIST}
+	@${ECHO_CMD} 'lib/xpi/symlinks/${PORTNAME}/${EM_ID}' >> ${TMPPLIST}
+	@${ECHO_CMD} '@exec ${LN} -sf %D/lib/xpi/${EM_ID} ${LOCALBASE}/lib/${PORTNAME}/extensions 2>/dev/null || true' >> ${TMPPLIST}
+	@${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/${PORTNAME}/extensions/${EM_ID}' >> ${TMPPLIST}
+	@(cd ${XPI_LIBDIR}; ${FIND} ${EM_ID} -type d) | ${SORT} -r | \
+		${SED} -ne 's,^,@dirrm lib/xpi/,p' >> ${TMPPLIST}
+.endif
+.if ${PORT_OPTIONS:MLIGHTNING} || ${PORT_OPTIONS:MMAILNEWS} && ${PORT_OPTIONS:MENIGMAIL}
+	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks/${PORTNAME} 2>/dev/null || true' >> ${TMPPLIST}
 	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks 2>/dev/null || true' >> ${TMPPLIST}
 	@${ECHO_CMD} '@unexec rmdir %D/lib/xpi 2>/dev/null || true' >> ${TMPPLIST}
 .endif

Modified: trunk/www/seamonkey/distinfo
==============================================================================
--- trunk/www/seamonkey/distinfo	Tue Sep 25 07:02:58 2012	(r1033)
+++ trunk/www/seamonkey/distinfo	Fri Sep 28 03:29:58 2012	(r1034)
@@ -1,2 +1,4 @@
 SHA256 (seamonkey-2.13b3.source.tar.bz2) = eb22e00a0ab091c189e7048fcbeeb6469759603290556a5ff36c6961950aa14d
 SIZE (seamonkey-2.13b3.source.tar.bz2) = 112000158
+SHA256 (enigmail-1.4.4.tar.gz) = ec62bb701968f72ad35546660132e6e47d4ebe684df1d27fc615cb9010a203b8
+SIZE (enigmail-1.4.4.tar.gz) = 1269444



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209280329.q8S3TwMN068261>