2011-06-27 15:24:13 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Mapserver < Formula
|
|
|
|
homepage 'http://mapserver.org/'
|
2012-03-21 16:38:00 +00:00
|
|
|
url 'http://download.osgeo.org/mapserver/mapserver-6.0.2.tar.gz'
|
2012-03-21 16:09:57 +00:00
|
|
|
md5 'd831c905b1b0df7ac09a80c3f9387374'
|
2011-06-27 15:24:13 +00:00
|
|
|
|
|
|
|
depends_on 'gd'
|
|
|
|
depends_on 'proj'
|
|
|
|
depends_on 'gdal'
|
|
|
|
|
2011-09-16 05:30:50 +00:00
|
|
|
depends_on 'geos' if ARGV.include? '--with-geos'
|
|
|
|
depends_on 'postgresql' if ARGV.include? '--with-postgresql' and not MacOS.lion?
|
|
|
|
|
|
|
|
def options
|
|
|
|
[
|
|
|
|
["--with-geos", "Build support for GEOS spatial operations"],
|
|
|
|
["--with-php", "Build PHP MapScript module"],
|
|
|
|
["--with-postgresql", "Build support for PostgreSQL as a data source"]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def configure_args
|
|
|
|
args = [
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-proj",
|
|
|
|
"--with-gdal",
|
|
|
|
"--with-ogr",
|
|
|
|
"--with-png=/usr/X11"
|
|
|
|
]
|
|
|
|
|
|
|
|
args.push "--with-geos" if ARGV.include? '--with-geos'
|
|
|
|
args.push "--with-php=/usr/include/php" if ARGV.include? '--with-php'
|
|
|
|
|
|
|
|
if ARGV.include? '--with-postgresql'
|
|
|
|
if MacOS.lion? # Lion ships with PostgreSQL libs
|
|
|
|
args.push "--with-postgis"
|
|
|
|
else
|
|
|
|
args.push "--with-postgis=#{HOMEBREW_PREFIX}/bin/pg_config"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
args
|
|
|
|
end
|
|
|
|
|
2012-03-21 16:09:57 +00:00
|
|
|
def patches
|
|
|
|
# Fix clang compilation issue, remove on future release
|
|
|
|
# See http://trac.osgeo.org/mapserver/changeset/12809
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2011-06-27 15:24:13 +00:00
|
|
|
def install
|
2011-10-26 08:06:09 +00:00
|
|
|
ENV.x11
|
2011-09-16 05:30:50 +00:00
|
|
|
system "./configure", *configure_args
|
2011-06-27 15:24:13 +00:00
|
|
|
system "make"
|
2012-01-23 15:19:48 +00:00
|
|
|
bin.install %w(mapserv shp2img legend shptree shptreevis
|
|
|
|
shptreetst scalebar sortshp mapscriptvars tile4ms
|
|
|
|
msencrypt mapserver-config)
|
2011-09-16 05:30:50 +00:00
|
|
|
|
|
|
|
if ARGV.include? '--with-php'
|
|
|
|
prefix.install %w(mapscript/php/php_mapscript.so)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
The Mapserver CGI executable is #{prefix}/mapserv
|
|
|
|
|
|
|
|
If you built the PHP option:
|
|
|
|
* Add the following line to php.ini:
|
|
|
|
extension="#{prefix}/php_mapscript.so"
|
|
|
|
* Execute "php -m"
|
|
|
|
* You should see MapScript in the module list
|
|
|
|
EOS
|
2011-06-27 15:24:13 +00:00
|
|
|
end
|
|
|
|
end
|
2012-03-21 16:09:57 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/renderers/agg/include/agg_renderer_outline_aa.h b/renderers/agg/include/agg_renderer_outline_aa.h
|
|
|
|
index 5ff3f20..7a14588 100644
|
|
|
|
--- a/renderers/agg/include/agg_renderer_outline_aa.h
|
|
|
|
+++ b/renderers/agg/include/agg_renderer_outline_aa.h
|
|
|
|
@@ -1365,7 +1365,6 @@ namespace mapserver
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void profile(const line_profile_aa& prof) { m_profile = &prof; }
|
|
|
|
const line_profile_aa& profile() const { return *m_profile; }
|
|
|
|
- line_profile_aa& profile() { return *m_profile; }
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
int subpixel_width() const { return m_profile->subpixel_width(); }
|