grass: drop clang integer patch (#342796)

This commit is contained in:
Nikolay Korotkiy 2024-09-19 18:00:32 +04:00 committed by GitHub
commit f6676eac25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 28 deletions

View File

@ -1,21 +0,0 @@
diff -ur a/db/drivers/mysql/db.c b/db/drivers/mysql/db.c
--- a/db/drivers/mysql/db.c 1969-12-31 19:00:01.000000000 -0500
+++ b/db/drivers/mysql/db.c 2023-11-09 23:26:25.329700495 -0500
@@ -52,9 +52,16 @@
db_get_login2("mysql", name, &user, &password, &host, &port);
+ const char* errstr;
+ unsigned int port_number = (unsigned int)strtonum(port, 0, 65536, &errstr);
+ if (errstr != NULL) {
+ db_d_append_error("%s", errstr);
+ return DB_FAILED;
+ }
+
connection = mysql_init(NULL);
res = mysql_real_connect(connection, host, user, password,
- connpar.dbname, port, NULL, 0);
+ connpar.dbname, port_number, NULL, 0);
if (res == NULL) {
db_d_append_error("%s\n%s", _("Connection failed."),

View File

@ -5,7 +5,7 @@
, makeWrapper
, wrapGAppsHook3
, withOpenGL ? true
, withOpenGL ? !stdenv.isDarwin
, bison
, blas
@ -23,6 +23,7 @@
, libsvm
, libtiff
, libxml2
, llvmPackages
, netcdf
, pdal
, pkg-config
@ -86,15 +87,11 @@ stdenv.mkDerivation (finalAttrs: {
zlib
zstd
] ++ lib.optionals withOpenGL [ libGLU ]
++ lib.optionals stdenv.isDarwin [ libiconv ];
++ lib.optionals stdenv.isDarwin [ libiconv ]
++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ];
strictDeps = true;
patches = lib.optionals stdenv.isDarwin [
# Fix conversion of const char* to unsigned int.
./clang-integer-conversion.patch
];
configureFlags = [
"--with-blas"
"--with-cairo-ldflags=-lfontconfig"