source: trunk/dports/lang/dragonegg-3.2/Portfile @ 102104

Last change on this file since 102104 was 102104, checked in by jeremyhu@…, 7 years ago

dragonegg*: Use compiler.blacklist

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 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 102104 2013-01-28 06:04:00Z jeremyhu@macports.org $
3
4PortSystem              1.0
5PortGroup select        1.0
6
7set llvm_version        3.2
8name                    dragonegg-${llvm_version}
9set gcc_version         46
10set gcc_version_dot     4.6
11dist_subdir             llvm
12categories              lang
13platforms               darwin
14maintainers             jeremyhu
15license                 GPL-2
16
17description             Dragonegg is a LLVM plug-in for GCC ${gcc_version_dot}
18long_description        Dragonegg replaces GCC optimizers and code generators \
19                        by the LLVM optimizing infrastructure. It supersedes \
20                        llvm-gcc.
21
22homepage                http://dragonegg.llvm.org/
23
24depends_lib             port:llvm-${llvm_version} port:gcc${gcc_version}
25depends_run             port:gcc_select
26
27# gcc needs to match our arch, not the other way around
28# We build +universal just fine in order to support whatever arch gcc is
29depends_skip_archcheck-append gcc${gcc_version}
30
31#fetch.type              svn
32#svn.revision            168259
33#version                 ${llvm_version}-r${svn.revision}
34#worksrcdir              trunk
35#svn.url                 http://llvm.org/svn/llvm-project/dragonegg/trunk
36#worksrcdir              release_32
37#svn.url                 http://llvm.org/svn/llvm-project/dragonegg/branches/release_32
38
39version                 ${llvm_version}
40epoch                   1
41master_sites            http://llvm.org/releases/${version}/
42extract.suffix          .tar.gz
43distname                dragonegg-${version}.src
44checksums           sha1    24bac8e3c17f416a3ab9e9ca0ef317c663c7ec9e \
45                    rmd160  fd9aaa6f5c712a56e21ab2b67d8b2209c75dacbe \
46                    sha256  6f19a1925147a1c9a0ecb6c5bf49cbdfbb65f904d5dcf737cded9c303c86dd49
47
48pre-fetch {
49    ui_msg "Please remember to keep dragonegg and llvm in phase by updating llvm-${llvm_version} first."
50}
51
52use_configure no
53
54select.group    gcc
55select.file     ${filespath}/dragonegg-${llvm_version}-gcc${gcc_version}
56
57build.target
58
59# g++-4.0 fails to build some of the newer C++ for ppc
60# Intel looks ok, but I prefer using gcc-4.2 for consistency
61compiler.blacklist gcc-4.0
62
63# TODO: base should do this: http://trac.macports.org/ticket/32542
64if {[portconfigure::compiler_is_port ${configure.compiler}]} {
65    depends_build-append port:$portconfigure::compiler_name_map(${configure.compiler}) port:ld64 port:cctools
66    depends_skip_archcheck-append $portconfigure::compiler_name_map(${configure.compiler}) ld64 cctools
67}
68
69patchfiles missing-includes.patch
70
71variant universal {
72    post-patch {
73        reinplace "/-MD -MP/d" ${worksrcpath}/Makefile
74    }
75}
76
77build.env-append \
78    LLVM_CONFIG=${prefix}/bin/llvm-config-mp-${llvm_version} \
79    GCC=${prefix}/bin/gcc-mp-${gcc_version_dot} \
80    CC="${configure.cc} ${configure.cppflags} [get_canonical_archflags cc]" \
81    CXX="${configure.cxx} ${configure.cppflags} [get_canonical_archflags cxx]"
82
83destroot {
84    xinstall -m 755 -d ${destroot}${prefix}/libexec/dragonegg
85    xinstall -m 755 ${worksrcpath}/dragonegg.so ${destroot}${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc${gcc_version}.so
86
87    xinstall -m 755 ${filespath}/dragonegg-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
88    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-cpp
89    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-c++
90    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-g++
91    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcj
92    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcov
93    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gfortran
94
95    reinplace "s:PLUGIN:${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc${gcc_version}.so:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
96    reinplace "s:LLVM_VERSION:${llvm_version}:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
97    reinplace "s:GCC_VERSION:${gcc_version_dot}:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
98}
99
100livecheck.type          none
Note: See TracBrowser for help on using the repository browser.