* [bug#54881] gnu: Add ncurses-5, ncurses/tinfo-5.
@ 2022-04-12 11:06 B. Wilson via Guix-patches via
2022-05-09 7:51 ` Mathieu Othacehe
0 siblings, 1 reply; 8+ messages in thread
From: B. Wilson via Guix-patches via @ 2022-04-12 11:06 UTC (permalink / raw)
To: 54881
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
Hello Guix,
I have a need to use ncurses-with-tinfo@5.
The ncurses package embeds the version string in various places, and even
hard-codes the version-major 6 in a couple places, making it impractical to
just create a transformation.
Is this patch reasonable?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-ncurses-5-ncurses-tinfo-5.patch --]
[-- Type: text/x-patch, Size: 4897 bytes --]
From 8ed5fceb8b0bcbfc39505b4a74bb7eed93dfdaf9 Mon Sep 17 00:00:00 2001
From: "B. Wilson" <elaexuotee@wilsonb.com>
Date: Tue, 12 Apr 2022 12:09:26 +0900
Subject: [PATCH] gnu: Add ncurses-5, ncurses/tinfo-5
To: guix-patches@gnu.org
* gnu/packages/ncurses.scm (ncurses-5, ncurses/tinfo-5): New varaibles.
---
gnu/packages/ncurses.scm | 49 ++++++++++++++++++++++++++++++----------
1 file changed, 37 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index 5b00da25bb..afca7b0208 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -39,18 +39,19 @@ (define-module (gnu packages ncurses)
#:use-module (guix utils)
#:use-module (ice-9 match))
-(define-public ncurses
+(define* (make-ncurses-package #:key
+ version
+ source-hash
+ rollup-patch-hash)
(package
(name "ncurses")
- (version "6.2.20210619")
+ (version version)
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/ncurses/ncurses-"
(version-major+minor version)
".tar.gz"))
- (sha256
- (base32
- "17bcm2z1rdx5gmzj5fb8cp7f28aw5b4g2z4qvvqg3yg0fq66wc1h"))))
+ (sha256 (base32 source-hash))))
(build-system gnu-build-system)
(outputs '("out"
"doc")) ;1 MiB of man pages
@@ -130,10 +131,12 @@ (define lib.a
(string-append "lib" lib ".a"))
,@(if (not (target-mingw?))
- '((define libw.so.x
- (string-append "lib" lib "w.so.6"))
+ `((define libw.so.x
+ (string-append "lib" lib "w.so."
+ ,(version-major version)))
(define lib.so.x
- (string-append "lib" lib ".so.6"))
+ (string-append "lib" lib ".so."
+ ,(version-major version)))
(define lib.so
(string-append "lib" lib ".so"))
(define packagew.pc
@@ -192,7 +195,9 @@ (define package.pc
"cf_cv_ld_searchpath=/no-ld-searchpath"
;; MinGW: Use term-driver created for the MinGW port.
- ,@(if (target-mingw?) '("--enable-term-driver") '()))))
+ ,@(if (target-mingw?) '("--enable-term-driver") '())
+
+ ,@extra-configure-flags)))
#:tests? #f ; no "check" target
#:phases (modify-phases %standard-phases
(add-after 'unpack 'apply-rollup-patch
@@ -216,9 +221,7 @@ (define package.pc
(string-append "https://invisible-mirror.net/archives"
"/ncurses/" major "." minor "/ncurses-"
major "." minor "-" point "-patch.sh.bz2"))))
- (sha256
- (base32
- "1b6522cvi4066bgh9lp93q8lk93zcjjssvnw1512z447xvazy2y6"))))
+ (sha256 (base32 rollup-patch-hash))))
("pkg-config" ,pkg-config)))
(native-search-paths
(list (search-path-specification
@@ -234,6 +237,18 @@ (define package.pc
(license x11)
(home-page "https://www.gnu.org/software/ncurses/")))
+(define-public ncurses
+ (make-ncurses-package
+ #:version "6.2.20210619"
+ #:source-hash "17bcm2z1rdx5gmzj5fb8cp7f28aw5b4g2z4qvvqg3yg0fq66wc1h"
+ #:rollup-patch-hash "1b6522cvi4066bgh9lp93q8lk93zcjjssvnw1512z447xvazy2y6"))
+
+(define-public ncurses-5
+ (make-ncurses-package
+ #:version "5.9.20141206"
+ #:source-hash "0fsn7xis81za62afan0vvm38bvgzg5wfmv1m86flqcj0nj7jjilh"
+ #:rollup-patch-hash "16ny892yhimy6r4mmsgw3rcl0i15570ifn9c54g1ndyrk7kpmlgs"))
+
(define-public ncurses/gpm
(package/inherit ncurses
(name "ncurses-with-gpm")
@@ -258,6 +273,16 @@ (define-public ncurses/tinfo
`(cons "--with-termlib=tinfo"
,cf))))))
+;; Consider merging into ncurses for next core-updates cycle.
+(define-public ncurses/tinfo-5
+ (package/inherit ncurses-5
+ (name "ncurses-with-tinfo")
+ (arguments
+ (substitute-keyword-arguments (package-arguments ncurses-5)
+ ((#:configure-flags cf)
+ `(cons "--with-termlib=tinfo"
+ ,cf))))))
+
(define-public dialog
(package
(name "dialog")
--
2.35.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#54881] gnu: Add ncurses-5, ncurses/tinfo-5.
2022-04-12 11:06 [bug#54881] gnu: Add ncurses-5, ncurses/tinfo-5 B. Wilson via Guix-patches via
@ 2022-05-09 7:51 ` Mathieu Othacehe
2022-05-09 11:39 ` B. Wilson via Guix-patches via
0 siblings, 1 reply; 8+ messages in thread
From: Mathieu Othacehe @ 2022-05-09 7:51 UTC (permalink / raw)
To: B. Wilson; +Cc: 54881
Hello,
> The ncurses package embeds the version string in various places, and even
> hard-codes the version-major 6 in a couple places, making it impractical to
> just create a transformation.
>
> Is this patch reasonable?
The make-ncurses-package procedure seems reasonable to be, as it will
also probably ease the upgrade of the package to future major revisions.
However, the introduction of ncurses-5 and ncurses/tinfo-5 has to match
a precise need for a package that is or will be part of Guix. Is that
the case?
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#54881] gnu: Add ncurses-5, ncurses/tinfo-5.
2022-05-09 7:51 ` Mathieu Othacehe
@ 2022-05-09 11:39 ` B. Wilson via Guix-patches via
2022-05-09 16:06 ` Mathieu Othacehe
0 siblings, 1 reply; 8+ messages in thread
From: B. Wilson via Guix-patches via @ 2022-05-09 11:39 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 54881
Thanks for taking a look at this.
> However, the introduction of ncurses-5 and ncurses/tinfo-5 has to match
> a precise need for a package that is or will be part of Guix. Is that
> the case?
Yes, sort of. I am currently test-driving a package for Dyalog APL at the
moment, which requires ncurses/tinfo-5. However, due to licensing issues, that
package needs to be in the unmentionable repo.
I'm not quite sure of the appropriate protocol in this case.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#54881] gnu: Add ncurses-5, ncurses/tinfo-5.
2022-05-09 11:39 ` B. Wilson via Guix-patches via
@ 2022-05-09 16:06 ` Mathieu Othacehe
2022-05-09 21:57 ` B. Wilson via Guix-patches via
0 siblings, 1 reply; 8+ messages in thread
From: Mathieu Othacehe @ 2022-05-09 16:06 UTC (permalink / raw)
To: B. Wilson; +Cc: 54881
Hey,
> I'm not quite sure of the appropriate protocol in this case.
We could apply the part introducing the make-ncurses-package procedure
but leave the definition of ncurses-5 and ncurses/tinfo-5 to the
channels which have a use for it?
While testing the make-ncurses-package procedure, I have the following
compile error:
--8<---------------cut here---------------start------------->8---
gnu/packages/ncurses.scm:200:16: In procedure arguments:
error: extra-configure-flags: unbound variable
hint: Did you forget a `use-modules' form?
--8<---------------cut here---------------end--------------->8---
Anything familiar?
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#54881] gnu: Add ncurses-5, ncurses/tinfo-5.
2022-05-09 16:06 ` Mathieu Othacehe
@ 2022-05-09 21:57 ` B. Wilson via Guix-patches via
2022-05-15 11:44 ` Mathieu Othacehe
0 siblings, 1 reply; 8+ messages in thread
From: B. Wilson via Guix-patches via @ 2022-05-09 21:57 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 54881
> We could apply the part introducing the make-ncurses-package procedure
> but leave the definition of ncurses-5 and ncurses/tinfo-5 to the
> channels which have a use for it?
Sounds reasonable to me.
> While testing the make-ncurses-package procedure, I have the following
> compile error:
>
> --8<---------------cut here---------------start------------->8---
> gnu/packages/ncurses.scm:200:16: In procedure arguments:
> error: extra-configure-flags: unbound variable
> hint: Did you forget a `use-modules' form?
> --8<---------------cut here---------------end--------------->8---
>
> Anything familiar?
Oof. That can be safely removed. I built and tested locally, but it looks like
that change is sitting on my local machine uncomitted. Whoops!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#54881] gnu: Add ncurses-5, ncurses/tinfo-5.
2022-05-09 21:57 ` B. Wilson via Guix-patches via
@ 2022-05-15 11:44 ` Mathieu Othacehe
2022-05-16 4:35 ` B. Wilson via Guix-patches via
0 siblings, 1 reply; 8+ messages in thread
From: Mathieu Othacehe @ 2022-05-15 11:44 UTC (permalink / raw)
To: B. Wilson; +Cc: 54881
Hello,
> Oof. That can be safely removed. I built and tested locally, but it looks like
> that change is sitting on my local machine uncomitted. Whoops!
I removed this bit and it looks like the introduction of the
make-ncurses-package procedure is causing a mass-rebuild. There's
probably another issue as this patch shouldn't cause any change to the
original package definition.
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#54881] gnu: Add ncurses-5, ncurses/tinfo-5.
2022-05-15 11:44 ` Mathieu Othacehe
@ 2022-05-16 4:35 ` B. Wilson via Guix-patches via
2022-05-16 14:03 ` Mathieu Othacehe
0 siblings, 1 reply; 8+ messages in thread
From: B. Wilson via Guix-patches via @ 2022-05-16 4:35 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 54881
> I removed this bit and it looks like the introduction of the
> make-ncurses-package procedure is causing a mass-rebuild. There's
> probably another issue as this patch shouldn't cause any change to the
> original package definition.
Yikes. That's definitely a bug. The package definition for the existing version
should end up the exact same. Will look into it.
By the way, how did you check the mass rebuild? Is there a simple command to
check reverse dependencies or the like?
Cheers,
B. Wilson
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#54881] gnu: Add ncurses-5, ncurses/tinfo-5.
2022-05-16 4:35 ` B. Wilson via Guix-patches via
@ 2022-05-16 14:03 ` Mathieu Othacehe
0 siblings, 0 replies; 8+ messages in thread
From: Mathieu Othacehe @ 2022-05-16 14:03 UTC (permalink / raw)
To: B. Wilson; +Cc: 54881
Hey,
> By the way, how did you check the mass rebuild? Is there a simple command to
> check reverse dependencies or the like?
When you run:
--8<---------------cut here---------------start------------->8---
./pre-inst-env guix build ncurses
--8<---------------cut here---------------end--------------->8---
there should not be any rebuild, that's how I check it at least :)
Mathieu
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-05-16 14:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-12 11:06 [bug#54881] gnu: Add ncurses-5, ncurses/tinfo-5 B. Wilson via Guix-patches via
2022-05-09 7:51 ` Mathieu Othacehe
2022-05-09 11:39 ` B. Wilson via Guix-patches via
2022-05-09 16:06 ` Mathieu Othacehe
2022-05-09 21:57 ` B. Wilson via Guix-patches via
2022-05-15 11:44 ` Mathieu Othacehe
2022-05-16 4:35 ` B. Wilson via Guix-patches via
2022-05-16 14:03 ` Mathieu Othacehe
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.