Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
Alexander Afanasyev | ca6d5d9 | 2017-02-02 20:43:59 -0800 | [diff] [blame] | 3 | NDN_CXX_COMMIT=${NDN_CXX_COMMIT:-ndn-cxx-0.5.1} |
| 4 | NFD_COMMIT=${NFD_COMMIT:-NFD-0.5.1} |
| 5 | NDN_TOOLS_COMMIT=${NDN_TOOLS_COMMIT:-ndn-tools-0.4} |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 6 | |
| 7 | GIT=${GIT:-https://github.com/named-data} |
| 8 | |
| 9 | mkdir build 2>/dev/null || true |
| 10 | path="$(pwd)" |
| 11 | |
| 12 | ####################################### |
| 13 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 14 | rm -Rf build/ndn-cxx |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 15 | git clone ${GIT}/ndn-cxx build/ndn-cxx |
| 16 | pushd build/ndn-cxx |
| 17 | git checkout ${NDN_CXX_COMMIT} |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 18 | |
| 19 | patch -p1 <<EOF |
| 20 | diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp |
Qi Zhao | 0e043e5 | 2016-12-05 18:27:09 -0800 | [diff] [blame] | 21 | index f2e44aa..268f967 100644 |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 22 | --- a/src/transport/unix-transport.cpp |
| 23 | +++ b/src/transport/unix-transport.cpp |
Qi Zhao | 0e043e5 | 2016-12-05 18:27:09 -0800 | [diff] [blame] | 24 | @@ -40,7 +40,7 @@ std::string |
| 25 | UnixTransport::getSocketNameFromUri(const std::string& uriString) |
| 26 | { |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 27 | // Assume the default nfd.sock location. |
Qi Zhao | 0e043e5 | 2016-12-05 18:27:09 -0800 | [diff] [blame] | 28 | - std::string path = "/var/run/nfd.sock"; |
| 29 | + std::string path = "/tmp/nfd.sock"; |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame] | 30 | |
Qi Zhao | 0e043e5 | 2016-12-05 18:27:09 -0800 | [diff] [blame] | 31 | if (uriString.empty()) { |
| 32 | return path; |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 33 | EOF |
| 34 | |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame] | 35 | ./waf configure --prefix="${path}/build/deps" \ |
| 36 | --sysconfdir="/Applications/NDN.app/Contents/etc" |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 37 | ./waf build |
| 38 | ./waf install |
| 39 | popd |
| 40 | |
| 41 | #################################### |
| 42 | |
Alexander Afanasyev | 11ae34d | 2016-03-21 11:55:16 -0700 | [diff] [blame] | 43 | rm -Rf build/NFD |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 44 | git clone ${GIT}/NFD build/NFD |
| 45 | pushd build/NFD |
| 46 | git checkout ${NFD_COMMIT} |
| 47 | git submodule update --init |
| 48 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
Alexander Afanasyev | 964feb9 | 2016-03-22 13:03:11 -0700 | [diff] [blame] | 49 | ./waf configure --prefix="${path}/build/deps" \ |
| 50 | --sysconfdir="/Applications/NDN.app/Contents/etc" |
Alexander Afanasyev | b2cf5c0 | 2016-03-21 11:04:28 -0700 | [diff] [blame] | 51 | ./waf build |
| 52 | ./waf install |
| 53 | popd |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 54 | |
Qi Zhao | 5fc9a70 | 2016-12-23 17:32:01 -0800 | [diff] [blame] | 55 | #################################### |
| 56 | |
| 57 | rm -Rf build/ndn-tools |
| 58 | git clone ${GIT}/ndn-tools build/ndn-tools |
| 59 | pushd build/ndn-tools |
| 60 | git checkout ${NDN_TOOLS_COMMIT} |
| 61 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
| 62 | ./waf configure --prefix="${path}/build/deps" \ |
| 63 | --sysconfdir="/Applications/NDN.app/Contents/etc" |
| 64 | ./waf build |
| 65 | ./waf install |
| 66 | popd |
| 67 | |
| 68 | #################################### |
| 69 | |
Alexander Afanasyev | 8e986f8 | 2016-03-21 14:19:15 -0700 | [diff] [blame] | 70 | PKG_CONFIG_PATH="${path}/build/deps/lib/pkgconfig:${PKG_CONFIG_PATH}" \ |
| 71 | ./waf configure |