Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | NDN_CXX_COMMIT=${NDN_CXX_COMMIT:-master} |
| 4 | NFD_COMMIT=${NFD_COMMIT:-master} |
| 5 | |
| 6 | GIT=${GIT:-https://github.com/named-data} |
| 7 | |
| 8 | mkdir build 2>/dev/null || true |
| 9 | path="$(pwd)" |
| 10 | |
Alexander Afanasyev | e1236c7 | 2016-03-21 15:52:09 -0700 | [diff] [blame] | 11 | pushd build |
| 12 | wget https://github.com/sparkle-project/Sparkle/releases/download/1.14.0/Sparkle-1.14.0.tar.bz2 |
| 13 | mkdir Sparkle-1.14 || true |
| 14 | pushd Sparkle-1.14 |
| 15 | tar xf ../Sparkle-1.14.0.tar.bz2 |
| 16 | popd |
| 17 | mv Sparkle-1.14/Sparkle.framework . |
| 18 | popd |
| 19 | |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 20 | ####################################### |
| 21 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 22 | rm -Rf build/ndn-cxx |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 23 | git clone ${GIT}/ndn-cxx build/ndn-cxx |
| 24 | pushd build/ndn-cxx |
| 25 | git checkout ${NDN_CXX_COMMIT} |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 26 | |
| 27 | patch -p1 <<EOF |
| 28 | diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame^] | 29 | index 6b86a34..e72170e 100644 |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 30 | --- a/src/transport/unix-transport.cpp |
| 31 | +++ b/src/transport/unix-transport.cpp |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame^] | 32 | @@ -72,7 +72,7 @@ UnixTransport::getDefaultSocketName(const ConfigFile& config) |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 33 | } |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame^] | 34 | |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 35 | // Assume the default nfd.sock location. |
| 36 | - return "/var/run/nfd.sock"; |
| 37 | + return "/tmp/nfd.sock"; |
| 38 | } |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame^] | 39 | |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 40 | shared_ptr<UnixTransport> |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 41 | EOF |
| 42 | |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame^] | 43 | ./waf configure --prefix="${path}/build/deps" \ |
| 44 | --sysconfdir="/Applications/NDN.app/Contents/etc" |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 45 | ./waf build |
| 46 | ./waf install |
| 47 | popd |
| 48 | |
| 49 | #################################### |
| 50 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 51 | rm -Rf build/NFD |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 52 | git clone ${GIT}/NFD build/NFD |
| 53 | pushd build/NFD |
| 54 | git checkout ${NFD_COMMIT} |
| 55 | git submodule update --init |
| 56 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame^] | 57 | ./waf configure --prefix="${path}/build/deps" \ |
| 58 | --sysconfdir="/Applications/NDN.app/Contents/etc" |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 59 | ./waf build |
| 60 | ./waf install |
| 61 | popd |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 62 | |
| 63 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
| 64 | ./waf configure |