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

PortSystem              1.0
PortGroup               makefile 1.0

name                    greed
version                 4.3
revision                0
categories              games
license                 BSD
maintainers             nomaintainer

description             The strategy game of Greed
long_description        {*}${description}. Try to eat as much as possible of \
                        the board before munching yourself into a corner.

homepage                http://www.catb.org/~esr/greed/
master_sites            ${homepage}

checksums               rmd160  165629a6c2afcd62ec8d0b41441a60686566da14 \
                        sha256  8ea3b9a22e9cf3789a9103d38ac0bf88fd6179763fffe36e3b607946b7449acf \
                        size    15150

patch.pre_args-replace  -p0 -p1
patchfiles              patch-makefile.diff

depends_lib-append      port:ncurses

post-build {
    reinplace "s|/usr/lib/games|${prefix}/share/${name}|g" ${worksrcpath}/${name}.6
}

post-destroot {
    file mkdir ${destroot}${prefix}/share/${name}
    system "touch ${destroot}${prefix}/share/${name}/${name}.hs"
    system "chmod 644 ${destroot}${prefix}/share/${name}/${name}.hs"
}
