# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2 PortSystem 1.0 PortGroup github 1.0 name gdal-grass categories gis # Due to upstream reset of version numbering after split from GDAL source repo, # do not (re-)publish 1.4.3_0, 2.1.0_0, 2.1.0_1, 2.2.0_0, 2.2.0_1, or 2.2.0_2 github.setup OSGeo gdal-grass 1.0.2 github.tarball_from archive revision 11 epoch 1 maintainers {vince @Veence} {yahoo.com:n_larsson @nilason} description GRASS Drivers for GDAL and OGR. long_description This plugin allows GDAL to read GRASS raster and vector files. license MIT depends_lib port:gdal \ port:grass checksums rmd160 316d2faf2c66aecbec9d340ef37e799600f7a89c \ sha256 91c45b3c316ed923f4fccb7e7e88fba131c883a6c92f950ec0c1a8b04a7bd851 \ size 58045 compiler.cxx_standard 2011 configure.cxxflags-append -std=c++11 pre-configure { set grass_gisbase [exec ${prefix}/bin/grass --config path] configure.args-append --with-grass=${grass_gisbase} # retrieve include path to from GRASS set fp [open ${grass_gisbase}/include/Make/Platform.make r] foreach line [split [read $fp] "\n"] { if {[string match PROJINC* ${line}]} { configure.cppflags-append [string trim [lindex [split ${line} "="] 1]] } } close $fp reinplace "s|CXXFLAGS = @CXX_WFLAGS@|CXXFLAGS = @CXXFLAGS@ @CXX_WFLAGS@|" \ ${worksrcpath}/Makefile.in } configure.args-append --with-gdal=${prefix}/bin/gdal-config # PostGreSQL variants (from the GDAL port) set postgresql_suffixes {12 13 14 15 16} set postgresql_variants {} foreach suffix ${postgresql_suffixes} { lappend postgresql_variants postgresql${suffix} } foreach suffix ${postgresql_suffixes} { set vrt postgresql${suffix} set pgversion [string index ${suffix} 0].[string index ${suffix} 1] set index [lsearch -exact ${postgresql_variants} ${vrt}] set conf [lreplace ${postgresql_variants} ${index} ${index}] variant ${vrt} description "Use PostgreSQL ${pgversion}" conflicts {*}${conf} " depends_lib-append port:${vrt} configure.args-append --with-postgres-includes=${prefix}/include/${vrt} " } # PostGreSQL default set pgdefault "if {" foreach suffix ${postgresql_suffixes} { set pgdefault "${pgdefault}!\[variant_isset postgresql${suffix}\] && " } set pgdefault [string range ${pgdefault} 0 end-4] set pgdefault "${pgdefault}} { default_variants +postgresql${suffix} }" eval ${pgdefault} build.target default