2014-05-22 13:56:51 +02:00
|
|
|
# Description: LLVM + clang compiler
|
|
|
|
# URL: http://llvm.org/
|
|
|
|
# Maintainer: Thomas Penteker, tek at serverop dot de
|
|
|
|
# Packager: Tilman Sauerbeck, tilman at crux dot nu
|
|
|
|
# Depends on: python, llvm
|
|
|
|
|
|
|
|
name=clang
|
2015-03-02 19:44:21 +01:00
|
|
|
version=3.6.0
|
2014-05-22 13:56:51 +02:00
|
|
|
release=1
|
2015-02-23 16:23:29 +01:00
|
|
|
source=(http://llvm.org/releases/$version/{llvm,cfe}-$version.src.tar.xz \
|
2014-05-22 13:56:51 +02:00
|
|
|
config.h llvm-config.h)
|
|
|
|
|
|
|
|
build() {
|
|
|
|
mv cfe-$version.src llvm-$version.src/tools/clang
|
|
|
|
|
|
|
|
cd llvm-$version.src
|
|
|
|
|
|
|
|
./configure --prefix=/usr \
|
|
|
|
--without-oprofile \
|
|
|
|
--enable-cxx11 \
|
|
|
|
--enable-targets=x86,x86_64,r600 \
|
|
|
|
--enable-shared \
|
|
|
|
--mandir=/usr/man
|
|
|
|
|
|
|
|
make $MAKEFLAGS
|
|
|
|
make DESTDIR=$PKG install
|
|
|
|
|
|
|
|
# Unfortunately, llvm's configure script seems to ignore --mandir.
|
|
|
|
mv $PKG/usr/share/man $PKG/usr
|
2015-02-23 16:23:29 +01:00
|
|
|
rm -rf $PKG/usr/share
|
2014-05-22 13:56:51 +02:00
|
|
|
|
|
|
|
find $PKG -name .dir -delete
|
|
|
|
rm -rf $PKG/usr/docs
|
|
|
|
|
|
|
|
# multilib stubs
|
|
|
|
mv $PKG/usr/include/llvm/Config/config{,-64}.h
|
|
|
|
mv $PKG/usr/include/llvm/Config/llvm-config{,-64}.h
|
|
|
|
install -m 0644 $SRC/config.h $PKG/usr/include/llvm/Config/
|
|
|
|
install -m 0644 $SRC/llvm-config.h $PKG/usr/include/llvm/Config/
|
|
|
|
|
|
|
|
# only clang may be left, remove llvm
|
|
|
|
rm -r $PKG/usr/include/llvm{,-c}
|
2015-03-03 07:33:23 +01:00
|
|
|
rm $PKG/usr/bin/{bugpoint,ll*,macho-dump,opt,FileCheck,count,not,obj2yaml,verify-uselistorder,yaml2obj}
|
2014-05-22 13:56:51 +02:00
|
|
|
rm $PKG/usr/lib/{LLVMHello.so,BugpointPasses.so,libLTO.*,libLLVM*}
|
|
|
|
}
|