From 5b34e520344f313a8704efb77dcdff5dabf9b580 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 22 Jan 2014 06:25:14 +0000 Subject: [PATCH] llvm: add 3.4 recipe and patchset --- sys-devel/llvm/llvm-3.4.recipe | 61 ++++++++++++++++++++++++ sys-devel/llvm/patches/llvm-3.4.patchset | 25 ++++++++++ 2 files changed, 86 insertions(+) create mode 100644 sys-devel/llvm/llvm-3.4.recipe create mode 100644 sys-devel/llvm/patches/llvm-3.4.patchset diff --git a/sys-devel/llvm/llvm-3.4.recipe b/sys-devel/llvm/llvm-3.4.recipe new file mode 100644 index 000000000..f93569b77 --- /dev/null +++ b/sys-devel/llvm/llvm-3.4.recipe @@ -0,0 +1,61 @@ +SUMMARY="Modular and reuseable compiler and toolchain technologies." +DESCRIPTION=" +LLVM is a collection of modular and reuseable compiler and and toolchain \ +technologies. +" +HOMEPAGE="http://www.llvm.org/" +LICENSE="UIUC" +COPYRIGHT="2003-2012 University of Illinois at Urbana-Champaign" +SRC_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.gz" +REVISION="1" +CHECKSUM_MD5="46ed668a1ce38985120dbf6344cf6116" +ARCHITECTURES="x86 x86_64" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + ARCHITECTURES="$ARCHITECTURES !x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + llvm$secondaryArchSuffix = $portVersion + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + " + +BUILD_REQUIRES=" + " + +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:libtoolize + cmd:make + cmd:python + cmd:sed + " + +PATCHES="llvm-${portVersion}.patchset" + +PATCH() +{ + find . -type f -exec sed -i 's/\/usr\/bin\/env/\/bin\/env/g' "{}" \; +} + +BUILD() +{ + # Haiku C++ requires rtti in a lot of central system components + # such as Mesa + export REQUIRES_RTTI=1 + runConfigure ./configure --enable-optimized + make $jobArgs +} + +INSTALL() +{ + make install +} diff --git a/sys-devel/llvm/patches/llvm-3.4.patchset b/sys-devel/llvm/patches/llvm-3.4.patchset new file mode 100644 index 000000000..9f14d94d8 --- /dev/null +++ b/sys-devel/llvm/patches/llvm-3.4.patchset @@ -0,0 +1,25 @@ +From 744634aa845c403f5a39b8257bbacd36dc1dd351 Mon Sep 17 00:00:00 2001 +From: Alexander von Gluck IV +Date: Wed, 22 Jan 2014 05:04:31 +0000 +Subject: [PATCH] haiku: fix Host.h for endian.h + +--- + include/llvm/Support/Host.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/llvm/Support/Host.h b/include/llvm/Support/Host.h +index 28c4cc7..ab985a4 100644 +--- a/include/llvm/Support/Host.h ++++ b/include/llvm/Support/Host.h +@@ -16,7 +16,7 @@ + + #include "llvm/ADT/StringMap.h" + +-#if defined(__linux__) || defined(__GNU__) ++#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__) + #include + #else + #if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32) +-- +1.8.3.4 +