2 #warning: Installed (but unpackaged) file(s) found:
3 # /usr/share/man/man1/lit.1.gz
6 %bcond_without ocaml # ocaml binding
7 %bcond_with apidocs # The doxygen docs are HUGE, so they are not built by default.
8 %bcond_with tests # run tests
10 %ifarch s390 s390x sparc64
11 # No ocaml on these arches
15 Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
16 Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
20 License: University of Illinois/NCSA Open Source License
21 Group: Development/Languages
22 Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.tgz
23 # Source0-md5: 793138412d2af2c7c7f54615f8943771
24 Source1: http://llvm.org/releases/%{version}/clang-%{version}.tgz
25 # Source1-md5: 634de18d04b7a4ded19ec4c17d23cfca
26 # Data files should be installed with timestamps preserved
27 Patch3: %{name}-2.6-timestamp.patch
28 Patch4: %{name}-pld.patch
34 BuildRequires: doxygen
35 BuildRequires: graphviz
38 BuildRequires: dejagnu
40 BuildRequires: tcl-devel
43 BuildRequires: libltdl-devel
44 BuildRequires: libstdc++-devel >= 5:3.4
45 BuildRequires: ocaml-ocamldoc
46 BuildRequires: perl-tools-pod
47 BuildRequires: rpm-pythonprov
48 # gcc4 might be installed, but not current __cc
49 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
50 BuildRequires: __cc >= 3.4
52 # LLVM is not supported on PPC64
53 # http://llvm.org/bugs/show_bug.cgi?id=3729
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 %define _sysconfdir /etc/%{name}
59 %define specflags_ppc -fno-var-tracking-assignments
61 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
62 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
65 LLVM is a compiler infrastructure designed for compile-time,
66 link-time, runtime, and idle-time optimization of programs from
67 arbitrary programming languages. LLVM is written in C++ and has been
68 developed since 2000 at the University of Illinois and Apple. It
69 currently supports compilation of C and C++ programs using clang
72 %description -l pl.UTF-8
73 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
74 czasu kompilowania, linkowania, działania i bezczynności programów w
75 dowolnych językach programowania. Jest napisana w C++, rozwijana od
76 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
77 kompilację programów w C i C++ przy użyciu frontendu clang.
80 Summary: Static libraries and header files for LLVM
81 Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
82 Group: Development/Languages
83 Requires: %{name} = %{version}-%{release}
84 Requires: libstdc++-devel >= 6:3.4
87 This package contains static libraries and header files needed to
88 develop new native programs that use the LLVM infrastructure.
90 %description devel -l pl.UTF-8
91 Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
92 potrzebne do tworzenia nowych programów natywnych wykorzystujących
96 Summary: Documentation for LLVM
97 Summary(pl.UTF-8): Dokumentacja do LLVM-a
99 # does not require base
102 Documentation for the LLVM compiler infrastructure.
104 %description doc -l pl.UTF-8
105 Dokumentacja do infrastruktury kompilatorów LLVM.
108 Summary: API documentation for LLVM
109 Summary(pl.UTF-8): Dokumentacja API LLVM-a
110 Group: Development/Languages
111 Requires: %{name}-doc = %{version}-%{release}
114 API documentation for the LLVM compiler infrastructure.
116 %description apidocs -l pl.UTF-8
117 Dokumentacja API infrastruktury kompilatorów LLVM.
120 Summary: A C language family frontend for LLVM
121 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C
123 Group: Development/Languages
125 %description -n clang
126 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
127 of a crane or goose. 3. C-language family front-end toolkit.
129 The goal of the Clang project is to create a new C, C++, Objective C
130 and Objective C++ front-end for the LLVM compiler. Its tools are built
131 as libraries and designed to be loosely-coupled and extendable.
133 %description -n clang -l pl.UTF-8
134 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
135 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
138 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
139 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
140 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
143 %package -n clang-analyzer
144 Summary: A source code analysis framework
145 Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego
147 Group: Development/Languages
148 Requires: clang = %{version}-%{release}
149 # not picked up automatically since files are currently not instaled
150 # in standard Python hierarchies yet
153 %description -n clang-analyzer
154 The Clang Static Analyzer consists of both a source code analysis
155 framework and a standalone tool that finds bugs in C and Objective-C
156 programs. The standalone tool is invoked from the command-line, and is
157 intended to run in tandem with a build of a project or code base.
159 %description -n clang-analyzer -l pl.UTF-8
160 Clang Static Analyzer składa się ze szkieletu do analizy kodu
161 źródłowego oraz samodzielnego narzędzia znajdującego błędy w
162 programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
163 myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
165 %package -n clang-devel
166 Summary: Header files for Clang
167 Summary(pl.UTF-8): Pliki nagłówkowe Clanga
168 Group: Development/Languages
169 Requires: clang = %{version}-%{release}
171 %description -n clang-devel
172 This package contains header files for the Clang compiler.
174 %description -n clang-devel -l pl.UTF-8
175 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
177 %package -n clang-doc
178 Summary: Documentation for Clang
179 Summary(pl.UTF-8): Dokumentacja do Clanga
181 Requires: %{name} = %{version}-%{release}
183 %description -n clang-doc
184 Documentation for the Clang compiler front-end.
186 %description -n clang-doc -l pl.UTF-8
187 Dokumentacja do frontendu kompilatora Clang.
189 %package -n clang-apidocs
190 Summary: API documentation for Clang
191 Summary(pl.UTF-8): Dokumentacja API Clanga
192 Group: Development/Languages
193 Requires: clang-doc = %{version}-%{release}
195 %description -n clang-apidocs
196 API documentation for the Clang compiler.
198 %description -n clang-apidocs -l pl.UTF-8
199 Dokumentacja API kompilatora Clang.
202 Summary: OCaml binding for LLVM
203 Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a
205 Requires: %{name} = %{version}-%{release}
206 %requires_eq ocaml-runtime
209 OCaml binding for LLVM.
211 %description ocaml -l pl.UTF-8
212 Wiązanie OCamla do LLVM-a.
215 Summary: Development files for LLVM OCaml binding
216 Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a
217 Group: Development/Libraries
218 Requires: %{name}-devel = %{version}-%{release}
219 Requires: %{name}-ocaml = %{version}-%{release}
221 %description ocaml-devel
222 The llvm-ocaml-devel package contains libraries and signature files
223 for developing applications that use llvm-ocaml binding.
225 %description ocaml-devel -l pl.UTF-8
226 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
227 wykorzystujących wiązanie llvm-ocaml.
231 Summary: Documentation for LLVM's OCaml binding
232 Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a
234 Requires: %{name}-ocaml = %{version}-%{release}
236 %description ocaml-doc
237 HTML documentation for LLVM's OCaml binding.
239 %description ocaml-doc -l pl.UTF-8
240 Dokumentacja HTML wiązania OCamla do LLVM-a.
244 mv clang-*.* tools/clang
248 sed -i 's|triplet-plox-here|%{_host}|' tools/clang/lib/Driver/ToolChains.cpp
250 # configure does not properly specify libdir
251 sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}|g' Makefile.config.in
253 grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
254 s,^#!.*bin/env python,#!%{__python},
255 s,^#!.*bin/env perl,#!%{__perl},
261 # Disabling assertions now, rec. by pure and needed for OpenGTL
262 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
264 # bash specific 'test a < b'
267 --libdir=%{_libdir}/%{name} \
268 --datadir=%{_datadir}/%{name}-%{version} \
276 --disable-assertions \
277 --enable-debug-runtime \
285 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
288 %{__make} check 2>&1 | tee llvm-testlog.txt
289 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
293 rm -rf $RPM_BUILD_ROOT
294 %{__make} -C obj -j1 install \
295 PROJ_docsdir=/moredocs \
296 DESTDIR=$RPM_BUILD_ROOT
298 # Static analyzer not installed by default:
299 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
300 install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
302 for f in scan-{build,view}; do
303 ln -s %{_libdir}/clang-analyzer/$f/$f $RPM_BUILD_ROOT%{_bindir}/$f
304 cp -pr tools/clang/tools/$f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
307 # Move documentation back to build directory
309 mv $RPM_BUILD_ROOT/moredocs .
310 rm -fv moredocs/*.tar.gz
311 rm -fv moredocs/ocamldoc/html/*.tar.gz
313 # and separate the apidoc
315 rm -rf apidoc clang-apidoc
316 mv moredocs/html/doxygen apidoc
317 cp -a tools/clang/docs/doxygen/html clang-apidoc
320 # And prepare Clang documentation
322 install -d clang-docs
323 for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do
324 ln tools/clang/$f clang-docs
327 # Get rid of erroneously installed example files.
328 rm -v $RPM_BUILD_ROOT%{_libdir}/*LLVMHello.*
330 # FIXME file this bug
331 sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}",' \
332 $RPM_BUILD_ROOT%{_bindir}/llvm-config
334 # remove documentation makefiles:
335 # they require the build directory to work
336 rm -rf moredocs/examples
337 cp -a examples moredocs/examples
338 find moredocs/examples -name Makefile | xargs -0r rm -f
341 rm -rf $RPM_BUILD_ROOT
343 %post -p /sbin/ldconfig
344 %postun -p /sbin/ldconfig
347 %defattr(644,root,root,755)
348 %doc CREDITS.TXT LICENSE.TXT README.txt
349 %{?with_tests:%doc llvm-testlog.txt}
350 %attr(755,root,root) %{_bindir}/bugpoint
351 %attr(755,root,root) %{_bindir}/llc
352 %attr(755,root,root) %{_bindir}/lli
353 %attr(755,root,root) %{_bindir}/opt
354 %attr(755,root,root) %{_bindir}/llvmc
355 %attr(755,root,root) %{_bindir}/llvm-*
356 %attr(755,root,root) %{_bindir}/macho-dump
357 %exclude %attr(755,root,root) %{_bindir}/llvm-config
358 %attr(755,root,root) %{_libdir}/libLLVM-*.*.so
359 %{_mandir}/man1/bugpoint.1*
360 %{_mandir}/man1/lit.1*
361 %{_mandir}/man1/llc.1*
362 %{_mandir}/man1/lli.1*
363 %{_mandir}/man1/llvm-*.1*
364 %{_mandir}/man1/llvmc.1*
365 %{_mandir}/man1/llvmgcc.1*
366 %{_mandir}/man1/llvmgxx.1*
367 %{_mandir}/man1/opt.1*
368 #%{_mandir}/man1/stkrc.1*
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_bindir}/llvm-config
374 %{_includedir}/llvm-c
376 # x86-64 only .a/.so?
378 %attr(755,root,root) %{_libdir}/BugpointPasses.so
379 %attr(755,root,root) %{_libdir}/libEnhancedDisassembly.so
380 %attr(755,root,root) %{_libdir}/libLTO.so
383 %exclude %attr(755,root,root) %{_libdir}/libLLVM-*.*.so
384 %exclude %attr(755,root,root) %{_libdir}/libclang.so
385 %attr(755,root,root) %{_libdir}/profile_rt.so
388 %defattr(644,root,root,755)
389 %doc moredocs/examples moredocs/html
393 %defattr(644,root,root,755)
398 %defattr(644,root,root,755)
400 %{?with_tests:%doc clang-testlog.txt}
401 %attr(755,root,root) %{_bindir}/clang*
402 %attr(755,root,root) %{_bindir}/tblgen
403 %attr(755,root,root) %{_libdir}/libclang.so
405 %{_mandir}/man1/clang.1.*
406 %{_mandir}/man1/tblgen.1*
408 %files -n clang-analyzer
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_bindir}/scan-build
411 %attr(755,root,root) %{_bindir}/scan-view
412 %dir %{_libdir}/clang-analyzer
414 %dir %{_libdir}/clang-analyzer/scan-view
415 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-view/scan-view
416 %{_libdir}/clang-analyzer/scan-view/Resources
417 %{_libdir}/clang-analyzer/scan-view/*.py
419 %dir %{_libdir}/clang-analyzer/scan-build
420 %{_libdir}/clang-analyzer/scan-build/*.css
421 %{_libdir}/clang-analyzer/scan-build/*.js
422 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/scan-build
423 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/*-analyzer
425 %files -n clang-devel
426 %defattr(644,root,root,755)
428 %{_includedir}/clang-c
431 %defattr(644,root,root,755)
432 %doc tools/clang/docs/*
435 %files -n clang-apidocs
436 %defattr(644,root,root,755)
442 %defattr(644,root,root,755)
443 %{_libdir}/ocaml/*.cma
444 %{_libdir}/ocaml/*.cmi
447 %defattr(644,root,root,755)
449 %{_libdir}/ocaml/*.cmx*
450 %{_libdir}/ocaml/*.mli
453 %defattr(644,root,root,755)
454 %doc moredocs/ocamldoc/html/*