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 115019 2013-12-22 09:29:46Z ryandesign@macports.org $ |
---|
3 | |
---|
4 | # tested on 10.4 PPC, 10.4 Intel, 10.5 Intel, 10.6 with LibCxx upgrade, 10.7, 10.11 |
---|
5 | # hatari command line builds on all systems |
---|
6 | # hatari MacOSX GUI builds on >= 10.6 as NSWindowDelegate is used and is only 10.6 onwards |
---|
7 | # MacOSX GUI does not build with gcc* or llvm-gcc-4.2 |
---|
8 | # winuae works on all with gcc flag modification below. |
---|
9 | # SDL2 works on 10.6, 10.7 and 10.11, and likely all in between, but not 10.5 |
---|
10 | |
---|
11 | PortSystem 1.0 |
---|
12 | PortGroup cmake 1.0 |
---|
13 | |
---|
14 | name hatari |
---|
15 | version 1.9.0 |
---|
16 | revision 0 |
---|
17 | |
---|
18 | categories emulators |
---|
19 | license GPL-2+ |
---|
20 | platforms darwin |
---|
21 | |
---|
22 | maintainers slor.net:james gmail.com:ken.cunningham.webuse openmaintainer |
---|
23 | description Atari ST/STe/STfm emulator |
---|
24 | long_description Hatari is an actively developed Atari ST/STe/STfm and Falcon emulator |
---|
25 | homepage http://hatari.tuxfamily.org/ |
---|
26 | |
---|
27 | fetch.type hg |
---|
28 | hg.url https://hg.tuxfamily.org/mercurialroot/hatari/hatari |
---|
29 | hg.tag v1.9.0 |
---|
30 | |
---|
31 | cmake.out_of_source yes |
---|
32 | |
---|
33 | depends_build port:cmake |
---|
34 | depends_lib port:libsdl \ |
---|
35 | port:libpng \ |
---|
36 | port:readline |
---|
37 | |
---|
38 | # 1. fix hard-coded installation directory for MacOSX bundle |
---|
39 | # 2. delete warning flag in winuae emulator code not supported by GCC42 |
---|
40 | post-extract { |
---|
41 | reinplace "s|/Applications|${applications_dir}|g" ${worksrcpath}/src/CmakeLists.txt |
---|
42 | reinplace "s|-Wno-maybe-uninitialized||g" ${worksrcpath}/src/cpu/CmakeLists.txt |
---|
43 | } |
---|
44 | |
---|
45 | # update python code to work with python3 in case user has selected python3 variant |
---|
46 | # verified to work with all versions of python back to MacOSX Tiger |
---|
47 | # a proper fix would be to set the python variant, and then |
---|
48 | # add designated python references in build script => upstream |
---|
49 | patchfiles-append 001-hatari-gentypes-python3-fix.diff |
---|
50 | |
---|
51 | # default to install MacOSX GUI application, and then adjust for OS variations |
---|
52 | |
---|
53 | platform darwin { |
---|
54 | if { ${os.major} <= 9 } { |
---|
55 | # 10.4 and 10.5 cannot build the MacOSX GUI at present |
---|
56 | default_variants +commandlineapp |
---|
57 | } |
---|
58 | |
---|
59 | if { ${os.major} >= 10 } { |
---|
60 | # *gcc* does not appear to build the MacOSX GUI, so blacklist it on 10.6+ |
---|
61 | compiler.blacklist *gcc* |
---|
62 | } |
---|
63 | } |
---|
64 | |
---|
65 | # ensure cmake's choice of compiler is correctly passed in (doesn't always seem to be?) |
---|
66 | # may not be strictly necessary, but won't hurt |
---|
67 | configure.args-append -DCMAKE_C_COMPILER=${configure.cc} |
---|
68 | |
---|
69 | # these settings are copied from the previous portfile (1.7 version) |
---|
70 | configure.cflags -O3 -pipe -fomit-frame-pointer |
---|
71 | configure.universal_args-delete --disable-dependency-tracking |
---|
72 | |
---|
73 | variant commandlineapp description "Install command line version only" { |
---|
74 | # we're bypassing the configure script in this portfile by using the cmake portgroup, so set these directly in cmake |
---|
75 | configure.args-append -DENABLE_OSX_BUNDLE:BOOL=0 |
---|
76 | } |
---|
77 | |
---|
78 | variant winuae description "Enable WinUAE CPU core (experimental)" { |
---|
79 | # we're bypassing the configure script in this portfile by using the cmake portgroup, so set these directly in cmake |
---|
80 | configure.args-append -DENABLE_WINUAE_CPU:BOOL=1 |
---|
81 | } |
---|
82 | |
---|
83 | platform darwin { |
---|
84 | # sdl2 can be used on MacOSX 10.6 or later (for 10.6, need to add MacOSX10.7.sdk to build libsdl2) |
---|
85 | # no combination of tricks allowed presently current libSDL@2.04 to build, or the web-installed SDL2.framework to work, on 10.5 |
---|
86 | # it is possible an older version of libsdl2, perhaps @2.01, might install and be useable on 10.5/Intel but this is left as an exercise for the reader |
---|
87 | if { ${os.major} >= 10 } { |
---|
88 | variant sdl2 description "Use SDL2" { |
---|
89 | configure.args-append -DENABLE_SDL2:BOOL=1 |
---|
90 | depends_lib-delete port:libsdl |
---|
91 | depends_lib-append port:libsdl2 |
---|
92 | } |
---|
93 | } |
---|
94 | } |
---|
95 | |
---|
96 | notes \ |
---|
97 | "A free ROM, EmuTOS, is available at http://sourceforge.net/projects/emutos \ |
---|
98 | \nAn online manual has been installed at file://${prefix}/share/doc/hatari/manual.html \ |
---|
99 | \nand can be accessed via the Help menu in the MacOSX application." |
---|