Skip to content

Commit bc12f5c

Browse files
committed
Switch to homebrew-extensions for geos on macOS [skip ci]
1 parent bbf0b63 commit bc12f5c

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

‎src/configs/brew_extensions‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ event=event
88
excimer=excimer
99
expect=expect
1010
gearman=gearman
11+
geos=geos
1112
gmagick=gmagick
1213
gnupg=gnupg
1314
grpc=grpc

‎src/scripts/extensions/geos.sh‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Helper function to compile and install geos
22
add_geos_helper() {
3-
export GEOS_LINUX_LIBS='libgeos-dev'
4-
export GEOS_DARWIN_LIBS='geos'
5-
add_extension_from_source geos https://github.com libgeos php-geos 1.0.0 extension get
3+
if [[ "$os" = "Linux" || "${version:?}" =~ 5.[3-5] ]]; then
4+
export GEOS_LINUX_LIBS='libgeos-dev'
5+
export GEOS_DARWIN_LIBS='geos'
6+
add_extension_from_source geos https://github.com libgeos php-geos 1.0.0 extension get
7+
else
8+
add_brew_extension geos extension
9+
fi
610
}
711

812
# Function to add geos
@@ -15,3 +19,5 @@ add_geos() {
1519
add_extension_log "geos" "Installed and enabled"
1620
fi
1721
}
22+
23+
os="$(uname -s)"

0 commit comments

Comments
 (0)