summaryrefslogtreecommitdiff
path: root/gnu/packages/readline.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-12-03 02:55:47 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-12-03 15:04:46 +0100
commit371193ecbfa3e4e41a7f0e380f7f15c485806e73 (patch)
tree760ae7231c0ebb78f70f6f4af692b799c1a65186 /gnu/packages/readline.scm
parent5bda082496d61e9c20aed231643639d907576c71 (diff)
downloadpatches-371193ecbfa3e4e41a7f0e380f7f15c485806e73.tar
patches-371193ecbfa3e4e41a7f0e380f7f15c485806e73.tar.gz
gnu: readline: Update to 7.0.3.
* gnu/packages/readline.scm (patch-url, readline-patch): New procedures. (patch-series): New macro. (%patch-series-7.0): New variable. (readline)[version]: Include patchlevel. [source](uri): Adjust to version suffix. [source](patches): Add %PATCH-SERIES-7.0.
Diffstat (limited to 'gnu/packages/readline.scm')
-rw-r--r--gnu/packages/readline.scm32
1 files changed, 28 insertions, 4 deletions
diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm
index f6ebbcc267..ac99f71ee7 100644
--- a/gnu/packages/readline.scm
+++ b/gnu/packages/readline.scm
@@ -26,7 +26,28 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
- #:use-module (guix utils))
+ #:use-module (guix utils)
+ #:use-module (ice-9 format))
+
+(define (patch-url seqno)
+ (format #f "mirror://gnu/readline/readline-7.0-patches/readline70-~3,'0d" seqno))
+
+(define (readline-patch seqno sha256)
+ "Return the origin of Readline patch SEQNO, with expected hash SHA256"
+ (origin
+ (method url-fetch)
+ (uri (patch-url seqno))
+ (sha256 sha256)))
+
+(define-syntax-rule (patch-series (seqno hash) ...)
+ (list (readline-patch seqno (base32 hash))
+ ...))
+
+(define %patch-series-7.0
+ (patch-series
+ (1 "0xm3sxvwmss7ddyfb11n6pgcqd1aglnpy15g143vzcf75snb7hcs")
+ (2 "0n1dxmqsbjgrfxb1hgk5c6lsraw4ncbnzxlsx7m35nym6lncjiw7")
+ (3 "1027kmymniizcy0zbdlrczxfx3clxcdln5yq05q9yzlc6y9slhwy")))
(define-public readline
(let ((post-install-phase
@@ -42,15 +63,18 @@
(find-files lib "\\.a"))))))
(package
(name "readline")
- (version "7.0")
+ (version (string-append "7.0."
+ (number->string (length %patch-series-7.0))))
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/readline/readline-"
- version ".tar.gz"))
+ (version-major+minor version) ".tar.gz"))
(sha256
(base32
"0d13sg9ksf982rrrmv5mb6a2p4ys9rvg9r71d6il0vr8hmql63bm"))
- (patches (search-patches "readline-link-ncurses.patch"))
+ (patches (append
+ %patch-series-7.0
+ (search-patches "readline-link-ncurses.patch")))
(patch-flags '("-p0"))))
(build-system gnu-build-system)
(propagated-inputs `(("ncurses" ,ncurses)))