source: trunk/dports/games/bastet/Portfile

Last change on this file was 142449, checked in by ryandesign@…, 19 months ago

bastet: update to latest upstream commit; fix permissions of global scores file

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
2# $Id: Portfile 142449 2015-11-12 08:30:00Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6
7github.setup        fph bastet 5037e410fde6fafe8e6bc4cf17a12ad98e01c17e
8version             0.43.1
9revision            2
10categories          games
11platforms           darwin
12maintainers         ryandesign openmaintainer
13license             GPL-3+
14
15description         Bastard Tetris is an antagonistic Tetris clone
16long_description \
17  Bastet stands for bastard tetris, and is a Tetris(R) \
18  clone which, instead of choosing your next brick at \
19  random, expressly checks to see which one causes you \
20  the most trouble. Playing Bastet can be a painful \
21  experience.
22
23homepage            http://fph.altervista.org/prog/bastet.shtml
24
25checksums           rmd160  ff411887c8326f120b859db7d52970cb895bf8f1 \
26                    sha256  8dd16613623a3e0086fd2a2c036b47aadf9f96effe1513609d50f956f76a76db
27
28depends_lib-append  port:boost \
29                    port:ncurses
30
31set scoredir        ${prefix}/var/games/${name}
32set scorefile       ${scoredir}/bastet.scores2
33
34post-patch {
35    reinplace "s|/var/games|${scoredir}|g" ${worksrcpath}/bastet.6 ${worksrcpath}/Config.cpp
36}
37
38use_configure       no
39
40variant universal {}
41
42build.env           BOOST_PO=-lboost_program_options-mt \
43                    CXX=${configure.cxx} \
44                    CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
45                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
46
47destroot.keepdirs   ${scoredir}
48
49destroot {
50  xinstall -m 755 ${worksrcpath}/bastet ${destroot}${prefix}/bin/
51
52    set docdir ${prefix}/share/doc/${subport}
53    xinstall -m 755 -d ${destroot}${docdir}
54    xinstall -m 644 -W ${worksrcpath} AUTHORS LICENSE NEWS README \
55        ${destroot}${docdir}
56}
57
58post-activate {
59    if {![file exists ${scorefile}]} {
60        touch ${scorefile}
61        file attributes ${scorefile} -permissions 0666
62    }
63    # Fix incorrect permissions set by previous versions of this port.
64    if {[file attributes ${scorefile} -permissions] == 666} {
65        file attributes ${scorefile} -permissions 0666
66    }
67}
Note: See TracBrowser for help on using the repository browser.