forked from ports/compat-32
54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
# Description: LLVM
|
|
# URL: http://llvm.org
|
|
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
|
|
# Packager: Tilman Sauerbeck, tilman at crux dot nu
|
|
# Depends on: python-32 llvm
|
|
|
|
name=llvm-32
|
|
version=3.3
|
|
release=2
|
|
source=(http://llvm.org/releases/$version/{llvm,cfe}-$version.src.tar.gz)
|
|
|
|
build() {
|
|
mv cfe-$version.src llvm-$version.src/tools/clang
|
|
|
|
cd llvm-$version.src
|
|
|
|
rm -rf tools/clang
|
|
|
|
sed -i -e '/ActiveLibDir = ActivePrefix/s|lib|lib32|' \
|
|
tools/llvm-config/llvm-config.cpp
|
|
|
|
sed -i -e 's|LLVM_LIBDIR="${prefix}/lib"|LLVM_LIBDIR="${prefix}/lib32"|' \
|
|
configure
|
|
|
|
sed -i -e 's|$(PROJ_prefix)/lib|$(PROJ_prefix)/lib32|g' \
|
|
Makefile.config.in
|
|
|
|
./configure \
|
|
--prefix=/usr \
|
|
--libdir=/usr/lib32 \
|
|
--host=i686-pc-linux-gnu \
|
|
--without-oprofile \
|
|
--enable-shared \
|
|
--enable-experimental-targets=R600
|
|
|
|
make $MAKEFLAGS
|
|
make DESTDIR=$PKG install
|
|
|
|
mv $PKG/usr/bin/llvm-config $PKG/
|
|
mv $PKG/usr/include/llvm/Config/{,llvm-}config.h $PKG/
|
|
rm -r $PKG/usr/{bin,docs,include}
|
|
|
|
#find $PKG -name .dir -delete
|
|
|
|
# multilib
|
|
install -d $PKG/usr/{bin,include/llvm/Config}
|
|
mv $PKG/llvm-config $PKG/usr/bin/llvm-config-32
|
|
mv $PKG/config.h $PKG/usr/include/llvm/Config/config-32.h
|
|
mv $PKG/llvm-config.h $PKG/usr/include/llvm/Config/llvm-config-32.h
|
|
|
|
# remove example hello transform
|
|
rm $PKG/usr/lib32/LLVMHello.so
|
|
}
|