|
| 1 | +using BinDeps, Compat |
| 2 | +@BinDeps.setup |
| 3 | + |
| 4 | +libgeos = library_dependency("libgeos",aliases=["libgeos_c", "libgeos_c-1"], validate = function(path, handle) |
| 5 | + return @compat(Libdl.dlsym_e(handle,:initGEOS)) != C_NULL && @compat(Libdl.dlsym_e(handle,:GEOSDelaunayTriangulation)) != C_NULL |
| 6 | +end) |
| 7 | + |
| 8 | +version = "3.4.2" |
| 9 | + |
| 10 | +provides(Sources, URI("http://download.osgeo.org/geos/geos-$(version).tar.bz2"), [libgeos], os = :Unix) |
| 11 | +provides(BuildProcess,Autotools(libtarget = "capi/.libs/libgeos_c."*BinDeps.shlib_ext),libgeos) |
| 12 | +# provides(AptGet,"libgeos-dev", libgeos) |
| 13 | +# TODO: provides(Yum,"libgeos-dev", libgeos) |
| 14 | +# TODO: provides(Pacman,"libgeos-dev", libgeos) |
| 15 | + |
| 16 | +@windows_only begin |
| 17 | + using WinRPM |
| 18 | + push!(WinRPM.sources, "http://download.opensuse.org/repositories/home:yeesian/openSUSE_13.1") |
| 19 | + push!(WinRPM.sources, "http://download.opensuse.org/repositories/home:yeesian/windows_mingw_win32_openSUSE_13.1") |
| 20 | + WinRPM.update() |
| 21 | + provides(WinRPM.RPM, "libgeos", [libgeos], os = :Windows) |
| 22 | +end |
| 23 | + |
| 24 | +@osx_only begin |
| 25 | + if Pkg.installed("Homebrew") === nothing |
| 26 | + error("Homebrew package not installed, please run Pkg.add(\"Homebrew\")") |
| 27 | + end |
| 28 | + using Homebrew |
| 29 | + provides(Homebrew.HB, "geos", libgeos, os = :Darwin) |
| 30 | +end |
| 31 | + |
| 32 | +@BinDeps.install @compat Dict(:libgeos => :libgeos) |
0 commit comments