1 | # $Id$ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name llvm |
---|
6 | version 2.4 |
---|
7 | revision 2 |
---|
8 | categories lang |
---|
9 | platforms darwin |
---|
10 | use_parallel_build yes |
---|
11 | maintainers erickt@macports.org openmaintainer |
---|
12 | description llvm is a next generation compiler infrastructure |
---|
13 | long_description llvm brings tools to work on the llvm intermediate \ |
---|
14 | language incl. a C and C++ frontend. |
---|
15 | |
---|
16 | homepage http://llvm.org/ |
---|
17 | master_sites ${homepage}releases/${version}/ |
---|
18 | |
---|
19 | checksums md5 bf43eee98c364fd79c7d2b72e645a15e \ |
---|
20 | sha1 8496fe06de1e622bfcfc84eac3c649b5333a241b \ |
---|
21 | rmd160 a1f23490f4c110133afbcf7e96fe0aa9d29d1de2 |
---|
22 | |
---|
23 | depends_build bin:flex:flex \ |
---|
24 | bin:bison:bison |
---|
25 | |
---|
26 | configure.dir ${workpath}/build |
---|
27 | build.dir ${configure.dir} |
---|
28 | destroot.dir ${configure.dir} |
---|
29 | |
---|
30 | post-extract { |
---|
31 | file mkdir ${configure.dir} |
---|
32 | } |
---|
33 | |
---|
34 | patchfiles patch-Makefile.config.in.diff \ |
---|
35 | patch-Makefile.ocaml.diff |
---|
36 | |
---|
37 | configure.cppflags |
---|
38 | configure.ldflags |
---|
39 | configure.cmd ${worksrcpath}/configure |
---|
40 | configure.args --enable-optimized --enable-jit |
---|
41 | |
---|
42 | post-destroot { |
---|
43 | file mkdir ${destroot}${prefix}/lib/llvm |
---|
44 | file mkdir ${destroot}${prefix}/lib/llvm/src |
---|
45 | file mkdir ${destroot}${prefix}/lib/llvm/obj |
---|
46 | |
---|
47 | file copy ${worksrcpath}/include ${destroot}${prefix}/lib/llvm/src |
---|
48 | file copy ${configure.dir}/include ${destroot}${prefix}/lib/llvm/obj |
---|
49 | file copy ${configure.dir}/Release ${destroot}${prefix}/lib/llvm/obj |
---|
50 | |
---|
51 | reinplace "s|${worksrcpath}|${prefix}/lib/llvm/src|g" ${destroot}${prefix}/bin/llvm-config \ |
---|
52 | ${destroot}${prefix}/lib/llvm/obj/Release/bin/llvm-config |
---|
53 | reinplace "s|${configure.dir}|${prefix}/lib/llvm/obj|g" ${destroot}${prefix}/bin/llvm-config \ |
---|
54 | ${destroot}${prefix}/lib/llvm/obj/Release/bin/llvm-config |
---|
55 | |
---|
56 | fs-traverse item ${destroot} { |
---|
57 | if {[file isfile ${item}] && ".dir" == [file tail ${item}]} { |
---|
58 | delete ${item} |
---|
59 | } |
---|
60 | } |
---|
61 | } |
---|
62 | |
---|
63 | variant ocaml description {Enable generation of OCaml binding} { |
---|
64 | depends_build-append port:ocaml |
---|
65 | depends_lib-append port:ocaml |
---|
66 | |
---|
67 | configure.args-delete --enable-bindings=none |
---|
68 | configure.args-append --enable-bindings=ocaml |
---|
69 | |
---|
70 | destroot.args-append OVERRIDE_libdir=${prefix}/lib |
---|
71 | } |
---|
72 | |
---|
73 | variant pic description {Enable generation of position independent code} { |
---|
74 | configure.args-append --enable-pic |
---|
75 | } |
---|