Saga-gis, check loop

When trying to install SAGA-gis, the log shows that it goes into a loop :

Blockquote
[…]
Checking wxcommon-light dependencies…
Checking wxbase-light dependencies…
Checking wxcommon-light dependencies…
Checking wxbase-light dependencies…
Checking wxcommon-light dependencies…
[…]

Saga-gis is necessary to work with Qgis proficiently ; many options it provides are simply not built-in.
I’m pretty much dead in the water. I only began to work with GIS software, and the tutorials I need to follow depend on this package.

Install wxgtk3-dev first to replace the current wxgtk3, and then when you build saga-gis, edit the PKGBUILD, and modify the dependency

depends=('wxgtk3>=3.1.0' 'proj' 'gdal' 'libtiff' 'unixodbc' 'jasper' 'swig' 'opencv' 'pdal')

to

depends=('wxgtk3-dev' 'proj' 'gdal' 'libtiff' 'unixodbc' 'jasper' 'swig' 'opencv' 'pdal')

So far, QGIS only officially supports up to SAGA 7 as SAGA provider, but you can enable SAGA 8 provider by editing the file

/usr/share/qgis/python/plugins/sagaprovider/SagaAlgorithmProvider.py

and find this line

BETA_SUPPORT_VERSION = '7.'

and change it to

BETA_SUPPORT_VERSION = '8.'

Also, consider to install python-wxpython-dev as the current python-wxpython doesn’t work with wxgtk3-dev.
If you’re bold enough, also consider to update your grass to grass 8 by editing the PKGBUILD according to the AUR page. I hope the current grass maintainer could update it, as grass 7 doesn’t work with python 3.10.