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 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup cmake 1.0 |
---|
5 | |
---|
6 | name hedgewars |
---|
7 | version 0.9.22 |
---|
8 | categories games |
---|
9 | platforms darwin |
---|
10 | license GPL-2 |
---|
11 | maintainers gmail:ken.cunningham.webuse openmaintainer |
---|
12 | |
---|
13 | description Funny turn-based artillery game, featuring fighting Hedgehogs! |
---|
14 | long_description ${description} |
---|
15 | homepage https://www.hedgewars.org/ |
---|
16 | |
---|
17 | master_sites http://download.gna.org/${name}/ |
---|
18 | use_bzip2 yes |
---|
19 | distfiles ${name}-src-${version} |
---|
20 | worksrcdir ${name}-src-${version} |
---|
21 | |
---|
22 | checksums md5 3718947ea69f57a76a3511678fb8173b \ |
---|
23 | sha1 53c2530df88c11297f3c1f6fc85a45f317644fe2 \ |
---|
24 | rmd160 359fd026643e69446121b94ba301646812353c19 |
---|
25 | |
---|
26 | cmake.out_of_source yes |
---|
27 | |
---|
28 | depends_build-append port:pkgconfig \ |
---|
29 | port:ghc \ |
---|
30 | port:hs-vector \ |
---|
31 | port:hs-bytestring-show \ |
---|
32 | port:hs-network \ |
---|
33 | port:hs-dataenc \ |
---|
34 | port:hs-hslogger \ |
---|
35 | port:hs-utf8-string \ |
---|
36 | port:hs-sha \ |
---|
37 | port:hs-entropy \ |
---|
38 | port:hs-zlib \ |
---|
39 | port:hs-random |
---|
40 | |
---|
41 | depends_lib-append port:ffmpeg \ |
---|
42 | port:libogg \ |
---|
43 | port:libsdl \ |
---|
44 | port:libsdl_image \ |
---|
45 | port:libsdl_ttf \ |
---|
46 | port:libsdl_mixer \ |
---|
47 | port:libsdl_net \ |
---|
48 | port:zlib \ |
---|
49 | port:libpng \ |
---|
50 | port:glew \ |
---|
51 | port:qt4-mac |
---|
52 | |
---|
53 | # don't use the sparkle selfupdate mechanism; use macports update process instead |
---|
54 | configure.args-append -DNOAUTOUPDATE=1 |
---|
55 | |
---|
56 | # don't add all of the macports support libraries into the app bundle |
---|
57 | configure.args-append -DSKIPBUNDLE:BOOL=ON |
---|
58 | |
---|
59 | configure.args-append -DQT_QMAKE_EXECUTABLE:FILEPATH=${prefix}/libexec/qt4/bin/qmake |
---|
60 | |
---|
61 | # update two source files to enable building against the current ffmpeg variable and procedure names |
---|
62 | patchfiles-append patch-0001-avwrapper-avframealloc-fix.diff |
---|
63 | patchfiles-append patch-0002-LibavInteraction-fix.diff |
---|
64 | |
---|
65 | # replace the hard-coded link to libstdc++ in the hwc engine build script with proper link flags |
---|
66 | patchfiles-append patch-0003-proj-hwc-CMakeLists-proper-link-flags.diff |
---|
67 | |
---|
68 | # remove the hard-coded link to libstdc++ in QTfrontend cmake build script, and add in link to correct stdlib |
---|
69 | # oddly it requires this link flag to be -lc++ or -lstdc++ -- setting -stdlib=libc++ or -stdlib=libstdc++ |
---|
70 | # did not generate a proper link. Admittedly this is not standard, but works correctly on all tested systems |
---|
71 | patchfiles-append patch-0004-remove-hardcoded-stdlib-and-iokit-QTfrontend.diff |
---|
72 | if { ${cxx_stdlib} eq "libc++"} { |
---|
73 | configure.ldflags-append -lc++ |
---|
74 | } else { |
---|
75 | configure.ldflags-append -lstdc++ |
---|
76 | } |
---|
77 | |
---|
78 | # lan server build fails unless this haskell optimization flag is disabled |
---|
79 | # probably due to excessive recursion |
---|
80 | patchfiles-append patch-0005-remove-haskell-spec-constr.diff |
---|
81 | |
---|
82 | # use the pas2c converter to compile the pascal portions rather than fpc |
---|
83 | configure.args-append -DBUILD_ENGINE_C:BOOL=ON |
---|
84 | |
---|
85 | post-destroot { |
---|
86 | move ${destroot}${workpath}/build/Hedgewars.app ${destroot}${applications_dir}/Hedgewars.app |
---|
87 | move ${worksrcpath}/man/hedgewars.6 ${destroot}${prefix}/share/man/man6/hedgewars.6 |
---|
88 | } |
---|