From f7bf4d7ab03f440e717ed6a20dcd077da7509c54 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 22 Jun 2016 15:29:19 -0400 Subject: [PATCH] jjb: Add macosxbuild to liburcu Signed-off-by: Michael Jeanson --- jobs/liburcu.yaml | 7 +++++++ scripts/liburcu/build.sh | 19 +++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/jobs/liburcu.yaml b/jobs/liburcu.yaml index 1ee7ffe..997ac3b 100644 --- a/jobs/liburcu.yaml +++ b/jobs/liburcu.yaml @@ -198,6 +198,13 @@ version: # Solaris support was introduced in 0.9 - master - stable-0.9 + - 'liburcu_{version}_{buildtype}': + buildtype: macosxbuild + arch: !!python/tuple [macosx] + build: !!python/tuple [std] + version: + - master + - stable-0.9 - 'liburcu_{version}_cppcheck' - 'liburcu_{version}_scan-build' - 'liburcu_{version}_coverity': diff --git a/scripts/liburcu/build.sh b/scripts/liburcu/build.sh index 996e7f1..aa7fdbf 100755 --- a/scripts/liburcu/build.sh +++ b/scripts/liburcu/build.sh @@ -18,19 +18,19 @@ # Version compare functions verlte() { - [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | head -n1`" ] + [ "$1" = "$(printf '%s\n%s' "$1" "$2" | sort -t '.' -k 1,1 -k 2,2 -k 3,3 -k 4,4 -g | head -n1)" ] } verlt() { - [ "$1" = "$2" ] && return 1 || verlte $1 $2 + [ "$1" = "$2" ] && return 1 || verlte "$1" "$2" } vergte() { - [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | tail -n1`" ] + [ "$1" = "$(printf '%s\n%s' "$1" "$2" | sort -t '.' -k 1,1 -k 2,2 -k 3,3 -k 4,4 -g | tail -n1)" ] } vergt() { - [ "$1" = "$2" ] && return 1 || vergte $1 $2 + [ "$1" = "$2" ] && return 1 || vergte "$1" "$2" } @@ -61,6 +61,17 @@ solaris11) export PATH="$PATH:/usr/perl5/bin" ;; +macosx) + MAKE=make + TAR=tar + NPROC="getconf _NPROCESSORS_ONLN" + BISON="bison" + YACC="$BISON -y" + export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" + export CFLAGS="-I/opt/local/include" + export LDFLAGS="-L/opt/local/lib" + ;; + *) MAKE=make TAR=tar -- 2.34.1