2 # - gcc/c++ packages: http://cvs.fedoraproject.org/viewvc/rpms/llvm/devel/llvm.spec?revision=HEAD&view=markup
3 # - test gcc pkgs and all
5 %define lgcc_vertar 4.2
6 %define lgcc_version 4.2
7 Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
8 Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
12 License: University of Illinois/NCSA Open Source License
13 Group: Development/Languages
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
18 # Data files should be installed with timestamps preserved
19 Patch3: %{name}-2.6-timestamp.patch
23 BuildRequires: doxygen
25 BuildRequires: graphviz
27 BuildRequires: libltdl-devel
28 BuildRequires: libstdc++-devel >= 5:3.4
29 BuildRequires: ocaml-ocamldoc
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
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define _sysconfdir /etc/%{name}
38 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
39 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
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.
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
63 Summary: Documentation for LLVM
65 Requires: %{name} = %{version}-%{release}
68 Documentation for the LLVM compiler infrastructure.
71 Summary: Libraries and header files for LLVM
72 Group: Development/Languages
73 Requires: %{name} = %{version}-%{release}
74 Requires: libstdc++-devel >= 6:3.4
77 This package contains library and header files needed to develop new
78 native programs that use the LLVM infrastructure.
81 Summary: OCaml binding for LLVM
82 Group: Development/Libraries
83 Requires: %{name} = %{version}-%{release}
84 %requires_eq ocaml-runtime
87 OCaml binding for LLVM.
90 Summary: Development files for %{name}-ocaml
91 Group: Development/Libraries
92 Requires: %{name}-devel = %{version}-%{release}
93 Requires: %{name}-ocaml = %{version}-%{release}
95 %description ocaml-devel
96 The %{name}-ocaml-devel package contains libraries and signature files
97 for developing applications that use %{name}-ocaml.
100 Summary: A C language family frontend for LLVM
102 Group: Development/Languages
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.
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.
112 %package -n clang-analyzer
113 Summary: A source code analysis framework
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
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.
129 mv clang-*.* tools/clang
130 %patch3 -p1 -b .timestamp
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
136 # bash specific 'test a < b'
139 --libdir=%{_libdir}/%{name} \
140 --datadir=%{_datadir}/%{name}-%{version} \
145 --disable-assertions \
146 --enable-debug-runtime \
153 # configure does not properly specify libdir
154 sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
157 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
160 rm -rf $RPM_BUILD_ROOT
163 chmod -x examples/Makefile
165 %{__make} -j1 install \
166 PROJ_docsdir=/moredocs \
167 DESTDIR=$RPM_BUILD_ROOT
170 # Static analyzer not installed by default:
171 install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/
173 install -d $RPM_BUILD_ROOT%{_libexecdir}
176 for f in scan-{build,view}; do
177 ln -s %{_libdir}/clang-analyzer/$f $RPM_BUILD_ROOT%{_bindir}/$f
180 cd tools/clang/tools/scan-build
182 for f in scan-build scanview.css sorttable.js; do
183 cp -p $f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/
185 cp -pr * $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/
188 # Move documentation back to build directory
191 mv $RPM_BUILD_ROOT/moredocs .
193 #rm moredocs/ocamldoc/html/*.tar.gz
195 # And prepare Clang documentation
199 for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do
200 ln tools/clang/$f clang-docs/
202 #rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools}
204 # Get rid of erroneously installed example files.
205 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/*LLVMHello.*
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
211 chmod -x $RPM_BUILD_ROOT%{_libdir}/%{name}/*.a
213 # remove documentation makefiles:
214 # they require the build directory to work
215 find examples -name 'Makefile' | xargs -0r rm -f
218 rm -rf $RPM_BUILD_ROOT
220 %post -p /sbin/ldconfig
221 %postun -p /sbin/ldconfig
224 %defattr(644,root,root,755)
225 %doc CREDITS.TXT LICENSE.TXT README.txt
226 %attr(755,root,root) %{_bindir}/bugpoint
227 %attr(755,root,root) %{_bindir}/llc
228 %attr(755,root,root) %{_bindir}/lli
229 %attr(755,root,root) %{_bindir}/opt
230 %attr(755,root,root) %{_bindir}/llvmc
231 %attr(755,root,root) %{_bindir}/llvm-*
232 %exclude %attr(755,root,root) %{_bindir}/llvm-config
233 %{_mandir}/man1/bugpoint.1*
234 %{_mandir}/man1/llc.1*
235 %{_mandir}/man1/lli.1*
236 %{_mandir}/man1/llvmc.1*
237 %{_mandir}/man1/llvm-*.1*
238 %{_mandir}/man1/llvmgcc.1*
239 %{_mandir}/man1/llvmgxx.1*
240 %{_mandir}/man1/opt.1*
241 #%{_mandir}/man1/stkrc.1*
242 %{_mandir}/man1/tblgen.1*
245 %defattr(644,root,root,755)
246 %doc docs/*.{html,css} docs/img examples moredocs/html
249 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_bindir}/llvm-config
253 %{_includedir}/llvm-c
257 %defattr(644,root,root,755)
259 %doc tools/clang/docs/*
260 %attr(755,root,root) %{_bindir}/clang*
261 %attr(755,root,root) %{_bindir}/tblgen
263 %{_mandir}/man1/clang.1.*
265 %files -n clang-analyzer
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_bindir}/scan-build
268 %attr(755,root,root) %{_bindir}/scan-view
269 %dir %{_libdir}/clang-analyzer
270 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-*
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-*
274 %{_libdir}/clang-analyzer/*.*
277 %defattr(644,root,root,755)
278 %doc moredocs/ocamldoc/html/*
279 %{_libdir}/ocaml/*.cma
280 %{_libdir}/ocaml/*.cmi
283 %defattr(644,root,root,755)
285 %{_libdir}/ocaml/*.cmx*
286 %{_libdir}/ocaml/*.mli