source: trunk/dports/lang/dragonegg-3.3/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.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 {[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.