source: trunk/dports/games/rrgbis/Portfile

Last change on this file was 114119, checked in by jmr@…, 4 years ago

libsdl dependents: use port: depspec - there's now only one port that provides sdl.pc, and most of these never worked with libsdl-devel in the first place

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1# $Id: Portfile 114119 2013-11-29 22:31:11Z ryandesign@macports.org $
2
3PortSystem          1.0
4
5name                rrgbis
6version             1.12
7revision            1
8set data_version    1.11
9categories          games
10platforms           darwin
11maintainers         nomaintainer
12description         Real time strategy game with fleets of spaceships.
13long_description    ${description}
14
15homepage            http://rrgbis.sourceforge.net/
16master_sites        sourceforge:project/${name}/${name}/${version}:source \
17                    sourceforge:project/${name}/${name}/${data_version}:data
18use_bzip2           yes
19set source          rrgbis-${version}-src${extract.suffix}
20set data            rrgbis-${data_version}-data${extract.suffix}
21distfiles           ${source}:source \
22                    ${data}:data
23checksums           ${source} \
24                        md5 14396c77f2b68cf2e5104174c135f4e4 \
25                        sha1 aa48440907f82fdb99f564fba69084146b9fae59 \
26                        rmd160 ec7d2f15086125d437179a53e552fd03f16c4539 \
27                    ${data} \
28                        md5 abd55dc67686ac99e96f9db2e59b5981 \
29                        sha1 bbfb809982f3c1a9d39d1685f23bd2e6b9b5599e \
30                        rmd160 65d9eca5be7c67d3e3c48bf90fb4a5a17f2bada4
31worksrcdir          ${name}
32
33depends_lib         port:freetype \
34                    port:libsdl \
35                    port:libsdl_image \
36                    port:libsdl_mixer \
37                    port:libvorbis
38
39patchfiles          patch-src_GLSDL.cpp.diff \
40                    patch-Makefile.diff
41
42pre-patch {
43    # Convert files from DOS to UNIX linefeeds before patching.
44    reinplace "s/\r$//g" ${worksrcpath}/Makefile
45}
46post-patch {
47    # Set the correct path to the installed rrgbis data in the settings file.
48    reinplace "s|pwd|${prefix}/share/rrgbis/|g" ${worksrcpath}/settings.dat
49}
50
51configure.dir       ${worksrcpath}/src/FTGL
52
53build.target        default
54
55destroot {
56    # Install the helper script which automatically sets the correct
57    # LD_LIBRARY_PATH variable and set the right ${prefix} path.
58    xinstall ${portpath}/${filesdir}/rrgbis ${destroot}${prefix}/bin
59    reinplace "s|__PREFIX__|${prefix}|g" ${destroot}${prefix}/bin/rrgbis
60
61    # Install the helper setup script which creates ~/.rrgbis and the
62    # settings.dat file in it.
63    xinstall ${portpath}/${filesdir}/rrgbis-setup ${destroot}${prefix}/bin
64    reinplace "s|__PREFIX__|${prefix}|g" ${destroot}${prefix}/bin/rrgbis-setup
65
66    # Install the real binary and rename it to rrgbis-bin.
67    copy ${worksrcpath}/rrgbis ${destroot}${prefix}/bin/rrgbis-bin
68
69    # Create the directory for the rrgbis data.
70    xinstall -d ${destroot}${prefix}/share/rrgbis
71    # Copy all data files and directories to ${destroot}.
72    set files {aiscripts fonts images missions music settings.dat sound \
73               squirrelscripts unitdata unitpictures}
74    foreach file $files {
75        move ${worksrcpath}/${file} ${destroot}${prefix}/share/rrgbis/${file}
76    }
77}
78
79post-install {
80    ui_msg "****************************************************************"
81    ui_msg "*                                                              *"
82    ui_msg "* Before you run rrgbis for the first time, you must run       *"
83    ui_msg "* rrgbis-setup to set up the default configuration.            *"
84    ui_msg "*                                                              *"
85    ui_msg "* This script is provided by MacPorts and not part of the      *"
86    ui_msg "* official distribution! If there are any problems with it     *"
87    ui_msg "* contact the port maintainer.                                 *"
88    ui_msg "*                                                              *"
89    ui_msg "****************************************************************"
90}
Note: See TracBrowser for help on using the repository browser.