source: trunk/dports/games/jnethack/Portfile

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

jnethack: remove maintainer (#48059)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# $Id: Portfile 139525 2015-08-19 20:42:04Z ryandesign@macports.org $
2
3PortSystem      1.0
4
5name            jnethack
6set ver_main    3.4.3
7set ver_patch   0.11
8version         ${ver_main}-${ver_patch}
9revision        1
10categories      games japanese
11maintainers     nomaintainer
12description     Classic dungeon adventure game, translated in Japanese.
13long_description \
14                ${description}
15platforms       darwin
16license         nethack
17homepage        http://jnethack.sourceforge.jp/
18master_sites    sourceforge_jp:${name}/9091/:nh \
19                sourceforge_jp:${name}/58545/:jnh
20set nethacksrc      "nethack-[string map {"." ""} ${ver_main}]-src.tgz"
21set jnethackpatch   "${name}-${version}.diff.gz"
22distfiles       ${nethacksrc}:nh \
23                ${jnethackpatch}:jnh
24patchfiles      patch-sys_unix_Makefile.doc.diff \
25                patch-sys_unix_Makefile.src.diff \
26                patch-sys_unix_Makefile.top.diff \
27                patch-sys_unix_Makefile.utl.diff \
28                patch-sys_unix_nethack.sh.diff \
29                patch-win_tty_termcap.c.diff \
30                patch-src_options.c.diff
31checksums       ${nethacksrc} sha1 c26537093c38152bc0fbcec20468d975b35f59fd \
32                ${jnethackpatch}  sha1 ee138602035c0f5587a24b2567135c836ad65395
33
34depends_lib     port:ncurses \
35                port:xorg-libX11
36depends_build   port:bison \
37                port:flex
38depends_run     port:cocot
39
40## extract ##
41
42extract.only    ${nethacksrc}
43worksrcdir      nethack-${ver_main}
44post-extract {
45    system "cd ${worksrcpath} && gunzip -dc ${distpath}/${jnethackpatch} | patch -p 1"
46}
47
48## patch ##
49
50pre-patch {
51    if {[variant_isset x11]} {
52        patchfiles-append x11/patch-include_config.h.diff \
53                          x11/patch-sys_unix_Makefile.top.diff \
54                          x11/patch-sys_unix_Makefile.src.diff \
55                          x11/patch-win_X11_JNetHack.ad.diff
56    }
57}
58
59post-patch {
60    set jn_cflags "${configure.cflags} ${configure.cppflags}"
61    set jn_ldflags ${configure.ldflags}
62
63    if {[variant_isset universal]} {
64        set jn_cflags "${jn_cflags} ${configure.universal_cflags}"
65    }
66
67    foreach f {sys/unix/Makefile.doc
68               sys/unix/Makefile.src
69               sys/unix/Makefile.top
70               sys/unix/Makefile.utl
71               sys/unix/nethack.sh} {
72        reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/${f}
73        reinplace "s|__CFLAGS__|${jn_cflags}|" ${worksrcpath}/${f}
74        reinplace "s|__LDFLAGS__|${jn_ldflags}|" ${worksrcpath}/${f}
75    }
76}
77
78## configure ##
79
80configure.dir       ${worksrcpath}/sys/unix
81configure.cmd       /bin/sh
82configure.pre_args  setup.sh
83
84## build ##
85
86use_parallel_build  no
87build.env-append    CC=${configure.cc}
88
89## destroot ##
90
91pre-destroot {
92    addgroup games
93    adduser games gid=[existsgroup games]
94}
95
96destroot.target     install manpages
97destroot.keepdirs   "${destroot}${prefix}/share/jnethackdir/save/"
98
99post-destroot {
100    reinplace "s|${destroot}||" "${destroot}${prefix}/bin/jnethack"
101    if {[variant_isset x11]} {
102        copy ${worksrcpath}/win/X11/JNetHack.ad ${destroot}${prefix}/share/jnethackdir/
103    }
104}
105
106## install ##
107
108pre-install {
109    addgroup games
110    adduser games gid=[existsgroup games]
111}
112
113## variants ##
114
115variant x11 {
116    depends_lib-append  port:xorg-libXaw \
117                        port:xorg-libXmu \
118                        port:xorg-libXext \
119                        port:xorg-libXt \
120                        port:xpm
121#                       port:xorg-libX11
122}
123
124variant universal {}
125
126livecheck.type  regex
127livecheck.url   ${homepage}
128livecheck.regex <li>\\(\[0-9/\]+\\) (\[0-9.-\]+)
Note: See TracBrowser for help on using the repository browser.