source: trunk/dports/emulators/hatari/Portfile

Last change on this file was 153175, checked in by ryandesign@…, 10 months ago

hatari: change "MacOSX" to "macOS" in comments

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
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# $Id: Portfile 153175 2016-09-26 08:58:52Z 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 python UI not needed with macOS GUI or command line versions - has unspecified python version so not included
7# hatari macOS GUI builds on >= 10.6 as NSWindowDelegate is used and is only 10.6 onwards
8# macOS 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
12PortSystem              1.0
13PortGroup               cmake 1.0
14
15name                    hatari
16version                 1.9.0
17
18categories              emulators
19license                 GPL-2+
20platforms               darwin
21
22maintainers             slor.net:james gmail.com:ken.cunningham.webuse openmaintainer
23description             Atari ST/STe/STfm emulator
24long_description        Hatari is an actively developed Atari ST/STe/STfm and Falcon emulator
25homepage                http://hatari.tuxfamily.org/
26master_sites            http://download.tuxfamily.org/hatari/${version}/
27
28checksums               sha256  b2b56e6cbe7f8769a5e8b1d96599f392d9351b44cacf959da6905da06d30e992 \
29                        rmd160  0bc9bd21a81211ebf293911d9aaa5e9cb84c0400
30
31use_bzip2               yes
32
33cmake.out_of_source     yes
34
35depends_lib             port:libsdl \
36                        port:libpng \
37                        port:readline
38
39# 1. fix hard-coded installation directory for macOS bundle
40# 2. delete warning flag in winuae emulator code not supported by GCC42
41# 3. disable python ui - not needed for macOS
42post-patch {
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 macOS GUI application, and then adjust for OS variations
49platform darwin {
50    if { ${os.major} <= 9 } {
51        # 10.4 and 10.5 cannot build the macOS GUI at present
52        default_variants       +commandlineapp
53    } 
54   
55    if { ${os.major} >= 10 } {
56        # *gcc* does not appear to build the macOS GUI, so blacklist it on 10.6+
57        compiler.blacklist     *gcc*
58    }
59}
60
61# ensure cmake's choice of compiler is correctly passed in (doesn't always seem to be)
62configure.args-append   -DCMAKE_C_COMPILER=${configure.cc}
63
64# these settings are copied from the previous portfile (1.7 version)
65configure.cflags        -O3 -pipe -fomit-frame-pointer
66configure.universal_args-delete --disable-dependency-tracking
67
68variant 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
73variant 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
78platform 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
88notes "
89A free ROM, EmuTOS, is available at
90
91    http://sourceforge.net/projects/emutos
92
93An online manual has been installed at
94
95    file://${prefix}/share/doc/hatari/manual.html
96
97and can be accessed via the Help menu in the macOS application.
98"
Note: See TracBrowser for help on using the repository browser.