diff --git a/src/configs/brew_extensions b/src/configs/brew_extensions index dd1c3f4b..c442c384 100644 --- a/src/configs/brew_extensions +++ b/src/configs/brew_extensions @@ -8,6 +8,7 @@ event=event excimer=excimer expect=expect gearman=gearman +geos=geos gmagick=gmagick gnupg=gnupg grpc=grpc diff --git a/src/scripts/extensions/geos.sh b/src/scripts/extensions/geos.sh index c685f866..360bb24a 100644 --- a/src/scripts/extensions/geos.sh +++ b/src/scripts/extensions/geos.sh @@ -1,8 +1,12 @@ # Helper function to compile and install geos add_geos_helper() { - export GEOS_LINUX_LIBS='libgeos-dev' - export GEOS_DARWIN_LIBS='geos' - add_extension_from_source geos https://github.com libgeos php-geos 1.0.0 extension get + if [ "$os" = "Linux" ]; then + export GEOS_LINUX_LIBS='libgeos-dev' + export GEOS_DARWIN_LIBS='geos' + add_extension_from_source geos https://github.com libgeos php-geos 1.0.0 extension get + else + add_brew_extension geos extension + fi } # Function to add geos @@ -15,3 +19,5 @@ add_geos() { add_extension_log "geos" "Installed and enabled" fi } + +os="$(uname -s)"