]> git.pld-linux.org Git - packages/llvm.git/blame - llvm.spec
- 2.5
[packages/llvm.git] / llvm.spec
CommitLineData
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
ER
4#
5# Conditional build:
6%bcond_with ocaml # build without OCaml bindings
6832a5c5 7%bcond_without gcc # build without gcc
bc88141a 8#
6832a5c5
ER
9%define lgcc_vertar 4.2
10%define lgcc_version 4.2.1
aa11c230 11Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
2326a99f 12Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
aa11c230 13Name: llvm
a8575aac 14Version: 2.5
aa11c230 15Release: 0.1
16License: University of Illinois/NCSA Open Source License
17Group: Development/Languages
aa11c230 18Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.tar.gz
a8575aac 19# Source0-md5: 55df2ea8665c8094ad2ef85187b9fc74
6832a5c5 20Source1: http://llvm.org/releases/%{version}/%{name}-gcc-%{lgcc_vertar}-%{version}.source.tar.gz
a8575aac 21# Source1-md5: c5800d85059fcf80429a86c536127595
aa11c230 22Patch0: %{name}-dirs.patch
2326a99f 23URL: http://llvm.org/
bc88141a 24BuildRequires: bash
2326a99f 25BuildRequires: gcc >= 5:3.4
bc88141a
ER
26BuildRequires: libltdl-devel
27%{?with_ocaml:BuildRequires: ocaml}
356a0bbd
ER
28# gcc4 might be installed, but not current __cc
29%if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
30BuildRequires: __cc >= 3.4
31%endif
aa11c230 32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
356a0bbd 34%define _sysconfdir /etc/%{name}
021b3c3d 35
6832a5c5
ER
36# strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
37%define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
38
aa11c230 39%description
40LLVM is a compiler infrastructure designed for compile-time,
41link-time, runtime, and idle-time optimization of programs from
42arbitrary programming languages. LLVM is written in C++ and has been
43developed since 2000 at the University of Illinois and Apple. It
44currently supports compilation of C and C++ programs, using front-ends
45derived from GCC 4.0.1. A new front-end for the C family of languages
46is in development. The compiler infrastructure includes mirror sets of
47programming tools as well as libraries with equivalent functionality.
48
2326a99f
JB
49%description -l pl.UTF-8
50LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
51czasu kompilowania, linkowania, działania i bezczynności programów w
52dowolnych językach programowania. Jest napisana w C++, rozwijana od
53roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
54kompilację programów w C i C++ przy użyciu frontendów wywodzących się
55z GCC 4.0.1. W trakcie tworzenia jest nowy frontend do języków z
56rodziny C. Infrastruktura kompilatora zawiera lustrzane zestawy
57narzędzi programistycznych oraz biblioteki z odpowiadającą narzędziom
58funkcjonalnością.
59
bc88141a
ER
60%package doc
61Summary: Documentation for LLVM
62Group: Documentation
63Requires: %{name} = %{version}-%{release}
64
65%description doc
66Documentation for the LLVM compiler infrastructure.
67
68%package devel
69Summary: Libraries and header files for LLVM
70Group: Development/Languages
71Requires: %{name} = %{version}-%{release}
72Requires: libstdc++-devel >= 6:3.4
73
74%description devel
75This package contains library and header files needed to develop new
76native programs that use the LLVM infrastructure.
77
78%package gcc
79Summary: C compiler for LLVM
80License: GPL+
81Group: Development/Languages
82Requires: %{name} = %{version}-%{release}
83
84%description gcc
85C compiler for LLVM.
86
87%package gcc-c++
88Summary: C++ compiler for LLVM
89License: GPL+
90Group: Development/Languages
91Requires: %{name}-gcc = %{version}-%{release}
92
93%description gcc-c++
94C++ compiler for LLVM.
95
96%package ocaml
97Summary: OCaml binding for LLVM
98Group: Development/Libraries
99Requires: %{name} = %{version}-%{release}
100%requires_eq ocaml-runtime
101
102%description ocaml
103OCaml binding for LLVM.
104
105%package ocaml-devel
106Summary: Development files for %{name}-ocaml
107Group: Development/Libraries
108Requires: %{name}-devel = %{version}-%{release}
109Requires: %{name}-ocaml = %{version}-%{release}
110
111%description ocaml-devel
112The %{name}-ocaml-devel package contains libraries and signature files
113for developing applications that use %{name}-ocaml.
114
aa11c230 115%prep
bc88141a 116%setup -q %{?with_gcc:-a1}
aa11c230 117%patch0 -p0
118
119%build
bc88141a
ER
120# bash specific 'test a < b'
121bash %configure \
122 --libdir=%{_libdir}/%{name} \
123 --datadir=%{_datadir}/%{name}-%{version} \
124 --enable-bindings=%{!?with_ocaml:no}%{?with_ocaml:ocaml} \
125 --disable-static \
126 --enable-assertions \
127 --enable-debug-runtime \
128 --enable-jit \
aa11c230 129 --enable-optimized \
bc88141a
ER
130 --enable-shared \
131 --with-pic
132
133%{__make} OPTIMIZE_OPTION="%{rpmcflags}"
134
135%if %{with gcc}
136# Build llvm-gcc.
aa11c230 137
bc88141a
ER
138export PATH=%{_builddir}/%{?buildsubdir}/Release/bin:$PATH
139
6832a5c5
ER
140install -d llvm-gcc%{lgcc_vertar}-%{version}.source/build
141cd llvm-gcc%{lgcc_vertar}-%{version}.source/build
bc88141a
ER
142../configure \
143 --host=%{_host} \
144 --build=%{_build} \
145 --target=%{_target_platform} \
146 --prefix=%{_libdir}/llvm-gcc \
147 --libdir=%{_libdir}/llvm-gcc/%{_lib} \
148 --enable-threads \
149 --disable-nls \
150%ifarch %{x8664}
151 --disable-multilib \
152 --disable-shared \
153%endif
154 --enable-languages=c,c++ \
155 --enable-llvm=%{_builddir}/%{?buildsubdir} \
156 --program-prefix=llvm-
157
158%{__make} LLVM_VERSION_INFO=%{version}
159%endif
aa11c230 160
161%install
162rm -rf $RPM_BUILD_ROOT
163
164%{__make} install \
165 DESTDIR=$RPM_BUILD_ROOT
166
bc88141a 167find $RPM_BUILD_ROOT -name .dir | xargs rm -fv
021b3c3d 168
6832a5c5
ER
169# Get rid of erroneously installed example files.
170rm $RPM_BUILD_ROOT%{_libdir}/%{name}/LLVMHello.*
171
172%if %{with gcc}
173# Install llvm-gcc.
174
175%{__make} -C llvm-gcc%{lgcc_vertar}-%{version}.source/build install \
176 DESTDIR=$RPM_BUILD_ROOT
177
178cd $RPM_BUILD_ROOT%{_libdir}/llvm-gcc/%{_lib}
179find . -name '*.la' -print0 | xargs -0r rm
180find . -name '*.a' -exec $RPM_BUILD_ROOT%{_bindir}/llvm-ranlib {} \;
181cd ../bin
182ln llvm-c++ llvm-gcc llvm-g++ $RPM_BUILD_ROOT%{_bindir}
183rm llvm-cpp llvm-gccbug llvm-gcov %{_target_platform}-gcc*
184cd ..
185mv man/man1/llvm-gcc.1 man/man1/llvm-g++.1 $RPM_BUILD_ROOT%{_mandir}/man1
186rm -r info man %{_lib}/libiberty.a
187rm -r libexec/gcc/%{_target_platform}/%{lgcc_version}/install-tools
188
189rm -r $RPM_BUILD_ROOT%{_libdir}/llvm-gcc/%{_lib}/gcc/%{_target_platform}/%{lgcc_version}/install-tools
190rm -f $RPM_BUILD_ROOT%{_libdir}/llvm-gcc/%{_lib}/libgomp.a
191rm -f $RPM_BUILD_ROOT%{_libdir}/llvm-gcc/%{_lib}/libgomp.spec
192rm -f $RPM_BUILD_ROOT%{_libdir}/llvm-gcc/%{_lib}/libssp.a
193rm -f $RPM_BUILD_ROOT%{_libdir}/llvm-gcc/%{_lib}/libssp_nonshared.a
194%endif
195
aa11c230 196%clean
197rm -rf $RPM_BUILD_ROOT
198
2326a99f
JB
199%post -p /sbin/ldconfig
200%postun -p /sbin/ldconfig
aa11c230 201
202%files
203%defattr(644,root,root,755)
bc88141a 204%doc CREDITS.TXT LICENSE.TXT README.txt
a9beeab5
JB
205%attr(755,root,root) %{_bindir}/bugpoint
206%attr(755,root,root) %{_bindir}/gccas
207%attr(755,root,root) %{_bindir}/gccld
208%attr(755,root,root) %{_bindir}/llc
209%attr(755,root,root) %{_bindir}/lli
a9beeab5 210%attr(755,root,root) %{_bindir}/opt
a8575aac 211%attr(755,root,root) %{_bindir}/llvmc
bc88141a
ER
212%attr(755,root,root) %{_bindir}/llvm-*
213%exclude %attr(755,root,root) %{_bindir}/llvm-config
a9beeab5
JB
214%{_mandir}/man1/bugpoint.1*
215%{_mandir}/man1/llc.1*
216%{_mandir}/man1/lli.1*
217%{_mandir}/man1/llvm-*.1*
a9beeab5
JB
218%{_mandir}/man1/llvmgcc.1*
219%{_mandir}/man1/llvmgxx.1*
220%{_mandir}/man1/opt.1*
a8575aac 221#%{_mandir}/man1/stkrc.1*
a9beeab5 222%{_mandir}/man1/tblgen.1*
bc88141a 223
a8575aac 224
bc88141a
ER
225%files doc
226%defattr(644,root,root,755)
227%doc docs/*.{html,css} docs/img examples
228
229%files devel
230%defattr(644,root,root,755)
231%attr(755,root,root) %{_bindir}/llvm-config
232%{_includedir}/llvm
233%{_includedir}/llvm-c
6832a5c5
ER
234%{_libdir}/llvm/LLVM*.o
235%{_libdir}/llvm/libLLVM*.a
bc88141a
ER
236
237%if %{with gcc}
238%files gcc
239%defattr(644,root,root,755)
6832a5c5
ER
240#%attr(755,root,root) %{_bindir}/llvm2cpp
241#%attr(755,root,root) %{_bindir}/llvmc
242#%dir %{_sysconfdir}
243#%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/c
244#%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/cpp
245#%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/ll
246#%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/st
247#%{_mandir}/man1/llvm2cpp.1*
248#%{_mandir}/man1/llvmc.1*
249%attr(755,root,root) %{_bindir}/llvm-gcc
250%dir %{_libdir}/llvm-gcc
251%dir %{_libdir}/llvm-gcc/bin
252%dir %{_libdir}/llvm-gcc/include
253%dir %{_libdir}/llvm-gcc/%{_lib}
254%dir %{_libdir}/llvm-gcc/libexec
255%dir %{_libdir}/llvm-gcc/libexec/gcc
256%dir %{_libdir}/llvm-gcc/libexec/gcc/%{_target_platform}/%{lgcc_version}
257%{_libdir}/llvm-gcc/%{_lib}/gcc
258%{_libdir}/llvm-gcc/%{_lib}/libmudflap*.a
a8575aac 259%attr(755,root,root) %{_libdir}/llvm-gcc/bin/%{_target_platform}-llvm-gcc
260%attr(755,root,root) %{_libdir}/llvm-gcc/bin/llvm-gcc
6832a5c5
ER
261%{_libdir}/llvm-gcc/libexec/gcc/%{_target_platform}/%{lgcc_version}/cc1
262%{_libdir}/llvm-gcc/libexec/gcc/%{_target_platform}/%{lgcc_version}/collect2
263%{_mandir}/man1/llvm-gcc.*
bc88141a
ER
264
265%files gcc-c++
266%defattr(644,root,root,755)
6832a5c5
ER
267#%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/c++
268#%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/cxx
269%attr(755,root,root) %{_bindir}/llvm-[cg]++
270%{_libdir}/llvm-gcc/%{_lib}/lib*++.a
a8575aac 271%attr(755,root,root) %{_libdir}/llvm-gcc/bin/%{_target_platform}-llvm-[cg]++
272%attr(755,root,root) %{_libdir}/llvm-gcc/bin/llvm-[cg]++
6832a5c5 273%{_libdir}/llvm-gcc/include/c++
a8575aac 274%attr(755,root,root) %{_libdir}/llvm-gcc/libexec/gcc/%{_target_platform}/%{lgcc_version}/cc1plus
6832a5c5 275%{_mandir}/man1/llvm-g++.*
bc88141a 276%endif
This page took 0.140592 seconds and 4 git commands to generate.