source: trunk/dports/games/jnethack/Portfile @ 19227

Last change on this file since 19227 was 19227, checked in by takanori, 13 years ago

New port: jnethack
Bug: 10513
Submitted by: kyut@…
Reviewed by: takanori@

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1# $Id: Portfile,v 1.1 2006/08/22 19:58:07 takanori Exp $
2PortSystem        1.0
3name              jnethack
4version           3.4.3-0.8
5revision          4
6categories        games japanese
7maintainers       kyut@rutiler.net
8description       Classic dungeon adventure game, translated in Japanese.
9long_description  ${description}
10homepage          http://jnethack.sourceforge.jp/
11platforms         darwin
12
13set nethacksrc    "nethack-343-src.tgz"
14set jnethackpatch "${name}-${version}.diff.gz"
15set sfj           "http://dl.sourceforge.jp/jnethack"
16
17master_sites      ${sfj}/9091/:nh \
18                  ${sfj}/19600/:jnh
19distfiles         ${nethacksrc}:nh \
20                  ${jnethackpatch}:jnh
21checksums         ${nethacksrc} sha1 c26537093c38152bc0fbcec20468d975b35f59fd \
22                  ${jnethackpatch}  sha1 e25e9d354f546394a80a451bb262c6e3d55e8858
23patchfiles        patch-sys__unix__Makefile.doc \
24                  patch-sys__unix__Makefile.top \
25                  patch-sys__unix__nethack.sh \
26                  patch-win__tty__termcap.c \
27                  patch-src__options.c
28
29depends_build     port:bison \
30                  port:flex
31depends_run       port:nkf
32
33livecheck.check   regex
34livecheck.url     ${homepage}
35livecheck.regex   <li>\\(\[0-9/\]+\\) (\[0-9.-\]+)
36
37extract.only      ${nethacksrc}
38worksrcdir        nethack-3.4.3
39
40## extract ##
41
42post-extract {
43        system "cd ${worksrcpath} && gunzip -dc ${distpath}/${jnethackpatch} | patch -p 1" 
44}
45
46## patch ##
47
48post-patch {
49        reinplace "s|__PREFIX__|${prefix}|" \
50    "${worksrcpath}/sys/unix/Makefile.doc" \
51    "${worksrcpath}/sys/unix/Makefile.top"
52}
53
54## configure ##
55
56configure.dir ${worksrcpath}/sys/unix
57configure.cmd   /bin/sh
58configure.pre_args setup.sh
59
60## destroot ##
61
62pre-destroot {
63        addgroup games
64        adduser games gid=[existsgroup games]
65
66        file mkdir "${destroot}${prefix}/share/man/man6"
67        file mkdir "${destroot}${prefix}/share/jnethackdir/save"
68}
69
70destroot.target install manpages
71destroot.keepdirs "${destroot}${prefix}/share/jnethackdir/save/"
72
73post-destroot {
74        reinplace "s|${destroot}||" "${destroot}${prefix}/bin/jnethack"
75  if {[variant_isset x11]} {
76    file copy ${worksrcpath}/win/X11/JNetHack.ad ${destroot}${prefix}/share/jnethackdir/
77  }
78}
79
80## install ##
81
82pre-install {
83        addgroup games
84        adduser games gid=[existsgroup games]
85}
86
87## variants ##
88
89variant x11 {
90  patchfiles-append \
91    x11/patch-include__config.h \
92    x11/patch-sys__unix__Makefile.top \
93    x11/patch-sys__unix__Makefile.src \
94    x11/patch-win__X11__JNetHack.ad
95}
96
Note: See TracBrowser for help on using the repository browser.