]>
Commit | Line | Data |
---|---|---|
bc88141a ER |
1 | # TODO |
2 | # - gcc/c++ packages: http://cvs.fedoraproject.org/viewvc/rpms/llvm/devel/llvm.spec?revision=HEAD&view=markup | |
6832a5c5 | 3 | # - test gcc pkgs and all |
bc88141a | 4 | # |
6832a5c5 | 5 | %define lgcc_vertar 4.2 |
d997b14b | 6 | %define lgcc_version 4.2 |
aa11c230 | 7 | Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure) |
2326a99f | 8 | Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego) |
aa11c230 | 9 | Name: llvm |
7e30fbbc | 10 | Version: 2.7 |
aa11c230 | 11 | Release: 0.1 |
12 | License: University of Illinois/NCSA Open Source License | |
13 | Group: Development/Languages | |
7e30fbbc | 14 | Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.tgz |
15 | # Source0-md5: ac322661f20e7d6c810b1869f886ad9b | |
16 | Source1: http://llvm.org/releases/2.7/clang-%{version}.tgz | |
17 | # Source1-md5: b83260aa8c13494adf8978b5f238bf1b | |
d997b14b AM |
18 | # Data files should be installed with timestamps preserved |
19 | Patch3: %{name}-2.6-timestamp.patch | |
2326a99f | 20 | URL: http://llvm.org/ |
bc88141a | 21 | BuildRequires: bash |
d997b14b AM |
22 | BuildRequires: bison |
23 | BuildRequires: doxygen | |
24 | BuildRequires: flex | |
25 | BuildRequires: graphviz | |
26 | BuildRequires: groff | |
bc88141a | 27 | BuildRequires: libltdl-devel |
d997b14b AM |
28 | BuildRequires: libstdc++-devel >= 5:3.4 |
29 | BuildRequires: ocaml-ocamldoc | |
356a0bbd ER |
30 | # gcc4 might be installed, but not current __cc |
31 | %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4" | |
32 | BuildRequires: __cc >= 3.4 | |
33 | %endif | |
aa11c230 | 34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
356a0bbd | 36 | %define _sysconfdir /etc/%{name} |
021b3c3d | 37 | |
6832a5c5 ER |
38 | # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ... |
39 | %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\) | |
40 | ||
aa11c230 | 41 | %description |
42 | LLVM is a compiler infrastructure designed for compile-time, | |
43 | link-time, runtime, and idle-time optimization of programs from | |
44 | arbitrary programming languages. LLVM is written in C++ and has been | |
45 | developed since 2000 at the University of Illinois and Apple. It | |
46 | currently supports compilation of C and C++ programs, using front-ends | |
47 | derived from GCC 4.0.1. A new front-end for the C family of languages | |
48 | is in development. The compiler infrastructure includes mirror sets of | |
49 | programming tools as well as libraries with equivalent functionality. | |
50 | ||
2326a99f JB |
51 | %description -l pl.UTF-8 |
52 | LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji | |
53 | czasu kompilowania, linkowania, działania i bezczynności programów w | |
54 | dowolnych językach programowania. Jest napisana w C++, rozwijana od | |
55 | roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje | |
56 | kompilację programów w C i C++ przy użyciu frontendów wywodzących się | |
57 | z GCC 4.0.1. W trakcie tworzenia jest nowy frontend do języków z | |
58 | rodziny C. Infrastruktura kompilatora zawiera lustrzane zestawy | |
59 | narzędzi programistycznych oraz biblioteki z odpowiadającą narzędziom | |
60 | funkcjonalnością. | |
61 | ||
bc88141a ER |
62 | %package doc |
63 | Summary: Documentation for LLVM | |
64 | Group: Documentation | |
65 | Requires: %{name} = %{version}-%{release} | |
66 | ||
67 | %description doc | |
68 | Documentation for the LLVM compiler infrastructure. | |
69 | ||
70 | %package devel | |
71 | Summary: Libraries and header files for LLVM | |
72 | Group: Development/Languages | |
73 | Requires: %{name} = %{version}-%{release} | |
74 | Requires: libstdc++-devel >= 6:3.4 | |
75 | ||
76 | %description devel | |
77 | This package contains library and header files needed to develop new | |
78 | native programs that use the LLVM infrastructure. | |
79 | ||
bc88141a ER |
80 | %package ocaml |
81 | Summary: OCaml binding for LLVM | |
82 | Group: Development/Libraries | |
83 | Requires: %{name} = %{version}-%{release} | |
84 | %requires_eq ocaml-runtime | |
85 | ||
86 | %description ocaml | |
87 | OCaml binding for LLVM. | |
88 | ||
89 | %package ocaml-devel | |
90 | Summary: Development files for %{name}-ocaml | |
91 | Group: Development/Libraries | |
92 | Requires: %{name}-devel = %{version}-%{release} | |
93 | Requires: %{name}-ocaml = %{version}-%{release} | |
94 | ||
95 | %description ocaml-devel | |
96 | The %{name}-ocaml-devel package contains libraries and signature files | |
97 | for developing applications that use %{name}-ocaml. | |
98 | ||
d997b14b AM |
99 | %package -n clang |
100 | Summary: A C language family frontend for LLVM | |
101 | License: NCSA | |
102 | Group: Development/Languages | |
103 | ||
104 | %description -n clang | |
105 | clang: noun 1. A loud, resonant, metallic sound. 2. The strident call | |
106 | of a crane or goose. 3. C-language family front-end toolkit. | |
107 | ||
108 | The goal of the Clang project is to create a new C, C++, Objective C | |
109 | and Objective C++ front-end for the LLVM compiler. Its tools are built | |
110 | as libraries and designed to be loosely-coupled and extendable. | |
111 | ||
112 | %package -n clang-analyzer | |
113 | Summary: A source code analysis framework | |
114 | License: NCSA | |
115 | Group: Development/Languages | |
116 | Requires: clang = %{version}-%{release} | |
117 | # not picked up automatically since files are currently not instaled | |
118 | # in standard Python hierarchies yet | |
119 | Requires: python | |
120 | ||
121 | %description -n clang-analyzer | |
122 | The Clang Static Analyzer consists of both a source code analysis | |
123 | framework and a standalone tool that finds bugs in C and Objective-C | |
124 | programs. The standalone tool is invoked from the command-line, and is | |
125 | intended to run in tandem with a build of a project or code base. | |
126 | ||
aa11c230 | 127 | %prep |
d997b14b AM |
128 | %setup -q -a1 |
129 | mv clang-*.* tools/clang | |
d997b14b | 130 | %patch3 -p1 -b .timestamp |
aa11c230 | 131 | |
132 | %build | |
d997b14b AM |
133 | # Disabling assertions now, rec. by pure and needed for OpenGTL |
134 | # no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3239 | |
135 | # | |
bc88141a | 136 | # bash specific 'test a < b' |
d997b14b AM |
137 | mkdir obj && cd obj |
138 | bash ../%configure \ | |
bc88141a ER |
139 | --libdir=%{_libdir}/%{name} \ |
140 | --datadir=%{_datadir}/%{name}-%{version} \ | |
d997b14b AM |
141 | %ifarch %{ix86} |
142 | --enable-pic=no \ | |
143 | %endif | |
bc88141a | 144 | --disable-static \ |
d997b14b | 145 | --disable-assertions \ |
bc88141a ER |
146 | --enable-debug-runtime \ |
147 | --enable-jit \ | |
aa11c230 | 148 | --enable-optimized \ |
bc88141a ER |
149 | --enable-shared \ |
150 | --with-pic | |
151 | ||
d997b14b AM |
152 | # FIXME file this |
153 | # configure does not properly specify libdir | |
154 | sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config | |
bc88141a | 155 | |
d997b14b AM |
156 | %{__make} \ |
157 | OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}" | |
aa11c230 | 158 | |
159 | %install | |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | ||
d997b14b AM |
162 | cd obj |
163 | chmod -x examples/Makefile | |
164 | ||
165 | %{__make} -j1 install \ | |
166 | PROJ_docsdir=/moredocs \ | |
aa11c230 | 167 | DESTDIR=$RPM_BUILD_ROOT |
d997b14b | 168 | cd .. |
aa11c230 | 169 | |
d997b14b | 170 | # Static analyzer not installed by default: |
7e30fbbc | 171 | install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/ |
d997b14b AM |
172 | # wrong path used |
173 | install -d $RPM_BUILD_ROOT%{_libexecdir} | |
d997b14b | 174 | # create launchers |
7e30fbbc | 175 | |
d997b14b AM |
176 | for f in scan-{build,view}; do |
177 | ln -s %{_libdir}/clang-analyzer/$f $RPM_BUILD_ROOT%{_bindir}/$f | |
178 | done | |
179 | ||
7e30fbbc | 180 | cd tools/clang/tools/scan-build |
d997b14b AM |
181 | |
182 | for f in scan-build scanview.css sorttable.js; do | |
183 | cp -p $f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/ | |
184 | done | |
d997b14b AM |
185 | cp -pr * $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/ |
186 | cd ../../../../ | |
187 | ||
188 | # Move documentation back to build directory | |
189 | # | |
190 | rm -rf moredocs | |
191 | mv $RPM_BUILD_ROOT/moredocs . | |
192 | rm moredocs/*.tar.gz | |
193 | #rm moredocs/ocamldoc/html/*.tar.gz | |
194 | ||
195 | # And prepare Clang documentation | |
196 | # | |
197 | rm -rf clang-docs | |
198 | mkdir clang-docs | |
199 | for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do | |
200 | ln tools/clang/$f clang-docs/ | |
201 | done | |
202 | #rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools} | |
021b3c3d | 203 | |
6832a5c5 | 204 | # Get rid of erroneously installed example files. |
d997b14b | 205 | rm $RPM_BUILD_ROOT%{_libdir}/%{name}/*LLVMHello.* |
6832a5c5 | 206 | |
d997b14b AM |
207 | # FIXME file this bug |
208 | sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \ | |
209 | $RPM_BUILD_ROOT%{_bindir}/llvm-config | |
6832a5c5 | 210 | |
d997b14b AM |
211 | chmod -x $RPM_BUILD_ROOT%{_libdir}/%{name}/*.a |
212 | ||
213 | # remove documentation makefiles: | |
214 | # they require the build directory to work | |
215 | find examples -name 'Makefile' | xargs -0r rm -f | |
6832a5c5 | 216 | |
aa11c230 | 217 | %clean |
218 | rm -rf $RPM_BUILD_ROOT | |
219 | ||
2326a99f JB |
220 | %post -p /sbin/ldconfig |
221 | %postun -p /sbin/ldconfig | |
aa11c230 | 222 | |
223 | %files | |
224 | %defattr(644,root,root,755) | |
bc88141a | 225 | %doc CREDITS.TXT LICENSE.TXT README.txt |
a9beeab5 | 226 | %attr(755,root,root) %{_bindir}/bugpoint |
a9beeab5 JB |
227 | %attr(755,root,root) %{_bindir}/llc |
228 | %attr(755,root,root) %{_bindir}/lli | |
a9beeab5 | 229 | %attr(755,root,root) %{_bindir}/opt |
a8575aac | 230 | %attr(755,root,root) %{_bindir}/llvmc |
bc88141a ER |
231 | %attr(755,root,root) %{_bindir}/llvm-* |
232 | %exclude %attr(755,root,root) %{_bindir}/llvm-config | |
a9beeab5 JB |
233 | %{_mandir}/man1/bugpoint.1* |
234 | %{_mandir}/man1/llc.1* | |
235 | %{_mandir}/man1/lli.1* | |
d997b14b | 236 | %{_mandir}/man1/llvmc.1* |
a9beeab5 | 237 | %{_mandir}/man1/llvm-*.1* |
a9beeab5 JB |
238 | %{_mandir}/man1/llvmgcc.1* |
239 | %{_mandir}/man1/llvmgxx.1* | |
240 | %{_mandir}/man1/opt.1* | |
a8575aac | 241 | #%{_mandir}/man1/stkrc.1* |
a9beeab5 | 242 | %{_mandir}/man1/tblgen.1* |
bc88141a ER |
243 | |
244 | %files doc | |
245 | %defattr(644,root,root,755) | |
d997b14b | 246 | %doc docs/*.{html,css} docs/img examples moredocs/html |
bc88141a ER |
247 | |
248 | %files devel | |
249 | %defattr(644,root,root,755) | |
d997b14b | 250 | #%doc docs/doxygen |
bc88141a ER |
251 | %attr(755,root,root) %{_bindir}/llvm-config |
252 | %{_includedir}/llvm | |
253 | %{_includedir}/llvm-c | |
d997b14b | 254 | %{_libdir}/%{name} |
bc88141a | 255 | |
d997b14b | 256 | %files -n clang |
bc88141a | 257 | %defattr(644,root,root,755) |
d997b14b AM |
258 | %doc clang-docs/* |
259 | %doc tools/clang/docs/* | |
260 | %attr(755,root,root) %{_bindir}/clang* | |
d997b14b AM |
261 | %attr(755,root,root) %{_bindir}/tblgen |
262 | %{_prefix}/lib/clang | |
d997b14b | 263 | %{_mandir}/man1/clang.1.* |
d997b14b AM |
264 | |
265 | %files -n clang-analyzer | |
bc88141a | 266 | %defattr(644,root,root,755) |
d997b14b AM |
267 | %attr(755,root,root) %{_bindir}/scan-build |
268 | %attr(755,root,root) %{_bindir}/scan-view | |
ae49e501 AM |
269 | %dir %{_libdir}/clang-analyzer |
270 | %attr(755,root,root) %{_libdir}/clang-analyzer/scan-* | |
7e30fbbc | 271 | %attr(755,root,root) %{_libdir}/clang-analyzer/c++-* |
272 | %attr(755,root,root) %{_libdir}/clang-analyzer/ccc-* | |
273 | %attr(755,root,root) %{_libdir}/clang-analyzer/set-xcode-* | |
ae49e501 | 274 | %{_libdir}/clang-analyzer/*.* |
d997b14b AM |
275 | |
276 | %files ocaml | |
277 | %defattr(644,root,root,755) | |
278 | %doc moredocs/ocamldoc/html/* | |
279 | %{_libdir}/ocaml/*.cma | |
280 | %{_libdir}/ocaml/*.cmi | |
281 | ||
282 | %files ocaml-devel | |
283 | %defattr(644,root,root,755) | |
284 | %{_libdir}/ocaml/*.a | |
285 | %{_libdir}/ocaml/*.cmx* | |
286 | %{_libdir}/ocaml/*.mli |