source: trunk/dports/lang/dragonegg-3.3/Portfile @ 102174

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

misc: Update compiler dependency workaround for #32542, see #37817

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.5 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 102174 2013-01-29 07:53:39Z jeremyhu@macports.org $
3
4PortSystem              1.0
5PortGroup select        1.0
6
7set llvm_version        3.3
8name                    dragonegg-${llvm_version}
9set gcc_version         47
10set gcc_version_dot     4.7
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
31fetch.type              svn
32svn.revision            173279
33version                 ${llvm_version}-r${svn.revision}
34worksrcdir              trunk
35svn.url                 http://llvm.org/svn/llvm-project/dragonegg/trunk
36#worksrcdir              release_33
37#svn.url                 http://llvm.org/svn/llvm-project/dragonegg/branches/release_33
38
39#version                 ${llvm_version}
40#epoch                   1
41#master_sites            http://llvm.org/releases/${version}/
42#extract.suffix          .tar.gz
43#distname                dragonegg-${version}.src
44#checksums           sha1    9be8f055df814e56ea3585156da8c7e457f2cd7b \
45#                    rmd160  93aa8a463b6b5e1fb9cc1ee0a7c4d310a78ea64f \
46#                    sha256  72df1fd2e901b254ab8d1b5e7b93c7104751a613aca531f1483f9a637a5f6827
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 {[info exists portconfigure::compiler_name_map(${configure.compiler})]} {
65    depends_build-append port:$portconfigure::compiler_name_map(${configure.compiler})
66
67    # base 2.1.x ignores the argument and just use ${configure.compiler}
68    if {[portconfigure::arch_flag_supported ${configure.compiler}]} {
69        depends_skip_archcheck-append $portconfigure::compiler_name_map(${configure.compiler})
70    }
71
72    if {[string match macports-gcc* ${configure.compiler}]} {
73        depends_lib-append port:$portconfigure::compiler_name_map(${configure.compiler})
74    }
75}
76
77patchfiles missing-includes.patch
78
79variant universal {
80    post-patch {
81        reinplace "/-MD -MP/d" ${worksrcpath}/Makefile
82    }
83}
84
85build.env-append \
86    LLVM_CONFIG=${prefix}/bin/llvm-config-mp-${llvm_version} \
87    GCC=${prefix}/bin/gcc-mp-${gcc_version_dot} \
88    CC="${configure.cc} ${configure.cppflags} [get_canonical_archflags cc]" \
89    CXX="${configure.cxx} ${configure.cppflags} [get_canonical_archflags cxx]"
90
91destroot {
92    xinstall -m 755 -d ${destroot}${prefix}/libexec/dragonegg
93    xinstall -m 755 ${worksrcpath}/dragonegg.so ${destroot}${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc${gcc_version}.so
94
95    xinstall -m 755 ${filespath}/dragonegg-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
96    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-cpp
97    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-c++
98    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-g++
99    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcj
100    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcov
101    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gfortran
102
103    reinplace "s:PLUGIN:${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc${gcc_version}.so:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
104    reinplace "s:LLVM_VERSION:${llvm_version}:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
105    reinplace "s:GCC_VERSION:${gcc_version_dot}:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
106}
107
108livecheck.type          none
Note: See TracBrowser for help on using the repository browser.