freebsd-ports/www/firefox35/Makefile
Joe Marcus Clarke 6593022e89 Add Firefox after a repo copy from mozilla-firebird. Firefox is the next
release of the Firebird web browser with a new name to avoid conflicts with
the Firebird database.  This is version 0.8.

http://www.mozilla.org/products/firefox/releases/

* Update to 0.8 and change name to firefox [1]
* Make PLIST from a fake installation [1]
* Restore original credit and portname in Makefile [1]
* Optionally install headers and IDL files [2]
* Use PERL instead of REINPLACE_CMD in a few places [1]
* Use OPTIONS
* Enable the Inspector extension
* Fix another possible esound related problem
* Enable basic optimizations if WITH_DEBUG is not specified

PR:		62631 [2]
Submitted by:	trevor [1] [2]
2004-02-11 07:16:17 +00:00

156 lines
4.5 KiB
Makefile

# New ports collection makefile for: phoenix
# Date created: 2002/10/21
# Whom: Alan Eldridge <alane@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= firefox
PORTVERSION= 0.8
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${PORTVERSION}
DISTNAME= ${PORTNAME}-source-${PORTVERSION}
MAINTAINER= gnome@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
png.5:${PORTSDIR}/graphics/png \
mng.1:${PORTSDIR}/graphics/libmng \
freetype.9:${PORTSDIR}/print/freetype2 \
nspr4.1:${PORTSDIR}/devel/nspr
BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip \
freetype-config:${PORTSDIR}/print/freetype2
ALL_TARGET= default
CONFIGURE_ENV= WITH_GTK2=yes
FAKEDIR= ${WRKDIR}/fake
FAKESUBDIR= ${FAKEDIR}/lib/${PORTNAME}
HAS_CONFIGURE= yes
JREDIR= ${LOCALBASE}/jdk1.3.1/jre
ESD_LIB= libesd.so.2
LOCAL_PREFIX= ${PREFIX}/lib/${PORTNAME}
NO_MTREE= yes
PLIST= ${WRKDIR}/plist
PLUGINSDIR= ${PREFIX}lib/browser_plugins
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gtk20 libidl
USE_ICONV= yes
USE_PERL5= yes
USE_REINPLACE= yes
USE_X_PREFIX= yes
WRKSRC= ${WRKDIR}/mozilla
OPTIONS= DEBUG "Build a debugging image" off \
HEADERS "Install headers and IDL files" off \
LOGGING "Enable additional log messages" off \
OPTIMIZED_CFLAGS "Enable some additional optimizations" off \
XFT "Enable support for anti-aliased fonts" on
.include <bsd.port.pre.mk>
.if defined(WITH_DEBUG)
WITH_LOGGING= yes
CONFIGURE_ENV+= WITH_DEBUG=yes
.endif # defined(WITH_DEBUG)
.if defined(WITH_OPTIMIZED_CFLAGS)
CFLAGS+= -O2
.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
LIB_DEPENDS+= Xft.2:${PORTSDIR}/x11-fonts/Xft
.endif # !defined(WITHOUT_XFT)
CPPFLAGS+= -I${X11BASE}/include
CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= -L${X11BASE}/lib
LIBS+= ${PTHREAD_LIBS}
EXTRA_SCRIPTS= ${PORTNAME}.rb
.if ${ARCH} == "alpha" && ${OSVERSION} < 500035
IGNORE= "core dumps on alpha during post-build"
.endif
pre-extract::
@${ECHO_MSG}
@${ECHO_MSG} "Extracting source (this takes a while) ..."
@${ECHO_MSG}
post-extract::
@${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/firefox|' \
-e 's|@PERL@|${PERL5}|' \
<${FILESDIR}/mozconfig.in >${WRKSRC}/.mozconfig
post-patch:
@${PERL} -pi -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/build/unix/run-mozilla.sh
@${PERL} -pi -e 's|-lc_r|${PTHREAD_LIBS}|g' \
${WRKSRC}/configure
@${PERL} -pi -e 's|-pthread|${PTHREAD_LIBS}|g' \
${WRKSRC}/nsprpub/config/config.mk \
${WRKSRC}/security/coreconf/FreeBSD.mk \
${WRKSRC}/directory/c-sdk/config/FreeBSD.mk \
${WRKSRC}/js/src/Makefile.in
@${PERL} -pi -e 's|libesd\.so\.0|${ESD_LIB}|g' \
${WRKSRC}/widget/src/gtk2/nsSound.cpp
@${REINPLACE_CMD} -e \
'/accessibility.typeaheadfind.enablesound/s/true/false/' \
${WRKSRC}/modules/libpref/src/init/all.js \
${WRKSRC}/browser/app/profile/all.js \
${WRKSRC}/calendar/sunbird/app/profile/all.js
pre-install:
@${RM} -rf ${FAKEDIR} ${PLIST}
@${MKDIR} ${FAKEDIR} ${FAKEDIR}/lib/browser_plugins
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
Makefile ${MAKE_ARGS} install
.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
@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:
cd ${FAKEDIR} && ${FIND} * | ${CPIO} -dmp --quiet ${PREFIX}
post-install:
.for i in ${EXTRA_SCRIPTS}
${INSTALL_SCRIPT} ${FILESDIR}/${i} ${PREFIX}/bin
.endfor
.for ii in f F
${RM} -f ${PREFIX}/bin/${ii}irefox
${LN} -sf ${LOCAL_PREFIX}/bin/firefox ${PREFIX}/bin/${ii}irefox
.endfor
${RM} -f ${PREFIX}/bin/firefox-config
${LN} -sf ${LOCAL_PREFIX}/bin/mozilla-config \
${PREFIX}/bin/firefox-config
${RM} -f ${PLUGINSDIR}/libjavaplugin_oji.so
-${LN} -sf \
${JREDIR}/plugin/${ARCH}/ns600/libjavaplugin_oji.so \
${PLUGINSDIR}/libjavaplugin_oji.so
.include <bsd.port.post.mk>