-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostgis.rb
64 lines (52 loc) · 1.88 KB
/
postgis.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# This custom formula is edited to support verison 9.6 of PostgreSQL.
class Postgis < Formula
desc "Adds support for geographic objects to PostgreSQL"
homepage "https://postgis.net/"
url "http://download.osgeo.org/postgis/source/postgis-2.4.0.tar.gz"
sha256 "02baa90f04da41e04b6c18eedfda53110c45ae943d4e65050f6d202f7de07d29"
revision 1
head do
url "https://svn.osgeo.org/postgis/trunk/"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "pkg-config" => :build
depends_on "gpp" => :build
depends_on "[email protected]"
depends_on "proj"
depends_on "geos"
depends_on "gdal" => :recommended
depends_on "pcre" if build.with? "gdal"
def install
ENV.deparallelize
args = [
"--with-projdir=#{Formula["proj"].opt_prefix}",
"--with-pgconfig=#{Formula["[email protected]"].opt_bin}/pg_config",
]
system "./autogen.sh" if build.head?
system "./configure", *args
system "make"
mkdir "stage"
system "make", "install", "DESTDIR=#{buildpath}/stage"
bin.install Dir["stage/**/bin/*"]
lib.install Dir["stage/**/lib/*"]
include.install Dir["stage/**/include/*"]
(doc/"[email protected]/extension").install Dir["stage/**/share/doc/[email protected]/extension/*"]
(share/"[email protected]/extension").install Dir["stage/**/share/[email protected]/extension/*"]
pkgshare.install Dir["stage/**/contrib/postgis-*/*"]
(share/"postgis_topology").install Dir["stage/**/contrib/postgis_topology-*/*"]
# Extension scripts
bin.install %w[
utils/create_undef.pl
utils/postgis_proc_upgrade.pl
utils/postgis_restore.pl
utils/profile_intersects.pl
utils/test_estimation.pl
utils/test_geography_estimation.pl
utils/test_geography_joinestimation.pl
utils/test_joinestimation.pl
]
man1.install Dir["doc/**/*.1"]
end
end