# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0

name                bastet
version             0.41
categories          games
platforms           darwin
maintainers         sfiera
description         Bastard Tetris is an antagonistic Tetris clone
long_description \
  Bastet stands for bastard tetris, and is a Tetris(R) \
  clone which, instead of choosing your next brick at \
  random, expressly checks to see which one causes you \
  the most trouble. Playing Bastet can be a painful \
  experience.

homepage            http://fph.altervista.org/prog/bastet.shtml
master_sites        http://fph.altervista.org/prog/
checksums           md5 48379dc98916ba083e9be5544f552a06
extract.suffix      .tgz
patchfiles          patch-Makefile.diff

depends_lib-append port:ncurses

use_configure       no

build.args          PREFIX=${prefix}

post-patch {
  reinplace "s|termio\.h|termios.h|" ${worksrcpath}/bast.c
}

destroot {
  xinstall -m 755 ${worksrcpath}/bastet ${destroot}${prefix}/bin/
  xinstall -m 755 -d ${destroot}${prefix}/var/games/bastet \
    ${destroot}${prefix}/share/doc/${name}
  xinstall -m 666 ${filespath}/bastet.scores \
    ${destroot}${prefix}/var/games/bastet/
  xinstall -m 644 -W ${worksrcpath} AUTHORS BUGS COPYING NEWS README \
    README-Petris TODO ${destroot}${prefix}/share/doc/${name}
}

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex {version (\d+\.\d+)}
