Ticket #34001: Portfile.3

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