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 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup cmake 1.0 |
---|
6 | |
---|
7 | name widelands |
---|
8 | version build17 |
---|
9 | revision 3 |
---|
10 | categories games |
---|
11 | platforms darwin |
---|
12 | maintainers nomaintainer |
---|
13 | license GPL-2+ |
---|
14 | |
---|
15 | description open-source real-time strategy game inspired by Settlers |
---|
16 | |
---|
17 | long_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 | |
---|
24 | homepage http://wl.widelands.org/ |
---|
25 | master_sites https://launchpad.net/${name}/${version}/build-17/+download/ |
---|
26 | |
---|
27 | use_bzip2 yes |
---|
28 | distfiles [suffix ${distname}-src] |
---|
29 | worksrcdir ${distname}-src/build |
---|
30 | |
---|
31 | checksums rmd160 4ea81d21d3b3e02fc22194d1a39e8c08e05aaa44 \ |
---|
32 | sha256 be48b3b8f342a537b39a3aec2f7702250a6a47e427188ba3bece67d7d90f3cc5 |
---|
33 | |
---|
34 | depends_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 |
---|
45 | if {${configure.compiler} == "clang"} { |
---|
46 | configure.compiler llvm-gcc-4.2 |
---|
47 | } |
---|
48 | |
---|
49 | if {${configure.compiler} == "gcc-4.0"} { |
---|
50 | configure.compiler gcc-4.2 |
---|
51 | } |
---|
52 | |
---|
53 | configure.args ../ \ |
---|
54 | -DCMAKE_INSTALL_PREFIX:PATH="${applications_dir}/Widelands.app/Contents/MacOS" |
---|
55 | |
---|
56 | pre-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 | } |
---|