utils+helper: Fix to compile against the latest version of ndn-cxx
Change-Id: If922b1c95beea08e5921af5223af042cb173f434
diff --git a/.jenkins.d/01-deps.sh b/.jenkins.d/01-deps.sh
new file mode 100755
index 0000000..1a0e8c8
--- /dev/null
+++ b/.jenkins.d/01-deps.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+set -x
+set -e
+
+IS_OSX=$( python -c "print 'yes' if 'OSX' in '$NODE_LABELS'.strip().split(' ') else 'no'" )
+IS_UBUNTU=$( python -c "print 'yes' if 'Ubuntu' in '$NODE_LABELS'.strip().split(' ') else 'no'" )
+
+if [[ $IS_OSX == "yes" ]]; then
+ brew update
+ brew upgrade
+ brew install boost cryptopp pkg-config libxml2
+ brew link --force libxml2
+ brew cleanup
+fi
+
+if [[ $IS_UBUNTU == "yes" ]]; then
+ sudo apt-get update -q -y
+ sudo apt-get -y install build-essential
+ sudo apt-get -y install libssl-dev libsqlite3-dev libcrypto++-dev
+
+ IS_12_04=$( python -c "print 'yes' if 'Ubuntu-12.04' in '$NODE_LABELS'.strip().split(' ') else 'no'" )
+ if [[ $IS_12_04 == "yes" ]]; then
+ sudo apt-get install -y python-software-properties
+ sudo add-apt-repository -y ppa:boost-latest/ppa
+ sudo apt-get update -q -y
+ sudo apt-get install -y libboost1.55-all-dev
+ sudo apt-get install -y python-gnomedesktop
+ else
+ sudo apt-get install -y libboost-all-dev
+ fi
+
+ sudo apt-get install -y python-dev python-pygraphviz python-kiwi
+ sudo apt-get install -y python-pygoocanvas python-gnome2
+ sudo apt-get install -y python-rsvg ipython
+fi
diff --git a/.jenkins.d/00-deps-ndn-cxx.sh b/.jenkins.d/02-deps-ndn-cxx.sh
similarity index 75%
rename from .jenkins.d/00-deps-ndn-cxx.sh
rename to .jenkins.d/02-deps-ndn-cxx.sh
index 12e3eb2..fdfafce 100755
--- a/.jenkins.d/00-deps-ndn-cxx.sh
+++ b/.jenkins.d/02-deps-ndn-cxx.sh
@@ -7,8 +7,6 @@
if [ ! -d ndn-cxx ]; then
git clone git://github.com/named-data/ndn-cxx
cd ndn-cxx
- # TEMPORARY, the following must be removed after issue if fixed
- git checkout 81a6c5dea60cea97c60dab0d78576c0d3b4e29ed
BUILD="yes"
else
cd ndn-cxx
@@ -16,8 +14,6 @@
sudo rm -Rf latest-version
git clone git://github.com/named-data/ndn-cxx latest-version
cd latest-version
- # TEMPORARY, the following must be removed after issue if fixed
- git checkout 81a6c5dea60cea97c60dab0d78576c0d3b4e29ed
LATEST_VERSION=`git rev-parse HEAD || echo UNKNOWN`
cd ..
rm -Rf latest-version
@@ -38,6 +34,11 @@
sudo ./waf distclean -j1 --color=yes
fi
-./waf configure -j1 --color=yes --without-osx-keychain
+IS_UBUNTU_12_04=$( python -c "print 'yes' if 'Ubuntu-12.04' in '$NODE_LABELS'.strip().split(' ') else 'no'" )
+if [[ $IS_UBUNTU_12_04 == "yes" ]]; then
+ EXTRA_FLAGS=" --boost-libs=/usr/lib/x86_64-linux-gnu"
+fi
+
+./waf configure -j1 --color=yes --without-osx-keychain $EXTRA_FLAGS
./waf -j1 --color=yes
sudo ./waf install -j1 --color=yes
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index 9297c7e..33352ca 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -7,12 +7,16 @@
# git submodule update
# COVERAGE=$( python -c "print '--with-coverage' if 'code-coverage' in '$JOB_NAME' else ''" )
+IS_UBUNTU_12_04=$( python -c "print 'yes' if 'Ubuntu-12.04' in '$NODE_LABELS'.strip().split(' ') else 'no'" )
+if [[ $IS_UBUNTU_12_04 == "yes" ]]; then
+ EXTRA_FLAGS=" --boost-libs=/usr/lib/x86_64-linux-gnu"
+fi
# Cleanup
sudo ./waf -j1 distclean
# Configure/build in debug mode
-./waf -j1 configure --enable-examples --enable-tests
+./waf -j1 configure --enable-examples --enable-tests $EXTRA_FLAGS
./waf -j1 build
# # Cleanup