Files
Mark MentovaiandRenee Otten 57d7db5c01 gdal: bump dependents’ revisions for update to 3.13.0
libgdal.dylib’s install_name is changing from libgdal.38.dylib to
libgdal.39.dylib in this update.

Procedure:

gsed -i -E -e 's/^( *revision +)([0-9]+)(.*)$/echo "\1$((\2+1))\3"/e' $(grep -c '^ *revision ' $(git grep -l port:gdal | grep -v '^gis/gdal/' | grep -v '^python/py-gdal/') | grep ':1$' | cut -d: -f1)

with manual handling for ports with more than one revision line:

grep -c '^ *revision ' $(git grep -l port:gdal | grep -v '^gis/gdal/' | grep -v '^python/py-gdal/') | grep -v ':1$' | cut -d: -f1

qgis3 and saga were omitted per
https://github.com/macports/macports-ports/pull/32926#issuecomment-4592025368.
liblas was omitted per
https://github.com/macports/macports-ports/pull/32926#issuecomment-4595124162.

[skip ci]
2026-06-02 21:22:03 -04:00

237 lines
9.2 KiB
Tcl
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
name postgis
categories databases gis
license GPL-2+
version 3.6.3
revision 1
maintainers {yahoo.com:n_larsson @nilason} openmaintainer
description PostGIS is the spatial extension to the\
PostGreSQL database.
long_description PostGIS adds geometrical, geographical and topological\
types, and functions operating thereon, to the PostGreSQL\
database. It also handles raster tiles and MVT format.
homepage https://postgis.net/
master_sites https://download.osgeo.org/postgis/source
distname postgis-${version}
checksums rmd160 e51ae92c9e74f664a26ce15189895f98fe9693f5 \
sha256 58ff19ae133e470280efb4949ef92e0364d4c2a66bef8c57e69477348d815ea3 \
size 16283593
patchfiles patch-configure.diff
post-configure {
if {[variant_exists universal] && [variant_isset universal]} {
# We must add universal flags to compile liblwgeom properly
file copy ${filespath}/ed_command ${worksrcpath}/ed_command
reinplace -E "s#XXX#${configure.universal_cflags}#" \
${worksrcpath}/ed_command
system -W ${worksrcpath}/liblwgeom \
"ed Makefile < ${worksrcpath}/ed_command"
}
}
livecheck.type regex
livecheck.url ${master_sites}
livecheck.regex {postgis2?-(\d+(?:\.\d+)*)\.[tz]}
# PostgreSQL subports
set postgresql_suffixes {12 13 14 15 16 17 18}
set subport_names {}
set docports {}
foreach v ${postgresql_suffixes} {
lappend subport_names pg${v}-${name}
lappend docports pg${v}-${name}-doc
}
foreach v ${postgresql_suffixes} {
subport pg${v}-${name} {
depends_build-append \
port:autoconf \
port:automake \
port:libtool \
port:libxslt \
port:pkgconfig
depends_lib-append port:geos \
port:json-c \
port:libiconv \
port:libxml2 \
port:protobuf-c
if {${v} eq 12} {
conflicts postgis2
}
compiler.cxx_standard 2011
compiler.thread_local_storage yes
configure.args-append \
--without-address-standardizer \
--without-raster \
--without-sfcgal \
--without-topology
configure.cflags-append \
-Diconv=libiconv -Diconv_open=libiconv_open -Diconv_close=libiconv_close
# see https://trac.macports.org/wiki/UsingTheRightCompiler
configure.env-append \
CPPBIN=${configure.cpp}
build.args ICONV_LDFLAGS='-L${prefix}/lib -liconv'
variant address_standardizer description {Build with Address Standardizer support} {
depends_lib-append port:pcre2
configure.args-replace --without-address-standardizer --with-address-standardizer
}
variant lto description {Build with Link Time Optimization (LTO)} {
configure.args-append --enable-lto
}
# PROJ variants
set proj_versions {6 7 8 9}
set proj_variants {}
foreach pjver ${proj_versions} {
lappend proj_variants proj${pjver}
}
foreach proj_ver ${proj_versions} {
set index [lsearch -exact ${proj_variants} proj${proj_ver}]
set cflcts [lreplace ${proj_variants} ${index} ${index}]
variant proj${proj_ver} description "Use Proj${proj_ver}" conflicts {*}${cflcts} "
depends_lib-append port:proj${proj_ver}
configure.args-append PROJ_CFLAGS=-I${prefix}/lib/proj${proj_ver}/include \
PROJ_LIBS=\"-L${prefix}/lib/proj${proj_ver}/lib -lproj\"
"
}
set projdf "if {"
foreach pv ${proj_versions} {
set projdf "${projdf}!\[variant_isset proj${pv}\] && "
}
set projdf [string range ${projdf} 0 end-4]
set projdf "${projdf}} { default_variants +proj${pv} }"
eval ${projdf}
variant raster description {Build raster support} {
depends_lib-append port:gdal
configure.args-replace --without-raster --with-raster
configure.args-append --with-gdalconfig=${prefix}/bin/gdal-config
}
variant sfcgal description {Uses SFCGAL for 3D queries} {
depends_lib-append port:sfcgal
configure.args-replace --without-sfcgal --with-sfcgal=${prefix}/bin/sfcgal-config
}
variant topology description {Build topology support} {
configure.args-replace --without-topology --with-topology
}
default_variants +raster +topology
# Set PostgreSQL subport
set p postgresql${v}
depends_lib-append port:${p}
configure.args-append --libdir=${prefix}/lib/${p} \
--bindir=${prefix}/lib/${p}/bin \
--with-pgconfig=${prefix}/lib/${p}/bin/pg_config
build.args-append PGSQL_DOCDIR=${destroot}${prefix}/share/doc/${p} \
PGSQL_MANDIR=${destroot}${prefix}/share/man
livecheck.type none
post-destroot {
delete ${destroot}${prefix}/share/man
}
if {${v} eq 14} {
notes-append "\n\
! This version comes with the following warning if you use postgresql14:\n\
Due to some query performance degradation with the new fast index build\n\
that requires PG14, we have decided to disable the feature by default\n\
until we get more user testing as to the true impact of real-world queries.\n\
If you are running PG14+, you can reenable it by doing:\n\
\n\
ALTER OPERATOR FAMILY gist_geometry_ops_2d USING gist\n\
ADD FUNCTION 11 (geometry)\n\
geometry_gist_sortsupport_2d (internal);\n\
\n\
and then reindex your gist indexes.\n\
To revert back to the old index behavior:\n\
\n\
ALTER OPERATOR FAMILY gist_geometry_ops_2d using gist\n\
DROP FUNCTION 11 (geometry);\n\
\n\
and then reindex your gist indexes."
}
}
subport pg${v}-${name}-doc {
platforms any
supported_archs noarch
description Documentation of PostGIS for PostgreSQL $v
long_description {*}${long_description} This adds documentation.
set index [lsearch -exact ${docports} pg${v}-${name}-doc]
set cflcts [lreplace ${docports} ${index} ${index}]
conflicts {*}${cflcts}
set p postgresql${v}
depends_build-append \
port:autoconf \
port:automake \
port:geos \
port:libtool \
port:libxslt \
port:pkgconfig \
port:${p} \
port:proj9 \
port:protobuf-c
configure.args-append \
--libdir=${prefix}/lib/${p} \
--bindir=${prefix}/lib/${p}/bin \
--with-pgconfig=${prefix}/lib/${p}/bin/pg_config \
--without-address-standardizer \
--without-raster \
--without-sfcgal \
--without-topology \
PROJ_CFLAGS=-I${prefix}/lib/proj9/include \
PROJ_LIBS=\"-L${prefix}/lib/proj9/lib -lproj\"
configure.cflags-append \
-Diconv=libiconv -Diconv_open=libiconv_open -Diconv_close=libiconv_close
# see https://trac.macports.org/wiki/UsingTheRightCompiler
configure.env-append \
CPPBIN=${configure.cpp}
build.args ICONV_LDFLAGS='-L${prefix}/lib -liconv'
build.args-append PGSQL_DOCDIR=${destroot}${prefix}/share/doc/${p} \
PGSQL_MANDIR=${destroot}${prefix}/share/man
build.env-append DESTDIR=${destroot}
build.dir ${worksrcpath}/doc
build.target man-install
post-destroot {
delete ${destroot}${prefix}/share/${p}
}
livecheck.type none
}
}
if {${name} eq ${subport}} {
PortGroup stub 1.0
platforms any
supported_archs noarch
notes "The $name port is just a stub. Please install one of the\
subports: ${subport_names}."
}