diff options
| author | Mike McQuaid | 2012-09-02 01:06:33 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2012-09-04 19:44:43 -0700 |
| commit | 7354edfa7b4e5b9aead7e8562ee61239a0b42a9c (patch) | |
| tree | b018971d0b1e804c2abf313bf47d5c9f8e47ae6c /Library/Formula | |
| parent | 42c7518d640d1e619a12f9e0eb518069429296fe (diff) | |
| download | homebrew-7354edfa7b4e5b9aead7e8562ee61239a0b42a9c.tar.bz2 | |
mapserver: fix test and X11 dependency.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/mapserver.rb | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Library/Formula/mapserver.rb b/Library/Formula/mapserver.rb index f2f77fc2f..e17a48d1e 100644 --- a/Library/Formula/mapserver.rb +++ b/Library/Formula/mapserver.rb @@ -10,7 +10,9 @@ class Mapserver < Formula option "with-php", "Build PHP MapScript module" option "with-postgresql", "Build support for PostgreSQL as a data source" - depends_on :x11 + depends_on :freetype + depends_on :libpng + depends_on 'giflib' depends_on 'gd' depends_on 'proj' depends_on 'gdal' @@ -19,17 +21,24 @@ class Mapserver < Formula depends_on 'postgresql' if build.include? 'with-postgresql' and not MacOS.lion? depends_on 'fcgi' if build.include? 'with-fastcgi' - def configure_args + def patches + # Fix clang compilation issue, remove on future release + # See http://trac.osgeo.org/mapserver/changeset/12809 + # Fix msGetMarkerSize() called on unloaded pixmap symbol + # https://github.com/mapserver/mapserver/issues/4225 + DATA + end + + def install args = [ "--prefix=#{prefix}", "--with-proj", "--with-gdal", "--with-ogr", - "--with-png=#{MacOS::X11.prefix}" ] - args.push "--with-geos" if build.include? 'with-geos' - args.push "--with-php=/usr/include/php" if build.include? 'with-php' + args << "--with-geos" if build.include? 'with-geos' + args << "--with-php=/usr/include/php" if build.include? 'with-php' if build.include? 'with-postgresql' if MacOS.lion? # Lion ships with PostgreSQL libs @@ -39,26 +48,13 @@ class Mapserver < Formula end end - if build.include? 'with-fastcgi' - args << "--with-fastcgi=#{HOMEBREW_PREFIX}" - end - - args - end - - def patches - # Fix clang compilation issue, remove on future release - # See http://trac.osgeo.org/mapserver/changeset/12809 - # Fix msGetMarkerSize() called on unloaded pixmap symbol - # https://github.com/mapserver/mapserver/issues/4225 - DATA - end + args << "--with-fastcgi=#{HOMEBREW_PREFIX}" if build.include? 'with-fastcgi' - def install - system "./configure", *configure_args + system "./configure", *args system "make" + libexec.install "mapscriptvars" bin.install %w(mapserv shp2img legend shptree shptreevis - shptreetst scalebar sortshp mapscriptvars tile4ms + shptreetst scalebar sortshp tile4ms msencrypt mapserver-config) if build.include? 'with-php' @@ -67,7 +63,7 @@ class Mapserver < Formula end def caveats; <<-EOS.undent - The Mapserver CGI executable is #{prefix}/mapserv + The Mapserver CGI executable is #{bin}/mapserv If you built the PHP option: * Add the following line to php.ini: @@ -76,6 +72,10 @@ class Mapserver < Formula * You should see MapScript in the module list EOS end + + def test + system "#{bin}/mapserver-config", "--version" + end end __END__ @@ -97,7 +97,7 @@ index 164a0ac..f9dcb20 100644 +++ b/mapsymbol.c @@ -601,6 +601,10 @@ int msGetMarkerSize(symbolSetObj *symbolset, styleObj *style, int *width, int *h } - + symbol = symbolset->symbol[style->symbol]; + if (symbol->type == MS_SYMBOL_PIXMAP && !symbol->pixmap_buffer) { + if (MS_SUCCESS != msPreloadImageSymbol(MS_MAP_RENDERER(symbolset->map), symbol)) |
