try sudoless clang upgrade
This commit is contained in:
parent
bdc49e2adb
commit
be1690d5c7
2 changed files with 62 additions and 4 deletions
|
@ -31,7 +31,7 @@ before_script:
|
|||
|
||||
script:
|
||||
- source bootstrap.sh
|
||||
- JOBS=2 make
|
||||
- JOBS=4 make
|
||||
- git clone --depth=1 https://github.com/mapbox/mapnik-test-data tests/data/mapnik-test-data
|
||||
- make test
|
||||
#- source localize.sh && make grind
|
||||
|
|
64
bootstrap.sh
64
bootstrap.sh
|
@ -18,6 +18,8 @@ todo
|
|||
|
||||
TOOLCHAIN="$(pwd)/toolchain"
|
||||
PPA="https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+files"
|
||||
LLVM_DIST="http://llvm.org/apt/precise/pool/main/l/llvm-toolchain-3.5"
|
||||
SECURITY="http://security.ubuntu.com/ubuntu/pool/main/e/eglibc/"
|
||||
|
||||
function setup_linux_cpp11_toolchain() {
|
||||
if [[ ! -d ${TOOLCHAIN} ]]; then
|
||||
|
@ -27,23 +29,75 @@ function setup_linux_cpp11_toolchain() {
|
|||
dpkg -x gcc-4.8_4.8.1-2ubuntu1~12.04_amd64.deb ${TOOLCHAIN}
|
||||
wget ${PPA}/g%2B%2B-4.8_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
dpkg -x g++-4.8_4.8.1-2ubuntu1~12.04_amd64.deb ${TOOLCHAIN}
|
||||
|
||||
wget ${PPA}/libisl10_0.12.2-2~12.04_amd64.deb
|
||||
dpkg -x libisl10_0.12.2-2~12.04_amd64.deb ${TOOLCHAIN}
|
||||
wget ${PPA}/libcloog-isl4_0.18.2-1~12.04_amd64.deb
|
||||
dpkg -x libcloog-isl4_0.18.2-1~12.04_amd64.deb ${TOOLCHAIN}
|
||||
|
||||
wget ${PPA}/libstdc%2B%2B-4.8-dev_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
dpkg -x libstdc++-4.8-dev_4.8.1-2ubuntu1~12.04_amd64.deb ${TOOLCHAIN}
|
||||
|
||||
${PPA}/gcc-4.8-base_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
dpkg -x gcc-4.8-base_4.8.1-2ubuntu1~12.04_amd64.deb ${TOOLCHAIN}
|
||||
|
||||
wget ${PPA}/libgcc-4.8-dev_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
dpkg -x libgcc-4.8-dev_4.8.1-2ubuntu1~12.04_amd64.deb ${TOOLCHAIN}
|
||||
|
||||
wget ${PPA}/libgcc1_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
dpkg -x libgcc1_4.8.1-2ubuntu1~12.04_amd64.deb ${TOOLCHAIN}
|
||||
|
||||
wget ${PPA}/cpp-4.8_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
dpkg -x cpp-4.8_4.8.1-2ubuntu1~12.04_amd64.deb ${TOOLCHAIN}
|
||||
fi
|
||||
export CPLUS_INCLUDE_PATH="${TOOLCHAIN}/usr/include/c++/4.8:${TOOLCHAIN}/usr/include/x86_64-linux-gnu/c++/4.8:${CPLUS_INCLUDE_PATH}"
|
||||
export LD_LIBRARY_PATH="${TOOLCHAIN}/usr/lib/x86_64-linux-gnu"
|
||||
#export CPLUS_INCLUDE_PATH="${TOOLCHAIN}/usr/include/:${TOOLCHAIN}/usr/include/x86_64-linux-gnu:${TOOLCHAIN}/usr/include/c++/4.8:${TOOLCHAIN}/usr/include/x86_64-linux-gnu/c++/4.8:${CPLUS_INCLUDE_PATH}"
|
||||
}
|
||||
|
||||
function dpack() {
|
||||
wget $1/$(echo $2 | sed 's/+/%2B/g')
|
||||
dpkg -x $2 ${TOOLCHAIN}
|
||||
}
|
||||
|
||||
function test_cpp11() {
|
||||
echo '#include <iostream>' > test.cpp
|
||||
echo ' ' >> test.cpp
|
||||
echo 'int main() {' >> test.cpp
|
||||
echo ' ' >> test.cpp
|
||||
echo 'std::move("hello");' >> test.cpp
|
||||
echo 'return 0;' >> test.cpp
|
||||
echo '}' >> test.cpp
|
||||
echo ' ' >> test.cpp
|
||||
./toolchain/usr/bin/clang++-3.5 -o test test.cpp -std=c++11
|
||||
}
|
||||
|
||||
# http://llvm.org/apt/precise/dists/llvm-toolchain-precise-3.5/main/binary-amd64/Packages
|
||||
function setup_clang_toolchain() {
|
||||
dpack ${LLVM_DIST} clang-3.5_3.5~svn217304-1~exp1_amd64.deb
|
||||
dpack ${LLVM_DIST} libllvm3.5_3.5~svn217304-1~exp1_amd64.deb
|
||||
dpack ${LLVM_DIST} libclang-common-3.5-dev_3.5~svn215019-1~exp1_amd64.deb
|
||||
#dpack ${LLVM_DIST} libclang1-3.5_3.5~svn215019-1~exp1_amd64.deb
|
||||
#dpack ${LLVM_DIST} libclang-3.5-dev_3.5~svn215019-1~exp1_amd64.deb
|
||||
#dpack ${LLVM_DIST} llvm-3.5-runtime_3.5~svn215019-1~exp1_amd64.deb
|
||||
dpack ${PPA} libstdc++6_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
dpack ${PPA} libstdc++-4.8-dev_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
#dpack ${PPA} libgcc-4.8-dev_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
#dpack ${PPA} libgcc1_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
#dpack ${PPA} cpp-4.8_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
#dpack ${PPA} gcc-4.8-base_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
#dpack ${PPA} gcc-4.8_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
#dpack ${PPA} g++-4.8_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
#dpack ${PPA} libisl10_0.12.2-2~12.04_amd64.deb
|
||||
#dpack ${PPA} libcloog-isl4_0.18.2-1~12.04_amd64.deb
|
||||
#dpack ${PPA} g++-4.8-multilib_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
#dpack ${PPA} g++-4.8_4.8.1-2ubuntu1~12.04_amd64.deb
|
||||
#dpack ${PPA} gcc-4.8-locales_4.8.1-2ubuntu1~12.04_all.deb
|
||||
#dpack ${SECURITY} libc6-dev_2.15-0ubuntu10.9_amd64.deb
|
||||
#wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux/linux-libc-dev_3.2.0-75.110_amd64.deb
|
||||
#dpkg -x linux-libc-dev_3.2.0-75.110_amd64.deb ${TOOLCHAIN}
|
||||
#wget http://mirrors.kernel.org/ubuntu/pool/main/b/binutils/binutils-gold_2.22-6ubuntu1.1_amd64.deb
|
||||
#dpkg -x binutils-gold_2.22-6ubuntu1.1_amd64.deb ${TOOLCHAIN}
|
||||
#wget http://security.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.22-6ubuntu1.1_amd64.deb
|
||||
#dpkg -x binutils_2.22-6ubuntu1.1_amd64.deb ${TOOLCHAIN}
|
||||
}
|
||||
|
||||
declare -A DEPS
|
||||
|
@ -95,7 +149,11 @@ export CPLUS_INCLUDE_PATH="${MASON_LINKED}/include"
|
|||
export LIBRARY_PATH="${MASON_LINKED}/lib"
|
||||
|
||||
if [[ $(uname -s) == 'Linux' ]]; then
|
||||
setup_linux_cpp11_toolchain
|
||||
#setup_linux_cpp11_toolchain
|
||||
setup_clang_toolchain
|
||||
export CPLUS_INCLUDE_PATH="${TOOLCHAIN}/usr/include/c++/4.8:${TOOLCHAIN}/usr/include/x86_64-linux-gnu/c++/4.8:${CPLUS_INCLUDE_PATH}"
|
||||
export LD_LIBRARY_PATH="${TOOLCHAIN}/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH}"
|
||||
export PATH=${TOOLCHAIN}/usr/bin:$PATH
|
||||
#sudo apt-get -y install zlib1g-dev python-dev make git python-dev python-nose
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue