- Don't adjust clang include dir; files there are noarch (bz#521893)
- Enable clang unit tests - clang and clang-analyzer renamed; no longer depend on llvm at runtime
This commit is contained in:
parent
09ee2abb73
commit
c19d461213
76
llvm.spec
76
llvm.spec
@ -18,6 +18,8 @@ Patch0: llvm-2.6-destdir.patch
|
||||
Patch1: llvm-2.6-destdir-clang.patch
|
||||
# http://llvm.org/bugs/show_bug.cgi?id=4911
|
||||
Patch2: llvm-2.5-tclsh_check.patch
|
||||
# Data files should be installed with timestamps preserved
|
||||
Patch3: llvm-2.6-timestamp.patch
|
||||
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
@ -60,46 +62,54 @@ native programs that use the LLVM infrastructure.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for LLVM
|
||||
Group: Development/Languages
|
||||
Group: Documentation
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description doc
|
||||
Documentation for the LLVM compiler infrastructure.
|
||||
|
||||
|
||||
%package clang
|
||||
%package -n clang
|
||||
Summary: A C language family frontend for LLVM
|
||||
License: NCSA
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description clang
|
||||
%description -n clang
|
||||
clang: noun
|
||||
1. A loud, resonant, metallic sound.
|
||||
2. The strident call of a crane or goose.
|
||||
3. C-language family front-end toolkit.
|
||||
|
||||
The goal of the Clang project is to create a new C, C++, Objective C
|
||||
and Objective C++ front-end for the LLVM compiler. Its qqqtools are built
|
||||
and Objective C++ front-end for the LLVM compiler. Its tools are built
|
||||
as libraries and designed to be loosely-coupled and extendable.
|
||||
|
||||
|
||||
%package clang-analyzer
|
||||
%package -n clang-analyzer
|
||||
Summary: A source code analysis framework
|
||||
License: NCSA
|
||||
Group: Development/Languages
|
||||
Requires: %{name}-clang = %{version}-%{release}
|
||||
Requires: clang = %{version}-%{release}
|
||||
# not picked up automatically since files are currently not instaled
|
||||
# in standard Python hierarchies yet
|
||||
Requires: python
|
||||
|
||||
%description clang-analyzer
|
||||
%description -n clang-analyzer
|
||||
The Clang Static Analyzer consists of both a source code analysis
|
||||
framework and a standalone tool that finds bugs in C and Objective-C
|
||||
programs. The standalone tool is invoked from the command-line, and is
|
||||
intended to run in tandem with a build of a project or code base.
|
||||
|
||||
|
||||
%package -n clang-doc
|
||||
Summary: Documentation for Clang
|
||||
Group: Documentation
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description -n clang-doc
|
||||
Documentation for the Clang compiler front-end.
|
||||
|
||||
|
||||
%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
|
||||
%package apidoc
|
||||
Summary: API documentation for LLVM
|
||||
@ -152,14 +162,7 @@ pushd tools/clang
|
||||
%patch1 -p0 -b .destdir-clang
|
||||
popd
|
||||
%patch2 -p1 -b .tclsh_check
|
||||
|
||||
# Fix hard-coded libdir for clang Headers
|
||||
%ifarch x86_64
|
||||
sed -i 's|(PROJ_prefix)/lib/clang|(PROJ_prefix)/%{_lib}/clang|g' \
|
||||
tools/clang/lib/Headers/Makefile
|
||||
sed -i 's|lib/clang/1.0|%{_lib}/clang/1.0|g' \
|
||||
tools/clang/lib/Driver/ToolChains.cpp
|
||||
%endif
|
||||
%patch3 -p1 -b .timestamp
|
||||
|
||||
|
||||
%build
|
||||
@ -188,17 +191,19 @@ make %{_smp_mflags} OPTIMIZE_OPTION='%{optflags}'
|
||||
# http://www.nabble.com/LLVM-2.6-pre1%3A-test-failures-on-Fedora-11.91-%28Rawhide%29-ppc-td25334198.html
|
||||
%ifnarch ppc
|
||||
cd obj && make check
|
||||
cd tools/clang && make test
|
||||
# some clang tests still fail, preserve test results
|
||||
(cd tools/clang && make test 2>&1) | tee ../testlog.txt || true
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
cd obj
|
||||
pushd obj
|
||||
chmod -x examples/Makefile
|
||||
|
||||
make install DESTDIR=%{buildroot} \
|
||||
PROJ_docsdir=/moredocs
|
||||
popd
|
||||
|
||||
# Static analyzer not installed by default:
|
||||
# http://clang-analyzer.llvm.org/installation#OtherPlatforms
|
||||
@ -210,7 +215,7 @@ for f in scan-{build,view}; do
|
||||
ln -s %{_libdir}/clang-analyzer/$f %{buildroot}%{_bindir}/$f
|
||||
done
|
||||
|
||||
pushd ../tools/clang/utils
|
||||
pushd tools/clang/utils
|
||||
cp -p ccc-analyzer %{buildroot}%{_libdir}/clang-analyzer/libexec/
|
||||
|
||||
for f in scan-build scanview.css sorttable.js; do
|
||||
@ -218,15 +223,24 @@ for f in scan-build scanview.css sorttable.js; do
|
||||
done
|
||||
popd
|
||||
|
||||
pushd ../tools/clang/tools/scan-view
|
||||
pushd tools/clang/tools/scan-view
|
||||
cp -pr * %{buildroot}%{_libdir}/clang-analyzer/
|
||||
popd
|
||||
|
||||
# Move documentation back to build directory
|
||||
#
|
||||
mv %{buildroot}/moredocs ../
|
||||
rm ../moredocs/*.tar.gz
|
||||
rm ../moredocs/ocamldoc/html/*.tar.gz
|
||||
mv %{buildroot}/moredocs .
|
||||
rm moredocs/*.tar.gz
|
||||
rm moredocs/ocamldoc/html/*.tar.gz
|
||||
|
||||
# And prepare Clang documentation
|
||||
#
|
||||
mkdir clang-docs
|
||||
for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do
|
||||
ln tools/clang/$f clang-docs/
|
||||
done
|
||||
rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools}
|
||||
|
||||
|
||||
find %{buildroot} -name .dir -print0 | xargs -0r rm -f
|
||||
file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
||||
@ -288,25 +302,28 @@ rm -rf %{buildroot}
|
||||
%{_includedir}/%{name}-c
|
||||
%{_libdir}/%{name}
|
||||
|
||||
|
||||
%files clang
|
||||
%files -n clang
|
||||
%defattr(-,root,root,-)
|
||||
%doc clang-docs/* testlog.txt
|
||||
%{_bindir}/clang*
|
||||
%{_bindir}/FileCheck
|
||||
%{_bindir}/FileUpdate
|
||||
%{_bindir}/tblgen
|
||||
%{_libdir}/clang
|
||||
%{_prefix}/lib/clang
|
||||
%{_libexecdir}/clang-cc
|
||||
%doc %{_mandir}/man1/clang.1.*
|
||||
%doc %{_mandir}/man1/FileCheck.1.*
|
||||
|
||||
|
||||
%files clang-analyzer
|
||||
%files -n clang-analyzer
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/scan-build
|
||||
%{_bindir}/scan-view
|
||||
%{_libdir}/clang-analyzer
|
||||
|
||||
%files -n clang-doc
|
||||
%defattr(-,root,root,-)
|
||||
%doc tools/clang/docs/*
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
%doc examples moredocs/html
|
||||
@ -336,8 +353,9 @@ rm -rf %{buildroot}
|
||||
|
||||
%changelog
|
||||
* Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1
|
||||
- Properly adjust clang include dir (bz#521893)
|
||||
- Don't adjust clang include dir; files there are noarch (bz#521893)
|
||||
- Enable clang unit tests
|
||||
- clang and clang-analyzer renamed; no longer depend on llvm at runtime
|
||||
|
||||
* Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1
|
||||
- Package Clang's static analyzer tools
|
||||
|
Loading…
Reference in New Issue
Block a user