| 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 python UI not needed with MacOSX GUI or command line versions - has unspecified python version so not included |
| 7 | # hatari MacOSX GUI builds on >= 10.6 as NSWindowDelegate is used and is only 10.6 onwards |
| 8 | # MacOSX GUI does not build with gcc* or llvm-gcc-4.2 |
| 9 | # winuae works on all with gcc flag modification below. |
| 10 | # SDL2 works on 10.6, 10.7 and 10.11, and likely all in between, but not 10.5 |
| 11 | |
30 | | depends_build port:cmake |
| 39 | # 1. fix hard-coded installation directory for MacOSX bundle |
| 40 | # 2. delete warning flag in winuae emulator code not supported by GCC42 |
| 41 | # 3. disable python ui - not needed for MacOSX |
| 42 | post-extract { |
| 43 | reinplace "s|/Applications|${applications_dir}|g" ${worksrcpath}/src/CmakeLists.txt |
| 44 | reinplace "s|-Wno-maybe-uninitialized||g" ${worksrcpath}/src/cpu/CmakeLists.txt |
| 45 | reinplace "s|add_subdirectory(python-ui)||g" ${worksrcpath}/CmakeLists.txt |
| 46 | } |
| 47 | |
| 48 | # default to install MacOSX GUI application, and then adjust for OS variations |
| 49 | platform darwin { |
| 50 | if { ${os.major} <= 9 } { |
| 51 | # 10.4 and 10.5 cannot build the MacOSX GUI at present |
| 52 | default_variants +commandlineapp |
| 53 | } |
| 54 | |
| 55 | if { ${os.major} >= 10 } { |
| 56 | # *gcc* does not appear to build the MacOSX GUI, so blacklist it on 10.6+ |
| 57 | compiler.blacklist *gcc* |
| 58 | } |
| 59 | } |
34 | | configure.args-append --disable-osx-bundle |
| 67 | |
| 68 | variant commandlineapp description "Install command line version only" { |
| 69 | # we're bypassing the configure script in this portfile by using the cmake portgroup, so set these directly in cmake |
| 70 | configure.args-append -DENABLE_OSX_BUNDLE:BOOL=0 |
| 71 | } |
| 72 | |
| 73 | variant winuae description "Enable WinUAE CPU core (experimental)" { |
| 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_WINUAE_CPU:BOOL=1 |
| 76 | } |
| 77 | |
| 78 | platform darwin { |
| 79 | if { ${os.major} >= 10 } { |
| 80 | variant sdl2 description "Use SDL2" { |
| 81 | configure.args-append -DENABLE_SDL2:BOOL=1 |
| 82 | depends_lib-delete port:libsdl |
| 83 | depends_lib-append port:libsdl2 |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | notes \ |
| 89 | "A free ROM, EmuTOS, is available at http://sourceforge.net/projects/emutos \ |
| 90 | \nAn online manual has been installed at file://${prefix}/share/doc/hatari/manual.html \ |
| 91 | \nand can be accessed via the Help menu in the MacOSX application." |