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

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

{clang,dragonegg,llvm}-3.2: Bump to r163175

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.0 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 97401 2012-09-04 23:45: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 openmaintainer
15license                 GPL-2
16
17description             Dragonegg is a LLVM plug-in for GCC 4.6
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            163175
33version                 ${llvm_version}-r${svn.revision}
34worksrcdir              trunk
35svn.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
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
61if {${configure.compiler} == "gcc-4.0"} {
62    configure.compiler gcc-4.2
63    if {![file exists ${configure.cc}]} {
64        depends_build-append port:apple-gcc42
65        configure.compiler apple-gcc-4.2
66    }
67}
68
69variant universal {
70    post-patch {
71        reinplace "/-MD -MP/d" ${worksrcpath}/Makefile
72    }
73}
74
75build.env-append \
76    LLVM_CONFIG=${prefix}/bin/llvm-config-mp-${llvm_version} \
77    GCC=${prefix}/bin/gcc-mp-${gcc_version_dot} \
78    CC="${configure.cc} ${configure.cppflags} [get_canonical_archflags cc]" \
79    CXX="${configure.cxx} ${configure.cppflags} [get_canonical_archflags cxx]"
80
81destroot {
82    xinstall -m 755 -d ${destroot}${prefix}/libexec/dragonegg
83    xinstall -m 755 ${worksrcpath}/dragonegg.so ${destroot}${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc${gcc_version}.so
84
85    xinstall -m 755 ${filespath}/dragonegg-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
86    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-cpp
87    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-c++
88    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-g++
89    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcj
90    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcov
91    ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gfortran
92
93    reinplace "s:PLUGIN:${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc${gcc_version}.so:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
94    reinplace "s:LLVM_VERSION:${llvm_version}:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
95    reinplace "s:GCC_VERSION:${gcc_version_dot}:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
96}
Note: See TracBrowser for help on using the repository browser.