diff options
author | Jan Nieuwenhuizen <janneke@gnu.org> | 2019-09-21 22:03:44 +0200 |
---|---|---|
committer | Jan Nieuwenhuizen <janneke@gnu.org> | 2020-02-17 23:16:40 +0100 |
commit | b022827de5440d64bf1ee57915bafadbca3a3dbe (patch) | |
tree | 9fef126ad3200315f6c0a6590d8fde0c82cd7443 /gnu | |
parent | 5dedce047c97d5ac17daa284b56c74bf4e1a29b2 (diff) | |
download | guix-b022827de5440d64bf1ee57915bafadbca3a3dbe.tar.gz |
gnu: commencement: Add gzip-mesboot.
* gnu/packages/commencement.scm (gzip-mesboot): New variable.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/commencement.scm | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 1444c70e3d..0f952286f2 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -674,6 +674,61 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\" (variable "LIBRARY_PATH") (files '("lib"))))))) +(define gzip-mesboot + ;; The initial gzip. We keep this scripted gzip build before building make + ;; to soften the dependency on Gash Core Utils gzip. + (package + (inherit gzip) + (version "1.2.4") + (name "gzip-mesboot") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gzip/gzip-" version ".tar")) + (sha256 + (base32 + "1rhgk2vvmdvnn6vygf0dja92ryyng00knl0kz5srb77k2kryjb2d")))) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (native-inputs `(("tcc" ,tcc-boot0) + ,@(%boot-gash-inputs))) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:strip-binaries? #f ; no strip yet + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'scripted-patch + (lambda _ + (substitute* "util.c" + (("^char [*]strlwr" all) (string-append all "_tcc_cannot_handle_dupe"))) + #t)) + (replace 'build + (lambda _ + (let ((files '("bits" "crypt" "deflate" "getopt" "gzip" + "inflate" "lzw" "trees" "unlzh" "unlzw" + "unpack" "unzip" "util" "zip"))) + (define (compile x) + (invoke "tcc" "-c" "-D NO_UTIME=1" "-D HAVE_UNISTD_H=1" + (string-append x ".c"))) + (for-each compile files) + (apply invoke + (cons* "tcc" "-o" "gzip" + (map (lambda (x) (string-append x ".o")) files))) + (link "gzip" "gunzip")))) + (replace 'install + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin"))) + (install-file "gzip" bin) + (install-file "gunzip" bin)))) + (replace 'check + (lambda _ + (invoke "./gzip" "--version"))) + ;; no gzip yet + (delete 'compress-documentation)))))) + (define tcc-boot (package (inherit tcc-boot0) |