This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch feature/cleanup in repository x2goclient. commit d6c17fc350c9188aa1a565140c4c9ce230dc32fe Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 16 03:14:38 2015 +0100 macbuild.sh: select stdlib on OS X based on the passed or default SDK value. --- debian/changelog | 1 + macbuild.sh | 14 +++++++++++++- x2goclient.pro | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 05e1c86..89d464c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -231,6 +231,7 @@ x2goclient (4.0.3.2-0x2go1) unstable; urgency=medium references in x2goclient.pro and macbuild.sh. - Add debug mode selector via DEBUG env variable to macbuild.sh. - Enable more debugging if needed: change -g flag to -g3 -ggdb3 -gdwarf-4. + - Select stdlib on OS X based on the passed or default SDK value. -- X2Go Release Manager <git-admin@x2go.org> Thu, 19 Feb 2015 12:49:22 +0100 diff --git a/macbuild.sh b/macbuild.sh index a02e3cb..642f6f3 100755 --- a/macbuild.sh +++ b/macbuild.sh @@ -22,6 +22,17 @@ case "${DEBUG}" in (*) BUILD_MODE="debug";; esac +SDK_MINOR_VERSION="$(/usr/bin/perl -pe 's#.*?10\.(\d+).*?\.sdk$#\1#' <<< "${SDK}")" + +MATCH_NUMBERS='^[0-9]+$' +if [[ "${SDK_MINOR_VERSION}" =~ ${MATCH_NUMBERS} ]]; then + STDLIB="libstdc++" + [ "${SDK_MINOR_VERSION}" -gt "8" ] && STDLIB="libc++" +else + echo "Unable to determine OS X version. Unknown value '${SDK_MINOR_VERSION}'." >&2 + exit 1 +fi + set -e function phase() { @@ -49,7 +60,8 @@ phase "Running qmake" qmake -config "${BUILD_MODE}" -spec macx-g++ "${PROJECT}" \ CONFIG+="x86_64" \ QMAKE_MAC_SDK="${SDK}" \ - QMAKE_MACOSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}" + QMAKE_MACOSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}" \ + OSX_STDLIB="${STDLIB}" phase "Running make" make -j2 diff --git a/x2goclient.pro b/x2goclient.pro index 5a195bd..d7adb51 100644 --- a/x2goclient.pro +++ b/x2goclient.pro @@ -186,6 +186,10 @@ x2go_linux_static { macx { message("building $$TARGET with ldap and cups") LIBS += -framework LDAP -lcups -lcrypto -lssl -lz + + !isEmpty(OSX_STDLIB) { + QMAKE_CXXFLAGS += --stdlib=$${OSX_STDLIB} + } } win32-* { message("building $$TARGET for windows without ldap and cups") -- Alioth's /srv/git/code.x2go.org/x2goclient.git//../..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git