Ticket #33862: Portfile

File Portfile, 2.8 KB (added by khepler, 12 years ago)

Portfile for qemu-1.1.1-1 with conditional tcg-interpreter support

Line 
1# $Id: Portfile 91467 2012-04-02 19:17:28Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                qemu
6version             1.1.1-1
7revision            1
8categories          emulators
9license             GPL-2+
10platforms           darwin
11maintainers         nomaintainer
12
13description         Emulator for various architectures
14long_description    QEMU is a generic and open source machine emulator. \
15                    It can run OSes and programs made for one machine on a \
16                    different machine. By using dynamic translation, it \
17                    achieves very good performance.
18
19homepage            http://qemu.org
20master_sites        ${homepage}/download
21
22use_bzip2           yes
23
24checksums           sha1    0754fe79279f58445d4a6e2c18afcbc3f0e1bb00 \
25                    rmd160  e1fa73652dbcfd234f862ce1979adf16182f00bc \
26                    sha256  6fbaff1fa75aae1a06947cf7cb101c35273712c561b87ef8eaec92aa39734ac8
27
28patchfiles          patch-configure.diff
29
30depends_build       port:texinfo \
31                    port:pkgconfig
32
33depends_lib         port:curl \
34                    port:cyrus-sasl2 \
35                    port:gnutls \
36                    port:libidn \
37                    port:libtasn1 \
38                    port:ncurses \
39                    port:libpng \
40                    port:jpeg \
41                    port:ossp-uuid
42
43configure.args      --cc=${configure.cc} \
44                    --host-cc=${configure.cc}
45
46if {${configure.compiler} == "clang" ||
47    ${configure.compiler} == "llvm-gcc-4.2"} {
48        configure.args-append --enable-tcg-interpreter
49}
50
51if {$build_arch != ""} {
52    configure.args-append --cpu=${build_arch}
53}
54
55set target_list {}
56pre-configure {
57    configure.args-append --target-list=${target_list}
58}
59
60foreach t {i386 x86_64 ppc ppc64 arm cris m68k mips mipsel mips64 mips64el ppcemb sh4 sh4eb sparc} {
61    variant target_${t} description "add ${t} target support" "append target_list \",${t}-softmmu\""
62}
63default_variants    +target_i386 +target_x86_64
64
65# Default universal variant does not work
66universal_variant   no
67
68#platform darwin {
69#       foreach t {i386 ppc} {
70#       variant ${t}_darwin_user description "add ${t} darwin user-mode emulation support" "append target_list \",${t}-darwin-user\""
71#    }
72#}
73
74platform darwin 8 {
75    depends_build-append port:gmake
76    build.cmd ${prefix}/bin/gmake
77}
78
79post-extract {
80        # version 1.1.1 was gzip-encoded and named as a bzip2 file, and version
81        # 1.1.1-1 contains an identical source tree to 1.1.1.  Unfortunately,
82        # Macports expects the extracted directory to end in "-1".
83    if {$version == "1.1.1-1"} {
84        # rename the source to the expected name
85        file rename [string range $worksrcpath 0 end-2] $worksrcpath
86    }
87}
88
89livecheck.type regex
90livecheck.url           [lindex ${master_sites} 0]
91livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)\\.tar