1998-04-12 14:47:23 +02:00
# New ports collection makefile for: mozilla
# Date created: 31 Mar 1998
# Whom: eivind/dima/jseger
1997-02-24 20:00:30 +01:00
#
1999-08-31 04:43:35 +02:00
# $FreeBSD$
1997-02-24 20:00:30 +01:00
#
2002-11-17 23:09:06 +01:00
PORTNAME ?= mozilla
2002-10-22 05:42:24 +02:00
PORTVERSION = 1.2b
2002-11-17 23:09:06 +01:00
PORTREVISION ?= 1
PORTEPOCH ?= 1
CATEGORIES ?= www
2002-02-07 11:56:05 +01:00
MASTER_SITES = ${ MASTER_SITE_MOZILLA } \
2002-10-22 05:42:24 +02:00
http://people.FreeBSD.org/~marcus/:local
2002-05-01 17:02:27 +02:00
MASTER_SITE_SUBDIR = mozilla/releases/${ PORTNAME } ${ PORTVERSION : S /.rc/rc/ } /src \
2002-08-29 00:11:41 +02:00
marcus/:local
2002-05-13 09:08:34 +02:00
DISTFILES = ${ PORTNAME } -source-${ PORTVERSION : S /.rc/rc/ } ${ EXTRACT_SUFX } \
2002-05-01 17:02:27 +02:00
libart_lgpl-${ PORTVERSION } ${ EXTRACT_SUFX } :local
1997-11-15 02:11:00 +01:00
2001-05-22 12:04:37 +02:00
MAINTAINER = gnome@FreeBSD.org
1997-11-15 02:11:00 +01:00
2002-03-12 19:16:09 +01:00
BUILD_DEPENDS = zip:${ PORTSDIR } /archivers/zip \
freetype-config:${ PORTSDIR } /print/freetype2
2002-07-23 08:58:42 +02:00
LIB_DEPENDS = jpeg.9:${ PORTSDIR } /graphics/jpeg \
2001-09-11 04:38:25 +02:00
png.5:${ PORTSDIR } /graphics/png \
2001-05-22 10:15:39 +02:00
mng.1:${ PORTSDIR } /graphics/libmng \
2002-10-23 06:26:25 +02:00
freetype.9:${ PORTSDIR } /print/freetype2
1998-11-11 06:37:39 +01:00
2000-04-21 04:36:52 +02:00
WRKSRC = ${ WRKDIR } /${ PORTNAME }
2000-02-04 08:45:35 +01:00
2002-11-17 23:09:06 +01:00
MOZILLA ?= mozilla-devel
2002-09-29 03:30:37 +02:00
WITHOUT_CHATZILLA = "Contains a buffer overflow reported at http://online.securityfocus.com/archive/1/270249"
2002-05-09 03:16:03 +02:00
2002-11-17 23:09:06 +01:00
. i f d e f i n e d ( W I T H _ G T K 2 )
2002-11-20 22:54:20 +01:00
LIB_DEPENDS += gtk-x11-2.0.0:${ PORTSDIR } /x11-toolkits/gtk20 \
ORBit-2.0:${ PORTSDIR } /devel/ORBit2
2002-11-17 23:09:06 +01:00
. e l s e
USE_GNOME = gtk12
. e n d i f
2002-10-23 06:26:25 +02:00
. i f ! d e f i n e d ( W I T H O U T _ X F T )
LIB_DEPENDS += Xft2.2:${ PORTSDIR } /x11-fonts/Xft
2002-10-25 22:37:54 +02:00
. i f e x i s t s ( $ { X 1 1 B A S E } / l i b / X 1 1 / f o n t s / m o z i l l a / f o n t s . d i r )
BROKEN = Mozilla-devel and Xft2 render the mozilla-fonts \
illegibly. Please remove the mozilla-fonts package.
. e n d i f
2002-10-23 06:26:25 +02:00
. e n d i f
2002-11-11 04:31:22 +01:00
. i f d e f i n e d ( W I T H _ C A L E N D A R )
DISTFILES += ${ PORTNAME } -calendar-${ PORTVERSION } ${ EXTRACT_SUFX } :local
LIB_DEPENDS += ical.0:${ PORTSDIR } /devel/libical
. e n d i f
2002-11-17 23:09:06 +01:00
LATEST_LINK = ${ MOZILLA }
2002-10-22 05:42:24 +02:00
EXTRACT_AFTER_ARGS = | ${ TAR } -xf - --exclude */CVS/* \
--exclude */macbuild/*\
--exclude */package/* \
--exclude .cvsignore \
--exclude makefile.win \
--exclude MANIFEST
1999-07-24 04:26:33 +02:00
USE_X_PREFIX = yes
USE_PERL5 = yes
USE_GMAKE = yes
2002-10-22 05:42:24 +02:00
USE_REINPLACE = yes
2000-10-25 07:15:45 +02:00
GNU_CONFIGURE = yes
1999-07-24 04:26:33 +02:00
CONFIGURE_ARGS = \
2002-02-15 19:44:15 +01:00
--disable-auto-deps \
--enable-chrome-format= jar \
2001-01-22 02:23:18 +01:00
--disable-cpp-exceptions \
1999-07-24 04:26:33 +02:00
--disable-cpp-rtti \
2001-06-13 11:15:59 +02:00
--enable-crypto \
2002-02-15 19:44:15 +01:00
--disable-debug \
1999-07-24 04:26:33 +02:00
--enable-double-buffer \
2002-02-15 19:44:15 +01:00
--enable-dtd-debug \
--enable-jsd \
2000-02-04 08:45:35 +01:00
--enable-mathml \
2002-02-15 19:44:15 +01:00
--disable-md \
--disable-optimize \
--disable-pedantic \
--disable-plaintext-editor-only \
--enable-strip \
2001-01-22 02:23:18 +01:00
--enable-svg \
2002-02-15 19:44:15 +01:00
--disable-tests \
--disable-xterm-updates \
--enable-xinerama \
--with-system-jpeg= ${ LOCALBASE } \
--with-system-mng= ${ LOCALBASE } \
--with-system-png= ${ LOCALBASE } \
2001-01-22 02:23:18 +01:00
--with-pthreads
2002-05-19 00:09:26 +02:00
2002-11-20 22:54:20 +01:00
. i f ! d e f i n e d ( W I T H _ G T K 2 )
USE_GNOMENG = yes
USE_GNOME += orbit
. e n d i f
2002-10-22 05:42:24 +02:00
PLIST = ${ WRKDIR } /pkg-plist
2002-05-19 00:09:26 +02:00
# LDAP is only used by mail and news so disable both together
. i f d e f i n e d ( W I T H O U T _ M A I L N E W S )
CONFIGURE_ARGS += --disable-ldap --disable-mailnews
. e l s e
# mail and news desired, but not LDAP
. i f d e f i n e d ( W I T H O U T _ L D A P )
CONFIGURE_ARGS += --disable-ldap --enable-mailnews
. e l s e
CONFIGURE_ARGS += --enable-ldap --enable-mailnews
2002-10-22 05:42:24 +02:00
. e n d i f
2002-05-19 00:09:26 +02:00
. e n d i f
2002-01-04 15:18:26 +01:00
. i f ! d e f i n e d ( W I T H O U T _ C H A T Z I L L A )
2002-03-14 21:21:05 +01:00
CONFIGURE_ARGS += --enable-extensions= default,irc,xmlterm
2002-04-15 23:44:48 +02:00
. e l s e
2002-05-15 05:57:17 +02:00
CONFIGURE_ARGS += --enable-extensions= default,xmlterm
2002-01-04 15:18:26 +01:00
. e n d i f
2002-02-15 19:44:15 +01:00
CONFIGURE_ENV = MOZ_INTERNAL_LIBART_LGPL = 1
2002-04-26 06:17:52 +02:00
2002-11-11 04:31:22 +01:00
. i f d e f i n e d ( W I T H _ C A L E N D A R )
CONFIGURE_ENV += LIBS = " -L ${ LOCALBASE } /lib "
CONFIGURE_ARGS += --enable-calendar
. e n d i f
2002-10-29 10:09:38 +01:00
. i f d e f i n e d ( W I T H O U T _ C O M P O S E R )
CONFIGURE_ARGS += --disable-composer
. e n d i f
. i f d e f i n e d ( W I T H _ G T K 2 )
CONFIGURE_ARGS += --enable-default-toolkit= gtk2
EXTRA_PATCHES = ${ FILESDIR } /mozilla_12b_patch
2002-11-17 23:09:06 +01:00
PKGCONFIG_FILES = mozilla-gtkmozembed.pc mozilla-js.pc mozilla-xpcom.pc \
mozilla-nspr.pc mozilla-nss.pc
2002-10-29 10:09:38 +01:00
. e l s e
CONFIGURE_ARGS += --enable-default-toolkit= gtk
. e n d i f
2002-10-23 06:26:25 +02:00
. i f ! d e f i n e d ( W I T H O U T _ X F T )
CONFIGURE_ARGS += --enable-xft
. e n d i f
2002-04-26 06:17:52 +02:00
. i n c l u d e < b s d . p o r t . p r e . m k >
2001-08-07 13:52:15 +02:00
MAKE_ENV = LD_LIBRARY_PATH = ${ WRKSRC } /dist/bin \
2001-12-26 11:21:22 +01:00
MOZ_INTERNAL_LIBART_LGPL = 1
ALL_TARGET = default
1998-03-15 16:13:57 +01:00
2002-07-23 08:58:42 +02:00
. i f ${ARCH} = = "i386"
CONFIGURE_ARGS += --enable-reorder
. e n d i f
. i f ${ARCH} = = "alpha"
BROKEN = "core dumps on alpha during post-build"
. e n d i f
2002-04-26 06:17:52 +02:00
. i f e x i s t s ( $ { L O C A L B A S E } / i n c l u d e / f r e e t y p e / f r e e t y p e . h )
BROKEN = " You must upgrade your freetype port to 1.3.1_2 or higher before installing Mozilla. If you have 1.3.1_2 installed, please remove ${ LOCALBASE } /include/freetype, then build Mozilla "
. e n d i f
2002-11-11 04:31:22 +01:00
pre-everything ::
. i f d e f i n e d ( W I T H _ C A L E N D A R )
@${ ECHO_MSG } "Calendar is still beta software."
@${ ECHO_MSG } "Use at your own risk."
@${ ECHO_MSG } "http://mozilla.org/projects/calendar/"
. e n d i f
2002-10-22 05:42:24 +02:00
post-patch :
@${ REINPLACE_CMD } -e 's|%%PREFIX%%|${PREFIX}|g' \
${ WRKSRC } /build/unix/run-mozilla.sh
2002-11-17 23:09:06 +01:00
. i f ! d e f i n e d ( W I T H O U T _ X F T )
2002-10-22 09:09:39 +02:00
@${ REINPLACE_CMD } -e 's|X11/Xft/Xft\.h|X11/Xft/Xft2.h|g' \
${ WRKSRC } /gfx/src/gtk/nsDrawingSurfaceGTK.cpp \
${ WRKSRC } /gfx/src/gtk/nsFontMetricsXft.h
2002-11-17 23:09:06 +01:00
. e n d i f
@${ REINPLACE_CMD } -e 's|%%MOZILLA%%|${MOZILLA}|g' \
-e 's|%%HEADERS_SUFX%%|-devel|g' \
${ WRKSRC } /config/autoconf.mk.in
2002-10-22 05:42:24 +02:00
2000-02-04 08:45:35 +01:00
post-build :
2002-11-17 23:09:06 +01:00
${ SED } -e " s;@PREFIX@; ${ PREFIX } ;g " -e " s;%%MOZILLA%%; ${ MOZILLA } ;g " \
${ FILESDIR } /mozilla.sh >${ WRKSRC } /${ MOZILLA }
2002-02-15 19:44:15 +01:00
( cd ${ WRKSRC } /dist/bin; \
2000-10-27 11:24:08 +02:00
${ SETENV } LD_LIBRARY_PATH = . MOZILLA_FIVE_HOME = . ./regxpcom; \
2002-08-29 00:11:41 +02:00
${ SETENV } LD_LIBRARY_PATH = . MOZILLA_FIVE_HOME = . ./regchrome; \
${ TOUCH } ./chrome/user-skins.rdf ./chrome/user-locales.rdf)
2002-02-15 19:44:15 +01:00
${ FIND } ${ WRKSRC } /dist/bin -type d | /usr/bin/sort -r | \
${ XARGS } ${ RMDIR } 2> /dev/null || ${ TRUE }
2000-02-04 08:45:35 +01:00
2002-10-22 05:42:24 +02:00
pre-install :
2002-11-17 23:09:06 +01:00
${ RM } -f ${ PLIST }
2002-10-22 05:42:24 +02:00
${ TOUCH } -f ${ PLIST }
2002-10-23 18:13:29 +02:00
if [ ! -x ${ PREFIX } /bin/mozilla -a ! -L ${ PREFIX } /bin/mozilla ] ; then \
${ ECHO_CMD } bin/mozilla >> ${ PLIST } ; \
2002-10-23 06:26:25 +02:00
fi
2002-11-17 23:09:06 +01:00
${ ECHO_CMD } bin/${ MOZILLA } >> ${ PLIST }
2002-10-23 18:13:29 +02:00
if [ ! -L ${ PREFIX } /lib/browser_plugins/libjavaplugin_oji.so ] ; then \
${ ECHO_CMD } lib/browser_plugins/libjavaplugin_oji.so >> ${ PLIST } ; \
2002-10-23 06:26:25 +02:00
fi
2002-10-22 05:42:24 +02:00
cd ${ WRKSRC } /dist/bin && ${ FIND } -s * -type f -o -type l | \
2002-11-17 23:09:06 +01:00
${ SED } -e 's:^:lib/${MOZILLA}/:' >> ${ PLIST } \
2002-10-22 05:42:24 +02:00
&& ${ FIND } -d * -type d | \
2002-11-17 23:09:06 +01:00
${ SED } -e 's:^:@dirrm lib/${MOZILLA}/:' >> ${ PLIST }
${ ECHO_CMD } @dirrm lib/${ MOZILLA } >> ${ PLIST }
. i f d e f i n e d ( W I T H _ G T K 2 )
for pcfile in ${ PKGCONFIG_FILES } ; do \
${ ECHO_CMD } libdata/pkgconfig/$$ pcfile >> ${ PLIST } ; \
done
. e n d i f
2002-10-22 05:42:24 +02:00
1997-04-09 17:12:15 +02:00
do-install :
2002-11-17 23:09:06 +01:00
${ MKDIR } ${ PREFIX } /lib/${ MOZILLA }
${ CHMOD } 755 ${ PREFIX } /lib/${ MOZILLA }
2002-04-13 19:06:30 +02:00
cd ${ WRKSRC } /dist/bin && ${ FIND } . | \
2002-11-17 23:09:06 +01:00
cpio -pdm -L -R ${ LIBOWN } :${ LIBGRP } ${ PREFIX } /lib/${ MOZILLA }
${ INSTALL_SCRIPT } ${ WRKSRC } /${ MOZILLA } ${ PREFIX } /bin
2002-10-23 18:13:29 +02:00
if [ ! -x ${ PREFIX } /bin/mozilla -a ! -L ${ PREFIX } /bin/mozilla ] ; then \
2002-11-17 23:09:06 +01:00
${ LN } -sf ${ PREFIX } /bin/${ MOZILLA } ${ PREFIX } /bin/mozilla ; \
2002-10-23 06:26:25 +02:00
fi
2002-10-23 18:13:29 +02:00
if [ ! -d ${ PREFIX } /lib/browser_plugins ] ; then \
${ MKDIR } ${ PREFIX } /lib/browser_plugins ; \
2002-10-23 06:26:25 +02:00
fi
2002-10-23 20:20:20 +02:00
if [ ! -L ${ PREFIX } /lib/browser_plugins/libjavaplugin_oji.so ] ; then \
2002-10-23 06:26:25 +02:00
${ LN } -sf ${ LOCALBASE } /jdk1.3.1/jre/plugin/i386/ns600/libjavaplugin_oji.so \
2002-10-23 18:13:29 +02:00
${ PREFIX } /lib/browser_plugins/libjavaplugin_oji.so ; \
2002-10-23 06:26:25 +02:00
fi
2002-11-17 23:09:06 +01:00
. i f d e f i n e d ( W I T H _ G T K 2 )
for pcfile in ${ PKGCONFIG_FILES } ; do \
${ INSTALL_DATA } ${ WRKSRC } /build/unix/$$ pcfile \
${ PREFIX } /libdata/pkgconfig ; \
done
. e n d i f
2002-10-22 05:42:24 +02:00
post-install :
@${ CAT } ${ PKGMESSAGE }
1997-02-24 20:00:30 +01:00
2002-04-26 06:17:52 +02:00
. i n c l u d e < b s d . p o r t . p o s t . m k >