# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 108099 2013-07-12 23:03:21Z devans@macports.org $

PortSystem      1.0

name            epiphany
version         2.30.6
revision        12
license         GPL-2+
set branch      [join [lrange [split ${version} .] 0 1] .]
description     A GNOME Web browser.
long_description \
                A web browser is more than an application, it is a \
                way of thinking, it is a way of seeing the world. \
                Epiphany's principles are simplicity and standards \
                compliance.
maintainers     devans openmaintainer
categories      gnome www
platforms       darwin
homepage        http://www.gnome.org/projects/${name}
master_sites    gnome:sources/${name}/${branch}/
use_bzip2       yes

checksums       md5     0c566b3ffd428d2135e3c8cb65352d64 \
                sha1    a4bde975f9b2b97d6aad14b4b8a715b40d19a155 \
                rmd160  60f2c7d699dd8728dc79cce012475972943c4007

depends_build   port:pkgconfig \
                port:intltool \
                port:gnome-common \
                port:gnome-doc-utils

depends_lib     port:gconf \
                port:webkit-gtk \
                port:icu \
                port:jpeg \
                port:startup-notification \
                port:libnotify \
                port:nss \
                port:iso-codes

depends_run     port:gnome-settings-daemon \
                port:yelp

configure.args  --with-distributor-name=MacPorts \
                --enable-introspection=no \
                --disable-zeroconf \
                --disable-network-manager \
                --disable-schemas-install \
                --disable-scrollkeeper \
                --disable-tests \
                --without-ca-file

pre-configure {
    reinplace "s|--rpath=|-rpath |g" ${worksrcpath}/configure
}

post-activate {
    system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
    system "${prefix}/bin/scrollkeeper-update"
    system "${prefix}/bin/update-desktop-database -q ${prefix}/share/applications"
    system "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` && \
        gconftool-2 --makefile-install-rule ${prefix}/etc/gconf/schemas/*.schemas"
}

#
# nss is not universal
#

if {[variant_isset universal]} {
    configure.args-append --disable-nss
    depends_lib-delete port:nss
}

livecheck.type  gnome
