From 4820eb07a786940e636b3e1271b1e234dcb8ce0e Mon Sep 17 00:00:00 2001 From: Nicklas Larsson Date: Fri, 7 Feb 2025 11:30:24 +0100 Subject: [PATCH] gdal-grass: update to 1.0.3, build with CMake --- gis/gdal-grass/Portfile | 81 ++++++++--------------------------------- 1 file changed, 16 insertions(+), 65 deletions(-) diff --git a/gis/gdal-grass/Portfile b/gis/gdal-grass/Portfile index 4577916ebb478..aae62f920282d 100644 --- a/gis/gdal-grass/Portfile +++ b/gis/gdal-grass/Portfile @@ -1,84 +1,35 @@ # -*- 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 +PortGroup cmake 1.1 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 +version 1.0.3 +revision 0 epoch 1 +categories gis +license MIT maintainers {yahoo.com:n_larsson @nilason} {vince @Veence} openmaintainer -description GRASS Drivers for GDAL and OGR. + +description GRASS Drivers for GDAL and OGR long_description This plugin allows GDAL to read GRASS raster and vector files. -license MIT +homepage https://github.com/OSGeo/gdal-grass +master_sites https://download.osgeo.org/gdal-grass/ 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} }" +checksums rmd160 3b5251029254b72215614df2e0690f0e9fa87ffc \ + sha256 eb000f9b953f3f2dc399e833969a2bc7f8f4637791add43240b69f77f382a71f \ + size 344478 -eval ${pgdefault} +compiler.cxx_standard 2011 -build.target default +livecheck.type regex +livecheck.url [lindex ${master_sites} 0] +livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)[quotemeta ${extract.suffix}]