aboutsummaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2016-02-03 16:37:28 -0800
committerVitaly Buka <vitalybuka@google.com>2016-02-03 16:49:26 -0800
commitff46c9361512be430b2aea0e8e11b51c2b9671b5 (patch)
tree3836a79d53e7ab607d6c0b89ccd6cc8eefe30cb7 /third_party
parent08be74de678930e6823f9fe7e460c35bb58040f9 (diff)
parent51c4d0d3184dfb5f2601367f06a46459126f377d (diff)
downloadlibweave-ff46c9361512be430b2aea0e8e11b51c2b9671b5.tar.gz
Merge remote-tracking branch 'weave/master' into dev_review
* weave/master: Revert "Make internal googletest optional." Fix incorrect weave setting file path Make internal googletest optional. Make internal libevhtp optional. Periodicly clean up command queue and remove old processed commands Changed meaning of some SSID flags Rename CommandQueue::DelayedRemove into RemoveLater() Fix memory leak when removing CommandInstance from CommandQueue Add a unit tests for deleting CloudCommandProxy along with CommandInstance Add libevent-dev to README. Make default Makefile target "all". Replace bleeding-edge libevent with libevhtp. Remove crypto type "None" Merge: Add write callback into SaveSettings function Merge: Add |name| into LoadSettings/SaveSettings Change-Id: Ia20fbfd59ee3b6287380b6e674b03f038d1b88b3
Diffstat (limited to 'third_party')
-rwxr-xr-xthird_party/get_libevent.sh29
-rwxr-xr-xthird_party/get_libevhtp.sh25
-rw-r--r--third_party/third_party.mk24
3 files changed, 37 insertions, 41 deletions
diff --git a/third_party/get_libevent.sh b/third_party/get_libevent.sh
deleted file mode 100755
index 9985bc0..0000000
--- a/third_party/get_libevent.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-# Copyright 2015 The Weave Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Make libevent.
-# Example uses libevent to implement HTTPS server. This capability is
-# available only in version 2.1.x-alpha. Step could be replaced with apt-get
-# in future.
-cd $(dirname "$0")
-THIRD_PARTY=$(pwd)
-
-mkdir -p include lib
-
-rm -rf $THIRD_PARTY/libevent
-git clone https://github.com/libevent/libevent.git || exit 1
-cd libevent || exit 1
-
-./autogen.sh || exit 1
-./configure --disable-shared || exit 1
-make || exit 1
-if [ -z "$DISABLE_LIBEVENT_TEST" ]; then
- echo -e "\n\nTesting libevent...\nCan take several minutes.\n"
- make verify || exit 1
-fi
-cp -rf include/*.h include/event2 $THIRD_PARTY/include/ || exit 1
-cp -f .libs/lib* $THIRD_PARTY/lib/ || exit 1
-
-rm -rf $THIRD_PARTY/libevent
diff --git a/third_party/get_libevhtp.sh b/third_party/get_libevhtp.sh
new file mode 100755
index 0000000..c270813
--- /dev/null
+++ b/third_party/get_libevhtp.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# Copyright 2016 The Weave Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Make libevhtp.
+# Example uses libevhtp to implement HTTPS server. This step could be
+# replaced with apt-get in future (Debian jessie, Ubuntu vivid).
+cd $(dirname "$0")
+THIRD_PARTY=$(pwd)
+
+mkdir -p include lib
+
+rm -rf $THIRD_PARTY/libevhtp
+curl -L https://github.com/ellzey/libevhtp/archive/1.2.10.tar.gz | tar xz || exit 1
+mv libevhtp-1.2.10 $THIRD_PARTY/libevhtp || exit 1
+cd $THIRD_PARTY/libevhtp || exit 1
+
+cmake -D EVHTP_DISABLE_REGEX:BOOL=ON . || exit 1
+make evhtp || exit 1
+
+cp -rf evhtp-config.h evhtp.h evthr/evthr.h htparse/htparse.h $THIRD_PARTY/include/ || exit 1
+cp -f libevhtp.a $THIRD_PARTY/lib/ || exit 1
+
+rm -rf $THIRD_PARTY/libevhtp
diff --git a/third_party/third_party.mk b/third_party/third_party.mk
index 8a11e2d..7f651a2 100644
--- a/third_party/third_party.mk
+++ b/third_party/third_party.mk
@@ -64,15 +64,15 @@ clean-gtest :
rm -rf third_party/googletest
###
-# libevent (third_party, downloaded on build)
-
-third_party/include/event2/event.h :
- @echo Downloading and building libevent...
- DISABLE_LIBEVENT_TEST=1 third_party/get_libevent.sh
- @echo Finished downloading and building libevent.
-
-clean-libevent :
- rm -rf third_party/include/ev* third_party/include/event2
- rm -rf third_party/lib/libevent*
- rm -rf third_party/libevent
-
+# libevhtp (third_party, downloaded on build)
+
+third_party/lib/libevhtp.a : third_party/include/evhtp.h
+third_party/include/evhtp.h :
+ @echo Downloading and building libevhtp...
+ third_party/get_libevhtp.sh
+ @echo Finished downloading and building libevhtp.
+
+clean-libevhtp :
+ rm -rf third_party/include/evhtp.h third_party/include/evhtp-config.h third_party/include/evthr.h third_party/include/htparse.h
+ rm -rf third_party/lib/libevhtp.a
+ rm -rf third_party/libevhtp