source: trunk/dports/games/nethack/Portfile

Last change on this file was 139526, checked in by ryandesign@…, 2 years ago

nethack: add ncurses dependency and revbump for ncurses 6 (#48633)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
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.4.3
8revision            4
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}-343-src
19extract.suffix      .tgz
20checksums           ${distfiles} md5 21479c95990eefe7650df582426457f9 \
21                    ${distfiles} sha1 c26537093c38152bc0fbcec20468d975b35f59fd \
22                    ${distfiles} rmd160 42f600d24715a0b7e631b357c135761410b3ca95
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
83variant autopickup_exceptions description { Automatically pick up things onto which you move } {
84    patchfiles-append patch-include__config.h.diff
85}
86
87#variant paranoid {
88#        patch_sites-append http://www.netsonic.fi/~walker/nh/
89#        patchfiles-append paranoid-343.diff
90#        checksums-append paranoid-343.diff md5 ade00f9cb51f1b0140557d329d56844c
91#}
92
93#variant deathexplore {
94#        patch_sites-append http://www.netsonic.fi/~walker/nh/
95#        patchfiles-append dthexp-343.diff
96#        checksums-append dthexp-343.diff md5 ade00f9cb51f1b0140557d329d56844c
97#}
98
99#variant sortloot {
100#        patch_sites-append http://www.netsonic.fi/~walker/nh/
101#        patchfiles-append sortloot-343.diff
102#        checksums-append sortloot-343.diff md5 ade00f9cb51f1b0140557d329d56844c
103#}
104
105variant menucolors description { Allows the user to define in what color menus are shown } {
106    patch_sites-append http://bilious.alt.org/~paxed/nethack
107    patchfiles-append nh343-menucolor.diff
108    checksums-append nh343-menucolor.diff md5 ade00f9cb51f1b0140557d329d56844c
109    build.args-delete CFLAGS="-O2 -I../include"
110    build.args-append CFLAGS="-O2 -I../include -DMENU_COLOR_REGEX_POSIX"
111}
Note: See TracBrowser for help on using the repository browser.