PKGNAME=qgis
PKGSEC=science
PKGDEP="proj geos gdal libzip exiv2 pdal qtkeychain qca gsl sip jinja2 psycopg2 \
		pyqt5 pyqt-builder qwt qscintilla postgresql-runtime owslib"
PKGDES="Geographic Information System (GIS) software"

ABTYPE=cmakeninja
# System libspatialindex is too new:
# https://github.com/libspatialindex/libspatialindex/issues/276
CMAKE_AFTER=(
	"-DPostgreSQL_INCLUDE_DIR=/usr/lib/postgresql-18/include/"
	"-DQGIS_MANUAL_SUBDIR=share/man"
    "-DWITH_INTERNAL_SPATIALINDEX=TRUE"
)

# FIXME: elocation truncated to fit: R_MIPS_TLS_LDM against 
# additional relocation overflows omitted from the output
# collect2: error: ld returned 1 exit status
NOLTO__LOONGSON3=1
