Ticket #53325: Portfile

File Portfile, 3.7 KB (added by kencu (Ken), 8 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
3PortSystem              1.0
4PortGroup               cmake 1.0
5
6name                    hedgewars
7version                 0.9.22
8categories              games
9platforms               darwin
10license                 GPL-2
11maintainers             gmail:ken.cunningham.webuse openmaintainer
12
13description             Funny turn-based artillery game, featuring fighting Hedgehogs!
14long_description        ${description}
15homepage                https://www.hedgewars.org/
16
17master_sites            http://download.gna.org/${name}/
18use_bzip2               yes
19distfiles               ${name}-src-${version}
20worksrcdir              ${name}-src-${version}
21
22checksums               md5     3718947ea69f57a76a3511678fb8173b \
23                        sha1    53c2530df88c11297f3c1f6fc85a45f317644fe2 \
24                        rmd160  359fd026643e69446121b94ba301646812353c19
25
26cmake.out_of_source     yes
27
28depends_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                   
41depends_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
54configure.args-append   -DNOAUTOUPDATE=1
55
56# don't add all of the macports support libraries into the app bundle
57configure.args-append   -DSKIPBUNDLE:BOOL=ON
58
59configure.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
62patchfiles-append       patch-0001-avwrapper-avframealloc-fix.diff
63patchfiles-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
66patchfiles-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
71patchfiles-append       patch-0004-remove-hardcoded-stdlib-and-iokit-QTfrontend.diff
72if { ${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
80patchfiles-append       patch-0005-remove-haskell-spec-constr.diff
81
82# use the pas2c converter to compile the pascal portions rather than fpc
83configure.args-append   -DBUILD_ENGINE_C:BOOL=ON
84
85post-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 }