Ticket #37237: Portfile

File Portfile, 3.0 KB (added by gilles.risch@…, 12 years ago)

small workaround

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 96356 2012-08-07 23:03:55Z jmr@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6
7name                widelands
8version             build17
9revision            3
10categories          games
11platforms           darwin
12maintainers         nomaintainer
13license             GPL-2+
14
15description         open-source real-time strategy game inspired by Settlers
16
17long_description    Widelands is an open-source real-time strategy game. It \
18                    is built upon the SDL and other open source libraries and \
19                    is (and will always be) under heavy development. If you \
20                    knew Settlers I & II (© Bluebyte), then you already have \
21                    a rough idea what Widelands is all about because \
22                    widelands is heavily inspired by those two games.
23
24homepage            http://wl.widelands.org/
25master_sites        https://launchpad.net/${name}/${version}/build-17/+download/
26
27use_bzip2           yes
28distfiles           [suffix ${distname}-src]
29worksrcdir          ${distname}-src/build
30
31checksums           rmd160  4ea81d21d3b3e02fc22194d1a39e8c08e05aaa44 \
32                    sha256  be48b3b8f342a537b39a3aec2f7702250a6a47e427188ba3bece67d7d90f3cc5
33
34depends_lib         port:libsdl \
35                    port:libsdl_image \
36                    port:libsdl_mixer \
37                    port:libsdl_net \
38                    port:libsdl_ttf \
39                    port:libsdl_gfx \
40                    port:boost \
41                    port:glew \
42                    port:lua
43
44# https://bugs.launchpad.net/widelands/+bug/744595
45if {${configure.compiler} == "clang"} {
46    configure.compiler llvm-gcc-4.2
47}
48
49if {${configure.compiler} == "gcc-4.0"} {
50    configure.compiler gcc-4.2
51}
52
53configure.args      ../ \
54                    -DCMAKE_INSTALL_PREFIX:PATH="${applications_dir}/Widelands.app/Contents/MacOS"
55
56pre-destroot {
57    xinstall -d ${destroot}${applications_dir}/Widelands.app/Contents/Resources \
58                ${destroot}${applications_dir}/Widelands.app/MacOS
59    file copy ${worksrcpath}/../pics/widelands.icns ${destroot}${applications_dir}/Widelands.app/Contents/Resources/widelands.icns
60    set data    " {\n\
61                CFBundleName = widelands;\n\
62                CFBundleDisplayName = Widelands;\n\
63                CFBundleIdentifier = \"org.widelands.wl\";\n\
64                CFBundleVersion = ${version};\n\
65                \"CFBundleInfoDictionaryVersion\" = \"6.0\";\n\
66                CFBundlePackageType = APPL;\n\
67                CFBundleSignature = \"????\";\n\
68                CFBundleExecutable = widelands;\n\
69                CFBundleIconFile = \"widelands.icns\";\n\
70                }"
71    set filename "${destroot}${applications_dir}/Widelands.app/Contents/Info.plist"
72    set fileId [open $filename "w"]
73    puts -nonewline $fileId $data
74    close $fileId
75}