1 | # Build options: |
---|
2 | # |
---|
3 | # --with doxygen |
---|
4 | # The doxygen docs are HUGE, so they are not built by default. |
---|
5 | |
---|
6 | Name: llvm |
---|
7 | Version: 2.7 |
---|
8 | Release: 1%{?_dist_release} |
---|
9 | Summary: The Low Level Virtual Machine |
---|
10 | Summary(ja): LLVM - 低レベルバーチャルマシン |
---|
11 | |
---|
12 | Group: Development/Languages |
---|
13 | License: NCSA |
---|
14 | URL: http://llvm.org/ |
---|
15 | Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tgz |
---|
16 | Source1: http://llvm.org/releases/%{version}/clang-%{version}.tgz |
---|
17 | # Data files should be installed with timestamps preserved |
---|
18 | Patch0: llvm-2.6-timestamp.patch |
---|
19 | |
---|
20 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
21 | |
---|
22 | BuildRequires: bison |
---|
23 | BuildRequires: chrpath |
---|
24 | BuildRequires: flex |
---|
25 | BuildRequires: gcc-c++ >= 3.4 |
---|
26 | BuildRequires: groff |
---|
27 | BuildRequires: libtool-ltdl-devel |
---|
28 | BuildRequires: ocaml |
---|
29 | # for DejaGNU test suite |
---|
30 | BuildRequires: dejagnu tcl python |
---|
31 | %if %{?_with_doxygen:1}%{!?_with_doxygen:0} |
---|
32 | BuildRequires: doxygen graphviz |
---|
33 | %endif |
---|
34 | |
---|
35 | # LLVM is not supported on PPC64 |
---|
36 | # http://llvm.org/bugs/show_bug.cgi?id=3729 |
---|
37 | ExcludeArch: ppc64 |
---|
38 | |
---|
39 | %description |
---|
40 | LLVM is a compiler infrastructure designed for compile-time, |
---|
41 | link-time, runtime, and idle-time optimization of programs from |
---|
42 | arbitrary programming languages. The compiler infrastructure includes |
---|
43 | mirror sets of programming tools as well as libraries with equivalent |
---|
44 | functionality. |
---|
45 | |
---|
46 | |
---|
47 | %package devel |
---|
48 | Summary: Libraries and header files for LLVM |
---|
49 | Summary(ja): LLVM のライブラリおよびヘッダファイル |
---|
50 | Group: Development/Languages |
---|
51 | Requires: %{name} = %{version}-%{release} |
---|
52 | Requires: libstdc++-devel |
---|
53 | Provides: llvm-static = %{version}-%{release} |
---|
54 | |
---|
55 | |
---|
56 | %description devel |
---|
57 | This package contains library and header files needed to develop new |
---|
58 | native programs that use the LLVM infrastructure. |
---|
59 | |
---|
60 | |
---|
61 | %package doc |
---|
62 | Summary: Documentation for LLVM |
---|
63 | Summary(ja): LLVM のドキュメント |
---|
64 | Group: Documentation |
---|
65 | Requires: %{name} = %{version}-%{release} |
---|
66 | |
---|
67 | %description doc |
---|
68 | Documentation for the LLVM compiler infrastructure. |
---|
69 | |
---|
70 | |
---|
71 | %package -n clang |
---|
72 | Summary: A C language family front-end for LLVM |
---|
73 | Summary(ja): LLVM の C 言語用フロントエンド |
---|
74 | License: NCSA |
---|
75 | Group: Development/Languages |
---|
76 | |
---|
77 | %description -n clang |
---|
78 | clang: noun |
---|
79 | 1. A loud, resonant, metallic sound. |
---|
80 | 2. The strident call of a crane or goose. |
---|
81 | 3. C-language family front-end toolkit. |
---|
82 | |
---|
83 | The goal of the Clang project is to create a new C, C++, Objective C |
---|
84 | and Objective C++ front-end for the LLVM compiler. Its tools are built |
---|
85 | as libraries and designed to be loosely-coupled and extensible. |
---|
86 | |
---|
87 | |
---|
88 | %package -n clang-devel |
---|
89 | Summary: Header files for clang |
---|
90 | Summary(ja): clang のヘッダファイル |
---|
91 | Group: Development/Languages |
---|
92 | Requires: clang = %{version}-%{release} |
---|
93 | |
---|
94 | %description -n clang-devel |
---|
95 | This package contains header files for the Clang compiler. |
---|
96 | |
---|
97 | |
---|
98 | %package -n clang-analyzer |
---|
99 | Summary: A source code analysis framework |
---|
100 | Summary(ja): ソースコー分析フレームワーク |
---|
101 | License: NCSA |
---|
102 | Group: Development/Languages |
---|
103 | Requires: clang = %{version}-%{release} |
---|
104 | # not picked up automatically since files are currently not instaled |
---|
105 | # in standard Python hierarchies yet |
---|
106 | Requires: python |
---|
107 | |
---|
108 | %description -n clang-analyzer |
---|
109 | The Clang Static Analyzer consists of both a source code analysis |
---|
110 | framework and a standalone tool that finds bugs in C and Objective-C |
---|
111 | programs. The standalone tool is invoked from the command-line, and is |
---|
112 | intended to run in tandem with a build of a project or code base. |
---|
113 | |
---|
114 | |
---|
115 | %package -n clang-doc |
---|
116 | Summary: Documentation for Clang |
---|
117 | Summary(ja): Clang のドキュメント |
---|
118 | Group: Documentation |
---|
119 | Requires: %{name} = %{version}-%{release} |
---|
120 | |
---|
121 | %description -n clang-doc |
---|
122 | Documentation for the Clang compiler front-end. |
---|
123 | |
---|
124 | |
---|
125 | %if %{?_with_doxygen:1}%{!?_with_doxygen:0} |
---|
126 | %package apidoc |
---|
127 | Summary: API documentation for LLVM |
---|
128 | Summary(ja): LLVM の API ドキュメント |
---|
129 | Group: Development/Languages |
---|
130 | Requires: %{name}-docs = %{version}-%{release} |
---|
131 | |
---|
132 | |
---|
133 | %description apidoc |
---|
134 | API documentation for the LLVM compiler infrastructure. |
---|
135 | %endif |
---|
136 | |
---|
137 | |
---|
138 | %package ocaml |
---|
139 | Summary: OCaml binding for LLVM |
---|
140 | Summary(ja): LLVM の OCaml バインディング |
---|
141 | Group: Development/Libraries |
---|
142 | Requires: %{name} = %{version}-%{release} |
---|
143 | Requires: ocaml |
---|
144 | |
---|
145 | %description ocaml |
---|
146 | OCaml binding for LLVM. |
---|
147 | |
---|
148 | |
---|
149 | %package ocaml-devel |
---|
150 | Summary: Development files for %{name}-ocaml |
---|
151 | Summary(ja): %{name}-ocaml の開発ファイル |
---|
152 | Group: Development/Libraries |
---|
153 | Requires: %{name}-devel = %{version}-%{release} |
---|
154 | Requires: %{name}-ocaml = %{version}-%{release} |
---|
155 | Requires: ocaml |
---|
156 | |
---|
157 | %description ocaml-devel |
---|
158 | The %{name}-ocaml-devel package contains libraries and signature files |
---|
159 | for developing applications that use %{name}-ocaml. |
---|
160 | |
---|
161 | |
---|
162 | %package ocaml-doc |
---|
163 | Summary: Documentation for %{name}-ocaml |
---|
164 | Summary(ja): %{name}-ocaml のドキュメント |
---|
165 | Group: Documentation |
---|
166 | Requires: %{name}-ocaml = %{version}-%{release} |
---|
167 | |
---|
168 | %description ocaml-doc |
---|
169 | HTML documentation for LLVM's OCaml binding. |
---|
170 | |
---|
171 | |
---|
172 | |
---|
173 | %prep |
---|
174 | %setup -q -n llvm-%{version} -a1 %{?_with_gcc:-a2} |
---|
175 | mv clang-%{version} tools/clang |
---|
176 | |
---|
177 | %patch0 -p1 -b .timestamp |
---|
178 | |
---|
179 | # Encoding fix |
---|
180 | (cd tools/clang/docs && \ |
---|
181 | iconv -f ISO88591 -t UTF8 BlockImplementation.txt \ |
---|
182 | -o BlockImplementation.txt) |
---|
183 | |
---|
184 | |
---|
185 | %build |
---|
186 | # Disabling assertions now, rec. by pure and needed for OpenGTL |
---|
187 | # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801 |
---|
188 | mkdir obj && cd obj |
---|
189 | ../configure \ |
---|
190 | --prefix=%{_prefix} \ |
---|
191 | --libdir=%{_libdir}/%{name} \ |
---|
192 | --disable-assertions \ |
---|
193 | --enable-jit \ |
---|
194 | --enable-shared |
---|
195 | |
---|
196 | # FIXME file this |
---|
197 | # configure does not properly specify libdir |
---|
198 | sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config |
---|
199 | |
---|
200 | make %{_smp_mflags} \ |
---|
201 | %ifarch ppc |
---|
202 | OPTIMIZE_OPTION="%{optflags} -fno-var-tracking-assignments" |
---|
203 | %else |
---|
204 | OPTIMIZE_OPTION="%{optflags}" |
---|
205 | %endif |
---|
206 | |
---|
207 | |
---|
208 | %check |
---|
209 | cd obj |
---|
210 | # no current unexpected failures. Use || true if they recur to force ignore |
---|
211 | make check 2>&1 | tee ../llvm-testlog.txt |
---|
212 | (cd tools/clang && make test 2>&1) | tee ../clang-testlog.txt |
---|
213 | |
---|
214 | |
---|
215 | %install |
---|
216 | rm -rf %{buildroot} |
---|
217 | pushd obj |
---|
218 | chmod -x examples/Makefile |
---|
219 | |
---|
220 | make install DESTDIR=%{buildroot} \ |
---|
221 | PROJ_docsdir=/moredocs |
---|
222 | popd |
---|
223 | |
---|
224 | # Create ld.so.conf.d entry |
---|
225 | mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d |
---|
226 | cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf << EOF |
---|
227 | %{_libdir}/llvm |
---|
228 | EOF |
---|
229 | |
---|
230 | # Static analyzer not installed by default: |
---|
231 | # http://clang-analyzer.llvm.org/installation#OtherPlatforms |
---|
232 | mkdir -p %{buildroot}%{_libdir}/clang-analyzer |
---|
233 | # create launchers |
---|
234 | for f in scan-{build,view}; do |
---|
235 | ln -s %{_libdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f |
---|
236 | done |
---|
237 | |
---|
238 | (cd tools/clang/tools && cp -pr scan-{build,view} \ |
---|
239 | %{buildroot}%{_libdir}/clang-analyzer/) |
---|
240 | |
---|
241 | |
---|
242 | # Move documentation back to build directory |
---|
243 | # |
---|
244 | mv %{buildroot}/moredocs . |
---|
245 | rm moredocs/*.tar.gz |
---|
246 | rm moredocs/ocamldoc/html/*.tar.gz |
---|
247 | |
---|
248 | # And prepare Clang documentation |
---|
249 | # |
---|
250 | mkdir clang-docs |
---|
251 | for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do |
---|
252 | ln tools/clang/$f clang-docs/ |
---|
253 | done |
---|
254 | rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools} |
---|
255 | |
---|
256 | |
---|
257 | #find %{buildroot} -name .dir -print0 | xargs -0r rm -f |
---|
258 | file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d |
---|
259 | file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d |
---|
260 | #chrpath -d %{buildroot}/%{_libexecdir}/clang-cc |
---|
261 | |
---|
262 | # Get rid of erroneously installed example files. |
---|
263 | rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.* |
---|
264 | |
---|
265 | # FIXME file this bug |
---|
266 | sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \ |
---|
267 | %{buildroot}%{_bindir}/llvm-config |
---|
268 | |
---|
269 | chmod -x %{buildroot}%{_libdir}/%{name}/*.a |
---|
270 | |
---|
271 | # remove documentation makefiles: |
---|
272 | # they require the build directory to work |
---|
273 | find examples -name 'Makefile' | xargs -0r rm -f |
---|
274 | |
---|
275 | |
---|
276 | %clean |
---|
277 | rm -rf %{buildroot} |
---|
278 | |
---|
279 | |
---|
280 | %post -p /sbin/ldconfig |
---|
281 | |
---|
282 | |
---|
283 | %postun -p /sbin/ldconfig |
---|
284 | |
---|
285 | |
---|
286 | %files |
---|
287 | %defattr(-,root,root,-) |
---|
288 | %doc CREDITS.TXT LICENSE.TXT README.txt llvm-testlog.txt |
---|
289 | %{_bindir}/bugpoint |
---|
290 | %{_bindir}/llc |
---|
291 | %{_bindir}/lli |
---|
292 | %exclude %{_bindir}/llvm-config |
---|
293 | %{_bindir}/llvm* |
---|
294 | %{_bindir}/opt |
---|
295 | %config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf |
---|
296 | %dir %{_libdir}/llvm |
---|
297 | %{_libdir}/llvm/*.so |
---|
298 | %exclude %{_mandir}/man1/clang.1.* |
---|
299 | %doc %{_mandir}/man1/*.1.* |
---|
300 | |
---|
301 | %files devel |
---|
302 | %defattr(-,root,root,-) |
---|
303 | %{_bindir}/llvm-config |
---|
304 | %{_includedir}/%{name} |
---|
305 | %{_includedir}/%{name}-c |
---|
306 | %{_libdir}/%{name}/*.a |
---|
307 | |
---|
308 | %files -n clang |
---|
309 | %defattr(-,root,root,-) |
---|
310 | %doc clang-docs/* clang-testlog.txt |
---|
311 | %{_bindir}/clang* |
---|
312 | %{_bindir}/tblgen |
---|
313 | %{_prefix}/lib/clang |
---|
314 | %doc %{_mandir}/man1/clang.1.* |
---|
315 | |
---|
316 | %files -n clang-devel |
---|
317 | %defattr(-,root,root,-) |
---|
318 | %{_includedir}/clang |
---|
319 | %{_includedir}/clang-c |
---|
320 | |
---|
321 | %files -n clang-analyzer |
---|
322 | %defattr(-,root,root,-) |
---|
323 | %{_bindir}/scan-build |
---|
324 | %{_bindir}/scan-view |
---|
325 | %{_libdir}/clang-analyzer |
---|
326 | |
---|
327 | %files -n clang-doc |
---|
328 | %defattr(-,root,root,-) |
---|
329 | %doc tools/clang/docs/* |
---|
330 | |
---|
331 | %files doc |
---|
332 | %defattr(-,root,root,-) |
---|
333 | %doc examples moredocs/html |
---|
334 | |
---|
335 | %files ocaml |
---|
336 | %defattr(-,root,root,-) |
---|
337 | %{_libdir}/ocaml/*.cma |
---|
338 | %{_libdir}/ocaml/*.cmi |
---|
339 | |
---|
340 | %files ocaml-devel |
---|
341 | %defattr(-,root,root,-) |
---|
342 | %{_libdir}/ocaml/*.a |
---|
343 | %{_libdir}/ocaml/*.cmx* |
---|
344 | %{_libdir}/ocaml/*.mli |
---|
345 | |
---|
346 | %files ocaml-doc |
---|
347 | %defattr(-,root,root,-) |
---|
348 | %doc moredocs/ocamldoc/html/* |
---|
349 | |
---|
350 | %if %{?_with_doxygen:1}%{!?_with_doxygen:0} |
---|
351 | %files apidoc |
---|
352 | %defattr(-,root,root,-) |
---|
353 | %doc docs/doxygen |
---|
354 | %endif |
---|
355 | |
---|
356 | |
---|
357 | |
---|
358 | %changelog |
---|
359 | * Sun May 23 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7-1 |
---|
360 | - initial build for Vine Linux |
---|
361 | |
---|
362 | * Sun May 2 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-1 |
---|
363 | - Update to final 2.7 release |
---|
364 | |
---|
365 | * Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-0.1.pre1 |
---|
366 | - Update to first 2.7 pre-release |
---|
367 | |
---|
368 | * Fri Sep 18 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.6.pre2 |
---|
369 | - Update to 2.6 pre-release2 |
---|
370 | - -devel subpackage now virtually provides -static |
---|
371 | |
---|
372 | * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.5.pre1 |
---|
373 | - Disable var tracking assignments on PPC |
---|
374 | |
---|
375 | * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1 |
---|
376 | - Don't adjust clang include dir; files there are noarch (bz#521893) |
---|
377 | - Enable clang unit tests |
---|
378 | - clang and clang-analyzer renamed; no longer depend on llvm at runtime |
---|
379 | |
---|
380 | * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1 |
---|
381 | - Package Clang's static analyzer tools |
---|
382 | |
---|
383 | * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.2.pre1 |
---|
384 | - PIC is now enabled by default; explicitly disable on %%{ix86} |
---|
385 | |
---|
386 | * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1 |
---|
387 | - First 2.6 prerelease |
---|
388 | - Enable Clang front-end |
---|
389 | - Enable debuginfo generation |
---|
390 | |
---|
391 | * Sat Sep 5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6 |
---|
392 | - Disable assertions (needed by OpenGTL, bz#521261) |
---|
393 | - Align spec file with upstream build instructions |
---|
394 | - Enable unit tests |
---|
395 | |
---|
396 | * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5 |
---|
397 | - Only disable PIC on %%ix86; ppc actually needs it |
---|
398 | |
---|
399 | * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4 |
---|
400 | - Disable use of position-independent code on 32-bit platforms |
---|
401 | (buggy in LLVM <= 2.5) |
---|
402 | |
---|
403 | * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3 |
---|
404 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
405 | |
---|
406 | * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2 |
---|
407 | - Remove build scripts; they require the build directory to work |
---|
408 | |
---|
409 | * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1 |
---|
410 | - Update to 2.5 |
---|
411 | - Package build scripts (bug #457881) |
---|
412 | |
---|
413 | * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2 |
---|
414 | - Patched build process for the OCaml binding |
---|
415 | |
---|
416 | * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1 |
---|
417 | - Update to 2.4 |
---|
418 | - Package Ocaml binding |
---|
419 | |
---|
420 | * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2 |
---|
421 | - Add dependency on groff |
---|
422 | |
---|
423 | * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-1 |
---|
424 | - LLVM 2.3 |
---|
425 | |
---|
426 | * Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2-4 |
---|
427 | - fix license tags |
---|
428 | |
---|
429 | * Wed Mar 5 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.2-3 |
---|
430 | - Fix compilation problems with gcc 4.3 |
---|
431 | |
---|
432 | * Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2-2 |
---|
433 | - Autorebuild for GCC 4.3 |
---|
434 | |
---|
435 | * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-2 |
---|
436 | - Fix review comments |
---|
437 | |
---|
438 | * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-1 |
---|
439 | - Initial version |
---|