2003-09-04 08:31:09 +02:00
|
|
|
# New ports collection makefile for: mozilla-thunderbird
|
|
|
|
# Date created: 4 September 2003
|
|
|
|
# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= thunderbird
|
2004-10-12 01:45:43 +02:00
|
|
|
PORTVERSION= 0.8
|
|
|
|
PORTREVISION= 2
|
2003-09-04 08:31:09 +02:00
|
|
|
CATEGORIES= mail
|
2004-05-03 21:10:34 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_MOZILLA}
|
|
|
|
MASTER_SITE_SUBDIR= thunderbird/releases/${PORTVERSION}
|
2004-10-12 01:45:43 +02:00
|
|
|
DISTNAME= ${PORTNAME}-source-${PORTVERSION}
|
2003-09-04 08:31:09 +02:00
|
|
|
|
|
|
|
MAINTAINER= gnome@FreeBSD.org
|
|
|
|
COMMENT= Mozilla Thunderbird is standalone mail and news that stands above
|
|
|
|
|
|
|
|
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
|
|
|
|
png.5:${PORTSDIR}/graphics/png \
|
|
|
|
mng.1:${PORTSDIR}/graphics/libmng \
|
|
|
|
nspr4.1:${PORTSDIR}/devel/nspr
|
2004-10-12 01:45:43 +02:00
|
|
|
BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip
|
2003-09-04 08:31:09 +02:00
|
|
|
|
|
|
|
USE_X_PREFIX= yes
|
|
|
|
|
|
|
|
USE_BZIP2= yes
|
|
|
|
USE_GMAKE= yes
|
2004-02-28 02:14:52 +01:00
|
|
|
USE_ICONV= yes
|
2003-09-04 08:31:09 +02:00
|
|
|
USE_PERL5= yes
|
|
|
|
USE_REINPLACE= yes
|
|
|
|
HAS_CONFIGURE= yes
|
|
|
|
ALL_TARGET= default
|
|
|
|
USE_GNOME= gtk20 libidl
|
2004-02-28 02:14:52 +01:00
|
|
|
CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
|
2004-06-24 20:15:44 +02:00
|
|
|
PKGINSTALL= ${WRKDIR}/pkg-install
|
2004-10-12 01:45:43 +02:00
|
|
|
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
|
|
|
|
FAKEDIR= ${WRKDIR}/fake
|
2003-09-04 08:31:09 +02:00
|
|
|
|
|
|
|
NO_MTREE= yes
|
|
|
|
WRKSRC= ${WRKDIR}/mozilla
|
|
|
|
LOCAL_SUBDIR= lib/${PORTNAME}
|
|
|
|
LOCAL_PREFIX= ${PREFIX}/${LOCAL_SUBDIR}
|
2004-02-28 02:14:52 +01:00
|
|
|
ESD_LIB= libesd.so.2
|
2003-11-24 02:21:15 +01:00
|
|
|
|
2004-10-12 01:45:43 +02:00
|
|
|
OPTIONS= DEBUG "Build a debugging image" off \
|
|
|
|
LOGGING "Enable additional log messages" off \
|
|
|
|
OPTIMIZED_CFLAGS "Enable some additional optimizations" off \
|
|
|
|
XFT "Enable support for anti-aliased fonts" on \
|
|
|
|
NEW_ICON "Install the new Firefox branding icon" off
|
2004-07-18 22:20:21 +02:00
|
|
|
|
2003-09-04 08:31:09 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2003-10-13 00:03:10 +02:00
|
|
|
.if ${ARCH} == "alpha" && ${OSVERSION} < 500035
|
|
|
|
IGNORE= "core dumps at runtime"
|
|
|
|
.endif # ${ARCH} == "alpha" && ${OSVERSION} < 500035
|
|
|
|
|
2003-09-04 08:31:09 +02:00
|
|
|
.if defined(WITH_DEBUG)
|
|
|
|
WITH_LOGGING= yes
|
|
|
|
CONFIGURE_ENV+= WITH_DEBUG=yes
|
|
|
|
.endif # defined(WITH_DEBUG)
|
|
|
|
|
|
|
|
.if defined(WITH_OPTIMIZED_CFLAGS)
|
|
|
|
CFLAGS+= -O2
|
2004-06-24 20:15:44 +02:00
|
|
|
CONFIGURE_ENV+= WITH_OPTIMIZE=-O2
|
|
|
|
.else
|
|
|
|
CONFIGURE_ENV+= WITH_OPTIMIZE=-O
|
2003-09-04 08:31:09 +02:00
|
|
|
.endif # defined(WITH_OPTIMIZED_CFLAGS)
|
|
|
|
|
|
|
|
.if defined(WITH_LOGGING)
|
|
|
|
CONFIGURE_ENV+= WITH_LOGGING=yes
|
|
|
|
.endif # defined(WITH_LOGGING)
|
|
|
|
|
|
|
|
.if defined(WITHOUT_XFT)
|
|
|
|
CONFIGURE_ENV+= WITHOUT_XFT=yes
|
|
|
|
.else
|
2004-03-16 23:54:05 +01:00
|
|
|
LIB_DEPENDS+= Xft.2:${PORTSDIR}/x11-fonts/libXft
|
2003-09-04 08:31:09 +02:00
|
|
|
.endif # !defined(WITHOUT_XFT)
|
|
|
|
|
|
|
|
CPPFLAGS+= -I${X11BASE}/include
|
|
|
|
CFLAGS+= ${PTHREAD_CFLAGS}
|
|
|
|
LDFLAGS+= -L${X11BASE}/lib
|
|
|
|
LIBS+= ${PTHREAD_LIBS}
|
|
|
|
|
|
|
|
pre-extract::
|
|
|
|
@${ECHO_MSG}
|
|
|
|
@${ECHO_MSG} "Extracting source (this takes a while) ..."
|
|
|
|
@${ECHO_MSG}
|
|
|
|
|
|
|
|
post-extract::
|
2004-10-12 01:45:43 +02:00
|
|
|
# FAKEDIR is here so that nsinstall will install under FAKEDIR, not
|
|
|
|
# under PREFIX. See pre-install and do-install for details.
|
|
|
|
@${SED} -e 's|@CPPFLAGS@|${CPPFLAGS}|' \
|
|
|
|
-e 's|@CFLAGS@|${CFLAGS}|' \
|
|
|
|
-e 's|@LDFLAGS@|${LDFLAGS}|' \
|
|
|
|
-e 's|@LIBS@|${LIBS}|' \
|
|
|
|
-e 's|@X11BASE@|${X11BASE}|' \
|
|
|
|
-e 's|@LOCALBASE@|${LOCALBASE}|' \
|
|
|
|
-e 's|@PREFIX@|${FAKEDIR}/lib/thunderbird|' \
|
|
|
|
-e 's|@PERL@|${PERL5}|' \
|
2003-09-04 08:31:09 +02:00
|
|
|
<${FILESDIR}/mozconfig.in >${WRKSRC}/.mozconfig
|
|
|
|
|
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
|
|
|
|
${WRKSRC}/build/unix/run-mozilla.sh
|
2004-02-28 02:14:52 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
|
|
|
|
s|-lpthread|${PTHREAD_LIBS}|g' \
|
2003-12-08 00:22:17 +01:00
|
|
|
${WRKSRC}/configure \
|
|
|
|
${WRKSRC}/nsprpub/configure
|
2003-09-06 20:34:37 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g' \
|
2003-12-08 00:22:17 +01:00
|
|
|
${WRKSRC}/nsprpub/configure \
|
2003-09-06 20:34:37 +02:00
|
|
|
${WRKSRC}/security/coreconf/FreeBSD.mk \
|
|
|
|
${WRKSRC}/directory/c-sdk/config/FreeBSD.mk \
|
|
|
|
${WRKSRC}/js/src/Makefile.in
|
2004-06-24 20:15:44 +02:00
|
|
|
@${REINPLACE_CMD} -E -e 's|libesd\.so\.[0-9]+|${ESD_LIB}|g' \
|
2004-02-28 02:14:52 +01:00
|
|
|
${WRKSRC}/widget/src/gtk2/nsSound.cpp
|
|
|
|
@${REINPLACE_CMD} -e '/accessibility.typeaheadfind.enablesound/s/true/false/' \
|
|
|
|
${WRKSRC}/modules/libpref/src/init/all.js \
|
|
|
|
${WRKSRC}/extensions/sroaming/resources/content/prefs/all.js \
|
2004-05-03 21:10:34 +02:00
|
|
|
${WRKSRC}/modules/libpref/src/init/all.js
|
2004-02-28 02:14:52 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|<iconv.h>|\"${LOCALBASE}/include/iconv.h\"|g' \
|
|
|
|
${WRKSRC}/configure \
|
|
|
|
${WRKSRC}/intl/uconv/native/nsNativeUConvService.cpp \
|
|
|
|
${WRKSRC}/xpcom/io/nsNativeCharsetUtils.cpp
|
2004-06-24 20:15:44 +02:00
|
|
|
@${SED} -e 's|%%MOZDIR%%|${LOCAL_PREFIX}/lib/${PORTNAME}-${PORTVERSION}|g' \
|
|
|
|
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
|
2004-10-12 01:45:43 +02:00
|
|
|
@${SED} -e 's|%%MOZDIR%%|${LOCAL_PREFIX}/lib/${PORTNAME}-${PORTVERSION}|g' \
|
|
|
|
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
|
2003-09-04 08:31:09 +02:00
|
|
|
|
2004-03-19 04:14:55 +01:00
|
|
|
pre-configure:
|
|
|
|
@if [ -n "`${PKG_INFO} -xI '^bind[0-9]*-base-[0-9]'`" ]; then \
|
|
|
|
${ECHO_CMD} "${PKGNAME}: bind installed with PORT_REPLACES_BASE_BIND causes build problems."; \
|
|
|
|
${FALSE}; \
|
|
|
|
fi
|
|
|
|
|
2004-06-24 20:15:44 +02:00
|
|
|
post-build:
|
|
|
|
# XXX This works around an install problem that is triggered when
|
|
|
|
# toolkit/profile/src is built after profile/src.
|
|
|
|
@${TOUCH} -f ${WRKSRC}/profile/build/libprofile.so
|
|
|
|
|
2003-09-04 08:31:09 +02:00
|
|
|
pre-install:
|
2004-10-12 01:45:43 +02:00
|
|
|
# Overview: the program installs itself in FAKEDIR, then a list is made of the
|
|
|
|
# files and directories in there. This is the PLIST (packing list) for the
|
|
|
|
# package, replacing the traditional pkg-plist file.
|
2003-09-04 08:31:09 +02:00
|
|
|
${RM} -fr ${LOCAL_PREFIX}
|
2004-10-12 01:45:43 +02:00
|
|
|
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
|
|
|
|
Makefile ${MAKE_ARGS} install
|
|
|
|
.for ii in mac win
|
|
|
|
.for jj in / .jar
|
|
|
|
@${RM} -rf ${FAKEDIR}/lib/${PORTNAME}/lib/${PORTNAME}-${PORTVERSION}/chrome/en-${ii}${jj}
|
|
|
|
.endfor
|
|
|
|
.endfor
|
|
|
|
@${RM} -fr ${FAKEDIR}/share/idl ${FAKEDIR}/include
|
|
|
|
.for ii in thunderbird thunderbird-config
|
|
|
|
@${ECHO_CMD} bin/${ii} >> ${PLIST}
|
|
|
|
.endfor
|
|
|
|
@cd ${FAKEDIR} && ${FIND} * ! -type d | ${SORT} >> ${PLIST}; \
|
|
|
|
${FIND} * -type d -empty | ${SORT} | ${SED} -e \
|
|
|
|
"s:^:@exec ${MKDIR} %D/:" -e "s:$$: || true:" >> ${PLIST}; \
|
|
|
|
${FIND} * -type d -empty | ${SORT} -r | ${SED} -e \
|
|
|
|
"s:^:@unexec ${RMDIR} %D/:" -e "s:$$: || true:" >> ${PLIST}; \
|
|
|
|
${FIND} * -type d ! -empty | ${SORT} -r | ${SED} -e "s:^:@dirrm :" | \
|
|
|
|
${GREP} / >> ${PLIST}
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
# This is the actual installation. First, the contents of FAKEDIR are
|
|
|
|
# just copied to PREFIX.
|
|
|
|
cd ${FAKEDIR} && ${FIND} * | ${CPIO} -dmp --quiet ${PREFIX}
|
2003-09-04 08:31:09 +02:00
|
|
|
|
2003-12-08 00:22:17 +01:00
|
|
|
post-install:
|
2004-06-24 20:15:44 +02:00
|
|
|
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
2004-07-18 22:20:21 +02:00
|
|
|
${MKDIR} ${PREFIX}/bin
|
2003-09-04 08:31:09 +02:00
|
|
|
${RM} -f ${PREFIX}/bin/thunderbird
|
|
|
|
${LN} -s ${LOCAL_PREFIX}/bin/thunderbird \
|
|
|
|
${PREFIX}/bin/thunderbird
|
|
|
|
${RM} -f ${PREFIX}/bin/thunderbird-config
|
2004-06-24 20:15:44 +02:00
|
|
|
${LN} -s ${LOCAL_PREFIX}/bin/thunderbird-config \
|
2003-09-04 08:31:09 +02:00
|
|
|
${PREFIX}/bin/thunderbird-config
|
2004-10-12 01:45:43 +02:00
|
|
|
${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \
|
|
|
|
${LOCAL_PREFIX}/bin/thunderbird \
|
|
|
|
${LOCAL_PREFIX}/bin/thunderbird-config
|
|
|
|
${FIND} ${LOCAL_PREFIX}/lib/pkgconfig -type f | ${XARGS} \
|
|
|
|
${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g'
|
|
|
|
.if defined(WITH_NEW_ICON)
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/thunderbird/default.xpm \
|
|
|
|
${LOCAL_PREFIX}/lib/${PORTNAME}-${PORTVERSION}/chrome/icons/default/default.xpm
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/thunderbird/mozicon50.xpm \
|
|
|
|
${LOCAL_PREFIX}/lib/${PORTNAME}-${PORTVERSION}/chrome/icons/default/messengerWindow.xpm
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/thunderbird/mozicon50.xpm \
|
|
|
|
${LOCAL_PREFIX}/lib/${PORTNAME}-${PORTVERSION}/chrome/icons/default/messengerWindow16.xpm
|
|
|
|
.endif # defined(WITH_NEW_ICON)
|
2003-09-04 08:31:09 +02:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|