source: trunk/dports/games/boswars/Portfile

Last change on this file was 123090, checked in by jmr@…, 3 years ago

boswars: correct license

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.3 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 123090 2014-08-05 04:34:43Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                boswars
7version             2.7
8categories          games
9platforms           darwin
10maintainers         nomaintainer
11license             GPL-2
12
13description         Bos Wars is a futuristic real time strategy game.
14long_description    Bos Wars is a futuristic real time strategy game (RTS). \
15                    Bos Wars has a dynamic rate based economy. Energy is \
16                    produced by power plants and magma gets pumped from hot \
17                    spots. Buildings and mobile units are also built at a \
18                    continuous rate. Control of larger parts of the map \
19                    creates the potential to increase your economy \
20                    throughput. Holding key points like roads and passages \
21                    allow for different strategies.
22
23homepage            http://boswars.org/
24master_sites        ${homepage}dist/releases:boswars \
25                    http://dev.gentoo.org/~hasufell/distfiles:images
26
27set imagefile       boswars-${version}-fixed-images-for-libpng-1.6.tar.xz
28                   
29distname            ${name}-${version}-src
30distfiles           ${distname}${extract.suffix}:boswars \
31                    ${imagefile}:images
32
33checksums           ${distname}${extract.suffix} \
34                    rmd160  8a22afb974452d5290e4023f801752b8f2defe04 \
35                    sha256  dc3718f531e9ea413cf37e1333b62a4c5e69f1405502d9c59b9e424635135e3e \
36                    ${imagefile} \
37                    rmd160  4354ab05348d2827ec17eeac472b03e854bcdaa7 \
38                    sha256  87f3ee7f4045c3acfacd884348a2b376e710b42aa0f40acbc212732d0bee9a24
39
40depends_extract-append port:xz
41
42depends_build       port:pkgconfig \
43                    port:scons
44
45depends_lib         port:libogg \
46                    port:libpng \
47                    port:libsdl \
48                    port:libtheora \
49                    port:libvorbis \
50                    port:lua51 \
51                    port:zlib
52
53license_noconflict  scons
54
55extract.only        ${distname}${extract.suffix}
56
57# image files shipped with boswar are built with libpng15
58# replace with fixed images built with libpng16
59
60post-extract {
61    system "cd ${worksrcpath} && \
62            ${prefix}/bin/xz -dc '${prefix}/var/macports/distfiles/${name}/${imagefile}' | ${portutil::autoconf::tar_command} --strip-components 1 -xf -"
63}
64
65pre-patch {
66    xinstall ${portpath}/${filesdir}/build_options.py ${worksrcpath}
67}
68
69patchfiles          patch-SConstruct.diff \
70                    patch-engine_video_graphic.cpp.diff
71
72post-patch {
73    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/build_options.py
74    reinplace "s|__CC__|${configure.cc}|g" ${worksrcpath}/build_options.py
75    reinplace "s|__CXX__|${configure.cxx}|g" ${worksrcpath}/build_options.py
76}
77
78use_configure       no
79universal_variant   no
80
81build.cmd           ${prefix}/bin/scons
82build.target
83
84destroot {
85    # Path to the boswars resource directory ${prefix}/share/boswars.
86    set share ${prefix}/share/boswars
87
88    # Rename the boswars binary to boswars-bin and install it in destroot so a
89    # helper script can be used which automatically sets the path to the
90    # boswars files.
91    move ${worksrcpath}/build/boswars-release ${destroot}${prefix}/bin/boswars-bin
92    # Copy the helper script to ${prefix}/bin.
93    xinstall ${portpath}/${filesdir}/boswars ${destroot}${prefix}/bin
94    # Set the correct path to the boswars files in the boswars helper script.
95    reinplace "s|__BOSWARS__|${share}|g" ${destroot}${prefix}/bin/boswars
96
97    # Create the resource directory in destroot.
98    xinstall -d ${destroot}${share}
99    # Install the boswar files into ${prefix}/share/boswars:
100    set files {campaigns doc graphics intro languages maps scripts sounds \
101               units}
102    foreach file $files {
103        move ${worksrcpath}/$file ${destroot}${share}/${file}
104    }
105}
106
107notes "
108Attention! Changing display mode to OpenGL in the settings\
109menu may not work and cause an application crash! If this\
110happens remove ~/Library/boswars/preferences.lua to reset\
111the setting.
112"
113
114livecheck.type      regex
115livecheck.url       ${homepage}download.shtml
116livecheck.regex     ${name}-(\[0-9.\]+)-src${extract.suffix}
Note: See TracBrowser for help on using the repository browser.