shapelib 1.4.1
depend on cmake add a test Closes #19313. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
6b199836e3
commit
5d4d66572d
1 changed files with 9 additions and 20 deletions
|
@ -1,8 +1,8 @@
|
|||
class Shapelib < Formula
|
||||
desc "Library for reading and writing ArcView Shapefiles"
|
||||
homepage "http://shapelib.maptools.org/"
|
||||
url "http://download.osgeo.org/shapelib/shapelib-1.3.0.tar.gz"
|
||||
sha256 "23d474016158ab5077db2f599527631706ba5c0dc7c4178a6a1d685bb014f68f"
|
||||
url "http://download.osgeo.org/shapelib/shapelib-1.4.1.tar.gz"
|
||||
sha256 "a4c94817365761a3a4c21bb3ca1c680a6bdfd3edd61df9fdd291d3e7645923b3"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
|
@ -15,25 +15,14 @@ class Shapelib < Formula
|
|||
sha256 "f8d87f694df8fec823efe62702e317737c53fd5c1407f1007b7d5fae9f37974f" => :mountain_lion
|
||||
end
|
||||
|
||||
depends_on "cmake" => :build
|
||||
|
||||
def install
|
||||
dylib = lib+"libshp.#{version}.dylib"
|
||||
system "cmake", ".", *std_cmake_args
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
system "make", "CC=#{ENV.cc}",
|
||||
"CFLAGS=#{ENV.cflags}",
|
||||
"PREFIX=#{prefix}"
|
||||
|
||||
lib.mkpath
|
||||
system ENV.cc, "-dynamiclib", "-Wl,-all_load",
|
||||
"-Wl,-install_name,#{dylib}",
|
||||
"-Wl,-headerpad_max_install_names",
|
||||
"-Wl,-compatibility_version,#{version}",
|
||||
"-o", dylib.to_s, "shpopen.o", "shptree.o",
|
||||
"dbfopen.o", "safileio.o"
|
||||
|
||||
include.install "shapefil.h"
|
||||
bin.install %w[shpcreate shpadd shpdump shprewind dbfcreate dbfadd dbfdump shptreedump]
|
||||
|
||||
lib.install_symlink dylib.basename => "libshp.#{version.to_s.split(".").first}.dylib"
|
||||
lib.install_symlink dylib.basename => "libshp.dylib"
|
||||
test do
|
||||
assert_match "shp_file", shell_output("#{bin}/shptreedump", 1)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue