From d17c7e24b3e11c988e509012e2ee7dfdfb2b95dc Mon Sep 17 00:00:00 2001 From: bdunahu Date: Fri, 19 Jun 2026 18:12:14 -0400 Subject: gnu: nethack: Use gzip and always link with tinfo. The tests and dependent projects also use build systems which assume tinfo and ncurses are compiled into the same shared library file. This avoids linker errors. * gnu/packages/games.scm (nethack)[#:make-flags]: Add LIBS=-ltinfo. Remove CFLAGS. [#:phases]: Adjust 'patch-paths' to find gzip. Remove 'add-compression'. [inputs]: Add gzip. Remove ncompress. Signed-off-by: Liliana Marie Prikler --- gnu/packages/games.scm | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 0a95d7eacdc..02d8e0438e1 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2826,8 +2826,8 @@ watch your CPU playing while enjoying a cup of tea!") #:make-flags #~(list (string-append "PREFIX=" #$output) - ;; Add the -W without overwriting the -I and -D. - "CFLAGS=-g -O2 -I../include -DNOTPARMDECL -Wno-error=cast-qual" + ;; Without this, build system assumes ncurses and tinfo are combined. + "LIBS=-ltinfo" (string-append "CC=" #$(cc-for-target)) (string-append "GREPPATH=" (search-input-file %build-inputs "/bin/grep"))) @@ -2871,15 +2871,9 @@ watch your CPU playing while enjoying a cup of tea!") (substitute* "sys/unix/sysconf" (("^.*GREPPATH[^\n]+") (string-append "GREPPATH=" - (search-input-file inputs "/bin/grep")))))) - (add-before 'configure 'add-compression - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "include/config.h" - (("^.*define COMPRESS [^\n]+") - (string-append - "#define COMPRESS \"" - (search-input-file inputs "/bin/compress") - "\""))))) + (search-input-file inputs "/bin/grep")))) + (substitute* "sys/unix/hints/linux.500" + (("/bin/gzip") (search-input-file inputs "bin/gzip"))))) (add-before 'configure 'make-reproducible (lambda _ (substitute* "include/config.h" @@ -2946,9 +2940,9 @@ done pkg-config)) (inputs (list grep + gzip less lua-5.4 - ncompress ncurses/tinfo perl)) (home-page "https://nethack.org") -- cgit v1.2.3