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 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name nethack |
---|
7 | version 3.6.0 |
---|
8 | revision 1 |
---|
9 | categories games |
---|
10 | maintainers nomaintainer |
---|
11 | description Classic dungeon adventure game. |
---|
12 | long_description ${description} |
---|
13 | homepage http://nethack.sourceforge.net/ |
---|
14 | platforms darwin freebsd |
---|
15 | license Copyleft |
---|
16 | |
---|
17 | master_sites sourceforge |
---|
18 | distname ${name}-360-src |
---|
19 | extract.suffix .tgz |
---|
20 | checksums ${distfiles} md5 d42147b26e5fb4746fb72536ce145984 \ |
---|
21 | ${distfiles} sha1 a94aebcca367954595747ac468d095f12fbf993a \ |
---|
22 | ${distfiles} rmd160 2500e4d53682757b39883789281e4ae3395acb91 |
---|
23 | |
---|
24 | depends_lib port:ncurses |
---|
25 | |
---|
26 | worksrcdir ${name}-${version} |
---|
27 | |
---|
28 | patch.args -p1 |
---|
29 | patchfiles 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 | |
---|
34 | post-patch { |
---|
35 | reinplace "s|__PREFIX__|${prefix}|" \ |
---|
36 | "${worksrcpath}/sys/unix/Makefile.doc" \ |
---|
37 | "${worksrcpath}/sys/unix/Makefile.top" |
---|
38 | } |
---|
39 | |
---|
40 | configure.dir ${worksrcpath}/sys/unix |
---|
41 | configure.cmd /bin/sh |
---|
42 | configure.pre_args setup.sh |
---|
43 | |
---|
44 | build.args-append CC=${configure.cc} \ |
---|
45 | CXX=${configure.cxx} \ |
---|
46 | CPP=${configure.cpp} \ |
---|
47 | CFLAGS="-O2 -I../include" |
---|
48 | |
---|
49 | pre-destroot { |
---|
50 | file mkdir "${destroot}${prefix}/share/man/man6" |
---|
51 | file mkdir "${destroot}${prefix}/share/nethackdir/save" |
---|
52 | } |
---|
53 | |
---|
54 | destroot.target install manpages |
---|
55 | destroot.keepdirs "${destroot}${prefix}/share/nethackdir/save/" |
---|
56 | |
---|
57 | post-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 | |
---|
66 | post-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 | |
---|
75 | variant 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 | |
---|