aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authornibbles 2bits2012-11-13 23:23:59 -0800
committerJack Nagel2012-11-14 12:27:17 -0600
commit7fcaf16bef69c6c5df5ef49f74a1969082cd507c (patch)
treecbafb0391384022c4d015705ec57cfd4fd94d03a /Library
parentd9f66369841fe6f2f38bcc021cdba2c1409ceffe (diff)
downloadhomebrew-7fcaf16bef69c6c5df5ef49f74a1969082cd507c.tar.bz2
shapelib 1.3.0
- Upgrade to 1.3.0 - Adjust the inreplace to set `CC = #{ENV.cc}` and the prefix. - Add a `-headerpad_max_install_names` to the shared lib command. - Add the new object file to the shared lib command. - Install all the binaries. - It passes `make test` - Works with superenv. Closes #16049. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/shapelib.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/Library/Formula/shapelib.rb b/Library/Formula/shapelib.rb
index 6286de5e4..4cd90bfa5 100644
--- a/Library/Formula/shapelib.rb
+++ b/Library/Formula/shapelib.rb
@@ -2,27 +2,31 @@ require 'formula'
class Shapelib < Formula
homepage 'http://shapelib.maptools.org/'
- url 'http://download.osgeo.org/shapelib/shapelib-1.2.10.tar.gz'
- sha1 '436b09b6a90f403e4568460d67560d5730725651'
+ url 'http://download.osgeo.org/shapelib/shapelib-1.3.0.tar.gz'
+ sha1 '599fde6f69424fa55da281506b297f3976585b85'
def install
dylib = lib+"libshp.#{version}.dylib"
inreplace 'Makefile' do |s|
- s.change_make_var! "CFLAGS", ENV.cflags
+ s.change_make_var! 'CFLAGS', ENV.cflags
+ s.change_make_var! 'PREFIX', prefix
+ s.gsub! '#CC = g++', "CC = #{ENV.cc}"
end
-
- system "make all"
- system "make shptree.o"
+ system 'make'
lib.mkpath
system ENV.cc, *%W(-dynamiclib -all_load
-install_name #{dylib}
+ -headerpad_max_install_names
-compatibility_version #{version}
-o #{dylib}
- shpopen.o shptree.o dbfopen.o)
+ shpopen.o shptree.o dbfopen.o safileio.o)
include.install 'shapefil.h'
+ bin.install %w(
+ shpcreate shpadd shpdump shprewind dbfcreate dbfadd dbfdump shptreedump
+ )
cd lib do
ln_s "libshp.#{version}.dylib", "libshp.#{version.to_s.split('.').first}.dylib"