Merge pull request #326291 from imincik/grass-sync-with-upstream

grass: sync packaging with upstream
This commit is contained in:
Ivan Mincik 2024-07-31 08:11:36 +00:00 committed by GitHub
commit 40cfb49204
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,17 +5,22 @@
, makeWrapper
, wrapGAppsHook3
, withOpenGL ? true
, bison
, blas
, cairo
, ffmpeg
, fftw
, flex
, freetype
, gdal
, geos
, lapack
, libGLU
, libiconv
, libmysqlclient
, libpng
, libsvm
, libtiff
, libxml2
, netcdf
@ -33,6 +38,7 @@
let
pyPackages = python311Packages;
in
stdenv.mkDerivation (finalAttrs: {
pname = "grass";
@ -53,7 +59,6 @@ stdenv.mkDerivation (finalAttrs: {
flex
gdal # for `gdal-config`
geos # for `geos-config`
libmysqlclient # for `mysql_config`
netcdf # for `nc-config`
pkg-config
] ++ (with pyPackages; [ python-dateutil numpy wxpython ]);
@ -63,10 +68,12 @@ stdenv.mkDerivation (finalAttrs: {
cairo
ffmpeg
fftw
freetype
gdal
geos
libmysqlclient
lapack
libpng
libsvm
libtiff
(libxml2.override { enableHttp = true; })
netcdf
@ -78,7 +85,8 @@ stdenv.mkDerivation (finalAttrs: {
wxGTK32
zlib
zstd
] ++ lib.optionals stdenv.isDarwin [ libiconv ];
] ++ lib.optionals withOpenGL [ libGLU ]
++ lib.optionals stdenv.isDarwin [ libiconv ];
strictDeps = true;
@ -87,26 +95,30 @@ stdenv.mkDerivation (finalAttrs: {
./clang-integer-conversion.patch
];
# Correct mysql_config query
postPatch = ''
substituteInPlace configure --replace "--libmysqld-libs" "--libs"
'';
configureFlags = [
"--with-blas"
"--with-cairo-ldflags=-lfontconfig"
"--with-cxx"
"--with-fftw"
"--with-freetype"
"--with-geos"
# It complains about missing libmysqld but doesn't really seem to need it
"--with-mysql"
"--with-mysql-includes=${lib.getDev libmysqlclient}/include/mysql"
"--with-mysql-libs=${libmysqlclient}/lib/mysql"
"--with-netcdf"
"--with-gdal"
"--with-lapack"
"--with-libsvm"
"--with-nls"
"--with-openmp"
"--with-pdal"
"--with-postgres"
"--with-postgres-libs=${postgresql.lib}/lib/"
"--with-proj-includes=${proj.dev}/include"
"--with-proj-libs=${proj}/lib"
"--with-proj-share=${proj}/share/proj"
"--with-pthread"
"--with-readline"
"--with-sqlite"
"--with-zstd"
"--without-bzlib"
"--without-mysql"
"--without-odbc"
] ++ lib.optionals (! withOpenGL) [
"--without-opengl"
] ++ lib.optionals stdenv.isDarwin [
"--without-cairo"