Skip to content

Commit

Permalink
gdal: Depends on expat and zlib for Linuxbrew (#2767)
Browse files Browse the repository at this point in the history
Fix the error:
Unwanted system libraries: libexpat.so.1
  • Loading branch information
sjackman authored May 26, 2017
1 parent 126a459 commit 4f0b363
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Formula/gdal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ class Gdal < Formula
depends_on :python3 => :optional
depends_on :fortran => :build if build.with?("python") || build.with?("python3")

depends_on "curl" unless OS.mac?
unless OS.mac?
depends_on "curl"
depends_on "expat"
depends_on "zlib"
end

# Extra linking libraries in configure test of armadillo may throw warning
# see: https://trac.osgeo.org/gdal/ticket/5455
Expand Down Expand Up @@ -133,10 +137,10 @@ def configure_args
"--with-pam",

# Backends supported by macOS.
"--with-libiconv-prefix=/usr",
"--with-libz=/usr",
*("--with-libiconv-prefix=/usr" if OS.mac?),
"--with-libz=#{OS.mac? ? "/usr" : Formula["zlib"].opt_prefix}",
"--with-png=#{Formula["libpng"].opt_prefix}",
"--with-expat=/usr",
"--with-expat=#{OS.mac? ? "/usr" : Formula["expat"].opt_prefix}",

# Default Homebrew backends.
"--with-jpeg=#{HOMEBREW_PREFIX}",
Expand Down

0 comments on commit 4f0b363

Please sign in to comment.