mirror of
git://code.qt.io/qt/qt5.git
synced 2026-03-17 17:56:11 +08:00
Provision libclang
PySide versions following 5.6 use a C++ parser based on Clang. The Clang library (C-bindings), version 3.9 or higher is required for building. Change-Id: Ia7bcad46e3214d6d8b688354c9abdc83a513573c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
committed by
Simon Hausmann
parent
577140a728
commit
0001d102f8
32
coin/provisioning/common/libclang.ps1
Normal file
32
coin/provisioning/common/libclang.ps1
Normal file
@@ -0,0 +1,32 @@
|
||||
param([Int32]$archVer=32)
|
||||
. "$PSScriptRoot\..\common\helpers.ps1"
|
||||
|
||||
# PySide versions following 5.6 use a C++ parser based on Clang (http://clang.org/).
|
||||
# The Clang library (C-bindings), version 3.9 or higher is required for building.
|
||||
|
||||
Get-Content "$PSScriptRoot\..\common\sw_versions.txt" | Foreach-Object {
|
||||
$var = $_.Split('=')
|
||||
New-Variable -Name $var[0] -Value $var[1]
|
||||
$libclang_version = $libclang_version -replace '["."]'
|
||||
}
|
||||
|
||||
if ( $archVer -eq 64 ) {
|
||||
$sha1 = "dc42beb0efff130c4d7dfef3c97adf26f1ab04e0"
|
||||
$url = "https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_$libclang_version-windows-vs2015_64.7z"
|
||||
} else {
|
||||
$sha1 = "64e826c00ae632fbb28655e6e1fa9194980e1205"
|
||||
$url = "https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_$libclang_version-windows-vs2015_32.7z"
|
||||
}
|
||||
|
||||
$zip = "c:\users\qt\downloads\libclang.7z"
|
||||
$destination = "C:\Utils\libclang-" + $libclang_version
|
||||
|
||||
Download $url $url $zip
|
||||
Verify-Checksum $zip $sha1
|
||||
|
||||
C:\Utils\sevenzip\7z.exe x $zip -oC:\Utils\
|
||||
Rename-Item C:\Utils\libclang $destination
|
||||
|
||||
[Environment]::SetEnvironmentVariable("LLVM_INSTALL_DIR", $destination, [EnvironmentVariableTarget]::Machine)
|
||||
del $zip
|
||||
echo "libClang = $libclang_version" >> ~/versions.txt
|
||||
73
coin/provisioning/common/libclang.sh
Executable file
73
coin/provisioning/common/libclang.sh
Executable file
@@ -0,0 +1,73 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#############################################################################
|
||||
##
|
||||
## Copyright (C) 2017 The Qt Company Ltd.
|
||||
## Contact: http://www.qt.io/licensing/
|
||||
##
|
||||
## This file is part of the provisioning scripts of the Qt Toolkit.
|
||||
##
|
||||
## $QT_BEGIN_LICENSE:LGPL21$
|
||||
## Commercial License Usage
|
||||
## Licensees holding valid commercial Qt licenses may use this file in
|
||||
## accordance with the commercial license agreement provided with the
|
||||
## Software or, alternatively, in accordance with the terms contained in
|
||||
## a written agreement between you and The Qt Company. For licensing terms
|
||||
## and conditions see http://www.qt.io/terms-conditions. For further
|
||||
## information use the contact form at http://www.qt.io/contact-us.
|
||||
##
|
||||
## GNU Lesser General Public License Usage
|
||||
## Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
## General Public License version 2.1 or version 3 as published by the Free
|
||||
## Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
||||
## LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
||||
## following information to ensure the GNU Lesser General Public License
|
||||
## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
||||
## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
##
|
||||
## As a special exception, The Qt Company gives you certain additional
|
||||
## rights. These rights are described in The Qt Company LGPL Exception
|
||||
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
##
|
||||
## $QT_END_LICENSE$
|
||||
##
|
||||
#############################################################################
|
||||
|
||||
# PySide versions following 5.6 use a C++ parser based on Clang (http://clang.org/).
|
||||
# The Clang library (C-bindings), version 3.9 or higher is required for building.
|
||||
|
||||
# This same script is used to provision libclang to Linux and macOS.
|
||||
# In case of Linux, we expect to get the values as args
|
||||
set -e
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
. $BASEDIR/sw_versions.txt
|
||||
url=$1
|
||||
sha1=$2
|
||||
version=$3
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
# The default values are for macOS package
|
||||
echo "Using macOS defaults"
|
||||
version=$libclang_version
|
||||
url="https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_${version//\./}-mac.7z"
|
||||
sha1="4781d154b274b2aec99b878c364f0ea80ff00a80"
|
||||
fi
|
||||
|
||||
zip="libclang.7z"
|
||||
destination="/usr/local/libclang-$version"
|
||||
|
||||
curl --fail -L --retry 5 --retry-delay 5 -o "$zip" "$url"
|
||||
_shasum=sha1sum
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
echo "DARWIN"
|
||||
_shasum=/usr/bin/shasum
|
||||
fi
|
||||
echo "$sha1 $zip" | $_shasum --check
|
||||
7z x $zip -o/tmp/
|
||||
rm -rf $zip
|
||||
|
||||
sudo mv /tmp/libclang $destination
|
||||
|
||||
echo "export LLVM_INSTALL_DIR=$destination" >> ~/.bash_profile
|
||||
echo "libClang = $version" >> ~/versions.txt
|
||||
1
coin/provisioning/common/sw_versions.txt
Normal file
1
coin/provisioning/common/sw_versions.txt
Normal file
@@ -0,0 +1 @@
|
||||
libclang_version="4.0"
|
||||
9
coin/provisioning/qtci-linux-RHEL-6.6-x86_64/08-libclang.sh
Executable file
9
coin/provisioning/qtci-linux-RHEL-6.6-x86_64/08-libclang.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
. $BASEDIR/../common/sw_versions.txt
|
||||
VERSION=$libclang_version
|
||||
URL="https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_${VERSION//\./}-linux-Rhel6.6-gcc4.9-x86_64.7z"
|
||||
SHA1="c7466109628418a6aa3db8b3f5825f847f1c4952"
|
||||
|
||||
$BASEDIR/../common/libclang.sh "$URL" "$SHA1" "$VERSION"
|
||||
9
coin/provisioning/qtci-linux-RHEL-7.2-x86_64/08-libclang.sh
Executable file
9
coin/provisioning/qtci-linux-RHEL-7.2-x86_64/08-libclang.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
. $BASEDIR/../common/sw_versions.txt
|
||||
VERSION=$libclang_version
|
||||
URL="https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_${VERSION//\./}-linux-Rhel7.2-gcc5.3-x86_64.7z"
|
||||
SHA1="bbdbbc0296f42310077539b7247d285386119ef4"
|
||||
|
||||
$BASEDIR/../common/libclang.sh "$URL" "$SHA1" "$VERSION"
|
||||
5
coin/provisioning/qtci-osx-10.10-x86_64/08-libclang.sh
Executable file
5
coin/provisioning/qtci-osx-10.10-x86_64/08-libclang.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
# There is only one mac package and common script uses it as a default
|
||||
$BASEDIR/../common/libclang.sh
|
||||
5
coin/provisioning/qtci-osx-10.11-x86_64/08-libclang.sh
Executable file
5
coin/provisioning/qtci-osx-10.11-x86_64/08-libclang.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
# There is only one mac package and common script uses it as a default
|
||||
$BASEDIR/../common/libclang.sh
|
||||
5
coin/provisioning/qtci-osx-10.8-x86_64/08-libclang.sh
Executable file
5
coin/provisioning/qtci-osx-10.8-x86_64/08-libclang.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
# There is only one mac package and common script uses it as a default
|
||||
$BASEDIR/../common/libclang.sh
|
||||
5
coin/provisioning/qtci-osx-10.9-x86_64/08-libclang.sh
Executable file
5
coin/provisioning/qtci-osx-10.9-x86_64/08-libclang.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
# There is only one mac package and common script uses it as a default
|
||||
$BASEDIR/../common/libclang.sh
|
||||
1
coin/provisioning/qtci-windows-10-x86/08-libclang.ps1
Normal file
1
coin/provisioning/qtci-windows-10-x86/08-libclang.ps1
Normal file
@@ -0,0 +1 @@
|
||||
. "$PSScriptRoot\..\common\libclang.ps1" 32
|
||||
1
coin/provisioning/qtci-windows-10-x86_64/08-libclang.ps1
Normal file
1
coin/provisioning/qtci-windows-10-x86_64/08-libclang.ps1
Normal file
@@ -0,0 +1 @@
|
||||
. "$PSScriptRoot\..\common\libclang.ps1" 64
|
||||
1
coin/provisioning/qtci-windows-8-x86/08-libclang.ps1
Normal file
1
coin/provisioning/qtci-windows-8-x86/08-libclang.ps1
Normal file
@@ -0,0 +1 @@
|
||||
. "$PSScriptRoot\..\common\libclang.ps1" 32
|
||||
1
coin/provisioning/qtci-windows-8-x86_64/08-libclang.ps1
Normal file
1
coin/provisioning/qtci-windows-8-x86_64/08-libclang.ps1
Normal file
@@ -0,0 +1 @@
|
||||
. "$PSScriptRoot\..\common\libclang.ps1" 64
|
||||
Reference in New Issue
Block a user