Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Oct 2005 15:22:03 -0700
From:      "David W. Hankins" <David_Hankins@isc.org>
To:        gnome@freebsd.org
Subject:   Firefox ports build.
Message-ID:  <20051003222203.GA806@isc.org>

next in thread | raw e-mail | index | archive | help

--vGgW1X5XWziG23Ko
Content-Type: multipart/mixed; boundary="5mCyUwZo2JvN/JJP"
Content-Disposition: inline


--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Find attached the Makefile and mozconfig.in I used to get Firefox to build
with the negotiateauth extension with MIT krb5 installed.  I did not save
original versions to construct diffs from, hopefully this is a trifle for
you.

I assume that KRB5_HOME is set when Heimdal is in use normally.  If not,
greater care will need to be taken.

Whatever the case, the current firefox default build is somewhat comedic.
It intentionally implies a GSSAPI configuration setting, but the only
way mozilla/firefox would make use of this is if you also enabled the
negotiateauth extension.  The comedy is in doing one but not the other.

--=20
David W. Hankins		"If you don't do it right the first time,
Software Engineer			you'll just have to do it again."
Internet Systems Consortium, Inc.		-- Jack T. Hankins

--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=Makefile

# New ports collection makefile for:	phoenix
# Date created:			2002/10/21
# Whom:				Alan Eldridge <alane@FreeBSD.org>
#
# $FreeBSD: ports/www/firefox/Makefile,v 1.132 2005/09/23 20:42:36 mezz Exp $
#    $MCom: ports-stable/www/firefox/Makefile,v 1.18 2005/08/20 21:53:54 mezz Exp $
#

PORTNAME=	firefox
PORTVERSION=	1.0.7
PORTREVISION=	1
PORTEPOCH=	1
CATEGORIES=	www
MASTER_SITES=	${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR=	${PORTNAME}/releases/${PORTVERSION}/source
DISTNAME=	${PORTNAME}-${PORTVERSION}-source

MAINTAINER=	gnome@FreeBSD.org
COMMENT=	Web browser based on the browser portion of Mozilla

LIB_DEPENDS=	jpeg:${PORTSDIR}/graphics/jpeg	\
		nspr4:${PORTSDIR}/devel/nspr	\
		png:${PORTSDIR}/graphics/png	\
		nss3:${PORTSDIR}/security/nss
BUILD_DEPENDS=	zip:${PORTSDIR}/archivers/zip

ALL_TARGET=	default
CONFIGURE_ENV=	LOCALBASE=${LOCALBASE}
FAKEDIR=	${WRKDIR}/fake
USE_REINPLACE=	yes
HAS_CONFIGURE=	yes
PLIST=		${WRKDIR}/plist
PLUGINSDIR=	${PREFIX}/lib/browser_plugins
USE_BZIP2=	yes
USE_GMAKE=	yes
USE_GNOME=	gtk20 libidl gnomehier desktopfileutils
USE_ICONV=	yes
USE_PERL5_BUILD=yes
USE_X_PREFIX=	yes
WRKSRC=		${WRKDIR}/mozilla
PKGINSTALL=	${WRKDIR}/pkg-install
PKGDEINSTALL=	${WRKDIR}/pkg-deinstall

EXTRACT_AFTER_ARGS=	| ${TAR} -xf - --exclude */CVS/* \
			--exclude */macbuild/*\
			--exclude */nsprpub/*\
			--exclude */package/* \
			--exclude */zlib/ \
			--exclude mozilla/modules/libimg/png \
			--exclude mozilla/jpeg \
			--exclude mozilla/dbm \
			--exclude mozilla/js/src/fdlibm \
			--exclude mozilla/security/nss	\
			--exclude mozilla/gc/boehm	\
			--exclude .cvsignore \
			--exclude makefile.win \
			--exclude MANIFEST

PORTNAME_ICON=	${PREFIX}/lib/${PORTNAME}/chrome/icons/default/default.xpm

PKGCONFIG_FILES=${PORTNAME}-gtkmozembed ${PORTNAME}-js ${PORTNAME}-xpcom \
		${PORTNAME}-plugin

JPI_LIST?=\
	${LOCALBASE}/jdk1.5.0/jre/plugin/${ARCH}/ns7/libjavaplugin_oji.so \
	${LOCALBASE}/jdk1.4.2/jre/plugin/${ARCH}/ns610/libjavaplugin_oji.so

SYSTEM_PREFS=	${FAKEDIR}/lib/${PORTNAME}-${PORTVERSION}/defaults/pref/${PORTNAME}.js
SCRIPTS_DIR=	${FAKEDIR}/lib/${PORTNAME}-${PORTVERSION}
MOZ_PIS_SCRIPTS=S50cleanhome
MOZ_PIS_DIR=	${SCRIPTS_DIR}/init.d

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 \
		SMB "Enable smb:// URI support using gnomevfs" off \
		NEWTAB "Open external links in a new tab" on
#		CJK "Enable CJK font family support" off

.include <bsd.port.pre.mk>

# Enable CJK Font Familyname support
#.if defined(WITH_CJK)
#PATCH_SITES+=	http://bbs.ilc.edu.tw/~chinsan/ \
#		http://bsdchat.com/dist/firefly-cjk-patchset/ \
#		ftp://local-distfiles.freebsd.org.cn/pub/china-ports/hamigua/
#PATCHFILES+=	mozilla-1.7.10-cjkfamilyname-20050731.patch.gz
#PATCH_DIST_STRIP+=	-p1
#.endif

.if defined(WITH_DEBUG)
WITH_LOGGING=		yes
CONFIGURE_ENV+=		WITH_DEBUG=yes
.endif # defined(WITH_DEBUG)

.if defined(WITH_OPTIMIZED_CFLAGS)
CFLAGS:=		-O2 -fno-strict-aliasing ${CFLAGS:N-O*}
.else
CFLAGS:=		-O ${CFLAGS:N-O*:N-m*}
CONFIGURE_ENV+=		WITH_OPTIMIZE=-O
.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/libXft
.endif # !defined(WITHOUT_XFT)

.if defined(WITH_SMB)
USE_GNOME+=	gnomevfs2
CONFIGURE_ENV+=	WITH_SMB=yes
.endif # defined(WITH_SMB)

CPPFLAGS+=		-I${X11BASE}/include -I${LOCALBASE}/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

.if ${PERL_LEVEL} < 500600
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-config_make-jars.pl
.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|@FAKEDIR@|${FAKEDIR}|'		\
		-e 's|@PERL@|${PERL5}|'			\
		-e 's|@KRB5_HOME@|${KRB5_HOME}|'	\
		<${FILESDIR}/mozconfig.in >${WRKSRC}/.mozconfig
	@${SED} -e 's|@PORTNAME_ICON@|${PORTNAME_ICON}|' \
		<${FILESDIR}/${PORTNAME}.desktop.in >${WRKDIR}/${PORTNAME}.desktop

post-patch:
	@${REINPLACE_CMD} -e  's/%{idldir}/%idldir%/g ; \
		s|"%FULL_NSPR_CFLAGS%"|`nspr-config --cflags`|g ; \
		s|"%FULL_NSPR_LIBS%"|`nspr-config --libs`|g' \
			${WRKSRC}/build/unix/mozilla-config.in
	@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${PORTNAME}|g ; \
		s|%%PREFIX%%|${PREFIX}|g ; \
		s|%%X11BASE%%|${X11BASE}|g' \
		< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
	@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${PORTNAME}|g' \
		< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
.for ii in ${EXTRA_SCRIPTS}
	@${SED} -e 's|%%MOZILLA%%|${PORTNAME}|g ; \
		s|%%PREFIX%%|${PREFIX}|g ; \
		s|%%X11BASE%%|${X11BASE}|g' \
		< ${FILESDIR}/${ii} > ${WRKDIR}/${ii}
.endfor
.for ii in ${MOZ_PIS_SCRIPTS}
	@${SED} -e 's|%%MOZILLA%%|${PORTNAME}|g ; \
		s|%%PREFIX%%|${PREFIX}|g ; \
		s|%%X11BASE%%|${X11BASE}|g' \
		< ${FILESDIR}/moz_pis_${ii} > ${WRKDIR}/moz_pis_${ii}
.endfor
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
		${WRKSRC}/build/unix/run-mozilla.sh
	@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
		s|-lpthread|${PTHREAD_LIBS}|g' \
		${WRKSRC}/configure
	@${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g' \
		${WRKSRC}/security/coreconf/FreeBSD.mk \
		${WRKSRC}/directory/c-sdk/config/FreeBSD.mk \
		${WRKSRC}/js/src/Makefile.in
	@${REINPLACE_CMD} -E -e 's|libesd\.so\.[0-9]+|libesd.so|g' \
		${WRKSRC}/widget/src/gtk2/nsSound.cpp
	@${REINPLACE_CMD} -E -e 's|libcups\.so\.[0-9]+|libcups.so|g' \
		${WRKSRC}/gfx/src/gtk/nsDeviceContextSpecG.cpp
	@${REINPLACE_CMD} -e 's|/usr/local/netscape|${LOCALBASE}|g' \
		-e 's|/usr/local/lib/netscape|${LOCALBASE}/lib|g' \
		${WRKSRC}/xpcom/*/SpecialSystemDirectory.cpp
	@${FIND} ${WRKSRC} -name all.js | ${XARGS} ${REINPLACE_CMD} -e \
		'/accessibility.typeaheadfind.enablesound/s/true/false/ ; \
		/dom.disable_window_open_feature.toolbar/s/false/true/'

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

pre-install:
	@${RM} -rf ${FAKEDIR} ${PLIST}
	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
		Makefile ${MAKE_ARGS} ${INSTALL_TARGET}
	@${MKDIR} ${SCRIPTS_DIR}
	@${MKDIR} ${MOZ_PIS_DIR}
	${ECHO_CMD} 'share/applications/${PORTNAME}.desktop' >> ${PLIST}
	${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g; \
		s|${PORTNAME}-${PORTVERSION}|${PORTNAME}|' \
		${FAKEDIR}/bin/${PORTNAME} \
		${FAKEDIR}/bin/${PORTNAME}-config
	for i in ${EXTRA_SCRIPTS}; do \
		${ECHO_CMD} bin/$${i} >> ${PLIST}; \
	done
	${ECHO_CMD} bin/${PORTNAME} >> ${PLIST}
	${ECHO_CMD} bin/${PORTNAME}-config >> ${PLIST}
.for ii in ${MOZ_PIS_SCRIPTS}
	${INSTALL_SCRIPT} ${WRKDIR}/moz_pis_${ii} ${MOZ_PIS_DIR}/${ii}
.endfor
.if !defined(WITHOUT_NEWTAB)
	${ECHO_CMD} >> ${SYSTEM_PREFS}
	${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS}
	${ECHO_CMD} "pref(\"browser.link.open_external\", 3);" \
		>> ${SYSTEM_PREFS}
.endif # !defined(WITHOUT_NEWTAB)
	cd ${FAKEDIR}/lib/${PORTNAME}-${PORTVERSION} && ${FIND} -s * -type f -o -type l | \
		${SED} -e 's|^|lib/${PORTNAME}/|' >> ${PLIST} \
		&& ${FIND} -d * -type d | \
		${SED} -e 's|^|@dirrm lib/${PORTNAME}/|' >> ${PLIST}
	${ECHO_CMD} @dirrm lib/${PORTNAME} >> ${PLIST}
	for pcfile in ${PKGCONFIG_FILES}; do \
		${REINPLACE_CMD} -e 's|${PORTNAME}-${PORTVERSION}|${PORTNAME}|g; \
			s|${FAKEDIR}|${PREFIX}|g ; \
			s|${PORTNAME}-nspr = ${PORTVERSION}|nspr >= 4.6.0|g' \
			${FAKEDIR}/lib/pkgconfig/$${pcfile}.pc ; \
		${ECHO_CMD} libdata/pkgconfig/$${pcfile}.pc >> ${PLIST} ; \
	done
	cd ${FAKEDIR}/include/${PORTNAME}-${PORTVERSION} && ${FIND} -s * -type f -o -type l | \
		${SED} -e 's|^|include/${PORTNAME}/|' >> ${PLIST} \
		&& ${FIND} -d * -type d | \
		${SED} -e 's|^|@dirrm include/${PORTNAME}/|' >> ${PLIST}
	${ECHO_CMD} @dirrm include/${PORTNAME} >> ${PLIST}
	${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
	${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST}
	${ECHO_CMD} "@exec ${LOCALBASE}/bin/update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
	${ECHO_CMD} "@unexec ${LOCALBASE}/bin/update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
	cd ${FAKEDIR}/share/idl/${PORTNAME}-${PORTVERSION} \
		&& ${FIND} -s * -type f -o -type l | \
		${SED} -e 's:^:share/idl/${PORTNAME}/:' >> ${PLIST} \
		&& ${FIND} -d * -type d | \
		${SED} -e 's:^:@dirrm share/idl/${PORTNAME}/:' >> ${PLIST}
		${ECHO_CMD} "@dirrm share/idl/${PORTNAME}" >> ${PLIST}
		${ECHO_CMD} "@unexec ${RMDIR} %D/share/idl 2>/dev/null || true" >> ${PLIST}

do-install:
	${MKDIR} ${PREFIX}/lib/${PORTNAME}
	${CHMOD} 755 ${PREFIX}/lib/${PORTNAME}
	${INSTALL_SCRIPT} ${FAKEDIR}/bin/${PORTNAME} ${PREFIX}/bin
	${INSTALL_SCRIPT} ${FAKEDIR}/bin/${PORTNAME}-config ${PREFIX}/bin
	if [ ! -d ${PREFIX}/lib/browser_plugins ]; then \
		${MKDIR} ${PREFIX}/lib/browser_plugins ; \
	fi
	${TOUCH} -f ${PREFIX}/lib/browser_plugins/.${PORTNAME}.keep
	if [ ! -L ${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ]; then \
		for jpi in ${JPI_LIST}; do \
			if [ -f $${jpi} ]; then \
				${LN} -sf $${jpi} \
					${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ; \
				break; \
			fi; \
		done; \
	fi
	for pcfile in ${PKGCONFIG_FILES}; do \
		${INSTALL_DATA} ${FAKEDIR}/lib/pkgconfig/$${pcfile}.pc \
			${PREFIX}/libdata/pkgconfig/$${pcfile}.pc ; \
	done
	-${RM} -fr ${PREFIX}/include/${PORTNAME}
	${MKDIR} ${PREFIX}/include/${PORTNAME}
	${CHMOD} 755 ${PREFIX}/include/${PORTNAME}
	cd ${FAKEDIR}/include/${PORTNAME}-${PORTVERSION} && ${FIND} . | \
		${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/include/${PORTNAME}
	cd ${FAKEDIR}/lib/${PORTNAME}-${PORTVERSION} && ${FIND} . | \
		${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/${PORTNAME}
	${MKDIR} ${PREFIX}/share/idl/${PORTNAME}
	cd ${FAKEDIR}/share/idl/${PORTNAME}-${PORTVERSION} && ${FIND} . | \
		${CPIO} -pdm -L -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/idl/${PORTNAME}

post-install:
.if !defined(PACKAGE_BUILDING)
	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.endif
.for i in ${EXTRA_SCRIPTS}
	${INSTALL_SCRIPT} ${FILESDIR}/${i} ${PREFIX}/bin
.endfor
	${MKDIR} ${PREFIX}/share/applications
	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.desktop ${PREFIX}/share/applications
	${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/${PORTNAME}/default.xpm \
		${PREFIX}/lib/${PORTNAME}/chrome/icons/default/default.xpm
	@-update-desktop-database

.include <bsd.port.post.mk>

--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mozconfig.in"

# .mozconfig.in -*-shell-script-*-
# $FreeBSD: ports/www/firefox/files/mozconfig.in,v 1.32 2005/08/28 07:59:05 mezz Exp $
######################################################################
# standard opts from README
export MOZ_PHOENIX=1
mk_add_options MOZ_PHOENIX=1
ac_add_options --enable-crypto
ac_add_options --disable-tests
ac_add_options --disable-mailnews
ac_add_options --disable-composer
ac_add_options --enable-default-toolkit=gtk2
# See the following URL for approval email for using official branding
# http://people.freebsd.org/~ahze/firefox_thunderbird-approved.txt
ac_add_options --enable-official-branding
######################################################################
# FBSD specific
export CPPFLAGS="@CPPFLAGS@"
export CFLAGS="@CFLAGS@"
export LIBS="@LIBS@"
export LDFLAGS="@LDFLAGS@"
export CONFIG_SH=/bin/sh
export XP_UNIX=1
mk_add_options XP_UNIX=1
export PERL="@PERL@"
mk_add_options PERL=$PERL
# Configure options for installation
ac_add_options --prefix=@FAKEDIR@
ac_add_options --x-includes=@X11BASE@/include
ac_add_options --x-libraries=@X11BASE@/lib
######################################################################
# Use ports for these libraries
ac_add_options --with-system-jpeg=@LOCALBASE@
ac_add_options --with-system-zlib
ac_add_options --with-system-png=@LOCALBASE@
ac_add_options --with-system-nspr
ac_add_options --with-gssapi=@KRB5_HOME@
######################################################################
# set compile/link features
ac_add_options --with-pthreads
######################################################################
# disable unneeded/unavailable
ac_add_options --disable-auto-deps
ac_add_options --disable-bidi
ac_add_options --disable-dtd-debug
ac_add_options --disable-jsd
ac_add_options --disable-ldap
ac_add_options --disable-pedantic
ac_add_options --disable-profilesharing
ac_add_options --disable-installer
ac_add_options --enable-single-profile
ac_add_options --disable-profilesharing
ac_add_options --enable-image-decoders=all
ac_add_options --enable-extensions="cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,p3p,gnomevfs,negotiateauth"
######################################################################
# conditional from port Makefile
#if test -n "$WITH_REORDER"; then
#    ac_add_options --enable-reorder
#else
#    ac_add_options --disable-reorder
#fi # test -n "$WITH_REORDER"
if test -n "$WITH_DEBUG"; then
    ac_add_options --enable-debug
    ac_add_options --disable-strip
else
    ac_add_options --disable-debug
    ac_add_options --enable-optimize=${WITH_OPTIMIZE}
    ac_add_options --enable-strip
fi # test -n "$WITH_DEBUG"
if test -n "$WITH_LOGGING"; then
    ac_add_options --enable-logging
else
    ac_add_options --disable-logging
fi # test -n "$WITH_LOGGING"
if test -z "$WITHOUT_XFT"; then
    ac_add_options --enable-xft
else
    ac_add_options --disable-xft
fi # test -z "$WITHOUT_XFT"
if test -z "$WITH_SMB"; then
    ac_add_options --disable-gnomevfs
fi # test -z "$WITH_SMB"
######################################################################

--5mCyUwZo2JvN/JJP--

--vGgW1X5XWziG23Ko
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFDQa8KcXeLeWu2vmoRAkOTAJ9eW27g7HJNwYpaDsbLPwzCaBBUdwCgpgl9
DzV5545YTWsXr7Z/alykM7Y=
=HUVB
-----END PGP SIGNATURE-----

--vGgW1X5XWziG23Ko--



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