From 9d19606abe03f0b578e914cf10c4ec6e9f16aa37 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Mon, 1 Jul 2019 20:11:55 +0200 Subject: [PATCH] Updated refs --- .gitmodules | 9 +++++++++ third_party/CXXTerminal | 1 + third_party/build.sh | 31 +++++++++++++++++++++++++++++++ third_party/build_breakpad.sh | 19 +++++++++++++++++++ third_party/build_cxxterminal.sh | 20 ++++++++++++++++++++ third_party/build_ed25519.sh | 11 +++++++++++ third_party/build_event.sh | 11 +++++++++++ third_party/build_jsoncpp.sh | 11 +++++++++++ third_party/build_opus.sh | 6 ++++++ third_party/jsoncpp | 1 + third_party/protobuf | 1 + 11 files changed, 121 insertions(+) create mode 160000 third_party/CXXTerminal create mode 100755 third_party/build.sh create mode 100755 third_party/build_breakpad.sh create mode 100755 third_party/build_cxxterminal.sh create mode 100755 third_party/build_ed25519.sh create mode 100755 third_party/build_event.sh create mode 100755 third_party/build_jsoncpp.sh create mode 100755 third_party/build_opus.sh create mode 160000 third_party/jsoncpp create mode 160000 third_party/protobuf diff --git a/.gitmodules b/.gitmodules index 34d2872..9e06961 100644 --- a/.gitmodules +++ b/.gitmodules @@ -46,3 +46,12 @@ [submodule "third_party/tommath"] path = third_party/tommath url = https://git.did.science/WolverinDEV/tommath.git +[submodule "third_party/CXXTerminal"] + path = third_party/CXXTerminal + url = https://github.com/WolverinDEV/CXXTerminal.git +[submodule "third_party/jsoncpp"] + path = third_party/jsoncpp + url = https://github.com/open-source-parsers/jsoncpp.git +[submodule "third_party/protobuf"] + path = third_party/protobuf + url = https://github.com/google/protobuf.git diff --git a/third_party/CXXTerminal b/third_party/CXXTerminal new file mode 160000 index 0000000..d44e435 --- /dev/null +++ b/third_party/CXXTerminal @@ -0,0 +1 @@ +Subproject commit d44e435f1ec8b130df5f9db2868e9abf94ddf9d2 diff --git a/third_party/build.sh b/third_party/build.sh new file mode 100755 index 0000000..a8e52b4 --- /dev/null +++ b/third_party/build.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +color_green='\e[92m' +color_normal='\e[39m' +function exec_script { + name=$(echo "$1" | sed -n -E 's:^build_(.*)\.sh:\1:p') + echo -e "==================== $color_green$name$color_normal ====================" + echo -e "Building library with script $color_green${1}$color_normal" + ./${1} + if [[ $? -ne 0 ]]; then + echo "Failed to build library $name. Status code: $?" + exit 1 + fi +} + +#exec_script build_boringssl.sh +#exec_script build_breakpad.sh +#exec_script build_cxxterminal.sh +#exec_script build_datapipes.sh +#exec_script build_ed25519.sh +exec_script build_event.sh +#exec_script build_jsoncpp.sh +#exec_script build_mysqlconnector.sh +#exec_script build_opus.sh +#exec_script build_protobuf.sh +#exec_script build_spdlog.sh +#exec_script build_stringvariable.sh +#exec_script build_threadpool.sh +#exec_script build_tom.sh +#exec_script build_yaml.sh +#exec_script build_jemalloc.sh diff --git a/third_party/build_breakpad.sh b/third_party/build_breakpad.sh new file mode 100755 index 0000000..4cb249a --- /dev/null +++ b/third_party/build_breakpad.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +source ../scripts/build_helper.sh + +library_path="breakpad" +requires_rebuild ${library_path} +[[ $? -eq 0 ]] && exit 0 + +cd ${library_path} +git clone https://chromium.googlesource.com/linux-syscall-support src/third_party/lss +cd build +../configure +make CXXFLAGS="-std=c++11 -I../../boringssl/include/ ${CXX_FLAGS}" CFLAGS="${C_FLAGS}" ${MAKE_OPTIONS} +sudo make install +cd .. + +# cmake_build ${library_path} -DCMAKE_C_FLAGS="-fPIC -I../../boringssl/include/" -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_OPENSSL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo +# check_err_exit ${library_path} "Failed to build libevent!" +set_build_successful ${library_path} \ No newline at end of file diff --git a/third_party/build_cxxterminal.sh b/third_party/build_cxxterminal.sh new file mode 100755 index 0000000..181411b --- /dev/null +++ b/third_party/build_cxxterminal.sh @@ -0,0 +1,20 @@ +cd CXXTerminal/libraries/ +./build_event.sh #TODO test status! +cd ../build/ +cmake .. -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_C_FLAGS="${C_FLAGS}" -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_OPTIONS} +make ${CMAKE_MAKE_OPTIONS} +sudo make install + +#!/usr/bin/env bash + +source ../scripts/build_helper.sh + +library_path="CXXTerminal" +requires_rebuild ${library_path} +[[ $? -eq 0 ]] && exit 0 + + +#./build_event.sh +cmake_build ${library_path} -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_BUILD_TYPE=RelWithDebInfo +check_err_exit ${library_path} "Failed to build libevent!" +set_build_successful ${library_path} \ No newline at end of file diff --git a/third_party/build_ed25519.sh b/third_party/build_ed25519.sh new file mode 100755 index 0000000..2625ce7 --- /dev/null +++ b/third_party/build_ed25519.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +source ../scripts/build_helper.sh + +library_path="ed25519" +requires_rebuild ${library_path} +[[ $? -eq 0 ]] && exit 0 + +cmake_build ${library_path} -DCMAKE_C_FLAGS="-fPIC -I`pwd`/boringssl/include/ -L`pwd`/boringssl/build/ssl/ -L`pwd`/boringssl/build/crypto/" -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_BUILD_TYPE=RelWithDebInfo +check_err_exit ${library_path} "Failed to build ed25519!" +set_build_successful ${library_path} \ No newline at end of file diff --git a/third_party/build_event.sh b/third_party/build_event.sh new file mode 100755 index 0000000..45045cf --- /dev/null +++ b/third_party/build_event.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +source ../scripts/build_helper.sh + +library_path="libevent" +requires_rebuild ${library_path} +if [[ $? -ne 0 ]]; then + cmake_build ${library_path} -DCMAKE_C_FLAGS="-fPIC -I../../boringssl/include/" -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_OPENSSL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo + check_err_exit ${library_path} "Failed to build libevent!" + set_build_successful ${library_path} +fi \ No newline at end of file diff --git a/third_party/build_jsoncpp.sh b/third_party/build_jsoncpp.sh new file mode 100755 index 0000000..1660bbb --- /dev/null +++ b/third_party/build_jsoncpp.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +source ../scripts/build_helper.sh + +library_path="jsoncpp" +requires_rebuild ${library_path} +[[ $? -eq 0 ]] && exit 0 + +cmake_build ${library_path} -DCMAKE_CXX_FLAGS="-std=c++11 -fPIC" -DCMAKE_BUILD_TYPE=RelWithDebInfo +check_err_exit ${library_path} "Failed to build jsoncpp!" +set_build_successful ${library_path} \ No newline at end of file diff --git a/third_party/build_opus.sh b/third_party/build_opus.sh new file mode 100755 index 0000000..c3dabd6 --- /dev/null +++ b/third_party/build_opus.sh @@ -0,0 +1,6 @@ +cd opus +./autogen.sh +cd build +../configure +make -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_C_FLAGS="${C_FLAGS}" ${MAKE_OPTIONS} +sudo make install diff --git a/third_party/jsoncpp b/third_party/jsoncpp new file mode 160000 index 0000000..95b3092 --- /dev/null +++ b/third_party/jsoncpp @@ -0,0 +1 @@ +Subproject commit 95b3092ce4b7156adc8a265907b2175ceff5a96f diff --git a/third_party/protobuf b/third_party/protobuf new file mode 160000 index 0000000..860bd12 --- /dev/null +++ b/third_party/protobuf @@ -0,0 +1 @@ +Subproject commit 860bd12fec5c69e6529565165532b3d5108a7d97