diff options
| author | Larry Shaffer | 2015-04-20 14:38:36 -0600 |
|---|---|---|
| committer | Mike McQuaid | 2015-04-21 10:35:30 +0100 |
| commit | e65f484d264cb686472bcb73b47644217aee76fb (patch) | |
| tree | bcdef21d9d7358dfe4256ea8d91ce6983540121b /Library | |
| parent | 0956bba823955d883c8fc3267c17f3a6bb7fed8c (diff) | |
| download | homebrew-e65f484d264cb686472bcb73b47644217aee76fb.tar.bz2 | |
postgis: add html and api doc generation options
Closes #38872.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/postgis.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Library/Formula/postgis.rb b/Library/Formula/postgis.rb index e38f06b79..6451d8273 100644 --- a/Library/Formula/postgis.rb +++ b/Library/Formula/postgis.rb @@ -21,6 +21,8 @@ class Postgis < Formula option "with-gui", "Build shp2pgsql-gui in addition to command line tools" option "without-gdal", "Disable postgis raster support" + option "with-html-docs", "Generate multi-file HTML documentation" + option "with-api-docs", "Generate developer API documentation (long process)" depends_on "pkg-config" => :build depends_on "gpp" => :build @@ -37,6 +39,16 @@ class Postgis < Formula # For advanced 2D/3D functions depends_on "sfcgal" => :recommended + if build.with? "html-docs" + depends_on "imagemagick" + depends_on "docbook-xsl" + end + + if build.with? "api-docs" + depends_on "graphviz" + depends_on "doxygen" + end + def install # Follow the PostgreSQL linked keg back to the active Postgres installation # as it is common for people to avoid upgrading Postgres. @@ -63,10 +75,27 @@ class Postgis < Formula args << "--with-gui" if build.with? "gui" args << "--without-raster" if build.without? "gdal" + args << "--with-xsldir=#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl" if build.with? "html-docs" + system "./autogen.sh" if build.head? system "./configure", *args system "make" + if build.with? "html-docs" + cd "doc" do + ENV["XML_CATALOG_FILES"] ="#{HOMEBREW_PREFIX}/etc/xml/catalog" + system "make", "chunked-html" + doc.install "html" + end + end + + if build.with? "api-docs" + cd "doc" do + system "make", "doxygen" + doc.install "doxygen/html" => "api" + end + end + # PostGIS includes the PGXS makefiles and so will install __everything__ # into the Postgres keg instead of the PostGIS keg. Unfortunately, some # things have to be inside the Postgres keg in order to be function. So, we |
