gnu: ncurses: Update to 6.2.20210619.
* gnu/packages/ncurses.scm (ncurses)[version]: Set to 6.2.20210619. [source](uri): Adjust accordingly. [arguments]: Remove trailing #t's. Rewrite apply-rollup-patch phase to work in the absence of the patch. Run the phase. [native-inputs]: Add "rollup-patch".
This commit is contained in:
		
							parent
							
								
									11c20005f5
								
							
						
					
					
						commit
						17747d1135
					
				
					 1 changed files with 30 additions and 17 deletions
				
			
		| 
						 | 
					@ -5,7 +5,7 @@
 | 
				
			||||||
;;; Copyright © 2016 Nikita <nikita@n0.is>
 | 
					;;; Copyright © 2016 Nikita <nikita@n0.is>
 | 
				
			||||||
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 | 
					;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 | 
				
			||||||
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 | 
					;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 | 
				
			||||||
;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
 | 
					;;; Copyright © 2017, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
 | 
				
			||||||
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 | 
					;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 | 
				
			||||||
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 | 
					;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
| 
						 | 
					@ -36,16 +36,17 @@
 | 
				
			||||||
  #:use-module (gnu packages pkg-config)
 | 
					  #:use-module (gnu packages pkg-config)
 | 
				
			||||||
  #:use-module (gnu packages swig)
 | 
					  #:use-module (gnu packages swig)
 | 
				
			||||||
  #:use-module (gnu packages linux)
 | 
					  #:use-module (gnu packages linux)
 | 
				
			||||||
  #:use-module (guix utils))
 | 
					  #:use-module (guix utils)
 | 
				
			||||||
 | 
					  #:use-module (ice-9 match))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define-public ncurses
 | 
					(define-public ncurses
 | 
				
			||||||
  (package
 | 
					  (package
 | 
				
			||||||
    (name "ncurses")
 | 
					    (name "ncurses")
 | 
				
			||||||
    (version "6.2")
 | 
					    (version "6.2.20210619")
 | 
				
			||||||
    (source (origin
 | 
					    (source (origin
 | 
				
			||||||
              (method url-fetch)
 | 
					              (method url-fetch)
 | 
				
			||||||
              (uri (string-append "mirror://gnu/ncurses/ncurses-"
 | 
					              (uri (string-append "mirror://gnu/ncurses/ncurses-"
 | 
				
			||||||
                                  (car (string-split version #\-))
 | 
					                                  (version-major+minor version)
 | 
				
			||||||
                                  ".tar.gz"))
 | 
					                                  ".tar.gz"))
 | 
				
			||||||
              (sha256
 | 
					              (sha256
 | 
				
			||||||
               (base32
 | 
					               (base32
 | 
				
			||||||
| 
						 | 
					@ -57,8 +58,7 @@
 | 
				
			||||||
     (let ((patch-makefile-phase
 | 
					     (let ((patch-makefile-phase
 | 
				
			||||||
            '(lambda _
 | 
					            '(lambda _
 | 
				
			||||||
               (for-each patch-makefile-SHELL
 | 
					               (for-each patch-makefile-SHELL
 | 
				
			||||||
                         (find-files "." "Makefile.in"))
 | 
					                         (find-files "." "Makefile.in"))))
 | 
				
			||||||
               #t))
 | 
					 | 
				
			||||||
           (configure-phase
 | 
					           (configure-phase
 | 
				
			||||||
            ;; The 'configure' script does not understand '--docdir', so we must
 | 
					            ;; The 'configure' script does not understand '--docdir', so we must
 | 
				
			||||||
            ;; override that and use '--mandir' instead.
 | 
					            ;; override that and use '--mandir' instead.
 | 
				
			||||||
| 
						 | 
					@ -74,18 +74,20 @@
 | 
				
			||||||
                        (if target
 | 
					                        (if target
 | 
				
			||||||
                            (cons (string-append "--host=" target)
 | 
					                            (cons (string-append "--host=" target)
 | 
				
			||||||
                                  configure-flags)
 | 
					                                  configure-flags)
 | 
				
			||||||
                            configure-flags))
 | 
					                            configure-flags)))))
 | 
				
			||||||
                 #t)))
 | 
					 | 
				
			||||||
           (apply-rollup-patch-phase
 | 
					           (apply-rollup-patch-phase
 | 
				
			||||||
            ;; Ncurses distributes "stable" patchsets to be applied on top
 | 
					            ;; Ncurses distributes "stable" patchsets to be applied on top
 | 
				
			||||||
            ;; of the release tarball.  These are only available as shell
 | 
					            ;; of the release tarball.  These are only available as shell
 | 
				
			||||||
            ;; scripts(!) so we decompress and apply them in a phase.
 | 
					            ;; scripts(!) so we decompress and apply them in a phase.
 | 
				
			||||||
            ;; See <https://invisible-mirror.net/archives/ncurses/6.1/README>.
 | 
					            ;; See <https://invisible-mirror.net/archives/ncurses/6.1/README>.
 | 
				
			||||||
            '(lambda* (#:key inputs native-inputs #:allow-other-keys)
 | 
					            '(lambda* (#:key inputs native-inputs #:allow-other-keys)
 | 
				
			||||||
               (copy-file (assoc-ref (or native-inputs inputs) "rollup-patch")
 | 
					               (let ((rollup-patch (assoc-ref (or native-inputs inputs)
 | 
				
			||||||
 | 
					                                              "rollup-patch")))
 | 
				
			||||||
 | 
					                 (when rollup-patch
 | 
				
			||||||
 | 
					                   (copy-file rollup-patch
 | 
				
			||||||
                              (string-append (getcwd) "/rollup-patch.sh.bz2"))
 | 
					                              (string-append (getcwd) "/rollup-patch.sh.bz2"))
 | 
				
			||||||
                   (invoke "bzip2" "-d" "rollup-patch.sh.bz2")
 | 
					                   (invoke "bzip2" "-d" "rollup-patch.sh.bz2")
 | 
				
			||||||
               (invoke "sh" "rollup-patch.sh")))
 | 
					                   (invoke "sh" "rollup-patch.sh")))))
 | 
				
			||||||
           (remove-shebang-phase
 | 
					           (remove-shebang-phase
 | 
				
			||||||
            '(lambda _
 | 
					            '(lambda _
 | 
				
			||||||
               ;; To avoid retaining a reference to the bootstrap Bash via the
 | 
					               ;; To avoid retaining a reference to the bootstrap Bash via the
 | 
				
			||||||
| 
						 | 
					@ -98,8 +100,7 @@
 | 
				
			||||||
                 (("@SHELL@ \\$0")
 | 
					                 (("@SHELL@ \\$0")
 | 
				
			||||||
                  "$0")
 | 
					                  "$0")
 | 
				
			||||||
                 (("mandir=.*$")
 | 
					                 (("mandir=.*$")
 | 
				
			||||||
                  "mandir=share/man"))
 | 
					                  "mandir=share/man"))))
 | 
				
			||||||
               #t))
 | 
					 | 
				
			||||||
           (post-install-phase
 | 
					           (post-install-phase
 | 
				
			||||||
            `(lambda* (#:key outputs #:allow-other-keys)
 | 
					            `(lambda* (#:key outputs #:allow-other-keys)
 | 
				
			||||||
               (let ((out (assoc-ref outputs "out")))
 | 
					               (let ((out (assoc-ref outputs "out")))
 | 
				
			||||||
| 
						 | 
					@ -156,8 +157,7 @@
 | 
				
			||||||
                                           (when (file-exists? packagew.pc)
 | 
					                                           (when (file-exists? packagew.pc)
 | 
				
			||||||
                                             (symlink packagew.pc package.pc))))
 | 
					                                             (symlink packagew.pc package.pc))))
 | 
				
			||||||
                                       '())))
 | 
					                                       '())))
 | 
				
			||||||
                             '("curses" "ncurses" "form" "panel" "menu")))
 | 
					                             '("curses" "ncurses" "form" "panel" "menu")))))))
 | 
				
			||||||
                 #t))))
 | 
					 | 
				
			||||||
       `(#:configure-flags
 | 
					       `(#:configure-flags
 | 
				
			||||||
         ,(cons*
 | 
					         ,(cons*
 | 
				
			||||||
           'quasiquote
 | 
					           'quasiquote
 | 
				
			||||||
| 
						 | 
					@ -195,6 +195,8 @@
 | 
				
			||||||
              ,@(if (target-mingw?) '("--enable-term-driver") '()))))
 | 
					              ,@(if (target-mingw?) '("--enable-term-driver") '()))))
 | 
				
			||||||
         #:tests? #f                  ; no "check" target
 | 
					         #:tests? #f                  ; no "check" target
 | 
				
			||||||
         #:phases (modify-phases %standard-phases
 | 
					         #:phases (modify-phases %standard-phases
 | 
				
			||||||
 | 
					                    (add-after 'unpack 'apply-rollup-patch
 | 
				
			||||||
 | 
					                      ,apply-rollup-patch-phase)
 | 
				
			||||||
                    (replace 'configure ,configure-phase)
 | 
					                    (replace 'configure ,configure-phase)
 | 
				
			||||||
                    (add-after 'install 'post-install
 | 
					                    (add-after 'install 'post-install
 | 
				
			||||||
                      ,post-install-phase)
 | 
					                      ,post-install-phase)
 | 
				
			||||||
| 
						 | 
					@ -206,6 +208,17 @@
 | 
				
			||||||
     `(,@(if (%current-target-system)
 | 
					     `(,@(if (%current-target-system)
 | 
				
			||||||
             `(("self" ,this-package))            ;for `tic'
 | 
					             `(("self" ,this-package))            ;for `tic'
 | 
				
			||||||
             '())
 | 
					             '())
 | 
				
			||||||
 | 
					       ("rollup-patch"
 | 
				
			||||||
 | 
					        ,(origin
 | 
				
			||||||
 | 
					           (method url-fetch)
 | 
				
			||||||
 | 
					           (uri (match (string-split (version-major+minor+point version) #\.)
 | 
				
			||||||
 | 
					                  ((major minor point)
 | 
				
			||||||
 | 
					                   (string-append "https://invisible-mirror.net/archives"
 | 
				
			||||||
 | 
					                                  "/ncurses/" major "." minor "/ncurses-"
 | 
				
			||||||
 | 
					                                  major "." minor "-" point "-patch.sh.bz2"))))
 | 
				
			||||||
 | 
					           (sha256
 | 
				
			||||||
 | 
					            (base32
 | 
				
			||||||
 | 
					             "1b6522cvi4066bgh9lp93q8lk93zcjjssvnw1512z447xvazy2y6"))))
 | 
				
			||||||
       ("pkg-config" ,pkg-config)))
 | 
					       ("pkg-config" ,pkg-config)))
 | 
				
			||||||
    (native-search-paths
 | 
					    (native-search-paths
 | 
				
			||||||
     (list (search-path-specification
 | 
					     (list (search-path-specification
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue