2010-04-28 18:11:40 +02:00
|
|
|
# Template file for 'llvm'
|
|
|
|
pkgname=llvm
|
2013-06-18 07:37:03 +02:00
|
|
|
version=3.3
|
2013-01-04 10:17:21 +01:00
|
|
|
wrksrc="llvm-${version}.src"
|
2013-06-18 09:20:37 +02:00
|
|
|
revision=4
|
2011-10-24 14:14:47 +02:00
|
|
|
build_style=gnu-configure
|
2010-04-28 18:11:40 +02:00
|
|
|
configure_args="--disable-expensive-checks --disable-debug-runtime
|
2013-01-04 10:17:21 +01:00
|
|
|
--enable-targets=all --enable-bindings=none --enable-optimize
|
|
|
|
--enable-shared --enable-libffi --enable-llvmc-dynamic
|
2013-06-18 09:20:37 +02:00
|
|
|
--disable-assertions --enable-experimental-targets=R600"
|
2010-04-28 18:11:40 +02:00
|
|
|
short_desc="Low Level Virtual Machine"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2011-11-06 09:54:22 +01:00
|
|
|
homepage="http://www.llvm.org"
|
|
|
|
license="BSD"
|
2013-01-04 10:17:21 +01:00
|
|
|
distfiles="
|
|
|
|
http://www.llvm.org/releases/${version}/llvm-${version}.src.tar.gz
|
2013-06-18 07:37:03 +02:00
|
|
|
http://www.llvm.org/releases/${version}/cfe-${version}.src.tar.gz
|
|
|
|
http://www.llvm.org/releases/${version}/compiler-rt-${version}.src.tar.gz"
|
2010-04-28 18:11:40 +02:00
|
|
|
checksum="
|
2013-06-18 07:37:03 +02:00
|
|
|
68766b1e70d05a25e2f502e997a3cb3937187a3296595cf6e0977d5cd6727578
|
|
|
|
b1b55de4ab3a57d3e0331a83e0284610191c77d924e3446498d9113d08dfb996
|
|
|
|
0e2f3180d6316e6c43f064fdd406c5c6515e682c5f31c57c28335b68c7525423"
|
2013-01-04 10:17:21 +01:00
|
|
|
|
|
|
|
# XXX Investigate ocaml bindings.
|
2013-04-12 19:13:19 +02:00
|
|
|
hostmakedepends="groff bsdtar perl python"
|
|
|
|
makedepends="libffi-devel"
|
2010-04-28 18:11:40 +02:00
|
|
|
|
2011-11-06 09:54:22 +01:00
|
|
|
post_extract() {
|
2010-04-28 18:11:40 +02:00
|
|
|
# Move clang files into the llvm source.
|
2013-06-18 07:37:03 +02:00
|
|
|
if [ -d ${XBPS_BUILDDIR}/cfe-${version}.src ]; then
|
|
|
|
mv ${XBPS_BUILDDIR}/cfe-${version}.src ${wrksrc}/tools/clang
|
2010-04-28 18:11:40 +02:00
|
|
|
fi
|
2013-01-04 10:17:21 +01:00
|
|
|
# Move compiler-rt files into the llvm source.
|
|
|
|
if [ -d ${XBPS_BUILDDIR}/compiler-rt-${version}.src ]; then
|
|
|
|
mv ${XBPS_BUILDDIR}/compiler-rt-${version}.src \
|
|
|
|
${wrksrc}/projects/compiler-rt
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
pre_configure() {
|
|
|
|
# Fix installation directories, ./configure doesn't seem to set them right
|
|
|
|
sed -i -e 's:\$(PROJ_prefix)/etc/llvm:/etc/llvm:' \
|
|
|
|
-e 's:\$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \
|
|
|
|
Makefile.config.in
|
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
# Fix permissions of static libs
|
2013-06-18 09:20:37 +02:00
|
|
|
chmod -x ${DESTDIR}/usr/lib/*.a
|
2013-01-04 10:17:21 +01:00
|
|
|
|
|
|
|
# Get rid of example Hello transformation
|
2013-06-18 09:20:37 +02:00
|
|
|
rm ${DESTDIR}/usr/lib/*LLVMHello.*
|
2013-01-04 10:17:21 +01:00
|
|
|
|
|
|
|
# Required for multilib.
|
|
|
|
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
|
|
|
for _header in config llvm-config; do
|
|
|
|
mv ${DESTDIR}/usr/include/llvm/Config/${_header}{,-64}.h
|
|
|
|
vinstall ${FILESDIR}/llvm-Config-${_header}.h 644 \
|
|
|
|
usr/include/llvm/Config ${_header}.h
|
|
|
|
done
|
|
|
|
fi
|
2010-04-28 18:11:40 +02:00
|
|
|
}
|
2013-04-12 19:13:19 +02:00
|
|
|
|
|
|
|
clang-analyzer_package() {
|
|
|
|
noarch=yes
|
|
|
|
pycompile_dirs="usr/lib/clang-analyzer"
|
2013-06-18 09:20:37 +02:00
|
|
|
depends="clang-${version}_${revision} python"
|
2013-04-12 19:13:19 +02:00
|
|
|
short_desc="Low-Level Virtual Machine (LLVM) - A source code analysis framework"
|
|
|
|
homepage="http://clang-analyzer.llvm.org/"
|
|
|
|
pkg_install() {
|
|
|
|
install -d ${PKGDESTDIR}/usr/bin
|
|
|
|
install -d ${PKGDESTDIR}/usr/lib/clang-analyzer
|
|
|
|
|
|
|
|
for f in build view; do
|
|
|
|
cp -r ${wrksrc}/tools/clang/tools/scan-${f} ${PKGDESTDIR}/usr/lib/clang-analyzer
|
|
|
|
cd ${PKGDESTDIR}/usr/bin
|
|
|
|
ln -s ../lib/${pkgname}/scan-${f}/scan-${f} scan-${f}
|
|
|
|
done
|
|
|
|
|
|
|
|
ln -sf /usr/bin/clang ${PKGDESTDIR}/usr/lib/${pkgname}/scan-build
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
clang_package() {
|
2013-06-18 09:20:37 +02:00
|
|
|
depends="libstdc++-devel binutils gcc"
|
2013-04-12 19:13:19 +02:00
|
|
|
short_desc="Low-Level Virtual Machine (LLVM) -- C language family frontend"
|
|
|
|
homepage="http://clang.llvm.org/"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include/clang
|
|
|
|
vmove "usr/bin/*clang*"
|
|
|
|
vmove usr/bin/c-index-test
|
|
|
|
vmove usr/lib/clang
|
2013-06-18 09:20:37 +02:00
|
|
|
vmove "usr/lib/libclang*"
|
2013-04-12 19:13:19 +02:00
|
|
|
vmove "usr/share/man/man1/*clang*"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
llvm-docs_package() {
|
|
|
|
noarch=yes
|
|
|
|
short_desc+=" - documentation files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/share/doc
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-06-18 09:20:37 +02:00
|
|
|
libllvm_package() {
|
|
|
|
short_desc+=" - runtime library"
|
|
|
|
replaces="llvm>3.2<3.3_4"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/libLLVM-${version}.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-12 19:13:19 +02:00
|
|
|
llvm_package() {
|
|
|
|
pkg_install() {
|
2013-06-18 07:41:25 +02:00
|
|
|
vmove all
|
2013-04-12 19:13:19 +02:00
|
|
|
}
|
|
|
|
}
|