# -*- 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$

PortSystem          1.0

name                edbrowse
version             3.4.10
categories          www
license             GPL
maintainers         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://edbrowse.org/

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  42503f7f851b987f10a21d068b0f324d1fcac738 \
                    sha256  58089879c31b571792f76fc53c41374fcbe8386ea82fe451737ae72e8a78e826

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