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

Last change on this file was 138252, checked in by ryandesign@…, 2 years ago

dragonegg-3.3-gcc-4.8, dragonegg-3.4-gcc-4.8: revbump for gcc48 @4.8.5 update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.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 138252 2015-07-03 06:18:30Z ryandesign@macports.org $
3
4PortSystem              1.0
5PortGroup select        1.0
6
7set llvm_version        3.3
8set llvm_version_no_dot 33
9name                    dragonegg-${llvm_version}
10
11subport                 ${name}-gcc-4.5 {
12    revision            7
13    set gcc_version     4.5
14    set gcc_version_no_dot 45
15}
16subport                 ${name}-gcc-4.6 {
17    revision            9
18    set gcc_version     4.6
19    set gcc_version_no_dot 46
20}
21subport                 ${name}-gcc-4.7 {
22    revision            10
23    set gcc_version     4.7
24    set gcc_version_no_dot 47
25}
26subport                 ${name}-gcc-4.8 {
27    revision            14
28    set gcc_version     4.8
29    set gcc_version_no_dot 48
30    #Fixing issue with TARGET_CPU_DEFAULT_max.
31    #see http://llvm.org/bugs/show_bug.cgi?id=18548
32    patchfiles-append   patch-CPU_DEFAULT.patch
33}
34
35dist_subdir             llvm
36categories              lang
37platforms               darwin
38maintainers             jeremyhu openmaintainer
39license                 GPL-2
40
41description             DragonEgg is a LLVM plug-in for GCC
42long_description        DragonEgg replaces GCC optimizers and code generators \
43                        by the LLVM optimizing infrastructure. It supersedes \
44                        llvm-gcc.
45
46homepage                http://dragonegg.llvm.org/
47
48if {${subport} eq ${name}} {
49version                 ${llvm_version}
50epoch                   1
51revision                3
52
53distfiles
54
55set gcc_version         4.6
56
57depends_run             port:${name}-gcc-${gcc_version}
58
59use_configure           no
60build                   {}
61destroot {
62    # For base
63    foreach binary {gcc cpp c++ g++ gcj gcov gfortran} {
64        ln -s dragonegg-${llvm_version}-${binary}-mp-${gcc_version} ${destroot}${prefix}/bin/dragonegg-${llvm_version}-${binary}
65    }
66}
67
68} else {
69
70depends_lib             port:llvm-${llvm_version} port:gcc${gcc_version_no_dot}
71depends_run             port:gcc_select
72
73# gcc needs to match our arch, not the other way around
74# We build +universal just fine in order to support whatever arch gcc is
75depends_skip_archcheck-append gcc${gcc_version_no_dot}
76
77#fetch.type              svn
78#svn.revision            185261
79#version                 ${llvm_version}-r${svn.revision}
80#worksrcdir              trunk
81#svn.url                 http://llvm.org/svn/llvm-project/dragonegg/trunk
82#worksrcdir              release_34
83#svn.url                 http://llvm.org/svn/llvm-project/dragonegg/branches/release_34
84
85version                 ${llvm_version}
86epoch                   1
87master_sites            http://llvm.org/releases/${version}/
88extract.suffix          .tar.gz
89distname                dragonegg-${version}.src
90checksums           sha1    aaab9d4c33e4bcad82027acb220453b5db61292a \
91                    rmd160  afee1287634ca3c926e5cdb93286e3f926f3f9ec \
92                    sha256  3153a827e9a3cef4212d0240ffc5ab7a2ce92dcf1283520d1eb0c3f295f4d9cd
93
94pre-fetch {
95    ui_msg "Please remember to keep dragonegg and llvm in phase by updating llvm-${llvm_version} first."
96}
97
98use_configure no
99
100select.group    gcc
101select.file     ${worksrcpath}/dragonegg-${llvm_version}-gcc${gcc_version_no_dot}
102
103build.target
104
105# g++-4.0 fails to build some of the newer C++ for ppc
106# Intel looks ok, but I prefer using gcc-4.2 for consistency
107compiler.blacklist gcc-4.0
108
109patchfiles-append missing-includes.patch
110
111post-extract {
112    file copy ${filespath}/dragonegg-select ${select.file}
113    reinplace "s:LLVM_VERSION:${llvm_version}:" ${select.file}
114    reinplace "s:GCC_VERSION:${gcc_version}:" ${select.file}
115}
116
117variant universal {
118    post-patch {
119        reinplace "/-MD -MP/d" ${worksrcpath}/Makefile
120    }
121}
122
123set cxx_stdlibflags {}
124if {[string match *clang* ${configure.cxx}]} {
125    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
126}
127build.env-append \
128    LLVM_CONFIG=${prefix}/bin/llvm-config-mp-${llvm_version} \
129    GCC=${prefix}/bin/gcc-mp-${gcc_version} \
130    CC="${configure.cc} ${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]" \
131    CXX="${configure.cxx} ${configure.cppflags} ${configure.cxxflags} ${cxx_stdlibflags} [get_canonical_archflags cxx]"
132
133destroot {
134    xinstall -m 755 -d ${destroot}${prefix}/libexec/dragonegg
135    xinstall -m 755 ${worksrcpath}/dragonegg.so ${destroot}${prefix}/libexec/dragonegg/llvm${llvm_version_no_dot}gcc${gcc_version_no_dot}.so
136    reinplace "s:dragonegg:llvm${llvm_version_no_dot}gcc${gcc_version_no_dot}:" ${worksrcpath}/integrated-as.specs
137    xinstall -m 644 ${worksrcpath}/integrated-as.specs ${destroot}${prefix}/libexec/dragonegg/llvm${llvm_version_no_dot}gcc${gcc_version_no_dot}-integrated-as.specs
138
139    foreach binary {gcc cpp c++ g++ gcj gcov gfortran} {
140        set path ${destroot}${prefix}/bin/dragonegg-${llvm_version}-${binary}-mp-${gcc_version}
141        xinstall -m 755 ${filespath}/dragonegg-gcc ${path}
142        reinplace "s:PLUGIN:${prefix}/libexec/dragonegg/llvm${llvm_version_no_dot}gcc${gcc_version_no_dot}.so:" ${path}
143        reinplace "s:PREFIX:${prefix}:" ${path}
144        reinplace "s:GCC_VERSION:${gcc_version}:" ${path}
145        reinplace "s:BINARY:${binary}:" ${path}
146    }
147}
148
149}
150
151livecheck.type          none
Note: See TracBrowser for help on using the repository browser.