Skip to content
Snippets Groups Projects
Commit 94729e48 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Clean-up master branch

parent 69a9a1cd
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,8 @@
# Build utilities
# Determines the architecture we're using
arch() {
# Determines the operating system we're using
osname() {
[[ "$(uname -s)" == "Darwin" ]] && echo "macosx" || echo "linux"
}
......@@ -196,7 +196,7 @@ check_pass DOCUSER
check_pass DOCPASS
# Sets up variables
ARCH=`arch`
OSNAME=`osname`
if [ -z "${CONDA_FOLDER}" ]; then
CONDA_FOLDER=/opt/conda
......@@ -213,15 +213,28 @@ fi
PREFIX=${CI_PROJECT_DIR}/${VIRTUALENV_PATH}
if [ "${ARCH}" == "linux" ]; then
if [ "${OSNAME}" == "linux" ]; then
# Temporary hack to get building done right with gcc-5 compilers
if [ -z "${CFLAGS}" ]; then
CFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0"
CFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 -pthread"
else
CFLAGS="${CFLAGS} -D_GLIBCXX_USE_CXX11_ABI=0"
if [[ "${CFLAGS}" != *-pthread* ]]; then
CFLAGS="${CFLAGS} -pthread"
fi
if [[ "${CFLAGS}" != *-D_GLIBCXX_USE_CXX11_ABI=0* ]]; then
CFLAGS="${CFLAGS} -D_GLIBCXX_USE_CXX11_ABI=0"
fi
fi
else #macosx
if [ -z "${CFLAGS}" ]; then
CFLAGS="-pthread"
elif [[ "${CFLAGS}" != *-pthread* ]]; then
CFLAGS="${CFLAGS} -pthread"
fi
if [ "${CFLAGS}" == *-DBZ_DEBUG* ]; then
# -DBZ_DEBUG does not work well with clang
CFLAGS=`echo ${CFLAGS} | sed -e s/\s*-DBZ_DEBUG//g`
fi
else
CFLAGS=""
fi
CXXFLAGS=${CFLAGS}
......@@ -236,8 +249,9 @@ if [ -z "${BOB_PREFIX_PATH}" ]; then
fi
fi
LD_LIBRARY_PATH=${BOB_PREFIX_PATH}/lib
if [ "${ARCH}" == "macosx" ]; then
if [ "${OSNAME}" == "macosx" ]; then
DYLD_FALLBACK_LIBRARY_PATH=${BOB_PREFIX_PATH}/lib
MACOSX_DEPLOYMENT_TARGET=10.9
fi
if [ -z "${PYPISERVER}" ]; then
......@@ -246,7 +260,7 @@ fi
TESTSERVER=https://testpypi.python.org/pypi
check_env ARCH
check_env OSNAME
check_env PYVER
check_env PREFIX
export_env CFLAGS
......@@ -257,8 +271,9 @@ check_env TESTSERVER
check_env CONDA_FOLDER
check_env VIRTUALENV_PATH
export_env LD_LIBRARY_PATH
if [ "${ARCH}" == "macosx" ]; then
if [ "${OSNAME}" == "macosx" ]; then
export_env DYLD_FALLBACK_LIBRARY_PATH
export_env MACOSX_DEPLOYMENT_TARGET
fi
export_env BOB_PREFIX_PATH
......@@ -277,10 +292,3 @@ fi
# Activates conda environment
run_cmd source ${BOB_PREFIX_PATH}/bin/activate `basename ${BOB_PREFIX_PATH}`
# Patches conda environment
log_info "Patching build flags to provide for conda..."
CFLAGS="${CFLAGS} -pthread"
export_env CFLAGS
CXXFLAGS="${CXXFLAGS} -pthread"
export_env CXXFLAGS
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment