1 | |
---|
2 | PortSystem 1.0 |
---|
3 | |
---|
4 | name llvm |
---|
5 | version 2.7 |
---|
6 | revision 1 |
---|
7 | categories lang |
---|
8 | platforms darwin |
---|
9 | use_parallel_build yes |
---|
10 | maintainers erickt openmaintainer |
---|
11 | description llvm is a next generation compiler infrastructure |
---|
12 | long_description llvm brings tools to work on the llvm intermediate \ |
---|
13 | language incl. a C and C++ frontend. |
---|
14 | |
---|
15 | homepage http://llvm.org/ |
---|
16 | master_sites ${homepage}releases/${version}/ |
---|
17 | |
---|
18 | extract.suffix .tgz |
---|
19 | |
---|
20 | checksums md5 ac322661f20e7d6c810b1869f886ad9b \ |
---|
21 | sha1 059fc21b0ec1b649c4a3dec81756e5f92aa131a2 \ |
---|
22 | rmd160 0fa2f362dd6a45efec35ce8fa0f8d36d98f32c8f |
---|
23 | |
---|
24 | depends_lib path:bin/perl:perl5 |
---|
25 | |
---|
26 | universal_variant no |
---|
27 | |
---|
28 | configure.dir ${workpath}/build |
---|
29 | build.dir ${configure.dir} |
---|
30 | destroot.dir ${configure.dir} |
---|
31 | |
---|
32 | post-extract { |
---|
33 | file mkdir ${configure.dir} |
---|
34 | } |
---|
35 | |
---|
36 | patchfiles patch-Makefile.config.in.diff \ |
---|
37 | patch-Makefile.ocaml.diff |
---|
38 | |
---|
39 | configure.cppflags |
---|
40 | configure.ldflags |
---|
41 | configure.cmd ${worksrcpath}/configure |
---|
42 | configure.args --enable-optimized --enable-jit \ |
---|
43 | --enable-bindings=none \ |
---|
44 | --disable-assertions |
---|
45 | |
---|
46 | if {[info exists build_arch] && ${os.platform} == "darwin"} { |
---|
47 | configure.args-append --build=${build_arch}-apple-darwin${os.major} |
---|
48 | } |
---|
49 | |
---|
50 | post-destroot { |
---|
51 | file mkdir ${destroot}${prefix}/lib/llvm |
---|
52 | file mkdir ${destroot}${prefix}/lib/llvm/src |
---|
53 | file mkdir ${destroot}${prefix}/lib/llvm/obj |
---|
54 | |
---|
55 | file copy ${worksrcpath}/include ${destroot}${prefix}/lib/llvm/src |
---|
56 | file copy ${configure.dir}/include ${destroot}${prefix}/lib/llvm/obj |
---|
57 | file copy ${configure.dir}/Release-Asserts ${destroot}${prefix}/lib/llvm/obj |
---|
58 | |
---|
59 | reinplace "s|${worksrcpath}|${prefix}/lib/llvm/src|g" ${destroot}${prefix}/bin/llvm-config \ |
---|
60 | ${destroot}${prefix}/lib/llvm/obj/Release-Asserts/bin/llvm-config |
---|
61 | reinplace "s|${configure.dir}|${prefix}/lib/llvm/obj|g" ${destroot}${prefix}/bin/llvm-config \ |
---|
62 | ${destroot}${prefix}/lib/llvm/obj/Release-Asserts/bin/llvm-config |
---|
63 | |
---|
64 | fs-traverse item ${destroot} { |
---|
65 | if {[file isfile ${item}] && ".dir" == [file tail ${item}]} { |
---|
66 | delete ${item} |
---|
67 | } |
---|
68 | } |
---|
69 | } |
---|
70 | |
---|
71 | variant ocaml description {Enable generation of OCaml binding} { |
---|
72 | depends_build-append port:ocaml |
---|
73 | depends_lib-append port:ocaml |
---|
74 | |
---|
75 | configure.args-delete --enable-bindings=none |
---|
76 | configure.args-append --enable-bindings=ocaml |
---|
77 | |
---|
78 | destroot.args-append OVERRIDE_libdir=${prefix}/lib |
---|
79 | } |
---|
80 | |
---|
81 | variant disable_pic description {Disable generation of position independent code} { |
---|
82 | configure.args-append --disable-pic |
---|
83 | } |
---|
84 | |
---|
85 | variant host_only description {Disables non-host targets} { |
---|
86 | configure.args-append --enable-targets=host-only |
---|
87 | } |
---|
88 | |
---|
89 | livecheck.type regex |
---|
90 | livecheck.url ${homepage}releases/ |
---|
91 | livecheck.regex {llvm-(0-9.)+)\.tgz} |
---|
92 | |
---|