Ticket #52537: Portfile-hatari-rev2-update-by-mojca.diff

File Portfile-hatari-rev2-update-by-mojca.diff, 3.4 KB (added by mojca (Mojca Miklavec), 8 years ago)

my suggested (untested) revision of the rev1 patch for hatari

  • Portfile

    old new  
    11# -*- 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$
    32
    4 # tested on 10.4 PPC, 10.4 Intel, 10.5 Intel, 10.6 with LibCxx upgrade, 10.7, 10.11
     3# tested on tested on 10.4 PPC/Intel, 10.5 PPC/Intel, 10.6, 10.6 with LibCxx upgrade, 10.7, 10.11
    54# hatari command line builds on all systems
    65# hatari python UI not needed with macOS GUI or command line versions - has unspecified python version so not included
    76# 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
     7# hatari macOS GUI does not build with gcc* or llvm-gcc-4.2 or older clang versions
    98# winuae works on all with gcc flag modification below.
    109# SDL2 works on 10.6, 10.7 and 10.11, and likely all in between, but not 10.5
    1110
    1211PortSystem              1.0
    1312PortGroup               cmake 1.0
     13PortGroup               compiler_blacklist_versions 1.0
    1414
    1515name                    hatari
    1616version                 1.9.0
     17revision                1
    1718
    1819categories              emulators
    1920license                 GPL-2+
    cmake.out_of_source yes 
    3435
    3536depends_lib             port:libsdl \
    3637                        port:libpng \
    37                         port:readline
     38                        port:readline \
     39                        port:portaudio
    3840
    3941# 1. fix hard-coded installation directory for macOS bundle
    4042# 2. delete warning flag in winuae emulator code not supported by GCC42
    post-patch { 
    4850# default to install macOS GUI application, and then adjust for OS variations
    4951platform darwin {
    5052    if { ${os.major} <= 9 } {
    51         # 10.4 and 10.5 cannot build the macOS GUI at present
    52         default_variants       +commandlineapp
     53        # 10.4 and 10.5 cannot build the macOS GUI, even with newer clang versions
     54        default_variants            +commandlineapp
    5355    }
    54    
    5556    if { ${os.major} >= 10 } {
    56         # *gcc* does not appear to build the macOS GUI, so blacklist it on 10.6+
    57         compiler.blacklist     *gcc*
     57        variant sdl2 description "Use SDL2" {
     58            configure.args-append   -DENABLE_SDL2:BOOL=1
     59            depends_lib-replace     port:libsdl port:libsdl2
     60        }
    5861    }
    5962}
    6063
    variant commandlineapp description "Install command line version only" { 
    7275
    7376variant winuae description "Enable WinUAE CPU core (experimental)" {
    7477    # 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
     78    configure.args-append   -DENABLE_WINUAE_CPU:BOOL=1
    7679}
    7780
    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         }
     81if {![variant_isset commandlineapp]} {
     82    compiler.blacklist      *gcc* { clang < 211 }
     83    # copy the included default tos.img into the app bundle if building the macOS GUI version
     84    post-destroot {
     85        copy ${worksrcpath}/src/tos.img ${destroot}${applications_dir}/hatari.app/Contents/Resources/tos.img
    8586    }
    8687}
    8788
    8889notes "
    89 A free ROM, EmuTOS, is available at
    90 
    91     http://sourceforge.net/projects/emutos
    92 
    9390An online manual has been installed at
    9491
    9592    file://${prefix}/share/doc/hatari/manual.html