mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 06:28:55 +02:00
clang: Patch to fix headers, add static analysis package
* clang was using the wrong include directories, patched to use /boot/system/development vs /boot/development Upstreamed: llvm.org/show_bug.cgi?id=18595 * Manually copy over the static analysis tools (no automated installation) and give them what they need to function. (tested working!) * clang isn't aware of secondary architecture include paths at this time.
This commit is contained in:
@@ -14,7 +14,7 @@ SRC_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.gz"
|
||||
CHECKSUM_MD5="46ed668a1ce38985120dbf6344cf6116"
|
||||
SRC_URI_2="http://llvm.org/releases/${portVersion}/clang-${portVersion}.src.tar.gz"
|
||||
CHECKSUM_MD5_2="b378f1e2c424e03289effc75268d3d2c"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
|
||||
ARCHITECTURES="x86 x86_64"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
@@ -55,7 +55,8 @@ BUILD_PREREQUIRES="
|
||||
|
||||
SOURCE_DIR="llvm-${portVersion}"
|
||||
|
||||
PATCHES="clang-${portVersion}.patchset"
|
||||
PATCHES="llvm-${portVersion}.patchset"
|
||||
PATCHES_2="clang-${portVersion}.patchset"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
@@ -82,10 +83,21 @@ INSTALL()
|
||||
mkdir -p $docDir
|
||||
|
||||
make install-clang
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
|
||||
# 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
|
||||
|
||||
# analysis package
|
||||
packageEntries analysis \
|
||||
$binDir/scan-build \
|
||||
$binDir/scan-view \
|
||||
$developDir/tools/clang$secondaryArchSuffix
|
||||
}
|
||||
|
||||
TEST()
|
||||
@@ -94,12 +106,15 @@ TEST()
|
||||
}
|
||||
|
||||
|
||||
# ----- devel package -------------------------------------------------------
|
||||
# ----- analysis package -------------------------------------------------------
|
||||
|
||||
PROVIDES_devel="
|
||||
clang${secondaryArchSuffix}_devel = $portVersion
|
||||
SUMMARY_analysis="Static analysis tools using the clang compiler"
|
||||
PROVIDES_analysis="
|
||||
clang${secondaryArchSuffix}_analysis = $portVersion
|
||||
cmd:scan_build = $portVersion
|
||||
cmd:scan_view = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES_devel="
|
||||
REQUIRES_analysis="
|
||||
clang$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user