2004-02-11 07:16:17 +00:00
|
|
|
# New ports collection makefile for: phoenix
|
|
|
|
# Date created: 2002/10/21
|
|
|
|
# Whom: Alan Eldridge <alane@FreeBSD.org>
|
2002-10-21 08:54:27 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2004-02-11 07:16:17 +00:00
|
|
|
PORTNAME= firefox
|
2004-10-12 00:04:40 +00:00
|
|
|
PORTVERSION= 1.0.1.p
|
2004-10-13 20:28:50 +00:00
|
|
|
PORTREVISION= 2
|
2003-06-02 18:30:59 +00:00
|
|
|
CATEGORIES= www
|
2003-08-24 16:18:58 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_MOZILLA}
|
2004-10-12 00:04:40 +00:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${REALVERSION}
|
|
|
|
DISTNAME= ${PORTNAME}-1.0PR-source
|
2002-10-21 08:54:27 +00:00
|
|
|
|
2003-06-02 18:30:59 +00:00
|
|
|
MAINTAINER= gnome@FreeBSD.org
|
2003-10-18 21:45:26 +00:00
|
|
|
COMMENT= Web browser based on the browser portion of Mozilla
|
2002-10-21 18:37:12 +00:00
|
|
|
|
2002-11-10 18:05:10 +00:00
|
|
|
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
|
2002-10-21 18:37:12 +00:00
|
|
|
png.5:${PORTSDIR}/graphics/png \
|
|
|
|
mng.1:${PORTSDIR}/graphics/libmng \
|
2004-10-12 00:04:40 +00:00
|
|
|
freetype.9:${PORTSDIR}/print/freetype2
|
2002-10-22 09:26:56 +00:00
|
|
|
BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip \
|
2002-11-01 04:17:51 +00:00
|
|
|
freetype-config:${PORTSDIR}/print/freetype2
|
2002-10-22 09:26:56 +00:00
|
|
|
|
2003-10-18 21:45:26 +00:00
|
|
|
ALL_TARGET= default
|
2004-06-16 00:10:12 +00:00
|
|
|
CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
|
2004-02-11 07:16:17 +00:00
|
|
|
FAKEDIR= ${WRKDIR}/fake
|
2004-10-12 00:04:40 +00:00
|
|
|
REALVERSION= 0.10.1
|
2004-02-11 07:16:17 +00:00
|
|
|
HAS_CONFIGURE= yes
|
|
|
|
ESD_LIB= libesd.so.2
|
|
|
|
LOCAL_PREFIX= ${PREFIX}/lib/${PORTNAME}
|
|
|
|
NO_MTREE= yes
|
|
|
|
PLIST= ${WRKDIR}/plist
|
2004-02-11 19:30:49 +00:00
|
|
|
PLUGINSDIR= ${PREFIX}/lib/browser_plugins
|
2004-02-11 07:16:17 +00:00
|
|
|
USE_BZIP2= yes
|
2003-06-02 18:30:59 +00:00
|
|
|
USE_GMAKE= yes
|
2003-10-18 21:45:26 +00:00
|
|
|
USE_GNOME= gtk20 libidl
|
2004-02-11 07:16:17 +00:00
|
|
|
USE_ICONV= yes
|
2004-04-07 10:49:20 +00:00
|
|
|
USE_PERL5_BUILD=yes
|
2004-02-11 07:16:17 +00:00
|
|
|
USE_X_PREFIX= yes
|
|
|
|
WRKSRC= ${WRKDIR}/mozilla
|
2004-06-16 00:10:12 +00:00
|
|
|
PKGINSTALL= ${WRKDIR}/pkg-install
|
2004-08-05 19:53:30 +00:00
|
|
|
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
|
2002-11-01 04:17:51 +00:00
|
|
|
|
2004-06-24 16:33:53 +00:00
|
|
|
PKGCONFIG_FILES=mozilla-gtkmozembed mozilla-js mozilla-xpcom \
|
|
|
|
mozilla-nspr mozilla-nss mozilla-plugin
|
|
|
|
|
2004-02-11 07:31:45 +00:00
|
|
|
JPI_LIST?=\
|
|
|
|
${LOCALBASE}/jdk1.4.2/jre/plugin/${ARCH}/ns610/libjavaplugin_oji.so \
|
|
|
|
${LOCALBASE}/jdk1.4.1/jre/plugin/${ARCH}/ns610/libjavaplugin_oji.so \
|
|
|
|
${LOCALBASE}/diablo-jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so \
|
|
|
|
${LOCALBASE}/jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so
|
|
|
|
|
2004-02-11 07:16:17 +00:00
|
|
|
OPTIONS= DEBUG "Build a debugging image" off \
|
2004-10-12 00:04:40 +00:00
|
|
|
HEADERS "Install headers and IDL files" on \
|
2004-02-11 07:16:17 +00:00
|
|
|
LOGGING "Enable additional log messages" off \
|
|
|
|
OPTIMIZED_CFLAGS "Enable some additional optimizations" off \
|
2004-06-24 16:33:53 +00:00
|
|
|
XFT "Enable support for anti-aliased fonts" on \
|
2004-10-12 00:04:40 +00:00
|
|
|
SMB "Enable smb:// URI support using gnomevfs" off \
|
|
|
|
NEW_ICON "Install the new Firefox branding icon" off
|
2002-10-21 18:37:12 +00:00
|
|
|
|
2002-10-21 08:54:27 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
2002-10-21 18:37:12 +00:00
|
|
|
|
2002-12-13 09:41:38 +00:00
|
|
|
.if defined(WITH_DEBUG)
|
2002-12-14 22:49:59 +00:00
|
|
|
WITH_LOGGING= yes
|
2002-12-13 09:41:38 +00:00
|
|
|
CONFIGURE_ENV+= WITH_DEBUG=yes
|
|
|
|
.endif # defined(WITH_DEBUG)
|
|
|
|
|
2003-06-02 18:30:59 +00:00
|
|
|
.if defined(WITH_OPTIMIZED_CFLAGS)
|
2002-12-13 09:41:38 +00:00
|
|
|
CFLAGS+= -O2
|
2004-06-19 00:51:17 +00:00
|
|
|
CONFIGURE_ENV+= WITH_OPTIMIZE=-O2
|
|
|
|
.else
|
|
|
|
CONFIGURE_ENV+= WITH_OPTIMIZE=-O
|
2003-06-02 18:30:59 +00:00
|
|
|
.endif # defined(WITH_OPTIMIZED_CFLAGS)
|
2002-12-13 09:41:38 +00:00
|
|
|
|
2002-12-14 22:49:59 +00:00
|
|
|
.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 22:54:05 +00:00
|
|
|
LIB_DEPENDS+= Xft.2:${PORTSDIR}/x11-fonts/libXft
|
2002-12-14 22:49:59 +00:00
|
|
|
.endif # !defined(WITHOUT_XFT)
|
|
|
|
|
2004-06-24 16:33:53 +00:00
|
|
|
.if defined(WITH_SMB)
|
|
|
|
USE_GNOME+= gnomevfs2
|
|
|
|
CONFIGURE_ENV+= WITH_SMB=yes
|
|
|
|
.endif # defined(WITH_SMB)
|
|
|
|
|
2004-02-12 09:06:57 +00:00
|
|
|
CPPFLAGS+= -I${X11BASE}/include -I${LOCALBASE}/include
|
2002-12-13 09:41:38 +00:00
|
|
|
CFLAGS+= ${PTHREAD_CFLAGS}
|
2004-02-13 07:30:21 +00:00
|
|
|
LDFLAGS+= -L${X11BASE}/lib
|
2002-12-13 09:41:38 +00:00
|
|
|
LIBS+= ${PTHREAD_LIBS}
|
|
|
|
|
2004-02-11 07:16:17 +00:00
|
|
|
EXTRA_SCRIPTS= ${PORTNAME}.rb
|
2002-12-18 05:02:34 +00:00
|
|
|
|
2003-10-12 22:01:55 +00:00
|
|
|
.if ${ARCH} == "alpha" && ${OSVERSION} < 500035
|
|
|
|
IGNORE= "core dumps on alpha during post-build"
|
|
|
|
.endif
|
|
|
|
|
2004-10-13 20:25:48 +00:00
|
|
|
.if ${OSVERSION} < 500000
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-config_make-jars.pl
|
|
|
|
.endif
|
|
|
|
|
2002-11-07 17:56:33 +00:00
|
|
|
pre-extract::
|
|
|
|
@${ECHO_MSG}
|
2002-11-05 12:00:22 +00:00
|
|
|
@${ECHO_MSG} "Extracting source (this takes a while) ..."
|
2002-11-07 17:56:33 +00:00
|
|
|
@${ECHO_MSG}
|
2002-11-05 12:00:22 +00:00
|
|
|
|
2002-11-07 17:56:33 +00:00
|
|
|
post-extract::
|
2004-02-11 22:02:15 +00:00
|
|
|
# FAKEDIR is here so that nsinstall will install under FAKEDIR, not
|
|
|
|
# under PREFIX. See pre-install and do-install for details.
|
2002-11-10 18:05:10 +00:00
|
|
|
@${SED} -e 's|@CPPFLAGS@|${CPPFLAGS}|' \
|
|
|
|
-e 's|@CFLAGS@|${CFLAGS}|' \
|
|
|
|
-e 's|@LDFLAGS@|${LDFLAGS}|' \
|
2002-10-22 11:04:48 +00:00
|
|
|
-e 's|@LIBS@|${LIBS}|' \
|
|
|
|
-e 's|@X11BASE@|${X11BASE}|' \
|
2002-10-21 18:37:12 +00:00
|
|
|
-e 's|@LOCALBASE@|${LOCALBASE}|' \
|
2004-02-11 19:30:49 +00:00
|
|
|
-e 's|@PREFIX@|${FAKEDIR}/lib/firefox|' \
|
2003-06-03 01:10:33 +00:00
|
|
|
-e 's|@PERL@|${PERL5}|' \
|
2002-10-21 18:37:12 +00:00
|
|
|
<${FILESDIR}/mozconfig.in >${WRKSRC}/.mozconfig
|
|
|
|
|
2003-06-02 18:30:59 +00:00
|
|
|
post-patch:
|
2004-02-11 07:16:17 +00:00
|
|
|
@${PERL} -pi -e 's|%%PREFIX%%|${PREFIX}|g' \
|
2003-06-02 18:30:59 +00:00
|
|
|
${WRKSRC}/build/unix/run-mozilla.sh
|
2004-02-12 09:06:57 +00:00
|
|
|
@${PERL} -pi -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
|
|
|
|
s|-lpthread|${PTHREAD_LIBS}|g' \
|
|
|
|
${WRKSRC}/configure \
|
|
|
|
${WRKSRC}/nsprpub/configure
|
2004-02-11 07:16:17 +00:00
|
|
|
@${PERL} -pi -e 's|-pthread|${PTHREAD_LIBS}|g' \
|
|
|
|
${WRKSRC}/nsprpub/config/config.mk \
|
2003-09-06 18:34:37 +00:00
|
|
|
${WRKSRC}/security/coreconf/FreeBSD.mk \
|
|
|
|
${WRKSRC}/directory/c-sdk/config/FreeBSD.mk \
|
|
|
|
${WRKSRC}/js/src/Makefile.in
|
2004-06-16 00:10:12 +00:00
|
|
|
@${PERL} -pi -e 's|libesd\.so\.\d+|${ESD_LIB}|g' \
|
2004-02-11 07:16:17 +00:00
|
|
|
${WRKSRC}/widget/src/gtk2/nsSound.cpp
|
2004-06-16 00:10:12 +00:00
|
|
|
.for ii in modules/libpref/src/init extensions/sroaming/resources/content/prefs \
|
|
|
|
embedding/minimo
|
2004-02-11 23:01:23 +00:00
|
|
|
${MV} ${WRKSRC}/${ii}/all.js ${WRKSRC}/${ii}/all.js.bak
|
|
|
|
${SED} -e '/accessibility.typeaheadfind.enablesound/s/true/false/' \
|
|
|
|
< ${WRKSRC}/${ii}/all.js.bak > ${WRKSRC}/${ii}/all.js
|
|
|
|
.endfor
|
2004-06-24 16:33:53 +00:00
|
|
|
.for ii in ${PKGCONFIG_FILES}
|
|
|
|
@${PERL} -pi -e 's|mozilla-|firefox-|g' \
|
|
|
|
${WRKSRC}/build/unix/${ii}.pc.in
|
|
|
|
.endfor
|
2003-06-02 18:30:59 +00:00
|
|
|
|
2004-03-19 03:14:55 +00: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-16 00:10:12 +00:00
|
|
|
post-build:
|
2004-06-19 00:51:17 +00:00
|
|
|
# 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
|
2004-06-16 00:10:12 +00:00
|
|
|
|
2002-12-10 08:57:05 +00:00
|
|
|
pre-install:
|
2004-02-11 22:02:15 +00: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.
|
2004-02-11 07:16:17 +00:00
|
|
|
@${RM} -rf ${FAKEDIR} ${PLIST}
|
2004-02-11 19:30:49 +00:00
|
|
|
@${MKDIR} ${FAKEDIR}/lib/browser_plugins
|
2004-02-11 07:16:17 +00:00
|
|
|
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
|
|
|
|
Makefile ${MAKE_ARGS} install
|
2004-02-11 21:52:13 +00:00
|
|
|
.for ii in mac win
|
|
|
|
.for jj in / .jar
|
2004-10-12 00:04:40 +00:00
|
|
|
@${RM} -rf ${FAKEDIR}/lib/${PORTNAME}/lib/${PORTNAME}-${REALVERSION}/chrome/en-${ii}${jj}
|
2004-02-11 21:52:13 +00:00
|
|
|
.endfor
|
|
|
|
.endfor
|
2004-10-12 00:04:40 +00:00
|
|
|
@${SED} -e 's|%%MOZDIR%%|${LOCAL_PREFIX}/lib/${PORTNAME}-${REALVERSION}|g' \
|
2004-06-16 00:10:12 +00:00
|
|
|
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
|
2004-10-12 00:04:40 +00:00
|
|
|
@${SED} -e 's|%%MOZDIR%%|${LOCAL_PREFIX}/lib/${PORTNAME}-${REALVERSION}|g' \
|
2004-08-05 19:53:30 +00:00
|
|
|
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
|
2004-02-11 21:52:13 +00:00
|
|
|
|
2004-02-11 07:16:17 +00:00
|
|
|
.if !defined (WITH_HEADERS)
|
|
|
|
@${RM} -fr ${FAKEDIR}/share/idl ${FAKEDIR}/include
|
|
|
|
.endif
|
|
|
|
.for ii in firefox Firefox firefox-config ${EXTRA_SCRIPTS}
|
|
|
|
@${ECHO_CMD} bin/${ii} >> ${PLIST}
|
|
|
|
.endfor
|
2004-02-11 19:30:49 +00:00
|
|
|
@cd ${FAKEDIR} && ${FIND} * ! -type d | ${SORT} >> ${PLIST}; \
|
2004-02-11 07:16:17 +00:00
|
|
|
${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:
|
2004-02-11 22:02:15 +00:00
|
|
|
# This is the actual installation. First, the contents of FAKEDIR are
|
|
|
|
# just copied to PREFIX.
|
2004-02-11 07:16:17 +00:00
|
|
|
cd ${FAKEDIR} && ${FIND} * | ${CPIO} -dmp --quiet ${PREFIX}
|
2002-12-10 08:57:05 +00:00
|
|
|
|
2004-02-08 19:37:12 +00:00
|
|
|
post-install:
|
2004-06-16 06:58:10 +00:00
|
|
|
.if !defined(PACKAGE_BUILDING)
|
|
|
|
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
|
|
|
.endif
|
2002-12-18 05:02:34 +00:00
|
|
|
.for i in ${EXTRA_SCRIPTS}
|
|
|
|
${INSTALL_SCRIPT} ${FILESDIR}/${i} ${PREFIX}/bin
|
2004-02-11 07:16:17 +00:00
|
|
|
.endfor
|
|
|
|
.for ii in f F
|
|
|
|
${RM} -f ${PREFIX}/bin/${ii}irefox
|
|
|
|
${LN} -sf ${LOCAL_PREFIX}/bin/firefox ${PREFIX}/bin/${ii}irefox
|
|
|
|
.endfor
|
2004-02-13 20:12:09 +00:00
|
|
|
${PERL} -pi -e 's|${FAKEDIR}|${PREFIX}|g' ${LOCAL_PREFIX}/bin/firefox
|
2004-02-11 07:16:17 +00:00
|
|
|
${RM} -f ${PREFIX}/bin/firefox-config
|
2004-06-16 16:53:33 +00:00
|
|
|
${LN} -sf ${LOCAL_PREFIX}/bin/firefox-config \
|
2004-02-11 07:16:17 +00:00
|
|
|
${PREFIX}/bin/firefox-config
|
2004-06-16 16:53:33 +00:00
|
|
|
${PERL} -pi -e 's|${FAKEDIR}|${PREFIX}|g' ${LOCAL_PREFIX}/bin/firefox-config
|
2004-02-11 19:30:49 +00:00
|
|
|
${FIND} ${LOCAL_PREFIX}/lib/pkgconfig -type f | ${XARGS} ${PERL} -pi -e \
|
|
|
|
's|${FAKEDIR}|${PREFIX}|g'
|
|
|
|
-if [ ! -L ${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ]; then \
|
2004-02-11 07:31:45 +00:00
|
|
|
for jpi in ${JPI_LIST}; do \
|
|
|
|
if [ -f $${jpi} ]; then \
|
2004-02-11 19:30:49 +00:00
|
|
|
${LN} -sf $${jpi} \
|
|
|
|
${PLUGINSDIR}/libjavaplugin_oji.so ; \
|
2004-02-11 07:31:45 +00:00
|
|
|
break; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
fi
|
2004-10-12 00:04:40 +00:00
|
|
|
.if defined(WITH_NEW_ICON)
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/firefox/default.xpm \
|
|
|
|
${LOCAL_PREFIX}/lib/${PORTNAME}-${REALVERSION}/chrome/icons/default/default.xpm
|
|
|
|
.endif # defined(WITH_NEW_ICON)
|
2002-10-22 09:26:56 +00:00
|
|
|
|
2002-10-21 08:54:27 +00:00
|
|
|
.include <bsd.port.post.mk>
|