Ticket #30250: mapserver-macports.diff

File mapserver-macports.diff, 11.8 KB (added by tbonfort (Thomas Bonfort), 13 years ago)

patch for mapserver 6.0 and 5.6

  • mapserver56/Portfile

     
    22
    33PortSystem 1.0
    44
    5 name             mapserver
    6 version          5.2.0
    7 maintainers      googlemail.com:mbarchfe
     5name             mapserver56
     6version          5.6.7
     7maintainers      googlemail.com:mbarchfe \
     8                 gmail.com:thomas.bonfort
    89categories       gis
    910platforms        darwin
    1011
     
    1415
    1516homepage         http://mapserver.gis.umn.edu/
    1617master_sites     http://download.osgeo.org/mapserver
     18distname         mapserver-${version}
    1719
    18 checksums        md5 6c0f210eb6510f0a43b6d5b09df8bb83
     20conflicts        mapserver mapserver60
     21checksums        md5 5494e6c3de87f4e2b77b20ce79933883
    1922
    2023depends_lib      port:gd2 \
    21                  port:geos
     24                 port:libpng \
     25                 port:freetype \
    2226
    2327patchfiles       patch-Makefile.in.diff
    2428
    25 configure.args   --with-gd=${prefix}
    26 variant gdalogr description {Add raster formats from gdal (Geospatial Data Abstraction Library) and vector formats from OGR Simple Features Library} {
    27     depends_lib-append      port:gdal
    28     configure.args-append   --with-gdal=${prefix}/bin/gdal-config \
    29                             --with-ogr=${prefix}/bin/gdal-config
     29configure.args   --with-gd=${prefix} \
     30                 --with-png=${prefix} \
     31                 --with-experimental-png \
     32                 --with-zlib=${prefix} \
     33                 --with-jpeg=${prefix} \
     34                 --with-gif=${prefix}
     35
     36use_parallel_build  no
     37
     38default_variants +wms +gdal +ogr +proj +wfs +proj \
     39                 +geos +postgis +wmsclient +wfsclient \
     40                 +wcs +sos +fastcgi
     41
     42if {[variant_isset postgis]} {
     43       #check for most recent version of postgresql installed
     44       set HAVE_PGCONFIG [llength [glob -nocomplain -d ${prefix}/lib postgresql*/bin/pg_config]]
     45       #if not found, intall the postgresql port
     46       if {$HAVE_PGCONFIG == 0} {
     47         depends_lib-append port:postgresql90
     48       }
    3049}
    3150
    32 variant proj description {Add projection and Web Map Service support} {
    33     depends_lib-append      port:proj
    34     configure.args-append   --with-proj=${prefix}
     51variant postgis description {Add support for postgis sources} {
     52       set PGSQL_DIR [lindex [lsort -dec [glob -d ${prefix}/lib postgresql*]] 0]
     53       configure.args-append "--with-postgis=${PGSQL_DIR}/bin/pg_config"
    3554}
    3655
     56variant wms description {Add WMS server support} {
     57   default_variants-append    +proj
     58}
     59
     60variant wfs description {Add WFS server support} {
     61   depends_lib-append port:libxml2
     62   default_variants-append +proj +ogr +geos
     63   configure.args-append   --with-wfs
     64}
     65
     66variant sos description {Add SOS server support} {
     67   depends_lib-append port:libxml2
     68   default_variants-append +proj +ogr
     69   configure.args-append   --with-sos
     70}
     71
     72variant wcs description {Add WCS server support} {
     73   default_variants-append +proj +gdal
     74   configure.args-append   --with-wcs
     75}
     76
     77variant wmsclient description {Add WMS client support} {
     78   depends_lib-append port:curl
     79   default_variants-append +proj +gdal
     80   configure.args-append   --with-wmsclient
     81}
     82
     83variant wfsclient description {Add WFS client support} {
     84   depends_lib-append port:libxml2 port:curl
     85   default_variants-append    +proj +ogr +geos
     86   configure.args-append   --with-wfsclient
     87}
     88
     89variant gdal description {Add GDAL input format support} {
     90   depends_lib-append   port:gdal
     91   configure.args-append    --with-gdal
     92}
     93
     94variant ogr description {Add OGR input format support} {
     95   depends_lib-append   port:gdal
     96   configure.args-append    --with-ogr
     97}
     98
     99
     100variant proj description {Proj.4 reprojection support} {
     101   depends_lib-append   port:proj
     102   configure.args-append    --with-proj=${prefix}
     103}
     104
     105variant fastcgi description {FastCGI support} {
     106   depends_lib-append   port:fcgi
     107   configure.args-append    --with-fastcgi=${prefix}
     108}
     109
     110variant geos description {Add GEOS operations support} {
     111   depends_lib-append   port:geos
     112   configure.args-append    --with-geos
     113}
     114
    37115variant apache conflicts apache2 apache_apple description {Use MacPorts Apache 1} {
    38116        depends_run-append port:apache
    39117        global cgi_path
     
    52130}
    53131
    54132if {![variant_isset apache] && ![variant_isset apache2] && ![variant_isset apache_apple]} {
    55         default_variants +apache2
     133   #default to the apple apache version if none specified
     134   default_variants +apache_apple
    56135}
    57136
    58137destroot.target install-force
    59138destroot.violate_mtree yes
    60139post-destroot {
    61140    file mkdir ${destroot}${cgi_path}
    62     xinstall -m 755 ${worksrcpath}/mapserv ${destroot}${cgi_path}
     141    xinstall -m 755 ${worksrcpath}/mapserv ${destroot}${cgi_path}/mapserv
    63142}
  • mapserver/Portfile

     
    1313                 building spatially-enabled internet applications.
    1414
    1515homepage         http://mapserver.gis.umn.edu/
    16 master_sites     http://download.osgeo.org/mapserver
    1716
    18 checksums        md5 6c0f210eb6510f0a43b6d5b09df8bb83
     17replaced_by      mapserver56
     18revision         1
     19distfiles
    1920
    20 depends_lib      port:gd2 \
    21                  port:geos
     21livecheck.type  none
     22conflicts mapserver56 mapserver60
    2223
    23 patchfiles       patch-Makefile.in.diff
    24 
    25 configure.args   --with-gd=${prefix}
    26 variant gdalogr description {Add raster formats from gdal (Geospatial Data Abstraction Library) and vector formats from OGR Simple Features Library} {
    27     depends_lib-append      port:gdal
    28     configure.args-append   --with-gdal=${prefix}/bin/gdal-config \
    29                             --with-ogr=${prefix}/bin/gdal-config
     24pre-configure {
     25   ui_error "Please do not install this port since it has been replaced by 'mapserver56' or 'mapserver60'."
     26   return -code error
    3027}
    31 
    32 variant proj description {Add projection and Web Map Service support} {
    33     depends_lib-append      port:proj
    34     configure.args-append   --with-proj=${prefix}
    35 }
    36 
    37 variant apache conflicts apache2 apache_apple description {Use MacPorts Apache 1} {
    38         depends_run-append port:apache
    39         global cgi_path
    40         set cgi_path "${prefix}/www/cgi-bin/"
    41 }
    42 
    43 variant apache2 conflicts apache apache_apple description {Use MacPorts Apache 2} {
    44         depends_run-append port:apache2
    45         global cgi_path
    46         set cgi_path "${prefix}/apache2/cgi-bin/"
    47 }
    48 
    49 variant apache_apple conflicts apache apache2 description {Use Apple Apache} {
    50         global cgi_path
    51         set cgi_path "/Library/WebServer/CGI-Executables/"
    52 }
    53 
    54 if {![variant_isset apache] && ![variant_isset apache2] && ![variant_isset apache_apple]} {
    55         default_variants +apache2
    56 }
    57 
    58 destroot.target install-force
    59 destroot.violate_mtree yes
    60 post-destroot {
    61     file mkdir ${destroot}${cgi_path}
    62     xinstall -m 755 ${worksrcpath}/mapserv ${destroot}${cgi_path}
    63 }
  • mapserver60/Portfile

     
    22
    33PortSystem 1.0
    44
    5 name             mapserver
    6 version          5.2.0
    7 maintainers      googlemail.com:mbarchfe
     5name             mapserver60
     6version          6.0.1
     7maintainers      googlemail.com:mbarchfe \
     8                 gmail.com:thomas.bonfort
    89categories       gis
    910platforms        darwin
    1011
     
    1415
    1516homepage         http://mapserver.gis.umn.edu/
    1617master_sites     http://download.osgeo.org/mapserver
     18distname         mapserver-${version}
    1719
    18 checksums        md5 6c0f210eb6510f0a43b6d5b09df8bb83
     20conflicts        mapserver mapserver56
     21checksums        md5 b96287449dcbca9a2fcea3a64905915a
    1922
    2023depends_lib      port:gd2 \
    21                  port:geos
     24                 port:jpeg \
     25                 port:libpng \
     26                 port:freetype \
     27                 port:giflib \
    2228
    2329patchfiles       patch-Makefile.in.diff
    2430
    25 configure.args   --with-gd=${prefix}
    26 variant gdalogr description {Add raster formats from gdal (Geospatial Data Abstraction Library) and vector formats from OGR Simple Features Library} {
    27     depends_lib-append      port:gdal
    28     configure.args-append   --with-gdal=${prefix}/bin/gdal-config \
    29                             --with-ogr=${prefix}/bin/gdal-config
     31configure.args   --with-gd=${prefix} \
     32                 --with-png=${prefix} \
     33                 --with-zlib=${prefix} \
     34                 --with-jpeg=${prefix} \
     35                 --with-gif=${prefix} \
     36
     37default_variants +wms +gdal +ogr +proj +cairo +wfs +proj \
     38                 +geos +postgis +wmsclient +wfsclient \
     39                 +wcs +sos +kml +fastcgi
     40
     41if {[variant_isset postgis]} {
     42       #check for most recent version of postgresql installed
     43       set HAVE_PGCONFIG [llength [glob -nocomplain -d ${prefix}/lib postgresql*/bin/pg_config]]
     44       #if not found, intall the postgresql port
     45       if {$HAVE_PGCONFIG == 0} {
     46         depends_lib-append port:postgresql90
     47       }
    3048}
    3149
    32 variant proj description {Add projection and Web Map Service support} {
    33     depends_lib-append      port:proj
    34     configure.args-append   --with-proj=${prefix}
     50variant postgis description {Add support for postgis sources} {
     51       set PGSQL_DIR [lindex [lsort -dec [glob -d ${prefix}/lib postgresql*]] 0]
     52       configure.args-append "--with-postgis=${PGSQL_DIR}/bin/pg_config"
    3553}
    3654
     55variant wms description {Add WMS server support} {
     56   default_variants-append    +proj
     57}
     58
     59variant wfs description {Add WFS server support} {
     60   depends_lib-append port:libxml2
     61   default_variants-append +proj +ogr +geos
     62   configure.args-append   --with-wfs
     63}
     64
     65variant sos description {Add SOS server support} {
     66   depends_lib-append port:libxml2
     67   default_variants-append +proj +ogr
     68   configure.args-append   --with-sos
     69}
     70
     71variant wcs description {Add WCS server support} {
     72   default_variants-append +proj +gdal
     73   configure.args-append   --with-wcs
     74}
     75
     76variant wmsclient description {Add WMS client support} {
     77   depends_lib-append port:curl
     78   default_variants-append +proj +gdal
     79   configure.args-append   --with-wmsclient
     80}
     81
     82variant kml description {Add KML output support} {
     83   configure.args-append   --with-kml
     84}
     85
     86variant wfsclient description {Add WFS client support} {
     87   depends_lib-append port:libxml2 port:curl
     88   default_variants-append    +proj +ogr +geos
     89   configure.args-append   --with-wfsclient
     90}
     91
     92variant cairo description {Add SVG and PDF support through cairo} {
     93    depends_lib-append      path:lib/pkgconfig/cairo.pc:cairo
     94    configure.args-append   --with-cairo
     95}
     96
     97variant gdal description {Add GDAL input format support} {
     98   depends_lib-append   port:gdal
     99   configure.args-append    --with-gdal
     100}
     101
     102variant ogr description {Add OGR input format support} {
     103   depends_lib-append   port:gdal
     104   configure.args-append    --with-ogr
     105}
     106
     107
     108variant proj description {Proj.4 reprojection support} {
     109   depends_lib-append   port:proj
     110   configure.args-append    --with-proj=${prefix}
     111}
     112
     113variant fastcgi description {FastCGI support} {
     114   depends_lib-append   port:fcgi
     115   configure.args-append    --with-fastcgi=${prefix}
     116}
     117
     118variant geos description {Add GEOS operations support} {
     119   depends_lib-append   port:geos
     120   configure.args-append    --with-geos
     121}
     122
    37123variant apache conflicts apache2 apache_apple description {Use MacPorts Apache 1} {
    38124        depends_run-append port:apache
    39125        global cgi_path
     
    52138}
    53139
    54140if {![variant_isset apache] && ![variant_isset apache2] && ![variant_isset apache_apple]} {
    55         default_variants +apache2
     141   #default to the apple apache version if none specified
     142   default_variants +apache_apple
    56143}
    57144
    58145destroot.target install-force
    59146destroot.violate_mtree yes
    60147post-destroot {
    61148    file mkdir ${destroot}${cgi_path}
    62     xinstall -m 755 ${worksrcpath}/mapserv ${destroot}${cgi_path}
     149    xinstall -m 755 ${worksrcpath}/mapserv ${destroot}${cgi_path}/mapserv
    63150}