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

PortSystem      1.0

name            eric4
version         4.5.13
categories      devel
platforms       darwin
maintainers     nomaintainer
license         GPL-3

description     Eric is a full featured Python and Ruby editor and IDE, written in python

long_description \
    Eric is a full featured Python and Ruby editor and IDE, written in python. \
    It is based on the cross platform Qt gui toolkit, integrating the highly  \
    flexible Scintilla editor control. It is designed to be usable as everdays' \
    quick and dirty editor as well as being usable as a professional project \
    management tool integrating many advanced features Python offers the \
    professional coder.

homepage        http://eric-ide.python-projects.org/index.html
master_sites    sourceforge:project/eric-ide/${name}/stable/${version}/

checksums       rmd160  0b01bb4c46c4ac959b5f45f037caeece624c504d \
                sha256  7032ff5758455b89fe733b41956e8ea60e215c4381603e897116cd15bb29da65

# Can use either py*-pyqt4 or py*-pyqt4-devel.
depends_lib     port:python27 \
                path:share/py27-sip/PyQt4:py27-pyqt4 \
                port:py27-qscintilla \
                port:py27-pysvn \
                port:py27-rope \
                port:py27-pylint \
                port:py27-cx_Freeze \
                port:py27-enchant

patchfiles      patch-install.py.diff

post-patch {
    reinplace "s|@APPLICATIONS_DIR@|${destroot}${applications_dir}|g" ${worksrcpath}/install.py
}

use_configure   no

build {
    # Building and installing are synonymous
}

destroot {
    system -W ${worksrcpath} "${prefix}/bin/python2.7 install.py -b '${prefix}/bin' -i '${destroot}'"
}

livecheck.type  regex
livecheck.url   http://eric-ide.python-projects.org/eric-news.html
livecheck.regex "eric4 (\\d+\\.\\d+\\.\\d+) has been released"