gdal: use numpy resource.
parent
79336143c5
commit
ee02b7f053
|
@ -18,6 +18,10 @@ class Gdal < Formula
|
|||
option 'enable-mdb', 'Build with Access MDB driver (requires Java 1.6+ JDK/JRE, from Apple or Oracle).'
|
||||
|
||||
depends_on :python => :recommended
|
||||
if build.with? "python"
|
||||
depends_on :fortran => :build
|
||||
end
|
||||
|
||||
depends_on 'libpng'
|
||||
depends_on 'jpeg'
|
||||
depends_on 'giflib'
|
||||
|
@ -33,9 +37,6 @@ class Gdal < Formula
|
|||
depends_on "postgresql" => :optional
|
||||
depends_on "mysql" => :optional
|
||||
|
||||
# Without Numpy, the Python bindings can't deal with raster data.
|
||||
depends_on 'numpy' => :python if build.with? 'python'
|
||||
|
||||
depends_on 'homebrew/science/armadillo' if build.include? 'enable-armadillo'
|
||||
|
||||
if build.include? 'complete'
|
||||
|
@ -71,6 +72,11 @@ class Gdal < Formula
|
|||
end if build.include? "enable-mdb"
|
||||
end
|
||||
|
||||
resource 'numpy' do
|
||||
url 'http://downloads.sourceforge.net/project/numpy/NumPy/1.8.1/numpy-1.8.1.tar.gz'
|
||||
sha1 '8fe1d5f36bab3f1669520b4c7d8ab59a21a984da'
|
||||
end
|
||||
|
||||
def get_configure_args
|
||||
args = [
|
||||
# Base configuration.
|
||||
|
@ -200,6 +206,13 @@ class Gdal < Formula
|
|||
end
|
||||
|
||||
def install
|
||||
if build.with? 'python'
|
||||
ENV.prepend_create_path 'PYTHONPATH', libexec+'lib/python2.7/site-packages'
|
||||
numpy_args = [ "build", "--fcompiler=gnu95",
|
||||
"install", "--prefix=#{libexec}" ]
|
||||
resource('numpy').stage { system "python", "setup.py", *numpy_args }
|
||||
end
|
||||
|
||||
# Linking flags for SQLite are not added at a critical moment when the GDAL
|
||||
# library is being assembled. This causes the build to fail due to missing
|
||||
# symbols. Also, ensure Homebrew SQLite is used so that Spatialite is
|
||||
|
|
Loading…
Reference in New Issue