source: trunk/dports/games/fortune/Portfile @ 31206

Last change on this file since 31206 was 31206, checked in by afb@…, 13 years ago

fix building on leopard, and probably panther too (#13020)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1# $Id: Portfile 31206 2007-11-18 10:13:34Z afb@macports.org $
2
3PortSystem 1.0
4
5name                    fortune
6version                 6.2.0-RELEASE
7categories              games
8maintainers             afb@macports.org openmaintainer
9description             Infamous electronic fortune-cookie generator
10long_description        ${description}
11platforms               darwin freebsd
12homepage                http://www.freebsd.org/
13use_bzip2               yes
14
15master_sites    macports
16
17checksums               md5 6185fe31e512e8b23ac5cc58ede27919 \
18
19extract.only    ${name}-${version}.tar.bz2
20worksrcdir              ${name}
21dist_subdir             ${name}
22
23patchfiles      \
24                patch-fortune-Makefile patch-strfile-Makefile \
25                patch-unstr-Makefile patch-datfiles-Makefile \
26                patch-strfile.h
27
28configure {
29        reinplace "s|/usr|${prefix}|" ${worksrcpath}/fortune/pathnames.h
30        reinplace "s|/usr/share|${prefix}/share|" ${worksrcpath}/fortune/fortune.6
31        reinplace "s|/usr/games/fortune|${prefix}/bin/fortune|" ${worksrcpath}/fortune/fortune.6
32        reinplace "s|XXPREFIX|${prefix}|" ${worksrcpath}/fortune/Makefile
33}
34
35build.type              bsd
36
37set datfiles "fortunes fortunes.dat fortunes-o fortunes-o.dat \
38                fortunes2-o fortunes2-o.dat limerick \
39                limerick.dat murphy murphy.dat murphy-o murphy-o.dat \
40                startrek startrek.dat zippy zippy.dat"
41
42destroot {
43        xinstall -m 755 -d ${destroot}${prefix}/share/games/fortune
44        xinstall -m 755 ${worksrcpath}/fortune/fortune \
45                ${worksrcpath}/strfile/strfile ${worksrcpath}/unstr/unstr \
46                ${destroot}${prefix}/bin
47        xinstall -m 644 ${worksrcpath}/fortune/fortune.6.gz \
48                ${destroot}${prefix}/share/man/man6
49        xinstall -m 644 ${worksrcpath}/strfile/strfile.8.gz \
50                ${destroot}${prefix}/share/man/man8
51        xinstall -m 644 ${worksrcpath}/strfile/strfile.8.gz \
52                ${destroot}${prefix}/share/man/man8/unstr.8.gz
53       
54        foreach datfile $datfiles {
55                file copy ${worksrcpath}/datfiles/${datfile} \
56                        ${destroot}/${prefix}/share/games/fortune
57        }
58}
59
60platform darwin {
61        patchfiles-append patch-fortune.c patch-strfile.c patch-unstr.c
62}
Note: See TracBrowser for help on using the repository browser.