freesweep: 1.0.2 -> 1.0.2-unstable-2024-04-19

freesweep has a new version in development and it seems to be usable,
let's update to it. I included a few patches to allow it to build
with and without mlibc (which I'm working on in #371092).

sanana 96c99d01 a3cc57a9

+67 -8
+15
pkgs/by-name/fr/freesweep/0001-include-strings.h.patch
···
··· 1 + diff --git a/sweep.h b/sweep.h 2 + index 198349d..549f39f 100644 3 + --- a/sweep.h 4 + +++ b/sweep.h 5 + @@ -32,6 +32,10 @@ 6 + #include <string.h> 7 + #endif /* HAVE_STRING_H */ 8 + 9 + +#ifdef HAVE_STRINGS_H 10 + +#include <strings.h> 11 + +#endif /* HAVE_STRINGS_H */ 12 + + 13 + #ifdef HAVE_GETOPT_H 14 + #include <getopt.h> 15 + #endif /* HAVE_GETOPT_H */
+13
pkgs/by-name/fr/freesweep/0002-fix-Wformat-security.patch
···
··· 1 + diff --git a/logs.c b/logs.c 2 + index 5e87f52..29ad433 100644 3 + --- a/logs.c 4 + +++ b/logs.c 5 + @@ -128,7 +128,7 @@ static void log_display(const char *mesg) { 6 + // Display the message on the screen. 7 + if (log_win) { 8 + wclear(log_win); 9 + - mvwprintw(log_win, 0, 0, mesg); 10 + + mvwprintw(log_win, 0, 0, "%s", mesg); 11 + wnoutrefresh(log_win); 12 + wrefresh(log_win); 13 + }
+12
pkgs/by-name/fr/freesweep/0003-remove-ac_func_malloc.patch
···
··· 1 + diff --git a/configure.ac b/configure.ac 2 + index ae08308..5262e56 100644 3 + --- a/configure.ac 4 + +++ b/configure.ac 5 + @@ -32,7 +32,6 @@ AC_TYPE_SIZE_T 6 + AC_TYPE_UID_T 7 + 8 + # Checks for library functions. 9 + -AC_FUNC_MALLOC 10 + AC_CHECK_FUNCS([alarm getcwd memset mkdir setlocale strdup strncasecmp 11 + fileno flock lockf getopt getopt_long]) 12 +
+27 -8
pkgs/by-name/fr/freesweep/package.nix
··· 3 ncurses, 4 lib, 5 stdenv, 6 - updateAutotoolsGnuConfigScriptsHook, 7 installShellFiles, 8 }: 9 10 - stdenv.mkDerivation rec { 11 pname = "freesweep"; 12 - version = "1.0.2"; 13 14 src = fetchFromGitHub { 15 owner = "rwestlund"; 16 repo = "freesweep"; 17 - rev = "v${version}"; 18 - hash = "sha256-iuu81yHbNrjdPsimBrPK58PJ0d8i3ySM7rFUG/d8NJM"; 19 }; 20 21 nativeBuildInputs = [ 22 - updateAutotoolsGnuConfigScriptsHook 23 installShellFiles 24 ]; 25 buildInputs = [ ncurses ]; 26 27 - configureFlags = [ "--with-prefsdir=$out/share" ]; 28 - 29 enableParallelBuilding = true; 30 31 installPhase = '' 32 runHook preInstall
··· 3 ncurses, 4 lib, 5 stdenv, 6 + autoconf, 7 + automake, 8 + pkg-config, 9 installShellFiles, 10 }: 11 12 + stdenv.mkDerivation { 13 pname = "freesweep"; 14 + version = "1.0.2-unstable-2024-04-19"; 15 16 src = fetchFromGitHub { 17 owner = "rwestlund"; 18 repo = "freesweep"; 19 + rev = "68c0ee5b29d1087d216d95875a7036713cd25fc0"; 20 + hash = "sha256-ZnAH7mIuBMFLdrtJOY8PzNbxv+GDEFAgyEtWCpTH2Us="; 21 }; 22 23 + # These patches are sent upstream in github:rwestlund/freesweep#18 24 + patches = [ 25 + # strncasecmp and friends are declared in strings.h and not string.h on 26 + # systems with HAVE_STRINGS_H 27 + ./0001-include-strings.h.patch 28 + # Fixes a potential format string vulnerability and makes it compile with 29 + # -Wformat-security 30 + ./0002-fix-Wformat-security.patch 31 + # autoconf believes systems that handle malloc(0) differently from glibc 32 + # have a bad malloc implementation and will replace calls to malloc with 33 + # rpl_malloc. freesweep does not define rpl_malloc so this macro prevents 34 + # building for such systems, the easiest solution is to remove this macro 35 + ./0003-remove-ac_func_malloc.patch 36 + ]; 37 + 38 nativeBuildInputs = [ 39 + autoconf 40 + automake 41 + pkg-config 42 installShellFiles 43 ]; 44 buildInputs = [ ncurses ]; 45 46 enableParallelBuilding = true; 47 + 48 + preConfigure = "./autogen.sh"; 49 50 installPhase = '' 51 runHook preInstall