diff options
Diffstat (limited to '')
-rwxr-xr-x | tools/macos-setup-brew.sh | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/tools/macos-setup-brew.sh b/tools/macos-setup-brew.sh index 910f7e86..da1a0aa9 100755 --- a/tools/macos-setup-brew.sh +++ b/tools/macos-setup-brew.sh @@ -23,6 +23,7 @@ function print_usage() { printf "\\t--install-dmg-deps: install packages required to build the .dmg file\\n" printf "\\t--install-sparkle-deps: install the Sparkle automatic updater\\n" printf "\\t--install-all: install everything\\n" + printf "\\t--install-logray: install everything to compile Logray and falco bridge\\n" printf "\\t[other]: other options are passed as-is to apt\\n" } @@ -46,6 +47,7 @@ INSTALL_DOC_DEPS=0 INSTALL_DMG_DEPS=0 INSTALL_SPARKLE_DEPS=0 INSTALL_TEST_DEPS=0 +INSTALL_LOGRAY=0 OPTIONS=() for arg; do case $arg in @@ -68,6 +70,9 @@ for arg; do --install-test-deps) INSTALL_TEST_DEPS=1 ;; + --install-logray) + INSTALL_LOGRAY=1 + ;; --install-all) INSTALL_OPTIONAL=1 INSTALL_DOC_DEPS=1 @@ -108,11 +113,15 @@ ADDITIONAL_LIST=( libsmi libssh libxml2 + lua lz4 minizip + minizip-ng + opencore-amr opus snappy spandsp + zlib-ng zstd ) @@ -122,6 +131,12 @@ DOC_DEPS_LIST=( docbook-xsl ) +LOGRAY_LIST=( + jsoncpp + onetbb + re2 +) + ACTUAL_LIST=( "${BUILD_LIST[@]}" "${REQUIRED_LIST[@]}" ) # Now arrange for optional support libraries @@ -133,16 +148,16 @@ if [ $INSTALL_DOC_DEPS -ne 0 ] ; then ACTUAL_LIST+=( "${DOC_DEPS_LIST[@]}" ) fi +if [ $INSTALL_LOGRAY -ne 0 ] ; then + ACTUAL_LIST+=( "${LOGRAY_LIST[@]}" ) +fi + if (( ${#OPTIONS[@]} != 0 )); then ACTUAL_LIST+=( "${OPTIONS[@]}" ) fi install_formulae "${ACTUAL_LIST[@]}" -if [ $INSTALL_OPTIONAL -ne 0 ] ; then - brew install lua@5.1 || printf "Lua 5.1 installation failed.\\n" -fi - if [ $INSTALL_DMG_DEPS -ne 0 ] ; then printf "Sorry, you'll have to install dmgbuild yourself for the time being.\\n" # pip3 install dmgbuild @@ -157,6 +172,28 @@ if [ $INSTALL_TEST_DEPS -ne 0 ] ; then # pip3 install pytest pytest-xdist fi +if [ $INSTALL_LOGRAY -ne 0 ] ; then + FALCO_LIBS_VERSION=0.17.1 + if [ "$FALCO_LIBS_VERSION" ] && [ ! -f "falco-libs-$FALCO_LIBS_VERSION-done" ] ; then + echo "Downloading, building, and installing libsinsp and libscap:" + [ -f "falco-libs-$FALCO_LIBS_VERSION.tar.gz" ] || curl -L -O --remote-header-name "https://github.com/falcosecurity/libs/archive/refs/tags/$FALCO_LIBS_VERSION.tar.gz" + mv "libs-$FALCO_LIBS_VERSION.tar.gz" "falco-libs-$FALCO_LIBS_VERSION.tar.gz" + tar -xf "falco-libs-$FALCO_LIBS_VERSION.tar.gz" + mv "libs-$FALCO_LIBS_VERSION" "falco-libs-$FALCO_LIBS_VERSION" + cd "falco-libs-$FALCO_LIBS_VERSION" + patch -p1 < "../tools/macos-setup-patches/falco-uthash_h-install.patch" + mkdir build_dir + cd build_dir + cmake -DBUILD_SHARED_LIBS=ON -DMINIMAL_BUILD=ON -DCREATE_TEST_TARGETS=OFF \ + -DUSE_BUNDLED_DEPS=ON -DUSE_BUNDLED_CARES=OFF -DUSE_BUNDLED_ZLIB=OFF \ + -DUSE_BUNDLED_JSONCPP=OFF -DUSE_BUNDLED_TBB=OFF -DUSE_BUNDLED_RE2=OFF \ + .. + make + sudo make install + cd ../.. + fi +fi + # Uncomment to add PNG compression utilities used by compress-pngs: # brew install advancecomp optipng oxipng pngcrush |