Portfile

# $Id: Portfile 22825 2007-03-16 08:25:29Z rhwood@macports.org $

PortSystem 1.0

name firefox-x11
categories www x11
version 1.5.0.1
revision 3
platforms darwin
maintainers rhwood@macports.org openmaintainer@macports.org
description Mozilla.org's popular stand-alone browser
long_description \
Firefox empowers you to browse faster, more safely and more \
efficiently than with any other browser. Join more than 44 \
million others and make the switch today. Firefox imports \
your Favorites, settings and other information, so you have \
nothing to lose.

homepage http://www.mozilla.com/firefox/
master_sites http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${version}/source/
distname firefox-${version}-source
checksums rmd160 6e332fb1a7e80ab56d3d6e3de3d203c8c58217bf
use_bzip2 yes
worksrcdir mozilla

depends_lib port:libidl \
port:glib2 \
port:zip \
port:gtk2 \
port:gnome-vfs \
port:gnome-icon-theme
depends_build port:pkgconfig

patchfiles patch-browser-app-mozilla.in \
patch-browser-components-build-Makefile.in \
patch-browser-app-profile-firefox.js

configure.env CPPFLAGS=-I${prefix}/include LDFLAGS=-L${prefix}/lib
configure.args --enable-application=browser \
--enable-official-branding \
--enable-optimize \
--disable-static \
--enable-shared \
--enable-default-toolkit=gtk2 \
--enable-xft \
--disable-freetype2 \
--enable-xinerama \
--with-pthreads \
--enable-gnomevfs \
--enable-postscript \
--disable-prebinding \
--disable-debug \
--enable-strip \
--enable-optimize='-O2' \
--disable-tests \
--with-default-mozilla-five-home=${prefix}/lib/firefox \
--with-system-jpeg=${prefix} \
--with-system-zlib=${prefix} \
--with-system-png=${prefix}

post-destroot {
file mkdir ${destroot}${prefix}/share/applications
file copy ${filespath}/share-applications-firefox.desktop \
${destroot}${prefix}/share/applications/firefox.desktop
}

variant use_system_dependencies {
depends_lib lib:libIDL.a:libidl1 lib:libglib.2:glib2 \
bin:unzip:zip lib:libgtk+-2.0:gtk2
}

files