building lightning as part of thunderbird

Mikhail T. mi+thun at aldan.algebra.com
Thu May 26 04:18:04 UTC 2011


It turns out, Lightning can already be built together with the rest of 
thunderbird 
<https://developer.mozilla.org/En/Simple_Thunderbird_build#Building_Thunderbird_and_Lightning> 
with the simple --enable-calendar configure-option. The attached patch 
does that unconditionally, but adding the OPTION (WITH_LIGHTNING?) is 
easy too.

The patch installs the lightning.xpi into the same location, where 
deskutils/lightning-thunderbird installs it --- deliberately. With this 
addition, the lightning-thunderbird port (which currently rebuilds vast 
amounts of C and C++ code for just one shared library) can be removed. 
But, of course, the location can changed --- to something underneath 
lib/thunderbird, for example...

Yours,

    -mi

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/mail/thunderbird/Makefile,v
retrieving revision 1.125
diff -U 2 -r1.125 Makefile
--- Makefile	29 Apr 2011 06:37:41 -0000	1.125
+++ Makefile	26 May 2011 04:06:11 -0000
@@ -30,4 +31,6 @@
 MAKE_ENV=	PTHREAD_LDFLAGS="${PTHREAD_LIBS}"
 HAS_CONFIGURE=	yes
+CONFIGURE_ARGS+=--enable-calendar
+LIGHTNING_DIR=	share/lightning
 USE_BZIP2=	yes
 USE_GMAKE=	yes
@@ -119,4 +124,6 @@
 	@${ECHO_CMD} 'share/pixmaps/${PORTNAME_ICON}' >> ${PLIST}
 	@${ECHO_CMD} '@dirrmtry share/applications' >> ${PLIST}
+	@${PRINTF} '%s/lightning.xpi\n at dirrmtry %s\n'	\
+		${LIGHTNING_DIR} ${LIGHTNING_DIR} >> ${PLIST}
 
 post-install:
@@ -124,4 +131,6 @@
 	${INSTALL_DATA} ${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop ${PREFIX}/share/applications
 	${LN} -sf ${PORTNAME_ICON_SRC} ${PREFIX}/share/pixmaps/${PORTNAME_ICON}
+	${MKDIR} ${PREFIX}/${LIGHTNING_DIR}
+	${INSTALL_DATA} ${MOZSRC}/dist/xpi-stage/lightning.xpi ${PREFIX}/${LIGHTNING_DIR}
 
 .include <bsd.port.post.mk>


More information about the freebsd-gecko mailing list