]> git.pld-linux.org Git - packages/llvm.git/blame - llvm.spec
- pl; update base desc (with clang gcc is no longer required as C/C++ frontend)
[packages/llvm.git] / llvm.spec
CommitLineData
bc88141a 1# TODO
9556f4c9
ER
2#warning: Installed (but unpackaged) file(s) found:
3# /usr/share/man/man1/lit.1.gz
bc88141a 4#
9556f4c9
ER
5# Conditional build:
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
9
10%ifarch s390 s390x sparc64
11# No ocaml on these arches
12%undefine with_ocaml
13%endif
14
aa11c230 15Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
2326a99f 16Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
aa11c230 17Name: llvm
a7973f21 18Version: 2.9
0acc46f3 19Release: 2
aa11c230 20License: University of Illinois/NCSA Open Source License
21Group: Development/Languages
7e30fbbc 22Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.tgz
a7973f21 23# Source0-md5: 793138412d2af2c7c7f54615f8943771
9556f4c9 24Source1: http://llvm.org/releases/%{version}/clang-%{version}.tgz
a7973f21 25# Source1-md5: 634de18d04b7a4ded19ec4c17d23cfca
d997b14b
AM
26# Data files should be installed with timestamps preserved
27Patch3: %{name}-2.6-timestamp.patch
ce9cc204 28Patch4: %{name}-pld.patch
2326a99f 29URL: http://llvm.org/
bc88141a 30BuildRequires: bash
d997b14b 31BuildRequires: bison
d997b14b 32BuildRequires: flex
9556f4c9
ER
33%if %{with apidocs}
34BuildRequires: doxygen
d997b14b 35BuildRequires: graphviz
9556f4c9
ER
36%endif
37%if %{with tests}
38BuildRequires: dejagnu
39BuildRequires: python
40BuildRequires: tcl-devel
41%endif
d997b14b 42BuildRequires: groff
bc88141a 43BuildRequires: libltdl-devel
d997b14b
AM
44BuildRequires: libstdc++-devel >= 5:3.4
45BuildRequires: ocaml-ocamldoc
8c156e7d 46BuildRequires: perl-tools-pod
47BuildRequires: rpm-pythonprov
356a0bbd
ER
48# gcc4 might be installed, but not current __cc
49%if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
50BuildRequires: __cc >= 3.4
51%endif
9556f4c9
ER
52# LLVM is not supported on PPC64
53# http://llvm.org/bugs/show_bug.cgi?id=3729
54ExcludeArch: ppc64
aa11c230 55BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
356a0bbd 57%define _sysconfdir /etc/%{name}
021b3c3d 58
9556f4c9
ER
59%define specflags_ppc -fno-var-tracking-assignments
60
6832a5c5
ER
61# strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
62%define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
63
aa11c230 64%description
65LLVM is a compiler infrastructure designed for compile-time,
66link-time, runtime, and idle-time optimization of programs from
67arbitrary programming languages. LLVM is written in C++ and has been
68developed since 2000 at the University of Illinois and Apple. It
621ec11f
JB
69currently supports compilation of C and C++ programs using clang
70frontend.
aa11c230 71
2326a99f
JB
72%description -l pl.UTF-8
73LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
74czasu kompilowania, linkowania, działania i bezczynności programów w
75dowolnych językach programowania. Jest napisana w C++, rozwijana od
76roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
621ec11f 77kompilację programów w C i C++ przy użyciu frontendu clang.
2326a99f 78
bc88141a 79%package devel
621ec11f
JB
80Summary: Static libraries and header files for LLVM
81Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
bc88141a
ER
82Group: Development/Languages
83Requires: %{name} = %{version}-%{release}
84Requires: libstdc++-devel >= 6:3.4
85
86%description devel
621ec11f
JB
87This package contains static libraries and header files needed to
88develop new native programs that use the LLVM infrastructure.
89
90%description devel -l pl.UTF-8
91Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
92potrzebne do tworzenia nowych programów natywnych wykorzystujących
93infrastrukturę LLVM.
bc88141a 94
9556f4c9
ER
95%package doc
96Summary: Documentation for LLVM
621ec11f 97Summary(pl.UTF-8): Dokumentacja do LLVM-a
9556f4c9
ER
98Group: Documentation
99# does not require base
bc88141a 100
9556f4c9
ER
101%description doc
102Documentation for the LLVM compiler infrastructure.
bc88141a 103
621ec11f
JB
104%description doc -l pl.UTF-8
105Dokumentacja do infrastruktury kompilatorów LLVM.
106
9556f4c9
ER
107%package apidocs
108Summary: API documentation for LLVM
621ec11f 109Summary(pl.UTF-8): Dokumentacja API LLVM-a
9556f4c9
ER
110Group: Development/Languages
111Requires: %{name}-doc = %{version}-%{release}
bc88141a 112
9556f4c9
ER
113%description apidocs
114API documentation for the LLVM compiler infrastructure.
bc88141a 115
621ec11f
JB
116%description apidocs -l pl.UTF-8
117Dokumentacja API infrastruktury kompilatorów LLVM.
118
d997b14b
AM
119%package -n clang
120Summary: A C language family frontend for LLVM
621ec11f 121Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C
d997b14b
AM
122License: NCSA
123Group: Development/Languages
124
125%description -n clang
126clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
127of a crane or goose. 3. C-language family front-end toolkit.
128
129The goal of the Clang project is to create a new C, C++, Objective C
130and Objective C++ front-end for the LLVM compiler. Its tools are built
131as libraries and designed to be loosely-coupled and extendable.
132
621ec11f
JB
133%description -n clang -l pl.UTF-8
134clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
135piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
136z rodziny C.
137
138Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
139LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
140budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
141i rozszerzaniu.
142
d997b14b
AM
143%package -n clang-analyzer
144Summary: A source code analysis framework
621ec11f 145Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego
d997b14b
AM
146License: NCSA
147Group: Development/Languages
148Requires: clang = %{version}-%{release}
149# not picked up automatically since files are currently not instaled
150# in standard Python hierarchies yet
151Requires: python
152
153%description -n clang-analyzer
154The Clang Static Analyzer consists of both a source code analysis
155framework and a standalone tool that finds bugs in C and Objective-C
156programs. The standalone tool is invoked from the command-line, and is
157intended to run in tandem with a build of a project or code base.
158
621ec11f
JB
159%description -n clang-analyzer -l pl.UTF-8
160Clang Static Analyzer składa się ze szkieletu do analizy kodu
161źródłowego oraz samodzielnego narzędzia znajdującego błędy w
162programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
163myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
164
9556f4c9 165%package -n clang-devel
621ec11f
JB
166Summary: Header files for Clang
167Summary(pl.UTF-8): Pliki nagłówkowe Clanga
9556f4c9
ER
168Group: Development/Languages
169Requires: clang = %{version}-%{release}
170
171%description -n clang-devel
172This package contains header files for the Clang compiler.
173
621ec11f
JB
174%description -n clang-devel -l pl.UTF-8
175Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
176
9556f4c9
ER
177%package -n clang-doc
178Summary: Documentation for Clang
621ec11f 179Summary(pl.UTF-8): Dokumentacja do Clanga
9556f4c9
ER
180Group: Documentation
181Requires: %{name} = %{version}-%{release}
182
183%description -n clang-doc
184Documentation for the Clang compiler front-end.
185
621ec11f
JB
186%description -n clang-doc -l pl.UTF-8
187Dokumentacja do frontendu kompilatora Clang.
188
9556f4c9
ER
189%package -n clang-apidocs
190Summary: API documentation for Clang
621ec11f 191Summary(pl.UTF-8): Dokumentacja API Clanga
9556f4c9
ER
192Group: Development/Languages
193Requires: clang-doc = %{version}-%{release}
194
195%description -n clang-apidocs
196API documentation for the Clang compiler.
197
621ec11f
JB
198%description -n clang-apidocs -l pl.UTF-8
199Dokumentacja API kompilatora Clang.
200
9556f4c9
ER
201%package ocaml
202Summary: OCaml binding for LLVM
621ec11f
JB
203Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a
204Group: Libraries
9556f4c9
ER
205Requires: %{name} = %{version}-%{release}
206%requires_eq ocaml-runtime
207
621ec11f 208%description ocaml
9556f4c9
ER
209OCaml binding for LLVM.
210
621ec11f
JB
211%description ocaml -l pl.UTF-8
212Wiązanie OCamla do LLVM-a.
213
9556f4c9 214%package ocaml-devel
621ec11f
JB
215Summary: Development files for LLVM OCaml binding
216Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a
9556f4c9
ER
217Group: Development/Libraries
218Requires: %{name}-devel = %{version}-%{release}
219Requires: %{name}-ocaml = %{version}-%{release}
220
221%description ocaml-devel
222The llvm-ocaml-devel package contains libraries and signature files
621ec11f
JB
223for developing applications that use llvm-ocaml binding.
224
225%description ocaml-devel -l pl.UTF-8
226Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
227wykorzystujących wiązanie llvm-ocaml.
228
9556f4c9
ER
229
230%package ocaml-doc
231Summary: Documentation for LLVM's OCaml binding
621ec11f 232Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a
9556f4c9
ER
233Group: Documentation
234Requires: %{name}-ocaml = %{version}-%{release}
235
236%description ocaml-doc
237HTML documentation for LLVM's OCaml binding.
238
621ec11f
JB
239%description ocaml-doc -l pl.UTF-8
240Dokumentacja HTML wiązania OCamla do LLVM-a.
241
aa11c230 242%prep
d997b14b
AM
243%setup -q -a1
244mv clang-*.* tools/clang
9556f4c9 245%patch3 -p1
ce9cc204 246%patch4 -p1
247
248sed -i 's|triplet-plox-here|%{_host}|' tools/clang/lib/Driver/ToolChains.cpp
9556f4c9 249
19f21eee
PS
250# configure does not properly specify libdir
251sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}|g' Makefile.config.in
252
bacc8b96
ER
253grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
254 s,^#!.*bin/env python,#!%{__python},
255 s,^#!.*bin/env perl,#!%{__perl},
256}'
257
9556f4c9 258install -d obj
aa11c230 259
260%build
d997b14b 261# Disabling assertions now, rec. by pure and needed for OpenGTL
9556f4c9 262# TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
d997b14b 263#
bc88141a 264# bash specific 'test a < b'
9556f4c9 265cd obj
d997b14b 266bash ../%configure \
bc88141a
ER
267 --libdir=%{_libdir}/%{name} \
268 --datadir=%{_datadir}/%{name}-%{version} \
d997b14b
AM
269%ifarch %{ix86}
270 --enable-pic=no \
9556f4c9
ER
271%endif
272%if %{with apidocs}
273 --enable-doxygen \
d997b14b 274%endif
bc88141a 275 --disable-static \
d997b14b 276 --disable-assertions \
bc88141a
ER
277 --enable-debug-runtime \
278 --enable-jit \
aa11c230 279 --enable-optimized \
bc88141a
ER
280 --enable-shared \
281 --with-pic
282
d997b14b 283%{__make} \
0a0b7076 284 REQUIRES_RTTI=1 \
d997b14b 285 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
aa11c230 286
9556f4c9
ER
287%if %{with test}
288%{__make} check 2>&1 | tee llvm-testlog.txt
289%{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
290%endif
291
aa11c230 292%install
293rm -rf $RPM_BUILD_ROOT
9556f4c9 294%{__make} -C obj -j1 install \
d997b14b 295 PROJ_docsdir=/moredocs \
aa11c230 296 DESTDIR=$RPM_BUILD_ROOT
297
d997b14b 298# Static analyzer not installed by default:
9556f4c9
ER
299# http://clang-analyzer.llvm.org/installation#OtherPlatforms
300install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
d997b14b
AM
301# create launchers
302for f in scan-{build,view}; do
9556f4c9
ER
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
d997b14b
AM
305done
306
d997b14b 307# Move documentation back to build directory
d997b14b
AM
308rm -rf moredocs
309mv $RPM_BUILD_ROOT/moredocs .
9556f4c9
ER
310rm -fv moredocs/*.tar.gz
311rm -fv moredocs/ocamldoc/html/*.tar.gz
312
313# and separate the apidoc
314%if %{with apidocs}
315rm -rf apidoc clang-apidoc
316mv moredocs/html/doxygen apidoc
317cp -a tools/clang/docs/doxygen/html clang-apidoc
318%endif
d997b14b
AM
319
320# And prepare Clang documentation
d997b14b 321rm -rf clang-docs
9556f4c9 322install -d clang-docs
d997b14b 323for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do
9556f4c9 324 ln tools/clang/$f clang-docs
d997b14b 325done
021b3c3d 326
6832a5c5 327# Get rid of erroneously installed example files.
19f21eee 328rm -v $RPM_BUILD_ROOT%{_libdir}/*LLVMHello.*
6832a5c5 329
d997b14b 330# FIXME file this bug
19f21eee 331sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}",' \
d997b14b 332 $RPM_BUILD_ROOT%{_bindir}/llvm-config
6832a5c5 333
d997b14b
AM
334# remove documentation makefiles:
335# they require the build directory to work
9556f4c9
ER
336rm -rf moredocs/examples
337cp -a examples moredocs/examples
338find moredocs/examples -name Makefile | xargs -0r rm -f
6832a5c5 339
aa11c230 340%clean
341rm -rf $RPM_BUILD_ROOT
342
2326a99f
JB
343%post -p /sbin/ldconfig
344%postun -p /sbin/ldconfig
aa11c230 345
346%files
347%defattr(644,root,root,755)
bc88141a 348%doc CREDITS.TXT LICENSE.TXT README.txt
9556f4c9 349%{?with_tests:%doc llvm-testlog.txt}
a9beeab5 350%attr(755,root,root) %{_bindir}/bugpoint
a9beeab5
JB
351%attr(755,root,root) %{_bindir}/llc
352%attr(755,root,root) %{_bindir}/lli
a9beeab5 353%attr(755,root,root) %{_bindir}/opt
a8575aac 354%attr(755,root,root) %{_bindir}/llvmc
bc88141a 355%attr(755,root,root) %{_bindir}/llvm-*
a7973f21 356%attr(755,root,root) %{_bindir}/macho-dump
bc88141a 357%exclude %attr(755,root,root) %{_bindir}/llvm-config
b3a27ca2 358%attr(755,root,root) %{_libdir}/libLLVM-*.*.so
a9beeab5 359%{_mandir}/man1/bugpoint.1*
a7973f21 360%{_mandir}/man1/lit.1*
a9beeab5
JB
361%{_mandir}/man1/llc.1*
362%{_mandir}/man1/lli.1*
363%{_mandir}/man1/llvm-*.1*
a7973f21 364%{_mandir}/man1/llvmc.1*
a9beeab5
JB
365%{_mandir}/man1/llvmgcc.1*
366%{_mandir}/man1/llvmgxx.1*
367%{_mandir}/man1/opt.1*
a8575aac 368#%{_mandir}/man1/stkrc.1*
bc88141a 369
bc88141a
ER
370%files devel
371%defattr(644,root,root,755)
372%attr(755,root,root) %{_bindir}/llvm-config
373%{_includedir}/llvm
374%{_includedir}/llvm-c
19f21eee 375%{_libdir}/lib*.a
1655c8b5
PS
376# x86-64 only .a/.so?
377%ifarch %{x8664}
0a8510f2 378%attr(755,root,root) %{_libdir}/BugpointPasses.so
19f21eee 379%attr(755,root,root) %{_libdir}/libEnhancedDisassembly.so
19f21eee 380%attr(755,root,root) %{_libdir}/libLTO.so
1655c8b5
PS
381%endif
382#
383%exclude %attr(755,root,root) %{_libdir}/libLLVM-*.*.so
b3a27ca2 384%exclude %attr(755,root,root) %{_libdir}/libclang.so
a7973f21 385%attr(755,root,root) %{_libdir}/profile_rt.so
bc88141a 386
9556f4c9
ER
387%files doc
388%defattr(644,root,root,755)
389%doc moredocs/examples moredocs/html
390
391%if %{with apidocs}
392%files apidocs
393%defattr(644,root,root,755)
394%doc apidoc/*
395%endif
396
d997b14b 397%files -n clang
bc88141a 398%defattr(644,root,root,755)
d997b14b 399%doc clang-docs/*
9556f4c9 400%{?with_tests:%doc clang-testlog.txt}
d997b14b 401%attr(755,root,root) %{_bindir}/clang*
d997b14b 402%attr(755,root,root) %{_bindir}/tblgen
b3a27ca2 403%attr(755,root,root) %{_libdir}/libclang.so
d997b14b 404%{_prefix}/lib/clang
d997b14b 405%{_mandir}/man1/clang.1.*
b3a27ca2 406%{_mandir}/man1/tblgen.1*
d997b14b
AM
407
408%files -n clang-analyzer
bc88141a 409%defattr(644,root,root,755)
d997b14b
AM
410%attr(755,root,root) %{_bindir}/scan-build
411%attr(755,root,root) %{_bindir}/scan-view
ae49e501 412%dir %{_libdir}/clang-analyzer
d997b14b 413
9556f4c9
ER
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
418
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
424
425%files -n clang-devel
426%defattr(644,root,root,755)
427%{_includedir}/clang
428%{_includedir}/clang-c
429
430%files -n clang-doc
431%defattr(644,root,root,755)
432%doc tools/clang/docs/*
433
434%if %{with apidocs}
435%files -n clang-apidocs
436%defattr(644,root,root,755)
437%doc clang-apidoc/*
438%endif
439
440%if %{with ocaml}
d997b14b
AM
441%files ocaml
442%defattr(644,root,root,755)
d997b14b
AM
443%{_libdir}/ocaml/*.cma
444%{_libdir}/ocaml/*.cmi
445
446%files ocaml-devel
447%defattr(644,root,root,755)
448%{_libdir}/ocaml/*.a
449%{_libdir}/ocaml/*.cmx*
450%{_libdir}/ocaml/*.mli
9556f4c9
ER
451
452%files ocaml-doc
453%defattr(644,root,root,755)
454%doc moredocs/ocamldoc/html/*
455%endif
This page took 0.081511 seconds and 4 git commands to generate.