mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-04 22:18:55 +02:00
llvm_clang: apply to 3.7.0 recipe.
This commit is contained in:
@@ -31,11 +31,16 @@ other than the ones listed above.
|
||||
HOMEPAGE="http://www.llvm.org/"
|
||||
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
|
||||
LICENSE="UIUC"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz"
|
||||
SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz"
|
||||
SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
|
||||
CHECKSUM_SHA256="ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153"
|
||||
CHECKSUM_SHA256_2="4ed740c5a91df1c90a4118c5154851d6a475f39a91346bdf268c1c29c13aa1cc"
|
||||
CHECKSUM_SHA256_3="8ae8a0a3a96b7a700412d67df0af172cb2fc1326beec575fcc0f71d2e72709cd"
|
||||
SOURCE_DIR="llvm-$portVersion.src"
|
||||
PATCHES="llvm-${portVersion}.patchset"
|
||||
PATCHES_2="clang-${portVersion}.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
@@ -198,11 +203,72 @@ PROVIDES="
|
||||
devel:libLTO$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
PROVIDES_clang="
|
||||
llvm${secondaryArchSuffix}_clang = $portVersion
|
||||
cmd:clang = $portVersion
|
||||
cmd:clang++ = $portVersion
|
||||
cmd:clang_apply_replacements = $portVersion
|
||||
cmd:clang_check = $portVersion
|
||||
cmd:clang_format = $portVersion
|
||||
cmd:clang_modernize = $portVersion
|
||||
cmd:clang_query = $portVersion
|
||||
cmd:clang_rename = $portVersion
|
||||
cmd:clang_tblgen = $portVersion
|
||||
cmd:clang_tidy = $portVersion
|
||||
cmd:c_index_test = $portVersion
|
||||
cmd:pp_trace = $portVersion
|
||||
lib:libclang$secondaryArchSuffix = $portVersion
|
||||
devel:libclang$secondaryArchSuffix = $portVersion
|
||||
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
|
||||
devel:libclangast$secondaryArchSuffix = $portVersion
|
||||
devel:libclangastmatchers$secondaryArchSuffix = $portVersion
|
||||
devel:libclanganalysis$secondaryArchSuffix = $portVersion
|
||||
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
|
||||
devel:libclangbasic$secondaryArchSuffix = $portVersion
|
||||
devel:libclangcodegen$secondaryArchSuffix = $portVersion
|
||||
devel:libclangdriver$secondaryArchSuffix = $portVersion
|
||||
devel:libclangdynamicastmatchers$secondaryArchSuffix = $portVersion
|
||||
devel:libclangedit$secondaryArchSuffix = $portVersion
|
||||
devel:libclangformat$secondaryArchSuffix = $portVersion
|
||||
devel:libclangfrontend$secondaryArchSuffix = $portVersion
|
||||
devel:libclangfrontendtool$secondaryArchSuffix = $portVersion
|
||||
devel:libclangindex$secondaryArchSuffix = $portVersion
|
||||
devel:libclanglex$secondaryArchSuffix = $portVersion
|
||||
devel:libclangparse$secondaryArchSuffix = $portVersion
|
||||
devel:libclangquery$secondaryArchSuffix = $portVersion
|
||||
devel:libclangrename$secondaryArchSuffix = $portVersion
|
||||
devel:libclangrewrite$secondaryArchSuffix = $portVersion
|
||||
devel:libclangrewritefrontend$secondaryArchSuffix = $portVersion
|
||||
devel:libclangsema$secondaryArchSuffix = $portVersion
|
||||
devel:libclangserialization$secondaryArchSuffix = $portVersion
|
||||
devel:libclangstaticanalyzercheckers$secondaryArchSuffix = $portVersion
|
||||
devel:libclangstaticanalyzercore$secondaryArchSuffix = $portVersion
|
||||
devel:libclangstaticanalyzerfrontend$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidy$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidygooglemodule$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidyllvmmodule$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidymiscmodule$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidyreadability$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidyutils$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtooling$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtoolingcore$secondaryArchSuffix = $portVersion
|
||||
devel:libmodernizecore$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_clang="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
PROVIDES_clang_analysis="
|
||||
llvm${secondaryArchSuffix}_clang_analysis = $portVersion
|
||||
cmd:scan_build$secondaryArchSuffix = $portVersion
|
||||
cmd:scan_view$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_clang_analysis="
|
||||
llvm${secondaryArchSuffix}_clang == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
@@ -210,17 +276,25 @@ BUILD_PREREQUIRES="
|
||||
cmd:automake
|
||||
cmd:find
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:groff
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize
|
||||
cmd:make
|
||||
cmd:python
|
||||
cmd:sed
|
||||
cmd:find
|
||||
cmd:grep
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# Add clang tools
|
||||
mkdir -p tools/clang
|
||||
cp -rd $sourceDir2/cfe-${portVersion}.src/* tools/clang/
|
||||
|
||||
# Add clang tools's tool's (really llvm?)
|
||||
mkdir -p tools/clang/tools/extra
|
||||
cp -rd $sourceDir3/clang-tools-extra-${portVersion}.src/* tools/clang/tools/extra
|
||||
|
||||
mkdir -p build; cd build
|
||||
# Haiku C++ requires rtti in a lot of central system components
|
||||
# such as Mesa
|
||||
@@ -233,6 +307,9 @@ BUILD()
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
mkdir -p $developDir
|
||||
mkdir -p $docDir
|
||||
mkdir -p $binDir
|
||||
|
||||
make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
|
||||
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
|
||||
@@ -240,7 +317,6 @@ INSTALL()
|
||||
# You can try and be fancy here parsing each arch in a for loop... but
|
||||
# not all arches contain the same libraries. The inventory for each arch
|
||||
# also changes between releases... so lets KISS.
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libLLVMAArch64AsmParser \
|
||||
libLLVMAArch64AsmPrinter \
|
||||
@@ -355,6 +431,39 @@ INSTALL()
|
||||
libLLVMipa \
|
||||
libLLVMipo \
|
||||
libLTO
|
||||
|
||||
make -C tools/clang install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
|
||||
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
|
||||
|
||||
# Install static analysis tools
|
||||
mkdir -p $developDir/tools/clang$secondaryArchSuffix
|
||||
cp -Ra ../tools/clang/tools/scan-build $developDir/tools/clang$secondaryArchSuffix/
|
||||
cp -Ra ../tools/clang/tools/scan-view $developDir/tools/clang$secondaryArchSuffix/
|
||||
|
||||
ln -s $developDir/tools/clang$secondaryArchSuffix/scan-build/scan-build $binDir/scan-build
|
||||
ln -s $developDir/tools/clang$secondaryArchSuffix/scan-view/scan-view $binDir/scan-view
|
||||
ln -s $binDir/clang $developDir/tools/clang$secondaryArchSuffix/scan-build/clang
|
||||
|
||||
prepareInstalledDevelLibs libclang* libmodernizeCore
|
||||
|
||||
mv $prefix/include/* $includeDir/
|
||||
rmdir $prefix/include
|
||||
|
||||
# analysis package
|
||||
packageEntries clang \
|
||||
$binDir/c-index-test \
|
||||
$binDir/clang* \
|
||||
$binDir/pp-trace \
|
||||
$includeDir/clang* \
|
||||
$libDir/libclang* \
|
||||
$developLibDir/libclang* \
|
||||
$developLibDir/libmodernizeCore*
|
||||
|
||||
# analysis package
|
||||
packageEntries clang_analysis \
|
||||
$binDir/scan-build \
|
||||
$binDir/scan-view \
|
||||
$developDir/tools/clang$secondaryArchSuffix
|
||||
}
|
||||
|
||||
TEST()
|
||||
|
||||
Reference in New Issue
Block a user