- Update to 2.5 (devel branch)

- Package build scripts (bug #457881)
This commit is contained in:
Michel Alexandre Salim 2009-03-05 00:27:31 +00:00
parent dfd7e5d51b
commit 3cd63a0c18
2 changed files with 81 additions and 47 deletions

16
llvm-build-examples.sh.in Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
touch ../config.status 2>/dev/null
if [ $? != 0 ]; then
echo Make sure parent directory is writeable.
echo You can fix this by e.g.
echo (cd ../ && tar cf - examples) | (cd $HOME && tar xf -)
exit $?
else
chmod +x ../config.status
for f in Makefile.{common,config,rules}; do
ln -sf LIBDIR/llvm/build/$f ..
done
make $@
fi

View File

@ -15,7 +15,7 @@
Name: llvm
Version: 2.4
Release: 2%{?dist}
Release: 3%{?dist}
Summary: The Low Level Virtual Machine
Group: Development/Languages
@ -25,6 +25,7 @@ Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tar.gz
%if %{?_with_gcc:1}%{!?_with_gcc:0}
Source1: http://llvm.org/releases/%{version}/llvm-gcc%{lgcc_version}-%{version}.source.tar.gz
%endif
Source2: llvm-build-examples.sh.in
Patch0: llvm-2.1-fix-sed.patch
Patch1: llvm-2.4-fix-ocaml.patch
@ -41,6 +42,10 @@ BuildRequires: ocaml-ocamldoc
BuildRequires: doxygen graphviz
%endif
# LLVM is not supported on PPC64
# http://llvm.org/bugs/show_bug.cgi?id=3729
ExcludeArch: ppc64
%description
LLVM is a compiler infrastructure designed for compile-time,
link-time, runtime, and idle-time optimization of programs from
@ -69,7 +74,8 @@ native programs that use the LLVM infrastructure.
%package doc
Summary: Documentation for LLVM
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
# depend on devel since the examples require build scripts
Requires: %{name}-devel = %{version}-%{release}
%description doc
Documentation for the LLVM compiler infrastructure.
@ -141,6 +147,7 @@ for developing applications that use %{name}-ocaml.
%patch1 -p1 -b .fix-ocaml
%build
# Note: --enable-pic can be turned off when 2.6 comes out
%configure \
--libdir=%{_libdir}/%{name} \
--datadir=%{_datadir}/%{name}-%{version} \
@ -149,7 +156,7 @@ for developing applications that use %{name}-ocaml.
--enable-debug-runtime \
--enable-jit \
--enable-optimized \
--enable-shared \
--enable-pic \
--with-pic
# --enable-targets=host-only \
@ -225,6 +232,14 @@ sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \
chmod -x %{buildroot}%{_libdir}/%{name}/*.[oa]
# Install build scripts
mkdir -p %{buildroot}%{_libdir}/llvm/build
chmod -x Makefile{,.common}
for f in Makefile.{common,config,rules}; do
cp -p $f %{buildroot}%{_libdir}/llvm/build/
done
cat %{SOURCE2} | sed -e "s|LIBDIR|%{_libdir}|g" > examples/build-examples.sh
%if %{?_with_gcc:1}%{!?_with_gcc:0}
# Install llvm-gcc.
@ -337,6 +352,9 @@ rm -rf %{buildroot}
%changelog
* Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.4-3
- Package build scripts (bug #457881)
* Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
- Patched build process for the OCaml binding