Merge pull request #266681 from reckenrode/clang16-fixes-batch6

encfs,grass,mayavi,aggdraw,vorbis-tools: fix builds on staging-next

authored by Weijia Wang and committed by GitHub 96ec4cfb dd2c8c60

+79 -49
+12 -6
pkgs/applications/audio/vorbis-tools/default.nix
··· 1 - { lib, stdenv, fetchurl, libogg, libvorbis, libao, pkg-config, curl 2 , speex, flac 3 , autoreconfHook }: 4 ··· 11 sha256 = "1c7h4ivgfdyygz2hyh6nfibxlkz8kdk868a576qkkjgj5gn78xyv"; 12 }; 13 14 - nativeBuildInputs = [ autoreconfHook pkg-config ]; 15 - buildInputs = [ libogg libvorbis libao curl speex flac ]; 16 17 - env = lib.optionalAttrs stdenv.cc.isClang { 18 - NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; 19 - }; 20 21 meta = with lib; { 22 description = "Extra tools for Ogg-Vorbis audio codec";
··· 1 + { lib, stdenv, fetchurl, fetchpatch, libogg, libvorbis, libao, pkg-config, curl, libiconv 2 , speex, flac 3 , autoreconfHook }: 4 ··· 11 sha256 = "1c7h4ivgfdyygz2hyh6nfibxlkz8kdk868a576qkkjgj5gn78xyv"; 12 }; 13 14 + patches = lib.optionals stdenv.cc.isClang [ 15 + # Fixes a call to undeclared function `utf8_decode`. 16 + # https://github.com/xiph/vorbis-tools/pull/33 17 + (fetchpatch { 18 + url = "https://github.com/xiph/vorbis-tools/commit/8a645f78b45ae7e370c0dc2a52d0f2612aa6110b.patch"; 19 + hash = "sha256-RkT9Xa0pRu/oO9E9qhDa17L0luWgYHI2yINIkPZanmI="; 20 + }) 21 + ]; 22 23 + nativeBuildInputs = [ autoreconfHook pkg-config ]; 24 + buildInputs = [ libogg libvorbis libao curl speex flac ] 25 + ++ lib.optionals stdenv.isDarwin [ libiconv ]; 26 27 meta = with lib; { 28 description = "Extra tools for Ogg-Vorbis audio codec";
+21
pkgs/applications/gis/grass/clang-integer-conversion.patch
···
··· 1 + diff -ur a/db/drivers/mysql/db.c b/db/drivers/mysql/db.c 2 + --- a/db/drivers/mysql/db.c 1969-12-31 19:00:01.000000000 -0500 3 + +++ b/db/drivers/mysql/db.c 2023-11-09 23:26:25.329700495 -0500 4 + @@ -52,9 +52,16 @@ 5 + 6 + db_get_login2("mysql", name, &user, &password, &host, &port); 7 + 8 + + const char* errstr; 9 + + unsigned int port_number = (unsigned int)strtonum(port, 0, 65536, &errstr); 10 + + if (errstr != NULL) { 11 + + db_d_append_error("%s", errstr); 12 + + return DB_FAILED; 13 + + } 14 + + 15 + connection = mysql_init(NULL); 16 + res = mysql_real_connect(connection, host, user, password, 17 + - connpar.dbname, port, NULL, 0); 18 + + connpar.dbname, port_number, NULL, 0); 19 + 20 + if (res == NULL) { 21 + db_d_append_error("%s\n%s", _("Connection failed."),
+5 -4
pkgs/applications/gis/grass/default.nix
··· 81 82 strictDeps = true; 83 84 - # On Darwin the installer tries to symlink the help files into a system 85 - # directory 86 - patches = [ ./no_symbolic_links.patch ]; 87 88 # Correct mysql_config query 89 - patchPhase = '' 90 substituteInPlace configure --replace "--libmysqld-libs" "--libs" 91 ''; 92
··· 81 82 strictDeps = true; 83 84 + patches = lib.optionals stdenv.isDarwin [ 85 + # Fix conversion of const char* to unsigned int. 86 + ./clang-integer-conversion.patch 87 + ]; 88 89 # Correct mysql_config query 90 + postPatch = '' 91 substituteInPlace configure --replace "--libmysqld-libs" "--libs" 92 ''; 93
-37
pkgs/applications/gis/grass/no_symbolic_links.patch
··· 1 - diff --git a/include/Make/Install.make b/include/Make/Install.make 2 - index 0aba138..8ba74bc 100644 3 - --- a/include/Make/Install.make 4 - +++ b/include/Make/Install.make 5 - @@ -116,11 +116,6 @@ real-install: | $(INST_DIR) $(UNIX_BIN) 6 - -$(INSTALL) config.status $(INST_DIR)/config.status 7 - -$(CHMOD) -R a+rX $(INST_DIR) 2>/dev/null 8 - 9 - -ifneq ($(findstring darwin,$(ARCH)),) 10 - - @# enable OSX Help Viewer 11 - - @/bin/ln -sfh "$(INST_DIR)/docs/html" /Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR) 12 - -endif 13 - - 14 - $(INST_DIR) $(UNIX_BIN): 15 - $(MAKE_DIR_CMD) $@ 16 - 17 - diff --git a/macosx/app/build_html_user_index.sh b/macosx/app/build_html_user_index.sh 18 - index 04e63eb..c9d9c2c 100755 19 - --- a/macosx/app/build_html_user_index.sh 20 - +++ b/macosx/app/build_html_user_index.sh 21 - @@ -140,7 +140,6 @@ else 22 - # echo "<tr><td valign=\"top\"><a href=\"$HTMLDIRG/$i\">$BASENAME</a></td> <td>$SHORTDESC</td></tr>" >> $FULLINDEX 23 - # make them local to user to simplify page links 24 - echo "<tr><td valign=\"top\"><a href=\"global_$i\">$BASENAME</a></td> <td>$SHORTDESC</td></tr>" >> $FULLINDEX 25 - - ln -sf "$HTMLDIRG/$i" global_$i 26 - done 27 - done 28 - fi 29 - @@ -183,8 +182,3 @@ echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"> 30 - </html>" > $i.html 31 - done 32 - 33 - -# add Help Viewer links in user docs folder 34 - - 35 - -mkdir -p $HOME/Library/Documentation/Help/ 36 - -ln -sfh ../../GRASS/$GRASS_MMVER/Modules/docs/html $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER-addon 37 - -ln -sfh $GISBASE/docs/html $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER
···
+9
pkgs/development/python-modules/aggdraw/default.nix
··· 1 { lib 2 , fetchFromGitHub 3 , buildPythonPackage 4 , packaging 5 , setuptools ··· 22 rev = "v${version}"; 23 hash = "sha256-2yajhuRyQ7BqghbSgPClW3inpw4TW2DhgQbomcRFx94="; 24 }; 25 26 nativeBuildInputs = [ 27 packaging
··· 1 { lib 2 , fetchFromGitHub 3 + , fetchpatch 4 , buildPythonPackage 5 , packaging 6 , setuptools ··· 23 rev = "v${version}"; 24 hash = "sha256-2yajhuRyQ7BqghbSgPClW3inpw4TW2DhgQbomcRFx94="; 25 }; 26 + 27 + patches = [ 28 + # Removes `register` storage class specifier, which is not allowed in C++17. 29 + (fetchpatch { 30 + url = "https://github.com/pytroll/aggdraw/commit/157ed49803567e8c3eeb7dfeff4c116db35747f7.patch"; 31 + hash = "sha256-QSzpO90u5oSBWUzehRFbXgZ1ApEfLlfp11MUx6w11aI="; 32 + }) 33 + ]; 34 35 nativeBuildInputs = [ 36 packaging
+19
pkgs/development/python-modules/mayavi/default.nix
··· 3 , buildPythonPackage 4 , envisage 5 , fetchPypi 6 , numpy 7 , packaging 8 , pyface ··· 25 inherit pname version; 26 hash = "sha256-n0J+8spska542S02ibpr7KJMhGDicG2KHJuEKJrT/Z4="; 27 }; 28 29 postPatch = '' 30 # building the docs fails with the usual Qt xcb error, so skip:
··· 3 , buildPythonPackage 4 , envisage 5 , fetchPypi 6 + , fetchpatch 7 , numpy 8 , packaging 9 , pyface ··· 26 inherit pname version; 27 hash = "sha256-n0J+8spska542S02ibpr7KJMhGDicG2KHJuEKJrT/Z4="; 28 }; 29 + 30 + patches = [ 31 + # Adds compatibility with Python 3.11. 32 + # https://github.com/enthought/mayavi/pull/1199 33 + (fetchpatch { 34 + name = "python311-compat.patch"; 35 + url = "https://github.com/enthought/mayavi/commit/50c0cbfcf97560be69c84b7c924635a558ebf92f.patch"; 36 + hash = "sha256-zZOT6on/f5cEjnDBrNGog/wPQh7rBkaFqrxkBYDUQu0="; 37 + includes = [ "tvtk/src/*" ]; 38 + }) 39 + # Fixes an incompatible function pointer conversion error 40 + # https://github.com/enthought/mayavi/pull/1266 41 + (fetchpatch { 42 + name = "incompatible-pointer-conversion.patch"; 43 + url = "https://github.com/enthought/mayavi/commit/887adc8fe2b076a368070f5b1d564745b03b1964.patch"; 44 + hash = "sha256-88H1NNotd4pO0Zw1oLrYk5WNuuVrmTU01HJgsTRfKlo="; 45 + }) 46 + ]; 47 48 postPatch = '' 49 # building the docs fails with the usual Qt xcb error, so skip:
+10 -1
pkgs/tools/filesystems/encfs/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub 2 , cmake, pkg-config, perl 3 , gettext, fuse, openssl, tinyxml2 4 }: ··· 13 repo = "encfs"; 14 owner = "vgough"; 15 }; 16 17 buildInputs = [ gettext fuse openssl tinyxml2 ]; 18 nativeBuildInputs = [ cmake pkg-config perl ];
··· 1 + { lib, stdenv, fetchFromGitHub, fetchpatch 2 , cmake, pkg-config, perl 3 , gettext, fuse, openssl, tinyxml2 4 }: ··· 13 repo = "encfs"; 14 owner = "vgough"; 15 }; 16 + 17 + patches = lib.optionals stdenv.cc.isClang [ 18 + # Fixes a build failure when building with newer versions of clang. 19 + # https://github.com/vgough/encfs/pull/650 20 + (fetchpatch { 21 + url = "https://github.com/vgough/encfs/commit/406b63bfe234864710d1d23329bf41d48001fbfa.patch"; 22 + hash = "sha256-VunC5ICRJBgCXqkr7ad7DPzweRJr1bdOpo1LKNCs4zY="; 23 + }) 24 + ]; 25 26 buildInputs = [ gettext fuse openssl tinyxml2 ]; 27 nativeBuildInputs = [ cmake pkg-config perl ];
+3 -1
pkgs/top-level/all-packages.nix
··· 30271 30272 dcw-gmt = callPackage ../applications/gis/gmt/dcw.nix { }; 30273 30274 - grass = callPackage ../applications/gis/grass { }; 30275 30276 openorienteering-mapper = libsForQt5.callPackage ../applications/gis/openorienteering-mapper { }; 30277
··· 30271 30272 dcw-gmt = callPackage ../applications/gis/gmt/dcw.nix { }; 30273 30274 + grass = callPackage ../applications/gis/grass { 30275 + stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; 30276 + }; 30277 30278 openorienteering-mapper = libsForQt5.callPackage ../applications/gis/openorienteering-mapper { }; 30279