Ticket #41914: bastet-0.43.1.diff

File bastet-0.43.1.diff, 2.7 KB (added by ryandesign (Ryan Carsten Schmidt), 10 years ago)
  • Portfile

     
    11# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
    22# $Id$
    33
    4 PortSystem 1.0
     4PortSystem          1.0
     5PortGroup           github 1.0
    56
    6 name                bastet
    7 version             0.41
     7github.setup        fph bastet 0.43.1
    88categories          games
    99platforms           darwin
    1010maintainers         nomaintainer
     11license             GPL-3+
     12
    1113description         Bastard Tetris is an antagonistic Tetris clone
    1214long_description \
    1315  Bastet stands for bastard tetris, and is a Tetris(R) \
     
    1719  experience.
    1820
    1921homepage            http://fph.altervista.org/prog/bastet.shtml
    20 master_sites        http://fph.altervista.org/prog/files/
    21 checksums           md5 48379dc98916ba083e9be5544f552a06
    22 extract.suffix      .tgz
    23 patchfiles          patch-Makefile.diff
    2422
    25 depends_lib-append port:ncurses
     23checksums           rmd160  a9970700ab568ce44f9fd67817653b84157d6fb5 \
     24                    sha256  a88834022d5f17750cc7dcb1eac7b19c0cb30fe8c3e749ada1094e2bde6f0181
    2625
    27 use_configure       no
     26depends_lib-append  port:boost \
     27                    port:ncurses
    2828
    29 build.args          PREFIX=${prefix}
    30 
    3129post-patch {
    32   reinplace "s|termio\.h|termios.h|" ${worksrcpath}/bast.c
     30    reinplace "s|/var/games|${prefix}/var/games|g" ${worksrcpath}/bastet.6 ${worksrcpath}/Config.cpp
    3331}
    3432
     33use_configure       no
     34
     35variant universal {}
     36
     37build.env           CXX=${configure.cxx} \
     38                    CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
     39                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
     40
     41set scoredir        ${prefix}/var/games/bastet
     42set scorefile       ${scoredir}/bastet.scores2
     43
     44destroot.keepdirs   ${scoredir}
     45
    3546destroot {
    3647  xinstall -m 755 ${worksrcpath}/bastet ${destroot}${prefix}/bin/
    37   xinstall -m 755 -d ${destroot}${prefix}/var/games/bastet \
    38     ${destroot}${prefix}/share/doc/${name}
    39   xinstall -m 666 ${filespath}/bastet.scores \
    40     ${destroot}${prefix}/var/games/bastet/
    41   xinstall -m 644 -W ${worksrcpath} AUTHORS BUGS COPYING NEWS README \
    42     README-Petris TODO ${destroot}${prefix}/share/doc/${name}
     48    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
     49    xinstall -m 644 -W ${worksrcpath} AUTHORS LICENSE NEWS README \
     50        ${destroot}${prefix}/share/doc/${subport}
    4351}
    4452
    45 livecheck.type  regex
    46 livecheck.url   ${homepage}
    47 livecheck.regex {version (\d+\.\d+)}
     53post-activate {
     54    if {![file exists ${scorefile}]} {
     55        touch ${scorefile}
     56        file attributes ${scorefile} -permissions 666
     57    }
     58}