Ticket #52212: Portfile-nopython

File Portfile-nopython, 3.7 KB (added by ken-cunningham-webuse, 8 years ago)

portfile replacement - no python

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 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 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
12PortSystem              1.0
13PortGroup               cmake 1.0
14
15name                    hatari
16version                 1.9.0
17revision                0
18
19categories              emulators
20license                 GPL-2+
21platforms               darwin
22
23maintainers             slor.net:james gmail.com:ken.cunningham.webuse openmaintainer
24description             Atari ST/STe/STfm emulator
25long_description        Hatari is an actively developed Atari ST/STe/STfm and Falcon emulator
26homepage                http://hatari.tuxfamily.org/
27
28fetch.type              hg
29hg.url                  https://hg.tuxfamily.org/mercurialroot/hatari/hatari
30hg.tag                  v1.9.0
31
32cmake.out_of_source     yes
33
34depends_build           port:cmake
35depends_lib             port:libsdl \
36                        port:libpng \
37                        port:readline
38
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
42post-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
49platform 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}
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 \
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."