# build twice, when building on the server, j8 fails to honor without wx first time pkgname=grass pkgver=8.4.0 _pkgver=84 pkgrel=2 pkgdesc='Geographic Information System (GIS) used for geospatial data management and analysis, image processing, graphics/maps production, spatial modeling, and visualization.' arch=('x86_64') url='https://grass.osgeo.org/' license=('GPL') depends=('gdal' 'tk' 'sqlite3' 'python3-numpy' 'python3-pillow' 'mesa' 'proj' 'libjpeg-turbo' 'libpng' 'libtiff' 'cfitsio' 'fftw' 'libxmu' 'postgresql' 'xorg-server' 'glu' 'tcl' 'zlib' 'cairo' 'geos' 'zstd' 'bzip2' 'python3-six') makedepends=('mariadb' 'freetype2' 'r') optdepends=('fftw: required for i.fft and i.ifft modules' 'postgresql: PostgreSQL database interface' 'r: R language interface' 'lapack: required for GMATH library') options=('!libtool' '!makeflags') groups=('gis') source=("https://grass.osgeo.org/grass${_pkgver}/source/${pkgname}-${pkgver}.tar.gz" "${pkgname}.sh" "${pkgname}.conf") md5sums=('2dac2ae5e69655b9825c34cce433a793' '23da2e9399b3c5504851dec37821abe1' '6103480c2a1adc19a50b9e925e5e6d4c') build() { cd ${pkgname}-${pkgver} #sed -i '/^\s*INSTDIR/ s/".*"//' configure export CFLAGS="$CPPFLAGS $CFLAGS" export CXXFLAGS="$CPPFLAGS $CXXFLAGS" unset CPPFLAGS # see ${srcdir}/grass-6.4.0/REQUIREMENTS.html for options ./configure --prefix=/opt/grass \ --with-mysql-includes=/usr/include/mysql \ --with-mysql \ --with-sqlite \ --with-postgres \ --with-fftw \ --with-gdal=/usr/bin/gdal-config \ --with-blas \ --with-bzlib \ --with-lapack \ --with-readline \ --with-pthread \ --with-netcdf \ --with-nls \ --with-geos \ --with-cairo \ --with-postgres \ --with-proj-libs=/usr/lib \ --with-proj-includes=/usr/include \ --with-proj-share=/usr/share/proj \ --with-fftw-includes=/usr/include \ --with-fftw-libs=/usr/lib \ --with-freetype \ --with-freetype-includes=/usr/include/freetype2 \ --with-zstd \ --without-wxwidgets \ --without-pdal make } package() { cd ${pkgname}-${pkgver} make \ exec_prefix=$pkgdir/usr \ INST_DIR=${pkgdir}/opt/grass \ BINDIR=${pkgdir}/usr/bin \ install install -D -m644 gui/icons/grass-48x48.png ${pkgdir}/usr/share/icons/hicolor/48x48/apps/grass.png install -D -m644 gui/icons/grass-64x64.png $pkgdir/usr/share/icons/hicolor/64x64/apps/grass.png install -D -m644 ${srcdir}/grass.conf ${pkgdir}/etc/ld.so.conf.d/grass.conf }