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

PortSystem      1.0
PortGroup       makefile 1.0

name            nedit
version         5.7
revision        1
categories      editors
license         GPL-2+
maintainers     nomaintainer
homepage        https://sourceforge.net/projects/nedit/
description     A multi-purpose text editor for the X Window System.
long_description \
    NEdit is a multi-purpose text editor for the X Window System, which \
    combines a standard, easy to use, graphical user interface with the \
    thorough functionality and stability required by users who edit text \
    eight hours a day. It provides intensive support for development in a \
    wide variety of languages, text processors, and other tools, but at \
    the same time can be used productively by just about anyone who needs \
    to edit text.

checksums       rmd160 85f1a1c32f53016dac87f11b77e1e4b4a55f0c96 \
                sha256 add9ac79ff973528ad36c86858238bac4f59896c27dbf285cbe6a4d425fca17a \
                size   1344754

master_sites    sourceforge:nedit
distname        ${name}-${version}-src
worksrcdir      ${name}-${version}

patchfiles-append \
                patch-Makefile-man.diff \
                patch-Makefile.macosx

depends_lib-append \
                lib:libXm:openmotif \
                port:xpm

build.args-append \
                MOTIFLINK="${configure.ldflags} -lXm" \
                MOTIFDIR=${prefix}

build.target    macosx man

destroot {
    xinstall -s -m 0755 ${worksrcpath}/source/nedit \
        ${destroot}${prefix}/bin/nedit
    xinstall -m 0444 ${worksrcpath}/doc/nedit.man \
        ${destroot}${prefix}/share/man/man1/nedit.1

    xinstall -s -m 0755 ${worksrcpath}/source/nc \
        ${destroot}${prefix}/bin/nedit-nc
    xinstall -m 0444 ${worksrcpath}/doc/nc.man \
        ${destroot}${prefix}/share/man/man1/nedit-nc.1
}
