diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh index af3bd5131c..56ebcbde54 100755 --- a/thirdparty/build-thirdparty.sh +++ b/thirdparty/build-thirdparty.sh @@ -6,6 +6,7 @@ function exit_if_fail() { if [ $2 -ne 0 ]; then echo "build $1 failed" + echo "please check the command-line output of cmake or make" exit $2 fi } @@ -264,3 +265,16 @@ if [ ! -d $TP_OUTPUT/include/gflags ]; then else echo "skip build gflags" fi + +#build prometheus-cpp +if [ ! -d $TP_OUTPUT/include/prometheus ]; then + mkdir -p $TP_BUILD/prometheus + cd $TP_BUILD/prometheus + cmake $TP_SRC/prometheus-cpp-0.7.0 -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$TP_OUTPUT -DENABLE_TESTING=OFF + make -j8 && make install + res=$? + exit_if_fail "prometheus-cpp" $res + cd $TP_DIR +else + echo "skip build prometheus-cpp" +fi diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh index 3f295d3398..1f13e97fe4 100755 --- a/thirdparty/download-thirdparty.sh +++ b/thirdparty/download-thirdparty.sh @@ -244,6 +244,32 @@ check_and_download "${GFLAGS_PKG}"\ "${GFLAGS_NAME}" exit_if_fail $? +# civetweb +# from: https://codeload.github.com/civetweb/civetweb/tar.gz/v1.11 +CIVETWEB_NAME=civetweb-1.11 +CIVETWEB_PKG=${CIVETWEB_NAME}.tar.gz +check_and_download "${CIVETWEB_PKG}"\ + "${OSS_URL_PREFIX}/${CIVETWEB_PKG}"\ + "b6d2175650a27924bccb747cbe084cd4"\ + "${CIVETWEB_NAME}" +exit_if_fail $? + +# prometheus-cpp +# from: https://codeload.github.com/jupp0r/prometheus-cpp/tar.gz/v0.7.0 +PROMETHEUS_NAME=prometheus-cpp-0.7.0 +PROMETHEUS_PKG=${PROMETHEUS_NAME}.tar.gz +check_and_download "${PROMETHEUS_PKG}"\ + "${OSS_URL_PREFIX}/${PROMETHEUS_PKG}"\ + "dc75c31ceaefd160e978365bdca8eb01"\ + "${PROMETHEUS_NAME}" +exit_if_fail $? + +rm -rf $TP_SRC/prometheus-cpp-0.7.0/3rdparty/civetweb +cp -r $TP_SRC/civetweb-1.11 $TP_SRC/prometheus-cpp-0.7.0/3rdparty/ +cd $TP_SRC/prometheus-cpp-0.7.0/3rdparty +mv civetweb-1.11 civetweb +cd $TP_SRC + # s2geometry # from: https://github.com/google/s2geometry/archive/0239455c1e260d6d2c843649385b4fb9f5b28dba.zip S2GEOMETRY_NAME=s2geometry-0239455c1e260d6d2c843649385b4fb9f5b28dba