Ticket #51251: NetHack 3.6.0 Portfile.tcl

File NetHack 3.6.0 Portfile.tcl, 3.2 KB (added by MaddTheSane (C.W. Betts), 9 years ago)

Initial attempt of updating the portfile for NetHack 3.6.0

Line 
1# -*- 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
2# $Id: Portfile 139526 2015-08-19 20:45:46Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                nethack
7version             3.6.0
8revision            1
9categories          games
10maintainers         nomaintainer
11description         Classic dungeon adventure game.
12long_description    ${description}
13homepage            http://nethack.sourceforge.net/
14platforms           darwin freebsd
15license             Copyleft
16
17master_sites        sourceforge
18distname            ${name}-360-src
19extract.suffix      .tgz
20checksums           ${distfiles} md5 d42147b26e5fb4746fb72536ce145984 \
21                    ${distfiles} sha1 a94aebcca367954595747ac468d095f12fbf993a \
22                    ${distfiles} rmd160 2500e4d53682757b39883789281e4ae3395acb91
23
24depends_lib         port:ncurses
25
26worksrcdir          ${name}-${version}
27
28patch.args          -p1
29patchfiles          patch-sys__unix__Makefile.doc.diff \
30                    patch-sys__unix__Makefile.src.diff \
31                    patch-sys__unix__Makefile.top.diff \
32                    patch-win__tty__termcap.c.diff
33
34post-patch {
35    reinplace "s|__PREFIX__|${prefix}|" \
36        "${worksrcpath}/sys/unix/Makefile.doc" \
37        "${worksrcpath}/sys/unix/Makefile.top"
38}
39
40configure.dir       ${worksrcpath}/sys/unix
41configure.cmd       /bin/sh
42configure.pre_args  setup.sh
43
44build.args-append   CC=${configure.cc} \
45                    CXX=${configure.cxx} \
46                    CPP=${configure.cpp} \
47                    CFLAGS="-O2 -I../include"
48
49pre-destroot {
50    file mkdir "${destroot}${prefix}/share/man/man6"
51    file mkdir "${destroot}${prefix}/share/nethackdir/save"
52}
53
54destroot.target     install manpages
55destroot.keepdirs   "${destroot}${prefix}/share/nethackdir/save/"
56
57post-destroot {
58    reinplace "s|${destroot}||" "${destroot}${prefix}/bin/nethack"
59
60    # Don't overwrite existing preference files
61    foreach f { logfile record } {
62        file rename ${destroot}${prefix}/share/nethackdir/${f} ${destroot}${prefix}/share/nethackdir/${f}.dist
63    }
64}
65
66post-activate {
67    # Make sure initial preference files exist
68    foreach f { logfile record } {
69        if {![file exists ${prefix}/share/nethackdir/${f}]} {
70            file copy ${prefix}/share/nethackdir/${f}.dist ${prefix}/share/nethackdir/${f}
71        }
72    }
73}
74
75variant x11 {
76    patchfiles-append \
77        x11/patch-include__config.h.diff \
78        x11/patch-sys__unix__Makefile.src.diff \
79        x11/patch-sys__unix__Makefile.top.diff
80    depends_lib-append port:xorg-libXaw
81}
82
83#variant paranoid {
84#        patch_sites-append http://www.netsonic.fi/~walker/nh/
85#        patchfiles-append paranoid-343.diff
86#        checksums-append paranoid-343.diff md5 ade00f9cb51f1b0140557d329d56844c
87#}
88
89#variant deathexplore {
90#        patch_sites-append http://www.netsonic.fi/~walker/nh/
91#        patchfiles-append dthexp-343.diff
92#        checksums-append dthexp-343.diff md5 ade00f9cb51f1b0140557d329d56844c
93#}
94
95#variant sortloot {
96#        patch_sites-append http://www.netsonic.fi/~walker/nh/
97#        patchfiles-append sortloot-343.diff
98#        checksums-append sortloot-343.diff md5 ade00f9cb51f1b0140557d329d56844c
99#}
100