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