# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 106593 2013-05-31 15:07:45Z snc@macports.org $

PortSystem          1.0

name                edbrowse
version             3.4.9
categories          www
license             GPL
maintainers         snc email.uc.edu:obrienj
description         A combination editor, browser, and mail client that is \
                    100% text based.
long_description    Edbrowse is a combination editor, browser, and mail client \
                    that is 100% text based.  The interface is similar to \
                    /bin/ed, though there are many more features, such as \
                    editing multiple files simultaneously, and rendering html.\
                    This program was originally written for blind users, but \
                    many sighted users have taken advantage of the unique \
                    scripting capabilities of this program, which can be found \
                    nowhere else.  A batch job, or cron job, can access web \
                    pages on the internet, submit forms, and send email, with \
                    no human intervention whatsoever.  edbrowse can also tap \
                    into databases through odbc.

homepage            http://the-brannons.com/edbrowse/

platforms           darwin freebsd
installs_libs       no
depends_lib         port:pcre \
                    port:spidermonkey185 \
                    port:curl \
                    port:readline \
                    port:openssl

master_sites        ${homepage}
use_zip             yes
dist_subdir			${name}-1

checksums           rmd160  96b3b88968ea3a1f52f91deff80662a5ab206bee \
                    sha256  ef4690e0f695bddf97194e3be5a4b7b999b8af07639e8c6cc02539b6296f3813

patchfiles          patch-makefile.diff
post-patch {
    reinplace       "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/src/makefile
}

use_configure       no

variant universal {}

configure.cppflags-append -I${prefix}/include/mozjs185
build.env-append    CC="${configure.cc} [get_canonical_archflags cc]" CFLAGS="${configure.cflags}" CPPFLAGS="${configure.cppflags} -DSYSBSD -DXP_UNIX -DX86_LINUX"
build.args          STRIP=''

destroot {
    xinstall ${worksrcpath}/src/${name} ${destroot}${prefix}/bin
}

livecheck.regex     {(3.[0-9].[0-9])}
livecheck.type      regex
