aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/syncthing.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/syncthing.scm')
-rw-r--r--gnu/packages/syncthing.scm77
1 files changed, 76 insertions, 1 deletions
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index e6a8ab4d31..434e236054 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,13 +22,23 @@
(define-module (gnu packages syncthing)
#:use-module (guix build-system go)
+ #:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix licenses)
#:use-module (gnu packages)
- #:use-module (gnu packages golang))
+ #:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages glib)
+ #:use-module (gnu packages gnome)
+ #:use-module (gnu packages golang)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages python-crypto)
+ #:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages time))
(define-public syncthing
(package
@@ -177,6 +188,70 @@ Protocol.")
(home-page "https://github.com/syncthing/syncthing")
(license mpl2.0)))
+(define-public syncthing-gtk
+ (package
+ (name "syncthing-gtk")
+ (version "0.9.4.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/syncthing/syncthing-gtk.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0nc0wd7qvyri7841c3dd9in5d7367hys0isyw8znv5fj4c0a6v1f"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'hardcode-dependencies
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((psmisc (assoc-ref inputs "psmisc"))
+ (syncthing (assoc-ref inputs "syncthing")))
+ ;; Hardcode dependencies paths to avoid propagation.
+ (substitute* "syncthing_gtk/tools.py"
+ (("killall") (string-append psmisc "/bin/killall")))
+ (substitute* "syncthing_gtk/configuration.py"
+ (("/usr/bin/syncthing") (string-append syncthing
+ "/bin/syncthing"))))
+ #t))
+ (add-after 'wrap 'wrap-libs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (wrap-program (string-append out "/bin/syncthing-gtk")
+ `("GI_TYPELIB_PATH" ":" prefix
+ (,(getenv "GI_TYPELIB_PATH"))))
+ #t))))))
+ (inputs
+ `(("gtk+" ,gtk+)
+ ("libappindicator" ,libappindicator)
+ ("libnotify" ,libnotify)
+ ("librsvg" ,librsvg)
+ ("python2-bcrypt" ,python2-bcrypt)
+ ("python2-dateutil" ,python2-dateutil)
+ ("python2-pycairo" ,python2-pycairo)
+ ("python2-pygobject" ,python2-pygobject)
+ ("python-nautilus" ,python-nautilus)
+ ("psmisc" ,psmisc)
+ ("syncthing" ,syncthing)))
+ (native-inputs
+ `(("python2-setuptools" ,python2-setuptools)))
+ (home-page "https://github.com/syncthing/syncthing-gtk")
+ (synopsis "GTK3 based GUI and notification area icon for Syncthing")
+ (description "@code{syncthing-gtk} is a GTK3 Python based GUI and
+notification area icon for Syncthing. Supported Syncthing features:
+
+@itemize
+@item Everything that WebUI can display
+@item Adding, editing and deleting nodes
+@item Adding, editing and deleting repositories
+@item Restart, shutdown server
+@item Editing daemon settings
+@end itemize\n")
+ (license gpl2)))
+
(define-public go-github-com-jackpal-go-nat-pmp
(package
(name "go-github-com-jackpal-go-nat-pmp")
x/diff/gnu/packages/base.scm?id=c4d769d359c67680fe55c3b71e659cd31837f3ec&id2=4de63cf3fc0a831d75cb507456821104f24800c2'>gnu/packages/base.scm238
-rw-r--r--gnu/packages/bash.scm14
-rw-r--r--gnu/packages/bioinformatics.scm4
-rw-r--r--gnu/packages/bison.scm4
-rw-r--r--gnu/packages/bittorrent.scm2
-rw-r--r--gnu/packages/boost.scm175
-rw-r--r--gnu/packages/bootloaders.scm4
-rw-r--r--gnu/packages/bootstrap.scm28
-rw-r--r--gnu/packages/build-tools.scm4
-rw-r--r--gnu/packages/cdrom.scm2
-rw-r--r--gnu/packages/check.scm191
-rw-r--r--gnu/packages/chez.scm2
-rw-r--r--gnu/packages/chromium.scm13
-rw-r--r--gnu/packages/ci.scm2
-rw-r--r--gnu/packages/cinnamon.scm7
-rw-r--r--gnu/packages/cmake.scm294
-rw-r--r--gnu/packages/code.scm18
-rw-r--r--gnu/packages/commencement.scm2866
-rw-r--r--gnu/packages/compression.scm65
-rw-r--r--gnu/packages/cran.scm6
-rw-r--r--gnu/packages/cross-base.scm69
-rw-r--r--gnu/packages/crypto.scm32
-rw-r--r--gnu/packages/cryptsetup.scm4
-rw-r--r--gnu/packages/cups.scm4
-rw-r--r--gnu/packages/curl.scm61
-rw-r--r--gnu/packages/cyrus-sasl.scm17
-rw-r--r--gnu/packages/databases.scm4
-rw-r--r--gnu/packages/dbm.scm9
-rw-r--r--gnu/packages/disk.scm18
-rw-r--r--gnu/packages/display-managers.scm2
-rw-r--r--gnu/packages/dns.scm14
-rw-r--r--gnu/packages/docbook.scm4
-rw-r--r--gnu/packages/documentation.scm19
-rw-r--r--gnu/packages/ebook.scm2
-rw-r--r--gnu/packages/ed.scm4
-rw-r--r--gnu/packages/efi.scm1
-rw-r--r--gnu/packages/emacs-xyz.scm19
-rw-r--r--gnu/packages/emacs.scm2
-rw-r--r--gnu/packages/engineering.scm2
-rw-r--r--gnu/packages/enlightenment.scm4
-rw-r--r--gnu/packages/file-systems.scm8
-rw-r--r--gnu/packages/file.scm5
-rw-r--r--gnu/packages/firmware.scm16
-rw-r--r--gnu/packages/fltk.scm4
-rw-r--r--gnu/packages/fontutils.scm44
-rw-r--r--gnu/packages/freedesktop.scm4
-rw-r--r--gnu/packages/fribidi.scm14
-rw-r--r--gnu/packages/game-development.scm12
-rw-r--r--gnu/packages/games.scm89
-rw-r--r--gnu/packages/gcc.scm85
-rw-r--r--gnu/packages/gd.scm5
-rw-r--r--gnu/packages/gdb.scm1
-rw-r--r--gnu/packages/geo.scm14
-rw-r--r--gnu/packages/ghostscript.scm98
-rw-r--r--gnu/packages/gimp.scm9
-rw-r--r--gnu/packages/glib.scm146
-rw-r--r--gnu/packages/gnome.scm156
-rw-r--r--gnu/packages/gnunet.scm4
-rw-r--r--gnu/packages/gnupg.scm92
-rw-r--r--gnu/packages/gnustep.scm2
-rw-r--r--gnu/packages/graphics.scm16
-rw-r--r--gnu/packages/graphviz.scm10
-rw-r--r--gnu/packages/groff.scm22
-rw-r--r--gnu/packages/gstreamer.scm2
-rw-r--r--gnu/packages/gtk.scm162
-rw-r--r--gnu/packages/guile-wm.scm4
-rw-r--r--gnu/packages/guile-xyz.scm269
-rw-r--r--gnu/packages/guile.scm119
-rw-r--r--gnu/packages/hurd.scm10
-rw-r--r--gnu/packages/icu4c.scm67
-rw-r--r--gnu/packages/image-processing.scm16
-rw-r--r--gnu/packages/image-viewers.scm5
-rw-r--r--gnu/packages/image.scm141
-rw-r--r--gnu/packages/imagemagick.scm4
-rw-r--r--gnu/packages/inkscape.scm18
-rw-r--r--gnu/packages/java.scm10
-rw-r--r--gnu/packages/jemalloc.scm7
-rw-r--r--gnu/packages/jupyter.scm2
-rw-r--r--gnu/packages/kde-frameworks.scm2
-rw-r--r--gnu/packages/kde.scm2
-rw-r--r--gnu/packages/kerberos.scm30
-rw-r--r--gnu/packages/kodi.scm4
-rw-r--r--gnu/packages/ld-wrapper-next.in305
-rw-r--r--gnu/packages/ld-wrapper.in23
-rw-r--r--gnu/packages/libbsd.scm6
-rw-r--r--gnu/packages/libevent.scm27
-rw-r--r--gnu/packages/libffi.scm31
-rw-r--r--gnu/packages/libidn.scm4
-rw-r--r--gnu/packages/libreoffice.scm11
-rw-r--r--gnu/packages/libusb.scm47
-rw-r--r--gnu/packages/lighting.scm2
-rw-r--r--gnu/packages/linux.scm346
-rw-r--r--gnu/packages/lisp-xyz.scm2
-rw-r--r--gnu/packages/llvm.scm104
-rw-r--r--gnu/packages/logging.scm12
-rw-r--r--gnu/packages/machine-learning.scm4
-rw-r--r--gnu/packages/mail.scm19
-rw-r--r--gnu/packages/make-bootstrap.scm55
-rw-r--r--gnu/packages/man.scm18
-rw-r--r--gnu/packages/mate.scm8
-rw-r--r--gnu/packages/maths.scm17
-rw-r--r--gnu/packages/messaging.scm2
-rw-r--r--gnu/packages/mono.scm2
-rw-r--r--gnu/packages/multiprecision.scm4
-rw-r--r--gnu/packages/music.scm4
-rw-r--r--gnu/packages/ncurses.scm26
-rw-r--r--gnu/packages/netpbm.scm2
-rw-r--r--gnu/packages/networking.scm6
-rw-r--r--gnu/packages/nfs.scm2
-rw-r--r--gnu/packages/ninja.scm16
-rw-r--r--gnu/packages/node.scm4
-rw-r--r--gnu/packages/nss.scm2
-rw-r--r--gnu/packages/nvi.scm8
-rw-r--r--gnu/packages/opencog.scm2
-rw-r--r--gnu/packages/openldap.scm27
-rw-r--r--gnu/packages/package-management.scm74
-rw-r--r--gnu/packages/password-utils.scm2
-rw-r--r--gnu/packages/patches/aspell-default-dict-dir.patch24
-rw-r--r--gnu/packages/patches/aspell-gcc-compat.patch31
-rw-r--r--gnu/packages/patches/avahi-CVE-2018-1000845.patch42
-rw-r--r--gnu/packages/patches/bash-linux-pgrp-pipe.patch32
-rw-r--r--gnu/packages/patches/bc-fix-cross-compilation.patch171
-rw-r--r--gnu/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch50
-rw-r--r--gnu/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch50
-rw-r--r--gnu/packages/patches/clang-runtime-9-libsanitizer-mode-field.patch60
-rw-r--r--gnu/packages/patches/cmake-curl-certificates.patch10
-rw-r--r--gnu/packages/patches/coreutils-ls.patch117
-rw-r--r--gnu/packages/patches/curl-use-ssl-cert-env.patch64
-rw-r--r--gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch12
-rw-r--r--gnu/packages/patches/datefudge-gettimeofday.patch13
-rw-r--r--gnu/packages/patches/dconf-meson-0.52.patch19
-rw-r--r--gnu/packages/patches/doxygen-1.8.17-runtests.patch73
-rw-r--r--gnu/packages/patches/doxygen-test.patch38
-rw-r--r--gnu/packages/patches/fifengine-swig-compat.patch17
-rw-r--r--gnu/packages/patches/file-CVE-2018-10360.patch27
-rw-r--r--gnu/packages/patches/findutils-gnulib-libio.patch114
-rw-r--r--gnu/packages/patches/findutils-makedev.patch22
-rw-r--r--gnu/packages/patches/findutils-test-rwlock-threads.patch38
-rw-r--r--gnu/packages/patches/findutils-test-xargs.patch22
-rw-r--r--gnu/packages/patches/fribidi-CVE-2019-18397.patch26
-rw-r--r--gnu/packages/patches/gcc-4.9-libsanitizer-mode-size.patch52
-rw-r--r--gnu/packages/patches/gcc-6-libsanitizer-mode-size.patch53
-rw-r--r--gnu/packages/patches/gcc-7-libsanitizer-mode-size.patch53
-rw-r--r--gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch56
-rw-r--r--gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch58
-rw-r--r--gnu/packages/patches/gcc-boot-4.6.4.patch (renamed from gnu/packages/patches/gcc-boot-4.7.4.patch)23
-rw-r--r--gnu/packages/patches/ghostscript-no-header-id.patch14
-rw-r--r--gnu/packages/patches/ghostscript-no-header-uuid.patch12
-rw-r--r--gnu/packages/patches/giflib-make-reallocarray-private.patch120
-rw-r--r--gnu/packages/patches/glibc-2.29-supported-locales.patch33
-rw-r--r--gnu/packages/patches/glibc-CVE-2019-19126.patch22
-rw-r--r--gnu/packages/patches/glibc-bootstrap-system-2.2.5.patch30
-rw-r--r--gnu/packages/patches/glibc-supported-locales.patch11
-rw-r--r--gnu/packages/patches/gsl-test-i686.patch17
-rw-r--r--gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch55
-rw-r--r--gnu/packages/patches/jbig2dec-ignore-testtest.patch16
-rw-r--r--gnu/packages/patches/libffi-3.2.1-complex-alpha.patch28
-rw-r--r--gnu/packages/patches/libgpg-error-gawk-compat.patch155
-rw-r--r--gnu/packages/patches/libjpeg-turbo-CVE-2019-2201.patch31
-rw-r--r--gnu/packages/patches/libxslt-generated-ids.patch6
-rw-r--r--gnu/packages/patches/make-glibc-compat.patch52
-rw-r--r--gnu/packages/patches/make-impure-dirs.patch12
-rw-r--r--gnu/packages/patches/mit-krb5-qualify-short-hostnames.patch29
-rw-r--r--gnu/packages/patches/pango-skip-libthai-test.patch23
-rw-r--r--gnu/packages/patches/python-2.7-search-paths.patch12
-rw-r--r--gnu/packages/patches/python-3-search-paths.patch23
-rw-r--r--gnu/packages/patches/python-3.8-search-paths.patch17
-rw-r--r--gnu/packages/patches/python-cffi-x87-stack-clean.patch29
-rw-r--r--gnu/packages/patches/python-cross-compile.patch145
-rw-r--r--gnu/packages/patches/swig-guile-gc.patch76
-rw-r--r--gnu/packages/patches/tcl-fix-cross-compilation.patch39
-rw-r--r--gnu/packages/patches/tcsh-fix-autotest.patch45
-rw-r--r--gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch31
-rw-r--r--gnu/packages/patches/telepathy-glib-channel-memory-leak.patch19
-rw-r--r--gnu/packages/patches/texlive-bin-CVE-2018-17407.patch249
-rw-r--r--gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch293
-rw-r--r--gnu/packages/patches/texlive-bin-poppler-0.83.patch52
-rw-r--r--gnu/packages/patches/texlive-bin-poppler-0.86.patch17
-rw-r--r--gnu/packages/patches/vigra-python-compat.patch18
-rw-r--r--gnu/packages/pciutils.scm18
-rw-r--r--gnu/packages/pcre.scm4
-rw-r--r--gnu/packages/pdf.scm12
-rw-r--r--gnu/packages/perl.scm23
-rw-r--r--gnu/packages/photo.scm12
-rw-r--r--gnu/packages/php.scm16
-rw-r--r--gnu/packages/pkg-config.scm13
-rw-r--r--gnu/packages/plotutils.scm13
-rw-r--r--gnu/packages/prolog.scm2
-rw-r--r--gnu/packages/pulseaudio.scm28
-rw-r--r--gnu/packages/python-compression.scm11
-rw-r--r--gnu/packages/python-xyz.scm224
-rw-r--r--gnu/packages/python.scm101
-rw-r--r--gnu/packages/qt.scm10
-rw-r--r--gnu/packages/rdesktop.scm2
-rw-r--r--gnu/packages/rdf.scm2
-rw-r--r--gnu/packages/readline.scm29
-rw-r--r--gnu/packages/ruby.scm161
-rw-r--r--gnu/packages/rust.scm5
-rw-r--r--gnu/packages/scanner.scm4
-rw-r--r--gnu/packages/scheme.scm2
-rw-r--r--gnu/packages/scribus.scm2
-rw-r--r--gnu/packages/sdl.scm13
-rw-r--r--gnu/packages/search.scm2
-rw-r--r--gnu/packages/selinux.scm60
-rw-r--r--gnu/packages/serialization.scm11
-rw-r--r--gnu/packages/shells.scm17
-rw-r--r--gnu/packages/simulation.scm3
-rw-r--r--gnu/packages/spice.scm2
-rw-r--r--gnu/packages/sqlite.scm42
-rw-r--r--gnu/packages/ssh.scm27
-rw-r--r--gnu/packages/sssd.scm2
-rw-r--r--gnu/packages/statistics.scm2
-rw-r--r--gnu/packages/storage.scm3
-rw-r--r--gnu/packages/swig.scm37
-rw-r--r--gnu/packages/task-management.scm2
-rw-r--r--gnu/packages/tcl.scm40
-rw-r--r--gnu/packages/telephony.scm24
-rw-r--r--gnu/packages/terminals.scm10
-rw-r--r--gnu/packages/tex.scm584
-rw-r--r--gnu/packages/texinfo.scm128
-rw-r--r--gnu/packages/time.scm25
-rw-r--r--gnu/packages/tls.scm146
-rw-r--r--gnu/packages/upnp.scm2
-rw-r--r--gnu/packages/version-control.scm57
-rw-r--r--gnu/packages/video.scm8
-rw-r--r--gnu/packages/virtualization.scm27
-rw-r--r--gnu/packages/vnc.scm2
-rw-r--r--gnu/packages/vpn.scm6
-rw-r--r--gnu/packages/web-browsers.scm4
-rw-r--r--gnu/packages/web.scm61
-rw-r--r--gnu/packages/webkit.scm2
-rw-r--r--gnu/packages/wine.scm2
-rw-r--r--gnu/packages/wv.scm2
-rw-r--r--gnu/packages/wxwidgets.scm4
-rw-r--r--gnu/packages/xdisorg.scm4
-rw-r--r--gnu/packages/xfce.scm2
-rw-r--r--gnu/packages/xfig.scm4
-rw-r--r--gnu/packages/xml.scm70
-rw-r--r--gnu/packages/xorg.scm188
-rw-r--r--gnu/services/base.scm14
-rw-r--r--gnu/services/xorg.scm2
-rw-r--r--gnu/system.scm9
-rw-r--r--gnu/system/install.scm7
-rw-r--r--gnu/system/locale.scm4
262 files changed, 7467 insertions, 5509 deletions
diff --git a/gnu/build/cross-toolchain.scm b/gnu/build/cross-toolchain.scm
index 6bdbdd5411..9746be3e50 100644
--- a/gnu/build/cross-toolchain.scm
+++ b/gnu/build/cross-toolchain.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
@@ -38,8 +38,11 @@
(define %gcc-include-paths
;; Environment variables for header search paths.
- ;; Note: See <http://bugs.gnu.org/30756> for why not 'C_INCLUDE_PATH' & co.
- '("CPATH"))
+ ;; Note: See <http://bugs.gnu.org/22186> for why not 'CPATH'.
+ '("C_INCLUDE_PATH"
+ "CPLUS_INCLUDE_PATH"
+ "OBJC_INCLUDE_PATH"
+ "OBJCPLUS_INCLUDE_PATH"))
(define %gcc-cross-include-paths
;; Search path for target headers when cross-compiling.
diff --git a/gnu/ci.scm b/gnu/ci.scm
index 44a6a87e1a..cd418363fb 100644
--- a/gnu/ci.scm
+++ b/gnu/ci.scm
@@ -123,8 +123,12 @@ SYSTEM."
%guile-bootstrap-tarball
%bootstrap-tarballs))
-(define %packages-to-cross-build
- %core-packages)
+(define (packages-to-cross-build target)
+ "Return the list of packages to cross-build for TARGET."
+ ;; Don't cross-build the bootstrap tarballs for MinGW.
+ (if (string-contains target "mingw")
+ (drop-right %core-packages 6)
+ %core-packages))
(define %cross-targets
'("mips64el-linux-gnu"
@@ -176,7 +180,7 @@ SYSTEM."
(map (lambda (package)
(package-cross-job store (job-name package)
package target system))
- %packages-to-cross-build))
+ (packages-to-cross-build target)))
(remove (either from-32-to-64? same? pointless?)
%cross-targets)))
diff --git a/gnu/installer.scm b/gnu/installer.scm
index 6c11fa6198..e195d4f84b 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -313,18 +313,18 @@ selected keymap."
(define set-installer-path
;; Add the specified binary to PATH for later use by the installer.
#~(let* ((inputs
- '#$(append (list bash ;start subshells
- connman ;call connmanctl
- cryptsetup
- dosfstools ;mkfs.fat
- e2fsprogs ;mkfs.ext4
- btrfs-progs ;mkfs.btrfs
- jfsutils ;jfs_mkfs
- kbd ;chvt
- guix ;guix system init call
- util-linux ;mkwap
- shadow)
- (map canonical-package (list coreutils)))))
+ '#$(list bash ;start subshells
+ connman ;call connmanctl
+ cryptsetup
+ dosfstools ;mkfs.fat
+ e2fsprogs ;mkfs.ext4
+ btrfs-progs
+ jfsutils ;jfs_mkfs
+ kbd ;chvt
+ guix ;guix system init call
+ util-linux ;mkwap
+ shadow
+ coreutils)))
(with-output-to-port (%make-void-port "w")
(lambda ()
(set-path-environment-variable "PATH" '("bin" "sbin") inputs)))))
diff --git a/gnu/local.mk b/gnu/local.mk
index caa73d44d4..25f017bc57 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -725,7 +725,6 @@ dist_patch_DATA = \
%D%/packages/patches/apr-skip-getservbyname-test.patch \
%D%/packages/patches/arm-trusted-firmware-disable-hdcp.patch \
%D%/packages/patches/aspell-default-dict-dir.patch \
- %D%/packages/patches/aspell-gcc-compat.patch \
%D%/packages/patches/ath9k-htc-firmware-binutils.patch \
%D%/packages/patches/ath9k-htc-firmware-gcc.patch \
%D%/packages/patches/ath9k-htc-firmware-objcopy.patch \
@@ -744,7 +743,6 @@ dist_patch_DATA = \
%D%/packages/patches/audiofile-hurd.patch \
%D%/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch \
%D%/packages/patches/automake-skip-amhello-tests.patch \
- %D%/packages/patches/avahi-CVE-2018-1000845.patch \
%D%/packages/patches/avahi-localstatedir.patch \
%D%/packages/patches/avogadro-boost148.patch \
%D%/packages/patches/avogadro-eigen3-update.patch \
@@ -754,8 +752,10 @@ dist_patch_DATA = \
%D%/packages/patches/azr3.patch \
%D%/packages/patches/bash-reproducible-linux-pgrp-pipe.patch \
%D%/packages/patches/bash-completion-directories.patch \
+ %D%/packages/patches/bash-linux-pgrp-pipe.patch \
%D%/packages/patches/bastet-change-source-of-unordered_set.patch \
%D%/packages/patches/bazaar-CVE-2017-14176.patch \
+ %D%/packages/patches/bc-fix-cross-compilation.patch \
%D%/packages/patches/beets-werkzeug-compat.patch \
%D%/packages/patches/beignet-correct-file-names.patch \
%D%/packages/patches/benchmark-unbundle-googletest.patch \
@@ -787,6 +787,9 @@ dist_patch_DATA = \
%D%/packages/patches/clang-9.0-libc-search-path.patch \
%D%/packages/patches/clang-runtime-asan-build-fixes.patch \
%D%/packages/patches/clang-runtime-esan-build-fixes.patch \
+ %D%/packages/patches/clang-runtime-9-libsanitizer-mode-field.patch \
+ %D%/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch \
+ %D%/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch \
%D%/packages/patches/classpath-aarch64-support.patch \
%D%/packages/patches/clementine-fix-sqlite.patch \
%D%/packages/patches/clementine-remove-crypto++-dependency.patch \
@@ -798,17 +801,22 @@ dist_patch_DATA = \
%D%/packages/patches/combinatorial-blas-awpm.patch \
%D%/packages/patches/combinatorial-blas-io-fix.patch \
%D%/packages/patches/containerd-test-with-go1.13.patch \
+ %D%/packages/patches/coreutils-ls.patch \
%D%/packages/patches/cpufrequtils-fix-aclocal.patch \
%D%/packages/patches/crawl-upgrade-saves.patch \
%D%/packages/patches/crda-optional-gcrypt.patch \
%D%/packages/patches/clucene-contribs-lib.patch \
%D%/packages/patches/cube-nocheck.patch \
+ %D%/packages/patches/curl-use-ssl-cert-env.patch \
%D%/packages/patches/cursynth-wave-rand.patch \
%D%/packages/patches/cvs-CVE-2017-12836.patch \
+ %D%/packages/patches/cyrus-sasl-ac-try-run-fix.patch \
%D%/packages/patches/darkice-workaround-fpermissive-error.patch \
+ %D%/packages/patches/datefudge-gettimeofday.patch \
%D%/packages/patches/dbus-helper-search-path.patch \
%D%/packages/patches/dbus-c++-gcc-compat.patch \
%D%/packages/patches/dbus-c++-threading-mutex.patch \
+ %D%/packages/patches/dconf-meson-0.52.patch \
%D%/packages/patches/debops-constants-for-external-program-names.patch \
%D%/packages/patches/debops-debops-defaults-fall-back-to-less.patch \
%D%/packages/patches/deja-dup-use-ref-keyword-for-iter.patch \
@@ -823,6 +831,7 @@ dist_patch_DATA = \
%D%/packages/patches/docker-fix-tests.patch \
%D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \
%D%/packages/patches/doxygen-test.patch \
+ %D%/packages/patches/doxygen-1.8.17-runtests.patch \
%D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \
%D%/packages/patches/dstat-skip-devices-without-io.patch \
%D%/packages/patches/dvd+rw-tools-add-include.patch \
@@ -862,18 +871,15 @@ dist_patch_DATA = \
%D%/packages/patches/fasthenry-spSolve.patch \
%D%/packages/patches/fasthenry-spFactor.patch \
%D%/packages/patches/fbreader-curl-7.62.patch \
+ %D%/packages/patches/fifengine-swig-compat.patch \
%D%/packages/patches/fifo-map-fix-flags-for-gcc.patch \
%D%/packages/patches/fifo-map-remove-catch.hpp.patch \
- %D%/packages/patches/file-CVE-2018-10360.patch \
- %D%/packages/patches/findutils-gnulib-libio.patch \
%D%/packages/patches/findutils-localstatedir.patch \
- %D%/packages/patches/findutils-makedev.patch \
- %D%/packages/patches/findutils-test-xargs.patch \
+ %D%/packages/patches/findutils-test-rwlock-threads.patch \
%D%/packages/patches/flann-cmake-3.11.patch \
%D%/packages/patches/flint-ldconfig.patch \
%D%/packages/patches/foomatic-filters-CVE-2015-8327.patch \
%D%/packages/patches/foomatic-filters-CVE-2015-8560.patch \
- %D%/packages/patches/fribidi-CVE-2019-18397.patch \
%D%/packages/patches/freeimage-unbundle.patch \
%D%/packages/patches/fuse-overlapping-headers.patch \
%D%/packages/patches/gawk-shell.patch \
@@ -881,13 +887,18 @@ dist_patch_DATA = \
%D%/packages/patches/gcc-arm-link-spec-fix.patch \
%D%/packages/patches/gcc-asan-missing-include.patch \
%D%/packages/patches/gcc-boot-2.95.3.patch \
- %D%/packages/patches/gcc-boot-4.7.4.patch \
+ %D%/packages/patches/gcc-boot-4.6.4.patch \
%D%/packages/patches/gcc-cross-environment-variables.patch \
%D%/packages/patches/gcc-fix-texi2pod.patch \
%D%/packages/patches/gcc-4.8-libsanitizer-fix.patch \
%D%/packages/patches/gcc-4.9-libsanitizer-fix.patch \
%D%/packages/patches/gcc-4.9-libsanitizer-ustat.patch \
%D%/packages/patches/gcc-libsanitizer-ustat.patch \
+ %D%/packages/patches/gcc-4.9-libsanitizer-mode-size.patch \
+ %D%/packages/patches/gcc-6-libsanitizer-mode-size.patch \
+ %D%/packages/patches/gcc-7-libsanitizer-mode-size.patch \
+ %D%/packages/patches/gcc-8-libsanitizer-mode-size.patch \
+ %D%/packages/patches/gcc-9-libsanitizer-mode-size.patch \
%D%/packages/patches/gcc-libvtv-runpath.patch \
%D%/packages/patches/gcc-strmov-store-file-names.patch \
%D%/packages/patches/gcc-4-compile-with-gcc-5.patch \
@@ -925,7 +936,6 @@ dist_patch_DATA = \
%D%/packages/patches/ghostscript-no-header-id.patch \
%D%/packages/patches/ghostscript-no-header-uuid.patch \
%D%/packages/patches/ghostscript-no-header-creationdate.patch \
- %D%/packages/patches/giflib-make-reallocarray-private.patch \
%D%/packages/patches/glib-tests-timer.patch \
%D%/packages/patches/glibc-CVE-2015-5180.patch \
%D%/packages/patches/glibc-CVE-2015-7547.patch \
@@ -939,6 +949,7 @@ dist_patch_DATA = \
%D%/packages/patches/glibc-CVE-2018-11237.patch \
%D%/packages/patches/glibc-CVE-2019-7309.patch \
%D%/packages/patches/glibc-CVE-2019-9169.patch \
+ %D%/packages/patches/glibc-CVE-2019-19126.patch \
%D%/packages/patches/glibc-allow-kernel-2.6.32.patch \
%D%/packages/patches/glibc-boot-2.16.0.patch \
%D%/packages/patches/glibc-boot-2.2.5.patch \
@@ -958,6 +969,7 @@ dist_patch_DATA = \
%D%/packages/patches/glibc-2.29-git-updates.patch \
%D%/packages/patches/glibc-2.27-supported-locales.patch \
%D%/packages/patches/glibc-2.28-supported-locales.patch \
+ %D%/packages/patches/glibc-2.29-supported-locales.patch \
%D%/packages/patches/glibc-supported-locales.patch \
%D%/packages/patches/glm-restore-install-target.patch \
%D%/packages/patches/gmp-arm-asm-nothumb.patch \
@@ -976,7 +988,6 @@ dist_patch_DATA = \
%D%/packages/patches/grep-timing-sensitive-test.patch \
%D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \
%D%/packages/patches/grub-efi-fat-serial-number.patch \
- %D%/packages/patches/gsl-test-i686.patch \
%D%/packages/patches/gspell-dash-test.patch \
%D%/packages/patches/guile-1.8-cpp-4.5.patch \
%D%/packages/patches/guile-2.2-default-utf8.patch \
@@ -989,6 +1000,7 @@ dist_patch_DATA = \
%D%/packages/patches/guile-relocatable.patch \
%D%/packages/patches/guile-rsvg-pkgconfig.patch \
%D%/packages/patches/guile-emacs-fix-configure.patch \
+ %D%/packages/patches/guile-sqlite3-fix-cross-compilation.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
%D%/packages/patches/gtk2-theme-paths.patch \
@@ -1043,7 +1055,6 @@ dist_patch_DATA = \
%D%/packages/patches/java-xerces-bootclasspath.patch \
%D%/packages/patches/java-xerces-build_dont_unzip.patch \
%D%/packages/patches/java-xerces-xjavac_taskdef.patch \
- %D%/packages/patches/jbig2dec-ignore-testtest.patch \
%D%/packages/patches/jfsutils-add-sysmacros.patch \
%D%/packages/patches/jfsutils-include-systypes.patch \
%D%/packages/patches/jsoncpp-fix-inverted-case.patch \
@@ -1102,9 +1113,6 @@ dist_patch_DATA = \
%D%/packages/patches/libgit2-mtime-0.patch \
%D%/packages/patches/libgnome-encoding.patch \
%D%/packages/patches/libgnomeui-utf8.patch \
- %D%/packages/patches/libgpg-error-gawk-compat.patch \
- %D%/packages/patches/libffi-3.2.1-complex-alpha.patch \
- %D%/packages/patches/libjpeg-turbo-CVE-2019-2201.patch \
%D%/packages/patches/libjxr-fix-function-signature.patch \
%D%/packages/patches/libjxr-fix-typos.patch \
%D%/packages/patches/libotr-test-auth-fix.patch \
@@ -1163,7 +1171,6 @@ dist_patch_DATA = \
%D%/packages/patches/luminance-hdr-qt-printer.patch \
%D%/packages/patches/lvm2-static-link.patch \
%D%/packages/patches/lxsession-use-gapplication.patch \
- %D%/packages/patches/make-glibc-compat.patch \
%D%/packages/patches/make-impure-dirs.patch \
%D%/packages/patches/mariadb-client-test-32bit.patch \
%D%/packages/patches/mars-install.patch \
@@ -1183,6 +1190,7 @@ dist_patch_DATA = \
%D%/packages/patches/mingw-w64-6.0.0-gcc.patch \
%D%/packages/patches/minisat-friend-declaration.patch \
%D%/packages/patches/minisat-install.patch \
+ %D%/packages/patches/mit-krb5-qualify-short-hostnames.patch \
%D%/packages/patches/mpc123-initialize-ao.patch \
%D%/packages/patches/module-init-tools-moduledir.patch \
%D%/packages/patches/monero-use-system-miniupnpc.patch \
@@ -1255,6 +1263,7 @@ dist_patch_DATA = \
%D%/packages/patches/p7zip-CVE-2017-17969.patch \
%D%/packages/patches/p7zip-remove-unused-code.patch \
%D%/packages/patches/pam-mount-luks2-support.patch \
+ %D%/packages/patches/pango-skip-libthai-test.patch \
%D%/packages/patches/sdl-pango-api_additions.patch \
%D%/packages/patches/sdl-pango-blit_overflow.patch \
%D%/packages/patches/sdl-pango-fillrect_crash.patch \
@@ -1319,13 +1328,12 @@ dist_patch_DATA = \
%D%/packages/patches/python-3-deterministic-build-info.patch \
%D%/packages/patches/python-3-search-paths.patch \
%D%/packages/patches/python-3-fix-tests.patch \
- %D%/packages/patches/python-3.8-search-paths.patch \
%D%/packages/patches/python-3.8-fix-tests.patch \
%D%/packages/patches/python-CVE-2018-14647.patch \
%D%/packages/patches/python-alembic-exceptions-cause.patch \
%D%/packages/patches/python-axolotl-AES-fix.patch \
%D%/packages/patches/python-cairocffi-dlopen-path.patch \
- %D%/packages/patches/python-cffi-x87-stack-clean.patch \
+ %D%/packages/patches/python-cross-compile.patch \
%D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
%D%/packages/patches/python-configobj-setuptools.patch \
%D%/packages/patches/python-faker-fix-build-32bit.patch \
@@ -1418,7 +1426,6 @@ dist_patch_DATA = \
%D%/packages/patches/superlu-dist-awpm-grid.patch \
%D%/packages/patches/superlu-dist-scotchmetis.patch \
%D%/packages/patches/supertux-unbundle-squirrel.patch \
- %D%/packages/patches/swig-guile-gc.patch \
%D%/packages/patches/swish-e-search.patch \
%D%/packages/patches/swish-e-format-security.patch \
%D%/packages/patches/symmetrica-bruch.patch \
@@ -1433,13 +1440,14 @@ dist_patch_DATA = \
%D%/packages/patches/tar-skip-unreliable-tests.patch \
%D%/packages/patches/tcc-boot-0.9.27.patch \
%D%/packages/patches/tclxml-3.2-install.patch \
+ %D%/packages/patches/tcl-fix-cross-compilation.patch \
%D%/packages/patches/tcsh-fix-autotest.patch \
- %D%/packages/patches/tcsh-fix-out-of-bounds-read.patch \
%D%/packages/patches/teensy-loader-cli-help.patch \
%D%/packages/patches/texinfo-5-perl-compat.patch \
- %D%/packages/patches/texlive-bin-CVE-2018-17407.patch \
- %D%/packages/patches/texlive-bin-luatex-poppler-compat.patch \
+ %D%/packages/patches/texlive-bin-poppler-0.83.patch \
+ %D%/packages/patches/texlive-bin-poppler-0.86.patch \
%D%/packages/patches/telegram-purple-adjust-test.patch \
+ %D%/packages/patches/telepathy-glib-channel-memory-leak.patch \
%D%/packages/patches/texi2html-document-encoding.patch \
%D%/packages/patches/texi2html-i18n.patch \
%D%/packages/patches/thefuck-test-environ.patch \
@@ -1476,6 +1484,7 @@ dist_patch_DATA = \
%D%/packages/patches/vboot-utils-fix-format-load-address.patch \
%D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \
%D%/packages/patches/vboot-utils-skip-test-workbuf.patch \
+ %D%/packages/patches/vigra-python-compat.patch \
%D%/packages/patches/vinagre-newer-freerdp.patch \
%D%/packages/patches/vinagre-newer-rdp-parameters.patch \
%D%/packages/patches/virglrenderer-CVE-2017-6386.patch \
@@ -1519,5 +1528,4 @@ dist_patch_DATA = \
%D%/packages/patches/zziplib-CVE-2018-16548.patch
MISC_DISTRO_FILES = \
- %D%/packages/ld-wrapper.in \
- %D%/packages/ld-wrapper-next.in
+ %D%/packages/ld-wrapper.in
diff --git a/gnu/packages/abiword.scm b/gnu/packages/abiword.scm
index 2b65a02242..9cfd12a1e6 100644
--- a/gnu/packages/abiword.scm
+++ b/gnu/packages/abiword.scm
@@ -95,7 +95,7 @@
("libchamplain" ,libchamplain)
("libglade" ,libglade)
("libgsf" ,libgsf)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
("librsvg" ,librsvg)
("libxml2" ,libxml2)
diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm
index 0131adcac4..bcab125164 100644
--- a/gnu/packages/acl.scm
+++ b/gnu/packages/acl.scm
@@ -48,6 +48,7 @@
(arguments
`(#:modules ((ice-9 ftw)
,@%gnu-build-system-modules)
+ #:configure-flags '("--disable-static")
#:phases
(modify-phases %standard-phases
;; XXX After repacking the sources the timestamps are reset to the
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 9b1844f36d..3d24e039d7 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -29,7 +29,7 @@
;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
-;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -211,10 +211,10 @@ and provides a \"top-like\" mode (monitoring).")
`(("pkg-config" ,pkg-config)
;; This is the Guile we use as a cross-compiler...
- ("guile" ,guile-2.2.7)))
+ ("guile" ,guile-3.0)))
(inputs
;; ... and this is the one that appears in shebangs when cross-compiling.
- `(("guile" ,guile-2.2.7) ;for <https://bugs.gnu.org/37757>
+ `(("guile" ,guile-3.0)
;; The 'shepherd' command uses Readline when used interactively. It's
;; an unusual use case though, so we don't propagate it.
@@ -228,15 +228,18 @@ interface and is based on GNU Guile.")
(license license:gpl3+)
(home-page "https://www.gnu.org/software/shepherd/")))
-(define-public guile3.0-shepherd
+(define-public guile2.2-shepherd
(package
(inherit shepherd)
- (name "guile3.0-shepherd")
+ (name "guile2.2-shepherd")
(native-inputs
`(("pkg-config" ,pkg-config)
- ("guile" ,guile-next)))
+ ("guile" ,guile-2.2)))
(inputs
- `(("guile" ,guile-next)))))
+ `(("guile" ,guile-2.2)))))
+
+(define-public guile3.0-shepherd
+ (deprecated-package "guile3.0-shepherd" shepherd))
(define-public cloud-utils
(package
@@ -531,13 +534,17 @@ login, passwd, su, groupadd, and useradd.")
`(#:phases
(modify-phases %standard-phases
(replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs target #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(man8 (string-append out "/share/man/man8"))
(sbin (string-append out "/sbin"))
(shadow (assoc-ref inputs "shadow"))
(login (string-append shadow "/bin/login")))
(substitute* "Makefile"
+ ,@(if (%current-target-system)
+ '((("CC=.*$")
+ (string-append "CC=" target "-gcc\n")))
+ '())
(("^SBINDIR.*")
(string-append "SBINDIR = " out
"/sbin\n"))
@@ -1710,12 +1717,12 @@ characters can be replaced as well, as can UTF-8 characters.")
(build-system gnu-build-system)
(inputs
`(("ntfs-3g" ,ntfs-3g)
- ("util-linux" ,util-linux)
+ ("util-linux" ,util-linux "lib")
("openssl" ,openssl)
;; FIXME: add reiserfs.
("zlib" ,zlib)
("e2fsprogs" ,e2fsprogs)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("ncurses" ,ncurses)))
(home-page "https://www.cgsecurity.org/wiki/TestDisk")
(synopsis "Data recovery tool")
@@ -2838,14 +2845,7 @@ buffers.")
(base32 "1gpdjs5aj6vsnzwcjvw5bb120lgffvvshi4202phr0bzw3b92ky8"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ; many of the tests try to load kernel modules
- #:phases
- (modify-phases %standard-phases
- (replace 'bootstrap
- (lambda _
- ;; Don't run configure in this phase.
- (setenv "NOCONFIGURE" "1")
- (invoke "sh" "autogen.sh"))))))
+ `(#:tests? #f)) ; many of the tests try to load kernel modules
(inputs
`(("cairo" ,cairo)
("elfutils" ,elfutils) ; libdw
@@ -3588,6 +3588,7 @@ tcpdump and snoop.")
("lvm2" ,lvm2)
("openssl" ,openssl)
("pcre" ,pcre)
+ ("libmount" ,util-linux "lib")
("util-linux" ,util-linux)))
(arguments
`(#:configure-flags
diff --git a/gnu/packages/adns.scm b/gnu/packages/adns.scm
index 541612d41a..5d8c6fdc91 100644
--- a/gnu/packages/adns.scm
+++ b/gnu/packages/adns.scm
@@ -62,7 +62,7 @@ scripts.")
(define-public c-ares
(package
(name "c-ares")
- (version "1.15.0")
+ (version "1.16.0")
(source (origin
(method url-fetch)
(uri (string-append
@@ -70,7 +70,7 @@ scripts.")
".tar.gz"))
(sha256
(base32
- "0lk8knip4xk6qzksdkn7085mmgm4ixfczdyyjw656c193y3rgnvc"))))
+ "129sm0wzij0mp8vdv68v18hnykcjb6ivi66wnqnnw598q7bql1fy"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 8682ecd8d0..e2e26c8c25 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;;
;;; This file is part of GNU Guix.
@@ -405,7 +406,7 @@ precision.")
("gsl" ,gsl)
("lapack" ,lapack)
("libao" ,ao)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
("libsamplerate" ,libsamplerate)
("libx11" ,libx11)
@@ -683,15 +684,23 @@ binary.")
(uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
(sha256
(base32
- "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))))
+ "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))
+ (patches (search-patches "bc-fix-cross-compilation.patch"))))
(build-system gnu-build-system)
(native-inputs
- `(("ed" ,ed)
+ `(("automake" ,automake)
+ ("autoconf" ,autoconf)
+ ("ed" ,ed)
("flex" ,flex)
("texinfo" ,texinfo)))
(arguments
'(#:configure-flags
- (list "--with-readline")))
+ (list "--with-readline")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'autogen
+ (lambda _
+ (invoke "autoreconf" "-vif"))))))
(home-page "https://www.gnu.org/software/bc/")
(synopsis "Arbitrary precision numeric processing language")
(description
@@ -1210,15 +1219,6 @@ objects.")
("libtool" ,libtool)))
(propagated-inputs
`(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'bootstrap 'setenv
- ;; Prevent the autogen.sh script to carry out the configure
- ;; script, which has not yet been patched to replace /bin/sh.
- (lambda _
- (setenv "NOCONFIGURE" "yes")
- #t)))))
(synopsis "Algebraic computations with exact rings and fields")
(description
"Givaro is a C++ library implementing the basic arithmetic of various
@@ -1257,15 +1257,7 @@ compound objects, such as vectors, matrices and univariate polynomials.")
`(#:configure-flags
(list (string-append "--with-blas-libs="
(assoc-ref %build-inputs "openblas")
- "/lib/libopenblas.so"))
- #:phases
- (modify-phases %standard-phases
- (add-before 'bootstrap 'setenv
- ;; Prevent the autogen.sh script to carry out the configure
- ;; script, which has not yet been patched to replace /bin/sh.
- (lambda _
- (setenv "NOCONFIGURE" "yes")
- #t)))))
+ "/lib/libopenblas.so"))))
(synopsis "C++ library for linear algebra over finite fields")
(description
"FFLAS-FFPACK is a C++ template library for basic linear algebra
@@ -1301,15 +1293,6 @@ algebra, such as the row echelon form.")
("pkg-config" ,pkg-config)))
(inputs
`(("fflas-ffpack" ,fflas-ffpack)))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'bootstrap 'setenv
- ;; Prevent the autogen.sh script to carry out the configure
- ;; script, which has not yet been patched to replace /bin/sh.
- (lambda _
- (setenv "NOCONFIGURE" "yes")
- #t)))))
(synopsis "C++ library for linear algebra over exact rings")
(description
"LinBox is a C++ template library for exact linear algebra computation
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 17f5f41fcb..68bcb72e69 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -840,7 +840,7 @@ script that you can put anywhere in your path.")
(install-file "abootimg" bin)
#t))))))
(inputs
- `(("libblkid" ,util-linux)))
+ `(("libblkid" ,util-linux "lib")))
(home-page "https://ac100.grandou.net/abootimg")
(synopsis "Tool for manipulating Android Boot Images")
(description "This package provides a tool for manipulating old Android
diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
index 08bf4eb1de..0357ac1190 100644
--- a/gnu/packages/animation.scm
+++ b/gnu/packages/animation.scm
@@ -112,7 +112,7 @@ C++ @dfn{Standard Template Library} (STL).")
`(("boost" ,boost)
("ffmpeg" ,ffmpeg)
("libdv" ,libdv)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
("libmng" ,libmng)
("zlib" ,zlib)))
diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
index db472efec5..e3f8b60aea 100644
--- a/gnu/packages/arcan.scm
+++ b/gnu/packages/arcan.scm
@@ -216,13 +216,7 @@ engine programmable using Lua.")
(assoc-ref %build-inputs "xkbcomp")
"/bin")
,(string-append "--with-xkb-output="
- "/tmp")) ; FIXME: Copied from xorg
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'noconfigure
- (lambda _
- (setenv "NOCONFIGURE" "true")
- #t)))))
+ "/tmp")))) ; FIXME: Copied from xorg
(native-inputs
`(("pkg-config" ,pkg-config)
("autoconf" ,autoconf)
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index b11a2dbe6b..fecc9a89ae 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
@@ -39,7 +39,7 @@
(define-public aspell
(package
(name "aspell")
- (version "0.60.6.1")
+ (version "0.60.8")
(source
(origin
(method url-fetch)
@@ -47,9 +47,8 @@
version ".tar.gz"))
(sha256
(base32
- "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))
- (patches (search-patches "aspell-default-dict-dir.patch"
- "aspell-gcc-compat.patch"))))
+ "1wi60ankalmh8ds7nplz434jd7j94gdvbahdwsr539rlad8pxdzr"))
+ (patches (search-patches "aspell-default-dict-dir.patch"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -66,14 +65,6 @@
(("\"filter-path(.*)DICT_DIR" _ middle)
(string-append "\"filter-path" middle
"\"" libdir "\"")))
- #t)))
- (add-after 'install 'wrap-aspell
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((bin/aspell (string-append (assoc-ref outputs "out")
- "/bin/aspell")))
- (wrap-program bin/aspell
- '("ASPELL_CONF" "" =
- ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))
#t))))))
(inputs `(("perl" ,perl)))
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 3bb236fde9..2ac41e17a0 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -132,7 +132,7 @@ header.")
(inputs
`(("cfitsio" ,cfitsio)
("gsl" ,gsl)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("libtiff" ,libtiff)
("wcslib" ,wcslib)
("zlib" ,zlib)))
@@ -218,7 +218,7 @@ objects.")
`(("glu" ,glu)
("glew" ,glew)
("libtheora" ,libtheora)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
;; maybe required?
("mesa" ,mesa)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 6880e74cce..5772547e3e 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -1583,7 +1583,7 @@ especially for creating reverb effects. It supports impulse responses with 1,
;; uuid.h is included in the JACK type headers
;; db.h is included in the libjack metadata headers
(propagated-inputs
- `(("libuuid" ,util-linux)
+ `(("libuuid" ,util-linux "lib")
("bdb" ,bdb)))
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -2446,13 +2446,6 @@ tempo and pitch of an audio recording independently of one another.")
(base32
"1k962ljpnwyjw9jjiky2372khhri1wqvrj5qsalfpys31xqzw31p"))))
(build-system gnu-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'bootstrap 'noconfigure
- (lambda _
- (setenv "NOCONFIGURE" "yes")
- #t)))))
(inputs
`(("jack" ,jack-1)
("alsa-lib" ,alsa-lib)))
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 62e0b9291f..f12428140d 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -353,21 +354,22 @@ Makefile, simplifying the entire process for the developer.")
;; XXX: There are test failures on mips64el-linux starting from 2.4.4:
;; <http://hydra.gnu.org/build/181662>.
- #:tests? ,(not (string-prefix? "mips64"
- (or (%current-target-system)
+ ;; Also, do not run tests when cross compiling
+ #:tests? ,(not (or (%current-target-system)
+ (string-prefix? "mips64"
(%current-system))))
#:phases
(modify-phases %standard-phases
(add-before 'check 'pre-check
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
;; Run the test suite in parallel, if possible.
(setenv "TESTSUITEFLAGS"
(string-append
"-j"
(number->string (parallel-job-count))))
;; Patch references to /bin/sh.
- (let ((bash (assoc-ref inputs "bash")))
+ (let ((bash (assoc-ref (or native-inputs inputs) "bash")))
(substitute* "tests/testsuite"
(("/bin/sh")
(string-append bash "/bin/sh")))
diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm
index ba609cf12e..602f9d7997 100644
--- a/gnu/packages/avahi.scm
+++ b/gnu/packages/avahi.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -25,17 +26,18 @@
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages dbm)
+ #:use-module (gnu packages gettext)
+ #:use-module (gnu packages glib)
#:use-module (gnu packages libdaemon)
+ #:use-module (gnu packages libevent)
#:use-module (gnu packages linux)
#:use-module (gnu packages pkg-config)
- #:use-module (gnu packages glib)
#:use-module (gnu packages xml))
(define-public avahi
(package
(name "avahi")
- (version "0.7")
- (replacement avahi/fixed)
+ (version "0.8")
(home-page "https://avahi.org")
(source (origin
(method url-fetch)
@@ -43,29 +45,40 @@
version ".tar.gz"))
(sha256
(base32
- "0128n7jlshw4bpx0vg8lwj8qwdisjxi7mvniwfafgnkzzrfrpaap"))
- (patches (search-patches "avahi-localstatedir.patch"))))
+ "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6"))
+ (patches (search-patches "avahi-localstatedir.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Fix version constraint in the avahi-libevent pkg-config file.
+ ;; This can be removed for Avahi versions > 0.8.
+ (substitute* "avahi-libevent.pc.in"
+ (("libevent-2\\.1\\.5")
+ "libevent >= 2.1.5"))
+ #t))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--with-distro=none"
+ "--disable-static"
"--localstatedir=/var" ; for the DBus socket
"--disable-python"
"--disable-mono"
"--disable-doxygen-doc"
"--disable-xmltoman"
"--enable-tests"
- "--disable-qt3" "--disable-qt4"
+ "--disable-qt4" "--disable-qt5"
"--disable-gtk" "--disable-gtk3"
"--enable-compat-libdns_sd")))
(inputs
- `(("expat" ,expat)
- ("glib" ,glib)
- ("dbus" ,dbus)
+ `(("dbus" ,dbus)
+ ("expat" ,expat)
("gdbm" ,gdbm)
+ ("glib" ,glib)
("libcap" ,libcap) ;to enable chroot support in avahi-daemon
- ("libdaemon" ,libdaemon)))
+ ("libdaemon" ,libdaemon)
+ ("libevent" ,libevent)))
(native-inputs
- `(("intltool" ,intltool)
+ `(("gettext" ,gettext-minimal)
("glib" ,glib "bin")
("pkg-config" ,pkg-config)))
(synopsis "Implementation of mDNS/DNS-SD protocols")
@@ -75,17 +88,6 @@ network. It is an implementation of the mDNS (for \"Multicast DNS\") and
DNS-SD (for \"DNS-Based Service Discovery\") protocols.")
(license lgpl2.1+)))
-(define avahi/fixed
- (package
- (inherit avahi)
- (source (origin
- (inherit (package-source avahi))
- (patches
- (append (search-patches "avahi-CVE-2018-1000845.patch")
- (origin-patches (package-source avahi))))))
- ;; Hide a duplicate of the CVE fixed above.
- (properties `((lint-hidden-cve . ("CVE-2017-6519"))))))
-
(define-public nss-mdns
(package
(name "nss-mdns")
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index b18dbf30f0..f12a02af4b 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -199,18 +200,18 @@ backups (called chunks) to allow easy burning to CD/DVD.")
(define-public libarchive
(package
(name "libarchive")
- (version "3.4.0")
+ (version "3.4.2")
(source
(origin
(method url-fetch)
(uri (list (string-append "https://libarchive.org/downloads/libarchive-"
- version ".tar.gz")
+ version ".tar.xz")
(string-append "https://github.com/libarchive/libarchive"
"/releases/download/v" version "/libarchive-"
- version ".tar.gz")))
+ version ".tar.xz")))
(sha256
(base32
- "0pl25mmz1b1cnwf35kxmygyy9g7z7hslxbx329a9yx8csh7dahw6"))))
+ "18dd01ahs2hv74xm7axjc3yhq839p0x0s4vssvlmm8fknja09qfq"))))
(build-system gnu-build-system)
(inputs
`(("bzip2" ,bzip2)
@@ -230,24 +231,34 @@ backups (called chunks) to allow easy burning to CD/DVD.")
(("/bin/pwd") (which "pwd")))
#t))
(replace 'check
- (lambda _
- ;; XXX: The test_owner_parse, test_read_disk, and
- ;; test_write_disk_lookup tests expect user 'root' to exist, but
- ;; the chroot's /etc/passwd doesn't have it. Turn off those tests.
- ;;
- ;; XXX: Adjust test that fails with zstd 1.4.1 because the default
- ;; options compresses two bytes better than this test expects.
- ;; https://github.com/libarchive/libarchive/issues/1226
- (substitute* "libarchive/test/test_write_filter_zstd.c"
- (("compression-level\", \"6\"")
- "compression-level\", \"7\""))
-
- ;; The tests allow one to disable tests matching a globbing pattern.
- (invoke "make" "libarchive_test" "bsdcpio_test" "bsdtar_test")
- ;; XXX: This glob disables too much.
- (invoke "./libarchive_test" "^test_*_disk*")
- (invoke "./bsdcpio_test" "^test_owner_parse")
- (invoke "./bsdtar_test")))
+ (lambda* (#:key (tests? #t) #:allow-other-keys)
+ (if tests?
+ ;; XXX: The test_owner_parse, test_read_disk, and
+ ;; test_write_disk_lookup tests expect user 'root' to
+ ;; exist, but the chroot's /etc/passwd doesn't have
+ ;; it. Turn off those tests.
+ ;;
+ ;; XXX: Adjust test that fails with zstd 1.4.1
+ ;; because the default options compresses two bytes
+ ;; better than this test expects.
+ ;; https://github.com/libarchive/libarchive/issues/1226
+ (begin
+ (substitute* "libarchive/test/test_write_filter_zstd.c"
+ (("compression-level\", \"6\"")
+ "compression-level\", \"7\""))
+
+ ;; The tests allow one to disable tests matching a globbing pattern.
+ (invoke "make"
+ "libarchive_test"
+ "bsdcpio_test"
+ "bsdtar_test")
+
+ ;; XXX: This glob disables too much.
+ (invoke "./libarchive_test" "^test_*_disk*")
+ (invoke "./bsdcpio_test" "^test_owner_parse")
+ (invoke "./bsdtar_test"))
+ ;; Tests may be disabled if cross-compiling.
+ (format #t "Test suite not run.~%"))))
(add-after 'install 'add--L-in-libarchive-pc
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index e8150708c0..196106fa29 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1,16 +1,16 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2019 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
-;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2016, 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016, 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
-;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
@@ -92,14 +92,14 @@ command-line arguments, multiple languages, and so on.")
(define-public grep
(package
(name "grep")
- (version "3.3")
+ (version "3.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/grep/grep-"
version ".tar.xz"))
(sha256
(base32
- "055mqp6vrd0brkygmygb2673qwz409a7kyp1mzbfy6cn94f58q5r"))
+ "1yy33kiwrxrwj2nxa4fg15bvmwyghqbs8qwkdvy5phm784f7brjq"))
(patches (search-patches "grep-timing-sensitive-test.patch"))))
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl))) ;some of the tests require it
@@ -133,14 +133,14 @@ including, for example, recursive directory searching.")
(define-public sed
(package
(name "sed")
- (version "4.7")
+ (version "4.8")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/sed/sed-" version
- ".tar.xz"))
+ ".tar.gz"))
(sha256
(base32
- "0smxcx66vx29djzb542nxcynl7qnzxqa5032ibazi7x2s267d198"))))
+ "0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk"))))
(build-system gnu-build-system)
(synopsis "Stream editor")
(native-inputs
@@ -253,40 +253,29 @@ interactive means to merge two files.")
(define-public findutils
(package
(name "findutils")
- (version "4.6.0")
+ (version "4.7.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/findutils/findutils-"
- version ".tar.gz"))
+ version ".tar.xz"))
(sha256
(base32
- "178nn4dl7wbcw499czikirnkniwnx36argdnqgz4ik9i6zvwkm6y"))
- (patches (search-patches
- "findutils-gnulib-libio.patch"
- "findutils-localstatedir.patch"
- "findutils-makedev.patch"
- "findutils-test-xargs.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; The gnulib test-lock test is prone to writer starvation
- ;; with our glibc@2.25, which prefers readers, so disable it.
- ;; The gnulib commit b20e8afb0b2 should fix this once
- ;; incorporated here.
- (substitute* "tests/Makefile.in"
- (("test-lock\\$\\(EXEEXT\\) ") ""))
- #t))))
+ "16kqz9yz98dasmj70jwf5py7jk558w96w0vgp3zf9xsqk3gzpzn5"))
+ (patches (search-patches "findutils-localstatedir.patch"
+ "findutils-test-rwlock-threads.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags (list
;; Tell 'updatedb' to write to /var.
- "--localstatedir=/var"
-
- ;; Work around cross-compilation failure. See
- ;; <http://savannah.gnu.org/bugs/?27299#comment1>.
- ,@(if (%current-target-system)
- '("gl_cv_func_wcwidth_works=yes")
- '()))))
+ "--localstatedir=/var")
+ #:phases (modify-phases %standard-phases
+ (add-before 'check 'adjust-test-shebangs
+ (lambda _
+ (substitute* '("tests/xargs/verbose-quote.sh"
+ "tests/find/exec-plus-last-file.sh")
+ (("#!/bin/sh")
+ (string-append "#!" (which "sh"))))
+ #t)))))
(synopsis "Operating on files matching given criteria")
(description
"Findutils supplies the basic file directory searching utilities of the
@@ -301,23 +290,26 @@ used to apply commands with arbitrarily long arguments.")
(define-public coreutils
(package
(name "coreutils")
- (version "8.31")
+ (version "8.32")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/coreutils/coreutils-"
version ".tar.xz"))
(sha256
(base32
- "1zg9m79x1i2nifj4kb0waf9x3i5h6ydkypkjnbsb9rnwis8rqypz"))))
+ "1yjcrh5hw70c0yn8zw55pd6j51dj90anpq8mmg649ps9g3gdhn24"))
+ (patches (search-patches "coreutils-ls.patch"))))
(build-system gnu-build-system)
(inputs `(("acl" ,acl) ; TODO: add SELinux
("gmp" ,gmp) ;bignums in 'expr', yay!
- ;; Drop the dependency on libcap when cross-compiling since it's
- ;; not quite cross-compilable.
- ,@(if (%current-target-system)
- '()
- `(("libcap" ,libcap))))) ;capability support is 'ls', etc.
+ ;; Do not use libcap when cross-compiling since it's not quite
+ ;; cross-compilable; and use it only for supported systems.
+ ,@(if (and (not (%current-target-system))
+ (not (member (%current-system)
+ (package-supported-systems libcap))))
+ `(("libcap" ,libcap)) ;capability support in 'ls', etc.
+ '())))
(native-inputs
;; Perl is needed to run tests in native builds, and to run the bundled
;; copy of help2man. However, don't pass it when cross-compiling since
@@ -340,16 +332,6 @@ used to apply commands with arbitrarily long arguments.")
(("/bin/sh") (which "sh")))
(substitute* (find-files "tests" "\\.sh$")
(("#!/bin/sh") (string-append "#!" (which "sh"))))
- #t))
- (add-before 'check 'disable-broken-test
- (lambda _
- ;; This test hits the 127 character shebang limit in the build
- ;; environment due to the way "env -S" splits arguments into
- ;; shebangs. Note that "env-S-script.sh" works around this
- ;; specific issue, but "env-S.pl" is not adjusted for build
- ;; environments with long prefixes (/tmp/guix-build-...).
- (substitute* "Makefile"
- (("^.*tests/misc/env-S.pl.*$") ""))
#t)))))
(synopsis "Core GNU utilities (file, text, shell)")
(description
@@ -371,31 +353,27 @@ functionality beyond that which is outlined in the POSIX standard.")
(define-public gnu-make
(package
(name "make")
- (version "4.2.1")
+ (version "4.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/make/make-" version
- ".tar.bz2"))
+ ".tar.gz"))
(sha256
(base32
- "12f5zzyq2w56g95nni65hc0g5p7154033y2f3qmjvd016szn5qnn"))
- (patches (search-patches "make-impure-dirs.patch"
- "make-glibc-compat.patch"))))
+ "06cfqzpqsvdnsxbysl5p2fgdgxgl9y4p7scpnrfa8z2zgkjdspz0"))
+ (patches (search-patches "make-impure-dirs.patch"))))
(build-system gnu-build-system)
(native-inputs `(("pkg-config" ,pkg-config))) ; to detect Guile
- (inputs `(("guile" ,guile-2.0)))
+ (inputs `(("guile" ,guile-3.0)))
(outputs '("out" "debug"))
(arguments
- '(;; Work around faulty glob detection with glibc 2.27. See
- ;; <https://lists.nongnu.org/archive/html/bug-make/2017-11/msg00027.html>.
- #:configure-flags '("make_cv_sys_gnu_glob=yes")
- #:phases
+ '(#:phases
(modify-phases %standard-phases
(add-before 'build 'set-default-shell
(lambda* (#:key inputs #:allow-other-keys)
;; Change the default shell from /bin/sh.
(let ((bash (assoc-ref inputs "bash")))
- (substitute* "job.c"
+ (substitute* "src/job.c"
(("default_shell =.*$")
(format #f "default_shell = \"~a/bin/sh\";\n"
bash)))
@@ -414,14 +392,14 @@ change. GNU make offers many powerful extensions over the standard utility.")
(define-public binutils
(package
(name "binutils")
- (version "2.32")
+ (version "2.34")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/binutils/binutils-"
version ".tar.bz2"))
(sha256
(base32
- "0b8767nyal1bc4cyzg5h9iis8kpkln1i3wkamig75cifj1fb2f6y"))
+ "1rin1f5c7wm4n3piky6xilcrpf2s0n3dd5vqq8irrxkcic3i1w49"))
(patches (search-patches "binutils-loongson-workaround.patch"))))
(build-system gnu-build-system)
@@ -446,7 +424,17 @@ change. GNU make offers many powerful extensions over the standard utility.")
;; Make sure 'ar' and 'ranlib' produce archives in a
;; deterministic fashion.
- "--enable-deterministic-archives")))
+ "--enable-deterministic-archives")
+
+ ;; XXX: binutils 2.34 was mistakenly released without generated manuals:
+ ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=25491>. To avoid a
+ ;; circular dependency on texinfo, prevent the build system from creating
+ ;; the manuals by calling "true" instead of "makeinfo"...
+ #:make-flags '("MAKEINFO=true")))
+
+ ;; ...and "hide" this package so that users who install binutils get the
+ ;; version with documentation defined below.
+ (properties '((hidden? . #t)))
(synopsis "Binary utilities: bfd gas gprof ld")
(description
@@ -459,6 +447,37 @@ included.")
(license gpl3+)
(home-page "https://www.gnu.org/software/binutils/")))
+;; Work around a problem with binutils 2.34 whereby manuals are missing from
+;; the release tarball. Remove this and the related code above when updating.
+(define-public binutils+documentation
+ (package/inherit
+ binutils
+ (native-inputs
+ `(("texinfo" ,texinfo)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments binutils)
+ ((#:make-flags _ ''()) ''())))
+ (properties '())))
+
+;; FIXME: ath9k-firmware-htc-binutils.patch do not apply on 2.34 because of a
+;; big refactoring of xtensa-modules.c (commit 567607c11fbf7105 upstream).
+;; Keep this version around until the patch is updated.
+(define-public binutils-2.33
+ (package/inherit
+ binutils
+ (version "2.33.1")
+ (source (origin
+ (inherit (package-source binutils))
+ (uri (string-append "mirror://gnu/binutils/binutils-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "1cmd0riv37bqy9mwbg6n3523qgr8b3bbm5kwj19sjrasl4yq9d0c"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments binutils)
+ ((#:make-flags _ ''()) ''())))
+ (properties '())))
+
(define-public binutils-gold
(package
(inherit binutils)
@@ -527,7 +546,9 @@ wrapper for the cross-linker for that target, called 'TARGET-ld'."
'(string-append bin "/ld")))
(go (string-append ld ".go")))
- (setvbuf (current-output-port) _IOLBF)
+ (setvbuf (current-output-port)
+ (cond-expand (guile-2.0 _IOLBF)
+ (else 'line)))
(format #t "building ~s/bin/ld wrapper in ~s~%"
(assoc-ref %build-inputs "binutils")
out)
@@ -567,13 +588,13 @@ the store.")
;; version 2.28, GNU/Hurd used a different glibc branch.
(package
(name "glibc")
- (version "2.29")
+ (version "2.31")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
(sha256
(base32
- "0jzh58728flfh939a8k9pi1zdyalfzlxmwra7k0rzji5gvavivpk"))
+ "05zxkyz9bv3j9h0xyid1rhvh3klhsmrpkf3bcs6frvlgyr2gwilj"))
(snippet
;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is
;; required on LFS distros to avoid loading the distro's libc.so
@@ -585,9 +606,6 @@ the store.")
#t))
(modules '((guix build utils)))
(patches (search-patches "glibc-ldd-x86_64.patch"
- "glibc-CVE-2019-7309.patch"
- "glibc-CVE-2019-9169.patch"
- "glibc-2.29-git-updates.patch"
"glibc-hidden-visibility-ldconfig.patch"
"glibc-versioned-locpath.patch"
"glibc-allow-kernel-2.6.32.patch"
@@ -819,6 +837,44 @@ with the Linux kernel.")
;; Below are old libc versions, which we use mostly to build locale data in
;; the old format (which the new libc cannot cope with.)
+(define-public glibc-2.30
+ (package
+ (inherit glibc)
+ (version "2.30")
+ (source (origin
+ (inherit (package-source glibc))
+ (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1bxqpg91d02qnaz837a5kamm0f43pr1il4r9pknygywsar713i72"))
+ (patches (search-patches "glibc-ldd-x86_64.patch"
+ "glibc-CVE-2019-19126.patch"
+ "glibc-hidden-visibility-ldconfig.patch"
+ "glibc-versioned-locpath.patch"
+ "glibc-allow-kernel-2.6.32.patch"
+ "glibc-reinstate-prlimit64-fallback.patch"
+ "glibc-2.29-supported-locales.patch"))))))
+
+(define-public glibc-2.29
+ (package
+ (inherit glibc)
+ (version "2.29")
+ (source (origin
+ (inherit (package-source glibc))
+ (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0jzh58728flfh939a8k9pi1zdyalfzlxmwra7k0rzji5gvavivpk"))
+ (patches (search-patches "glibc-ldd-x86_64.patch"
+ "glibc-CVE-2019-7309.patch"
+ "glibc-CVE-2019-9169.patch"
+ "glibc-2.29-git-updates.patch"
+ "glibc-hidden-visibility-ldconfig.patch"
+ "glibc-versioned-locpath.patch"
+ "glibc-allow-kernel-2.6.32.patch"
+ "glibc-reinstate-prlimit64-fallback.patch"
+ "glibc-2.29-supported-locales.patch"))))))
+
(define-public glibc-2.28
(package
(inherit glibc)
@@ -978,21 +1034,8 @@ with the Linux kernel.")
(package-name libc) "-"
(package-version libc)))
(arguments
- (substitute-keyword-arguments
- (ensure-keyword-arguments (package-arguments base-gcc)
- '(#:implicit-inputs? #f))
- ((#:phases phases)
- `(modify-phases ,phases
- (add-before 'configure 'treat-glibc-as-system-header
- (lambda _
- (let ((libc (assoc-ref %build-inputs "libc")))
- ;; GCCs build processes requires that the libc
- ;; we're building against is on the system header
- ;; search path.
- (for-each (lambda (var)
- (setenv var (string-append libc "/include")))
- '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"))
- #t)))))))
+ (ensure-keyword-arguments (package-arguments base-gcc)
+ '(#:implicit-inputs? #f)))
(native-inputs
`(,@(package-native-inputs base-gcc)
,@(append (fold alist-delete (%final-inputs) '("libc" "libc:static")))
@@ -1271,26 +1314,7 @@ and daylight-saving rules.")
;;; package.
(define-public tzdata-for-tests
(hidden-package
- (package
- (inherit tzdata)
- (version "2019b")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://data.iana.org/time-zones/releases/tzdata"
- version ".tar.gz"))
- (sha256
- (base32
- "0r0clnlslwm15m1c61dinf1fi9ffgl6aipng7i7yryfwj0n0kn85"))))
- (inputs
- `(("tzcode" ,(origin
- (method url-fetch)
- (uri (string-append
- "https://data.iana.org/time-zones/releases/tzcode"
- version ".tar.gz"))
- (sha256
- (base32
- "0vbmswvv3li25s31shyllq5v24449lxnrki9hr043nipjd09sirf")))))))))
+ (package/inherit tzdata)))
(define-public libiconv
(package
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 3256a356d4..1b342827c5 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -69,7 +69,16 @@
(4 "021gqqvgydixkrmqss64b6srfdlkvnx88lyfzpxfrn5d6bc7li0l")
(5 "0xl2kyzm84nlyklrqzkn73ixabhzfhn9x91lzcmis89cppclvxav")
(6 "0844749ixk1z60437nkznzms1f0nzh9an62kj7sny6r0zyk2k1fn")
- (7 "16xg37gp1b8zlj5969w8mcrparwqlcbj9695vn3qhgb7wdz1xd0p")))
+ (7 "16xg37gp1b8zlj5969w8mcrparwqlcbj9695vn3qhgb7wdz1xd0p")
+ (8 "1qyp19krjh8zxvb0jgwmyjz40djslwcf4xi7kc1ab0iaca44bipf")
+ (9 "00yrjjqd95s81b21qq3ba1y7h879q8jaajlkjggc6grhcwbs4g7d")
+ (10 "04ca5bjv456v538mkspzvn4xb2zdphh31r4fpvfm9p5my0jw7yyn")
+ (11 "1sklyixvsv8993kxzs0jigacpdchjrq7jv5xpdx7kbqyp4rf6k9c")
+ (12 "0cz21qg2gbr40lfgza7g02bqi2qknwqgxnq459pjj640d0cywhr9")
+ (13 "16h9nwz3yzwj7fnxvlidjymdc4yr30h818433gh9j1x3in6igmzm")
+ (14 "12gm5bvv2pd3m72z2ilj26pa08c61az253dsgfl24vpf2ijywvjx")
+ (15 "0pm0px758w4i23s55wajcv6lqfiym7zgxvq0pxf6vclkv8nxy5x5")
+ (16 "0vdha332km2iwx8g2ld15jy7d24cbplzgr1531dpzylr9ajxglgz")))
(define (download-patches store count)
"Download COUNT Bash patches into store. Return a list of
@@ -116,7 +125,8 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
(base32
"0kgvfwqdcd90waczf4gx39xnrxzijhjrzyzv7s8v4w31qqm0za5l"))
(patch-flags '("-p0"))
- (patches %patch-series-5.0)))
+ (patches (cons (search-patch "bash-linux-pgrp-pipe.patch")
+ %patch-series-5.0))))
(version (string-append version "." (number->string (length %patch-series-5.0))))
(build-system gnu-build-system)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 6dfc23c1dc..dd25ff0bb6 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -11983,8 +11983,8 @@ The following file formats are supported:
(("lib/libdivsufsort.a") "/lib/libdivsufsort.so"))
;; Ensure that all headers can be found
- (setenv "CPATH"
- (string-append (getenv "CPATH")
+ (setenv "CPLUS_INCLUDE_PATH"
+ (string-append (or (getenv "CPLUS_INCLUDE_PATH") "")
":"
(assoc-ref inputs "eigen")
"/include/eigen3"))
diff --git a/gnu/packages/bison.scm b/gnu/packages/bison.scm
index 12f19b785e..862c2a0528 100644
--- a/gnu/packages/bison.scm
+++ b/gnu/packages/bison.scm
@@ -31,7 +31,7 @@
(define-public bison
(package
(name "bison")
- (version "3.4.1")
+ (version "3.5.2")
(source
(origin
(method url-fetch)
@@ -39,7 +39,7 @@
version ".tar.xz"))
(sha256
(base32
- "03c2pmq3bs0drdislnz6gm1rwz3n4pb2rz9navyxydppxg2rl597"))))
+ "1pah9q53aqgr0as3s5la4vbcp9940x6jhj06dyxqpnmnkvdp7qi4"))))
(build-system gnu-build-system)
(arguments
'(;; Building in parallel on many-core systems may cause an error such as
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index fa63c49920..9e19425e90 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -404,7 +404,7 @@ and will take advantage of multiple processor cores where possible.")
(assoc-ref %outputs "out") "/lib"))))
(inputs `(("boost" ,boost)
("openssl" ,openssl)))
- (native-inputs `(("python" ,python-2)
+ (native-inputs `(("python" ,python-wrapper)
("pkg-config" ,pkg-config)))
(home-page "https://www.libtorrent.org/")
(synopsis "Feature complete BitTorrent implementation")
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 8bf2002adb..afdbdbd15b 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -10,7 +10,9 @@
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,66 +42,113 @@
#:use-module (gnu packages icu4c)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
- #:use-module (gnu packages shells))
+ #:use-module (gnu packages shells)
+ #:use-module (srfi srfi-1))
+
+(define (version-with-underscores version)
+ (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version))
+
+(define (boost-patch name version hash)
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.boost.org/patches/"
+ (version-with-underscores version) "/" name))
+ (file-name (string-append "boost-" name))
+ (sha256 (base32 hash))))
(define-public boost
(package
(name "boost")
- (version "1.70.0")
+ (version "1.72.0")
(source (origin
(method url-fetch)
- (uri (let ((version-with-underscores
- (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)))
- (list (string-append "mirror://sourceforge/boost/boost/" version
- "/boost_" version-with-underscores ".tar.bz2")
- (string-append "https://dl.bintray.com/boostorg/release/"
- version "/source/boost_"
- version-with-underscores ".tar.bz2"))))
+ (uri (string-append "https://dl.bintray.com/boostorg/release/"
+ version "/source/boost_"
+ (version-with-underscores version) ".tar.bz2"))
+ (patches
+ (list (boost-patch
+ ;; 1.72.0 was released with a faulty coroutine submodule:
+ ;; <https://github.com/boostorg/coroutine/issues/46>.
+ "0001-revert-cease-dependence-on-range.patch" version
+ "1zcqxzh56m1s635wqwk15j3zcs2gmjvjy2f0hid7i78s4pgm0yfs")))
(sha256
(base32
- "0y47nc7w0arwgj4x1phadxbvl7wyfcgknbz5kv8lzpl98wsyh2j3"))))
+ "08h7cv61fd0lzb4z50xanfqn0pdgvizjrpd1kcdgj725pisb5jar"))))
(build-system gnu-build-system)
(inputs `(("icu4c" ,icu4c)
("zlib" ,zlib)))
(native-inputs
`(("perl" ,perl)
- ("python" ,python-2)
+ ,@(if (%current-target-system)
+ '()
+ `(("python" ,python-wrapper)))
("tcsh" ,tcsh)))
(arguments
- `(#:tests? #f
+ `(#:imported-modules ((guix build python-build-system)
+ ,@%gnu-build-system-modules)
+ #:modules (((guix build python-build-system) #:select (python-version))
+ ,@%gnu-build-system-modules)
+ #:tests? #f
#:make-flags
(list "threading=multi" "link=shared"
- ;; XXX: Disable installation of Boosts modular CMake config scripts
- ;; which conflicts in 1.70.0 with the ones provided by CMake.
- ;; See <https://bugs.gnu.org/36721>.
- "--no-cmake-config"
-
;; Set the RUNPATH to $libdir so that the libs find each other.
(string-append "linkflags=-Wl,-rpath="
- (assoc-ref %outputs "out") "/lib"))
+ (assoc-ref %outputs "out") "/lib")
+ ,@(if (%current-target-system)
+ `("--user-config=user-config.jam"
+ ;; Python is not supported when cross-compiling.
+ "--without-python"
+ "binary-format=elf"
+ "target-os=linux"
+ ,@(cond
+ ((string-prefix? "arm" (%current-target-system))
+ '("abi=aapcs"
+ "address-model=32"
+ "architecture=arm"))
+ ((string-prefix? "aarch64" (%current-target-system))
+ '("abi=aapcs"
+ "address-model=64"
+ "architecture=arm"))
+ (else '())))
+ '()))
#:phases
(modify-phases %standard-phases
(delete 'bootstrap)
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((icu (assoc-ref inputs "icu4c"))
+ (python (assoc-ref inputs "python"))
(out (assoc-ref outputs "out")))
(substitute* '("libs/config/configure"
"libs/spirit/classic/phoenix/test/runtest.sh"
- "tools/build/src/engine/execunix.c"
- "tools/build/src/engine/Jambase"
- "tools/build/src/engine/jambase.c")
+ "tools/build/src/engine/execunix.cpp"
+ "tools/build/src/engine/Jambase")
(("/bin/sh") (which "sh")))
(setenv "SHELL" (which "sh"))
(setenv "CONFIG_SHELL" (which "sh"))
+ ,@(if (%current-target-system)
+ `((call-with-output-file "user-config.jam"
+ (lambda (port)
+ (format port
+ "using gcc : cross : ~a-c++ ;"
+ ,(%current-target-system)))))
+ '())
+
(invoke "./bootstrap.sh"
(string-append "--prefix=" out)
;; Auto-detection looks for ICU only in traditional
;; install locations.
(string-append "--with-icu=" icu)
+ ;; Ditto for Python.
+ ,@(if (%current-target-system)
+ '()
+ `((string-append "--with-python-root=" python)
+ (string-append "--with-python=" python "/bin/python")
+ (string-append "--with-python-version="
+ (python-version python))))
"--with-toolset=gcc"))))
(replace 'build
(lambda* (#:key make-flags #:allow-other-keys)
@@ -109,17 +158,27 @@
(replace 'install
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "./b2" "install" make-flags)))
- (add-after 'install 'provide-libboost_python
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ;; Boost can build support for both Python 2 and Python 3 since
- ;; version 1.67.0, and suffixes each library with the Python
- ;; version. Many consumers only check for libboost_python
- ;; however, so we provide it here as suggested in
- ;; <https://github.com/boostorg/python/issues/203>.
- (with-directory-excursion (string-append out "/lib")
- (symlink "libboost_python27.so" "libboost_python.so"))
- #t))))))
+ ,@(if (%current-target-system)
+ '()
+ '((add-after 'install 'provide-libboost_python
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (python-version (python-version
+ (assoc-ref inputs "python")))
+ (libboost_pythonNN.so
+ (string-append "libboost_python"
+ (string-join (string-split
+ python-version #\.)
+ "")
+ ".so")))
+ (with-directory-excursion (string-append out "/lib")
+ (symlink libboost_pythonNN.so "libboost_python.so")
+ ;; Some packages only look for the major version.
+ (symlink libboost_pythonNN.so
+ (string-append "libboost_python"
+ (string-take python-version 1)
+ ".so")))
+ #t))))))))
(home-page "https://www.boost.org")
(synopsis "Peer-reviewed portable C++ source libraries")
@@ -129,54 +188,16 @@ across a broad spectrum of applications.")
(license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt"
"Some components have other similar licences."))))
-;; TODO: Merge with 'Boost' in the next rebuild cycle.
-(define-public boost-with-python3
+(define-public boost-with-python2
(package
(inherit boost)
- (name "boost-python3")
+ (name "boost-python2")
(native-inputs
- `(("perl" ,perl)
- ("python" ,python)
- ("tcsh" ,tcsh)))
- (arguments (substitute-keyword-arguments (package-arguments boost)
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((icu (assoc-ref inputs "icu4c"))
- (python (assoc-ref inputs "python"))
- (out (assoc-ref outputs "out")))
- (substitute* '("libs/config/configure"
- "libs/spirit/classic/phoenix/test/runtest.sh"
- "tools/build/src/engine/execunix.c"
- "tools/build/src/engine/Jambase"
- "tools/build/src/engine/jambase.c")
- (("/bin/sh") (which "sh")))
-
- (setenv "SHELL" (which "sh"))
- (setenv "CONFIG_SHELL" (which "sh"))
+ `(("python" ,python-2)
+ ,@(alist-delete "python" (package-native-inputs boost))))))
- (substitute* "tools/build/src/tools/python.jam"
- (("include/python\\$\\(version\\)")
- "include/python$(version)m"))
-
- (invoke "./bootstrap.sh"
- (string-append "--prefix=" out)
- ;; Auto-detection looks for dependencies only
- ;; in traditional install locations.
- (string-append "--with-icu=" icu)
- (string-append "--with-python=" python "/bin/python3")
- (string-append "--with-python-root=" python)
- "--with-python-version=3.7"
- "--with-toolset=gcc"))))
- (replace 'provide-libboost_python
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (with-directory-excursion (string-append out "/lib")
- (symlink "libboost_python37.so" "libboost_python.so")
- ;; Some packages also look for libboost_python3.so
- (symlink "libboost_python37.so" "libboost_python3.so"))
- #t)))))))))
+(define-public boost-with-python3
+ (deprecated-package "boost-with-python3" boost))
(define-public boost-static
(package
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 770647935a..425c0d53c9 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -306,7 +306,7 @@ menu to select one of the installed operating systems.")
("perl" ,perl)
("python-2" ,python-2)))
(inputs
- `(("libuuid" ,util-linux)
+ `(("libuuid" ,util-linux "lib")
("mtools" ,mtools)))
(arguments
`(#:parallel-build? #f
@@ -915,7 +915,7 @@ to Novena upstream, does not load u-boot.img from the first partition.")
("libyaml" ,libyaml)
("openssl" ,openssl)
("openssl:static" ,openssl "static")
- ("util-linux" ,util-linux)))
+ ("util-linux" ,util-linux "lib")))
(home-page
"https://dev.chromium.org/chromium-os/chromiumos-design-docs/verified-boot")
(synopsis "ChromiumOS verified boot utilities")
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index d6995f104c..0fbe8ef64a 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -301,7 +301,8 @@ or false to signal an error."
"http://alpha.gnu.org/gnu/guix/bootstrap"
"ftp://alpha.gnu.org/gnu/guix/bootstrap"
"http://www.fdn.fr/~lcourtes/software/guix/packages"
- "http://flashner.co.il/guix/bootstrap"))
+ "http://flashner.co.il/guix/bootstrap"
+ "http://lilypond.org/janneke/guix/"))
(define (bootstrap-guile-url-path system)
"Return the URI for FILE."
@@ -808,19 +809,18 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
(define (%bootstrap-inputs)
;; The initial, pre-built inputs. From now on, we can start building our
;; own packages.
- `(,@(match (%current-system)
- ((or "i686-linux" "x86_64-linux")
- `(("linux-libre-headers" ,%bootstrap-linux-libre-headers)
- ("bootstrap-mescc-tools" ,%bootstrap-mescc-tools)
- ("mes" ,%bootstrap-mes)))
- (_
- `(("libc" ,%bootstrap-glibc)
- ("gcc" ,%bootstrap-gcc)
- ("binutils" ,%bootstrap-binutils))))
- ("coreutils&co" ,%bootstrap-coreutils&co)
-
- ;; In gnu-build-system.scm, we rely on the availability of Bash.
- ("bash" ,%bootstrap-coreutils&co)))
+ (match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ `(("linux-libre-headers" ,%bootstrap-linux-libre-headers)
+ ("bootstrap-mescc-tools" ,%bootstrap-mescc-tools)
+ ("mes" ,%bootstrap-mes)))
+ (_
+ `(("libc" ,%bootstrap-glibc)
+ ("gcc" ,%bootstrap-gcc)
+ ("binutils" ,%bootstrap-binutils)
+ ("coreutils&co" ,%bootstrap-coreutils&co)
+ ;; In gnu-build-system.scm, we rely on the availability of Bash.
+ ("bash" ,%bootstrap-coreutils&co)))))
(define %bootstrap-inputs-for-tests
;; These are bootstrap inputs that are cheap to produce (no compilation
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 63dc72e1a7..e8f5be8f05 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -168,7 +168,7 @@ files and generates build instructions for the Ninja build system.")
(define-public meson
(package
(name "meson")
- (version "0.50.1")
+ (version "0.53.2")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/mesonbuild/meson/"
@@ -176,7 +176,7 @@ files and generates build instructions for the Ninja build system.")
version ".tar.gz"))
(sha256
(base32
- "1k2fw5qk4mqjcb4j5dhp8xfn0caqphb11yh8zkw7v9w01kb5d3zn"))))
+ "07y2hh9dfn1m9g4bsy49nbn3vdmd0b2iwr8bxg19fhqq6c7q73ry"))))
(build-system python-build-system)
(arguments
`(;; FIXME: Tests require many additional inputs, a fix for the RUNPATH
diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm
index d6127d11f9..de8d089333 100644
--- a/gnu/packages/cdrom.scm
+++ b/gnu/packages/cdrom.scm
@@ -459,7 +459,7 @@ capacity is user-selectable.")
("eudev" ,eudev)
("fontconfig" ,fontconfig)
("libexif" ,libexif)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("ffmpeg" ,ffmpeg-3.4)))
(native-inputs
`(("pkg-config" ,pkg-config)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 1b60b99ce1..c84a682e75 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -64,6 +64,7 @@
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages time)
+ #:use-module (gnu packages xml)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
@@ -642,26 +643,20 @@ doctest.")
(define-public python-mock
(package
(name "python-mock")
- (version "2.0.0")
+ (version "3.0.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "mock" version))
(sha256
(base32
- "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
+ "1hrp6j0yrx2xzylfv02qa8kph661m6yq4p0mc8fnimch9j4psrc3"))))
(propagated-inputs
- `(("python-pbr" ,python-pbr-minimal)
- ("python-six" ,python-six)))
+ `(("python-six" ,python-six)))
(build-system python-build-system)
- (native-inputs
- `(("python-unittest2" ,python-unittest2)))
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (zero? (system* "unit2")))))))
+ ;; FIXME: Tests require "pytest", which depends on this package.
+ '(#:tests? #f))
(home-page "https://github.com/testing-cabal/mock")
(synopsis "Python mocking and patching library for testing")
(description
@@ -769,35 +764,40 @@ standard library.")
(define-public python-pytest
(package
(name "python-pytest")
- (version "4.4.2")
+ (version "5.3.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest" version))
(sha256
(base32
- "18w38kjnffdcrlbw6ny6dksgxai6x9bxpjs2m6klqmb8hfzjkcb2"))))
+ "139i9cjhrv5aici3skq8iihvfb3lq0d8xb5j7qycr2hlk8cfjpqd"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "pytest" "-vv" "-k"
- (string-append
- ;; These tests involve the /usr directory, and fails.
- "not test_remove_dir_prefix"
- " and not test_argcomplete"
- ;; This test tries to override PYTHONPATH, and
- ;; subsequently fails to locate the test libraries.
- " and not test_collection")))))))
+ (lambda* (#:key (tests? #t) #:allow-other-keys)
+ (if tests?
+ (invoke "pytest" "-vv" "-k"
+ (string-append
+ ;; These tests involve the /usr directory, and fails.
+ "not test_remove_dir_prefix"
+ " and not test_argcomplete"
+ ;; This test tries to override PYTHONPATH, and
+ ;; subsequently fails to locate the test libraries.
+ " and not test_collection"))
+ (format #t "test suite not run~%"))
+ #t)))))
(propagated-inputs
`(("python-atomicwrites" ,python-atomicwrites)
("python-attrs" ,python-attrs-bootstrap)
("python-more-itertools" ,python-more-itertools)
+ ("python-packaging" ,python-packaging-bootstrap)
("python-pluggy" ,python-pluggy)
("python-py" ,python-py)
- ("python-six" ,python-six-bootstrap)))
+ ("python-six" ,python-six-bootstrap)
+ ("python-wcwidth" ,python-wcwidth)))
(native-inputs
`(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
("bash" ,bash)
@@ -805,7 +805,8 @@ standard library.")
("python-nose" ,python-nose)
("python-mock" ,python-mock)
("python-pytest" ,python-pytest-bootstrap)
- ("python-setuptools-scm" ,python-setuptools-scm)))
+ ("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-xmlschema" ,python-xmlschema)))
(home-page "https://docs.pytest.org/en/latest/")
(synopsis "Python testing library")
(description
@@ -815,15 +816,41 @@ and many external plugins.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-pytest))))))
+;; Pytest 4.x are the last versions that support Python 2.
(define-public python2-pytest
- (let ((pytest (package-with-python2
- (strip-python2-variant python-pytest))))
- (package
- (inherit pytest)
- (propagated-inputs
- `(("python2-funcsigs" ,python2-funcsigs)
- ("python2-pathlib2" ,python2-pathlib2)
- ,@(package-propagated-inputs pytest))))))
+ (package
+ (inherit (strip-python2-variant python-pytest))
+ (name "python2-pytest")
+ (version "4.6.9")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest" version))
+ (sha256
+ (base32
+ "0fgkmpc31nzy97fxfrkqbzycigdwxwwmninx3qhkzp81migggs0r"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:python ,python-2
+ ,@(package-arguments python-pytest)))
+ (propagated-inputs
+ `(("python-atomicwrites" ,python2-atomicwrites)
+ ("python-attrs" ,python2-attrs-bootstrap)
+ ("python-funcsigs" ,python2-funcsigs)
+ ("python-importlib-metadata" ,python2-importlib-metadata-bootstrap)
+ ("python-more-itertools" ,python2-more-itertools)
+ ("python-packaging" ,python2-packaging-bootstrap)
+ ("python-pathlib2" ,python2-pathlib2)
+ ("python-pluggy" ,python2-pluggy)
+ ("python-py" ,python2-py)
+ ("python-six" ,python2-six-bootstrap)
+ ("python-wcwidth" ,python2-wcwidth)))
+ (native-inputs
+ `(("bash" ,bash) ;tests require 'compgen'
+ ("python-hypothesis" ,python2-hypothesis)
+ ("python-nose" ,python2-nose)
+ ("python-mock" ,python2-mock)
+ ("python-pytest" ,python2-pytest-bootstrap)
+ ("python-setuptools-scm" ,python2-setuptools-scm)))))
(define-public python-pytest-bootstrap
(package
@@ -834,24 +861,37 @@ and many external plugins.")
(properties `((python2-variant . ,(delay python2-pytest-bootstrap))))))
(define-public python2-pytest-bootstrap
- (let ((pytest (package-with-python2
- (strip-python2-variant python-pytest-bootstrap))))
- (package (inherit pytest)
- (propagated-inputs
- `(("python2-funcsigs" ,python2-funcsigs-bootstrap)
- ("python2-pathlib2" ,python2-pathlib2-bootstrap)
- ,@(package-propagated-inputs pytest))))))
+ (hidden-package
+ (package/inherit
+ python2-pytest
+ (name "python2-pytest-bootstrap")
+ (arguments
+ (substitute-keyword-arguments (package-arguments python2-pytest)
+ ((#:tests? _ #f) #f)))
+ (native-inputs
+ `(("python-setuptools-scm" ,python2-setuptools-scm)))
+ (propagated-inputs
+ `(("python-atomicwrites" ,python2-atomicwrites)
+ ("python-attrs" ,python2-attrs-bootstrap)
+ ("python-funcsigs" ,python2-funcsigs-bootstrap)
+ ("python-importlib-metadata" ,python2-importlib-metadata-bootstrap)
+ ("python-more-itertools" ,python2-more-itertools)
+ ("python-packaging" ,python2-packaging-bootstrap)
+ ("python-pathlib2" ,python2-pathlib2-bootstrap)
+ ("python-pluggy" ,python2-pluggy-bootstrap)
+ ("python-py" ,python2-py)
+ ("python-wcwidth" ,python2-wcwidth))))))
(define-public python-pytest-cov
(package
(name "python-pytest-cov")
- (version "2.6.1")
+ (version "2.8.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-cov" version))
(sha256
- (base32 "0cyxbbghx2l4p60w10k00j1j74q1ngfiffr0pxn73ababjr69dha"))))
+ (base32 "0avzlk9p4nc44k7lpx9109dybq71xqnggxb9f4hp0l64pbc44ryc"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -880,18 +920,28 @@ supports coverage of subprocesses.")
(define-public python-pytest-runner
(package
(name "python-pytest-runner")
- (version "4.4")
+ (version "5.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-runner" version))
(sha256
(base32
- "1x0d9n40lsiphblbs61rdc0d5r31f6vh0vcahqdv0mffakbnrb80"))))
+ "0awll1bva5zy8cspsxcpv7pjcrdf5c6pf56nqn4f74vvmlzfgiwn"))))
(build-system python-build-system)
+ (arguments
+ '(;; FIXME: The test suite requires 'python-flake8' and 'python-black',
+ ;; but that introduces a circular dependency.
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (invoke "pytest" "-vv")
+ (format #t "test suite not run~%"))
+ #t)))))
(native-inputs
- `(("python-pytest" ,python-pytest-bootstrap)
- ("python-setuptools-scm" ,python-setuptools-scm)))
+ `(("python-setuptools-scm" ,python-setuptools-scm)))
(home-page "https://github.com/pytest-dev/pytest-runner")
(synopsis "Invoke py.test as a distutils command")
(description
@@ -1348,14 +1398,14 @@ have failed since the last commit or what tests are currently failing.")))
(define-public python-coverage
(package
(name "python-coverage")
- (version "4.5.3")
+ (version "5.0.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "coverage" version))
(sha256
(base32
- "02f6m073qdispn96rc616hg0rnmw1pgqzw3bgxwiwza4zf9hirlx"))))
+ "1vrg8panqw79pswg52ygbrff3wdnxarrd9qz6c64ah0c4h2cmbvp"))))
(build-system python-build-system)
(arguments
;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
@@ -1616,20 +1666,20 @@ instantly.")
(define-public python-hypothesis
(package
(name "python-hypothesis")
- (version "4.18.3")
+ (version "5.4.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "hypothesis" version))
(sha256
(base32
- "0a35nwqyjnm4cphi43xracqpkws0ip61mndvqb1iqq7gkva83lb1"))))
+ "0zn09bn6hadk4vxl6jy8bkjr5fz8mrhin3z46w7pq5qgbaycr89p"))))
(build-system python-build-system)
- (native-inputs
- `(("python-flake8" ,python-flake8)
- ("python-pytest" ,python-pytest-bootstrap)))
+ (arguments
+ ;; XXX: Tests are not distributed with the PyPI archive.
+ '(#:tests? #f))
(propagated-inputs
`(("python-attrs" ,python-attrs-bootstrap)
- ("python-coverage" ,python-coverage)))
+ ("python-sortedcontainers" ,python-sortedcontainers)))
(synopsis "Library for property based testing")
(description "Hypothesis is a library for testing your Python code against a
much larger range of examples than you would ever want to write by hand. It’s
@@ -1639,10 +1689,18 @@ seamlessly into your existing Python unit testing work flow.")
(license license:mpl2.0)
(properties `((python2-variant . ,(delay python2-hypothesis))))))
+;; This is the last version of Hypothesis that supports Python 2.
(define-public python2-hypothesis
(let ((hypothesis (package-with-python2
(strip-python2-variant python-hypothesis))))
(package (inherit hypothesis)
+ (version "4.57.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "hypothesis" version))
+ (sha256
+ (base32
+ "183gpxbfcdhdqzlahkji5a71n6lmvgqsbkcb0ihqad51n2j6jhrw"))))
(propagated-inputs
`(("python2-enum34" ,python2-enum34)
,@(package-propagated-inputs hypothesis))))))
@@ -2195,13 +2253,13 @@ create data based on random numbers and yet remain repeatable.")
(define-public python-freezegun
(package
(name "python-freezegun")
- (version "0.3.12")
+ (version "0.3.14")
(source
(origin
(method url-fetch)
(uri (pypi-uri "freezegun" version))
(sha256
- (base32 "1rx57v8ryjncjimg8hys9kx1r3rknvwcl4y340g20jn0sf69qk9a"))))
+ (base32 "0al75mk829j1izxi760b7yjnknjihyfhp2mvi5qiyrxb9cpxwqk2"))))
(build-system python-build-system)
(native-inputs
`(("python-mock" ,python-mock)
@@ -2368,11 +2426,21 @@ portable to just about any platform.")
(let ((out (assoc-ref outputs "out")))
(setenv "CC" "gcc")
(setenv "PREFIX" out)
+
+ ;; XXX: Without this flag, the CLOCK_REALTIME test hangs
+ ;; indefinitely. See README.packagers for more information.
+ ;; Try removing this for future versions of libfaketime.
+ (setenv "FAKETIME_COMPILE_CFLAGS" "-DFORCE_MONOTONIC_FIX")
+
#t)))
(add-before 'check 'pre-check
(lambda _
(substitute* "test/functests/test_exclude_mono.sh"
(("/bin/bash") (which "bash")))
+
+ ;; Do not fail due to use of 'ftime', which was deprecated in
+ ;; glibc 2.31. Remove this for later versions of libfaketime.
+ (setenv "FAKETIME_COMPILE_CFLAGS" "-Wno-deprecated-declarations")
#t)))
#:test-target "test"))
(native-inputs
@@ -2509,3 +2577,16 @@ system. The code under test requires no modification to work with pyfakefs.")
(define-public python2-pyfakefs
(package-with-python2 python-pyfakefs))
+
+;; This minimal variant is used to avoid a circular dependency between
+;; python2-importlib-metadata, which requires pyfakefs for its tests, and
+;; python2-pytest, which requires python2-importlib-metadata.
+(define-public python2-pyfakefs-bootstrap
+ (hidden-package
+ (package
+ (inherit python2-pyfakefs)
+ (name "python2-pyfakefs-bootstrap")
+ (native-inputs '())
+ (arguments
+ `(#:python ,python-2
+ #:tests? #f)))))
diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index 3330f91dfc..d08363a8dc 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -77,7 +77,7 @@
(build-system gnu-build-system)
(inputs
`(("ncurses" ,ncurses)
- ("libuuid" ,util-linux)
+ ("libuuid" ,util-linux "lib")
("libx11" ,libx11)
("xorg-rgb" ,xorg-rgb)
("nanopass" ,nanopass)
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index bb0993a4b4..f73c76b827 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -427,18 +427,6 @@ from forcing GEXP-PROMISE."
`(cons "--enable-custom-modes"
,flags))))))
-;; Add a custom ld wrapper that supports quoted strings in response files.
-;; To be merged with 'ld-wrapper' in a future rebuild cycle.
-(define-public ld-wrapper-next
- (let ((orig (car (assoc-ref (%final-inputs) "ld-wrapper"))))
- (package
- (inherit orig)
- (name "ld-wrapper-next")
- (inputs
- `(("wrapper" ,(search-path %load-path
- "gnu/packages/ld-wrapper-next.in"))
- ,@(alist-delete "wrapper" (package-inputs orig)))))))
-
(define-public ungoogled-chromium
(package
(name "ungoogled-chromium")
@@ -766,7 +754,6 @@ from forcing GEXP-PROMISE."
("clang" ,clang-9)
("gn" ,gn)
("gperf" ,gperf)
- ("ld-wrapper" ,ld-wrapper-next)
("ninja" ,ninja)
("node" ,node)
("pkg-config" ,pkg-config)
diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
index 24de11b713..a5474e0a96 100644
--- a/gnu/packages/ci.scm
+++ b/gnu/packages/ci.scm
@@ -120,7 +120,7 @@
`("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs)))
#t))))))
(inputs
- `(("guile" ,guile-2.2)
+ `(("guile" ,guile-3.0)
("guile-fibers" ,guile-fibers)
("guile-gcrypt" ,guile-gcrypt)
("guile-json" ,guile-json-3)
diff --git a/gnu/packages/cinnamon.scm b/gnu/packages/cinnamon.scm
index a8850391aa..fadf18df81 100644
--- a/gnu/packages/cinnamon.scm
+++ b/gnu/packages/cinnamon.scm
@@ -51,13 +51,6 @@
(base32
"18mjy80ly9361npjhxpm3n0pkmrwviaqr2kixjb7hyxa6kzzh5xw"))))
(build-system gnu-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'bootstrap 'skip-premature-configure
- (lambda _
- (setenv "NOCONFIGURE" "set")
- #t)))))
;; TODO: package 'libgsystem'.
(inputs
`(("accountsservice" ,accountsservice)
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 2d2827ffee..e24979d2b2 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -5,10 +5,11 @@
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +33,7 @@
#:use-module (guix utils)
#:use-module (guix deprecation)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system cmake)
#:use-module (guix build-system emacs)
#:use-module (gnu packages)
#:use-module (gnu packages backup)
@@ -41,17 +43,60 @@
#:use-module (gnu packages file)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages serialization)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages xml)
+ #:use-module (ice-9 match)
#:use-module (srfi srfi-1))
-;;; This minimal variant of CMake does not include the documentation. It is
-;;; used by the cmake-build-system.
-(define-public cmake-minimal
+;;; Build phases shared between 'cmake-bootstrap' and the later variants
+;;; that use cmake-build-system.
+(define %common-build-phases
+ `((add-after 'unpack 'split-package
+ ;; Remove files that have been packaged in other package recipes.
+ (lambda _
+ (delete-file "Auxiliary/cmake-mode.el")
+ (substitute* "Auxiliary/CMakeLists.txt"
+ ((".*cmake-mode.el.*") ""))
+ #t))
+ (add-before 'configure 'patch-bin-sh
+ (lambda _
+ ;; Replace "/bin/sh" by the right path in... a lot of
+ ;; files.
+ (substitute*
+ '("Modules/CompilerId/Xcode-3.pbxproj.in"
+ "Modules/Internal/CPack/CPack.RuntimeScript.in"
+ "Source/cmGlobalXCodeGenerator.cxx"
+ "Source/cmLocalUnixMakefileGenerator3.cxx"
+ "Source/cmExecProgramCommand.cxx"
+ "Utilities/Release/release_cmake.cmake"
+ "Tests/CMakeLists.txt"
+ "Tests/RunCMake/File_Generate/RunCMakeTest.cmake")
+ (("/bin/sh") (which "sh")))
+ #t))))
+
+(define %common-disabled-tests
+ '(;; This test copies libgcc_s.so.1 from GCC and tries to modify its RPATH,
+ ;; but does not cope with the file being read-only.
+ "BundleUtilities"
+ ;; This test requires network access.
+ "CTestTestUpload"
+ ;; This test requires 'ldconfig' which is not available in Guix.
+ "RunCMake.install"))
+
+(define %preserved-third-party-files
+ '(;; 'Source/cm_getdate.c' includes archive_getdate.c wholesale, so it must
+ ;; be available along with the required headers.
+ "Utilities/cmlibarchive/libarchive/archive_getdate.c"
+ "Utilities/cmlibarchive/libarchive/archive_getdate.h"))
+
+;;; The "bootstrap" CMake. It is used to build 'cmake-minimal' below, as well
+;;; as any dependencies that need cmake-build-system.
+(define-public cmake-bootstrap
(package
- (name "cmake-minimal")
- (version "3.15.1")
+ (name "cmake-bootstrap")
+ (version "3.16.5")
(source (origin
(method url-fetch)
(uri (string-append "https://www.cmake.org/files/v"
@@ -59,23 +104,50 @@
"/cmake-" version ".tar.gz"))
(sha256
(base32
- "1xyprly3sf4wi0n1x79k4n22yxm6pb7fv70gqr9lvc7qv14cbphq"))
- (modules '((guix build utils)))
+ "1z4bb8z6b4dvq5hrvajrf1hyybqay3xybyimf71w1jgcp180nxjz"))
+ (modules '((guix build utils)
+ (ice-9 ftw)))
(snippet
- '(begin
- ;; Drop bundled software.
- (with-directory-excursion "Utilities"
- (for-each delete-file-recursively
- '("cmbzip2"
- ;; "cmcompress"
- "cmcurl"
- "cmexpat"
- ;; "cmjsoncpp"
- ;; "cmlibarchive"
- "cmliblzma"
- ;; "cmlibuv"
- "cmzlib"))
- #t)))))
+ `(begin
+ ;; CMake bundles its dependencies in the "Utilities" directory.
+ ;; Delete those to ensure the system libraries are used.
+ (define preserved-files
+ '(,@%preserved-third-party-files
+ ;; Use the bundled JsonCpp during bootstrap to work around
+ ;; a circular dependency. TODO: JsonCpp can be built with
+ ;; Meson instead of CMake, but meson-build-system currently
+ ;; does not support cross-compilation.
+ "Utilities/cmjsoncpp"
+ ;; LibUV is required to bootstrap the initial build system.
+ "Utilities/cmlibuv"))
+
+ (file-system-fold (lambda (dir stat result) ;enter?
+ (or (string=? "Utilities" dir) ;init
+ ;; The bundled dependencies are
+ ;; distinguished by having a "cm"
+ ;; prefix to their upstream names.
+ (and (string-prefix? "Utilities/cm" dir)
+ (not (member dir preserved-files)))))
+ (lambda (file stat result) ;leaf
+ (unless (or (member file preserved-files)
+ ;; Preserve top-level files.
+ (string=? "Utilities"
+ (dirname file)))
+ (delete-file file)))
+ (const #t) ;down
+ (lambda (dir stat result) ;up
+ (when (equal? (scandir dir) '("." ".."))
+ (rmdir dir)))
+ (const #t) ;skip
+ (lambda (file stat errno result)
+ (format (current-error-port)
+ "warning: failed to delete ~a: ~a~%"
+ file (strerror errno)))
+ #t
+ "Utilities"
+ lstat)
+ #t))
+ (patches (search-patches "cmake-curl-certificates.patch"))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
@@ -86,7 +158,7 @@
(string-append "--parallel=" parallel-job-count)
(string-append "--prefix=" out)
"--system-libs"
- "--no-system-jsoncpp" ; FIXME: Circular dependency.
+ "--no-system-jsoncpp"
;; By default, the man pages and other docs land
;; in PREFIX/man and PREFIX/doc, but we want them
;; in share/{man,doc}. Note that unlike
@@ -95,14 +167,18 @@
;; to --mandir and --docdir.
"--mandir=share/man"
,(string-append "--docdir=share/doc/cmake-"
- (version-major+minor version))))
+ (version-major+minor version))
+
+ ;; By default CMake is built without any optimizations. Use
+ ;; the recommended Release target for a ~2.5x speedup.
+ "--" "-DCMAKE_BUILD_TYPE=Release"))
#:make-flags
(let ((skipped-tests
- (list "BundleUtilities" ; This test fails on Guix.
+ (list ,@%common-disabled-tests
"CTestTestSubdir" ; This test fails to build 2 of the 3 tests.
- ;; These tests requires network access.
- "CTestCoverageCollectGCOV"
- "CTestTestUpload")))
+ ;; This test fails when ARGS (below) is in use, see
+ ;; <https://gitlab.kitware.com/cmake/cmake/issues/17165>.
+ "CTestCoverageCollectGCOV")))
(list
(string-append
;; These arguments apply for the tests only.
@@ -111,29 +187,7 @@
" --exclude-regex ^\\(" (string-join skipped-tests "\\|") "\\)$")))
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'split-package
- ;; Remove files that have been packaged in other package recipes.
- (lambda _
- (delete-file "Auxiliary/cmake-mode.el")
- (substitute* "Auxiliary/CMakeLists.txt"
- ((".*cmake-mode.el.*") ""))
- #t))
- (add-before 'configure 'patch-bin-sh
- (lambda _
- ;; Replace "/bin/sh" by the right path in... a lot of
- ;; files.
- (substitute*
- '("Modules/CompilerId/Xcode-3.pbxproj.in"
- "Modules/CPack.RuntimeScript.in"
- "Source/cmGlobalXCodeGenerator.cxx"
- "Source/cmLocalUnixMakefileGenerator3.cxx"
- "Source/cmExecProgramCommand.cxx"
- "Utilities/Release/release_cmake.cmake"
- "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c"
- "Tests/CMakeLists.txt"
- "Tests/RunCMake/File_Generate/RunCMakeTest.cmake")
- (("/bin/sh") (which "sh")))
- #t))
+ ,@%common-build-phases
(add-before 'configure 'set-paths
(lambda _
;; Help cmake's bootstrap process to find system libraries
@@ -148,18 +202,29 @@
(apply invoke "./configure" configure-flags))))))
(inputs
`(("bzip2" ,bzip2)
- ("curl" ,curl)
+ ("curl" ,curl-minimal)
("expat" ,expat)
("file" ,file)
("libarchive" ,libarchive)
("libuv" ,libuv)
- ("ncurses" ,ncurses) ; required for ccmake
+ ("ncurses" ,ncurses) ;required for ccmake
("rhash" ,rhash)
("zlib" ,zlib)))
(native-search-paths
(list (search-path-specification
(variable "CMAKE_PREFIX_PATH")
- (files '("")))))
+ (files '("")))
+ ;; "cmake-curl-certificates.patch" changes CMake to honor 'SSL_CERT_DIR'
+ ;; and 'SSL_CERT_FILE', hence these search path entries.
+ (search-path-specification
+ (variable "SSL_CERT_DIR")
+ (separator #f) ;single entry
+ (files '("etc/ssl/certs")))
+ (search-path-specification
+ (variable "SSL_CERT_FILE")
+ (file-type 'regular)
+ (separator #f) ;single entry
+ (files '("etc/ssl/certs/ca-certificates.crt")))))
(home-page "https://cmake.org/")
(synopsis "Cross-platform build system")
(description
@@ -169,23 +234,84 @@ and compiler independent configuration files. CMake generates native makefiles
and workspaces that can be used in the compiler environment of your choice.")
(properties '((hidden? . #t)))
(license (list license:bsd-3 ; cmake
- license:bsd-4 ; cmcompress
- license:bsd-2 ; cmlibarchive
license:expat ; cmjsoncpp is dual MIT/public domain
license:public-domain)))) ; cmlibarchive/archive_getdate.c
+;;; This minimal variant of CMake does not include the documentation. It is
+;;; used by the cmake-build-system.
+(define-public cmake-minimal
+ (package
+ (inherit cmake-bootstrap)
+ (name "cmake-minimal")
+ (source (origin
+ (inherit (package-source cmake-bootstrap))
+ (snippet
+ (match (origin-snippet (package-source cmake-bootstrap))
+ ((_ _ exp ...)
+ ;; Now we can delete the remaining software bundles.
+ (append `(begin
+ (define preserved-files ',%preserved-third-party-files))
+ exp))))))
+ (inputs
+ `(("curl" ,curl)
+ ("jsoncpp" ,jsoncpp)
+ ,@(alist-delete "curl" (package-inputs cmake-bootstrap))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags
+ (list "-DCMAKE_USE_SYSTEM_LIBRARIES=ON"
+ (string-append "-DCMAKE_DOC_DIR=share/doc/cmake-"
+ ,(version-major+minor (package-version
+ cmake-bootstrap))))
+
+ ;; This is the CMake used in cmake-build-system. Ensure compiler
+ ;; optimizations are enabled to save size and CPU cycles.
+ #:build-type "Release"
+ #:phases
+ (modify-phases %standard-phases
+ ,@%common-build-phases
+ (replace 'check
+ (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
+ (let ((skipped-tests (list ,@%common-disabled-tests
+ ;; This test requires the bundled libuv.
+ "BootstrapTest")))
+ (if tests?
+ (begin
+ (invoke "ctest" "-j" (if parallel-tests?
+ (number->string (parallel-job-count))
+ "1")
+ "--exclude-regex"
+ (string-append "^(" (string-join skipped-tests "|") ")$")))
+ (format #t "test suite not run~%"))
+ #t))))
+ ,@(if (%current-target-system)
+ '()
+ `(#:cmake ,cmake-bootstrap))))))
+
+;;; The "user-facing" CMake, now with manuals and HTML documentation.
(define-public cmake
(package
(inherit cmake-minimal)
(name "cmake")
(arguments
(substitute-keyword-arguments (package-arguments cmake-minimal)
- ((#:configure-flags configure-flags ''())
- `(append ,configure-flags
- ;; Extra configure flags used to generate the documentation.
- '("--sphinx-info"
- "--sphinx-man"
- "--sphinx-html")))
+ ;; Use cmake-minimal this time.
+ ((#:cmake _ #f)
+ (if (%current-target-system)
+ cmake-minimal-cross
+ cmake-minimal))
+
+ ;; Enable debugging information for convenience.
+ ((#:build-type _ #f) "RelWithDebInfo")
+
+ ((#:configure-flags flags ''())
+ `(append (list "-DSPHINX_INFO=ON" "-DSPHINX_MAN=ON" "-DSPHINX_HTML=ON"
+ (string-append "-DCMAKE_DOC_DIR=share/doc/cmake-"
+ ,(version-major+minor (package-version
+ cmake-minimal)))
+ "-DCMAKE_INFO_DIR=share/info"
+ "-DCMAKE_MAN_DIR=share/man")
+ ,flags))
((#:phases phases)
`(modify-phases ,phases
(add-after 'install 'move-html-doc
@@ -208,45 +334,13 @@ and workspaces that can be used in the compiler environment of your choice.")
(outputs '("out" "doc"))
(properties (alist-delete 'hidden? (package-properties cmake-minimal)))))
-(define-public cmake-3.15.5
- ;; CMake 3.15.5 fixes some issues, but declare another version to
- ;; avoid triggering the rebuild of all CMake-based packages.
- ;; See <https://issues.guix.gnu.org/issue/38060>.
- ;;
- ;; Furthermore, this variant fixes X.509 certificate lookup:
- ;; <https://issues.guix.gnu.org/issue/37371>.
+(define-public cmake-minimal-cross
(package
- (inherit cmake)
- (version "3.15.5")
- (source (origin
- (inherit (package-source cmake))
- (uri (string-append "https://www.cmake.org/files/v"
- (version-major+minor version)
- "/cmake-" version ".tar.gz"))
- (sha256
- (base32
- "1d5y8d92axcc6rfqlsxamayfs3fc1vdby91hn5mx1kn02ppprpgv"))
- (patches
- (append (search-patches "cmake-curl-certificates.patch")
- (origin-patches (package-source cmake))))))
-
- (native-search-paths
- ;; "cmake-curl-certificates.patch" changes CMake to honor 'SSL_CERT_DIR'
- ;; and 'SSL_CERT_FILE', hence these search path entries.
- (append (list (search-path-specification
- (variable "SSL_CERT_DIR")
- (separator #f) ;single entry
- (files '("etc/ssl/certs")))
- (search-path-specification
- (variable "SSL_CERT_FILE")
- (file-type 'regular)
- (separator #f) ;single entry
- (files '("etc/ssl/certs/ca-certificates.crt"))))
- (package-native-search-paths cmake)))))
-
-;; This was cmake@3.15.1 plus "cmake-curl-certificates.patch".
-(define-deprecated cmake/fixed cmake-3.15.5)
-(export cmake/fixed)
+ (inherit cmake-minimal)
+ (name "cmake-minimal-cross")
+ (native-search-paths '())
+ (search-paths
+ (package-native-search-paths cmake-minimal))))
(define-public emacs-cmake-mode
(package
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index c1eaaf1aab..a4697e34cd 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -30,6 +30,7 @@
(define-module (gnu packages code)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
@@ -659,9 +660,24 @@ the C, C++, C++/CLI, Objective‑C, C#, and Java programming languages.")
;; overrides this to be in PREFIX/doc. Fix this.
(substitute* "doc/Makefile.in"
(("^docdir = .*$") "docdir = @docdir@\n"))
+ #t))
+ (add-after 'unpack 'fix-configure
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ ;; Replace outdated config.sub and config.guess:
+ (with-directory-excursion "config"
+ (for-each (lambda (file)
+ (install-file
+ (string-append (assoc-ref
+ (or native-inputs inputs) "automake")
+ "/share/automake-"
+ ,(version-major+minor
+ (package-version automake))
+ "/" file) "."))
+ '("config.sub" "config.guess")))
#t)))))
(native-inputs
- `(("texinfo" ,texinfo)))
+ `(("texinfo" ,texinfo)
+ ("automake" ,automake))) ; For up to date 'config.guess' and 'config.sub'.
(synopsis "Code reformatter")
(description
"Indent is a program that makes source code easier to read by
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 42d1132fba..65797af244 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1,12 +1,13 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,7 +32,6 @@
#:use-module (gnu packages c)
#:use-module (gnu packages gcc)
#:use-module (gnu packages m4)
- #:use-module (gnu packages file)
#:use-module (gnu packages gawk)
#:use-module (gnu packages bison)
#:use-module (gnu packages flex)
@@ -44,13 +44,16 @@
#:use-module (gnu packages python)
#:use-module (gnu packages linux)
#:use-module (gnu packages hurd)
+ #:use-module (gnu packages shells)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages rsync)
#:use-module (gnu packages xml)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix memoization)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
@@ -80,81 +83,369 @@
;;;
;;; Code:
+(define bootar
+ (package
+ (name "bootar")
+ (version "1a")
+ (source (origin
+ (method url-fetch)
+ (uri (list (string-append
+ "mirror://gnu/guix/mirror/bootar-" version ".ses")
+ (string-append
+ "https://files.ngyro.com/bootar/bootar-"
+ version ".ses")))
+ (sha256
+ (base32
+ "0mvp6vgx0q316fvy3z2lddlc5xgq5np3bm1fypgvj6dnayibg9np"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:implicit-inputs? #f
+ #:tests? #f
+ #:guile ,%bootstrap-guile
+ #:imported-modules ((guix build gnu-bootstrap)
+ ,@%gnu-build-system-modules)
+ #:phases
+ (begin
+ (use-modules (guix build gnu-bootstrap))
+ (modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((source (assoc-ref inputs "source"))
+ (guile-dir (assoc-ref inputs "guile"))
+ (guile (string-append guile-dir "/bin/guile")))
+ (invoke guile "--no-auto-compile" source)
+ (chdir "bootar")
+ #t)))
+ (replace 'configure (bootstrap-configure ,version "." "scripts"))
+ (replace 'build (bootstrap-build "."))
+ (replace 'install (bootstrap-install "." "scripts"))))))
+ (inputs `(("guile" ,%bootstrap-guile)))
+ (home-page "https://git.ngyro.com/bootar")
+ (synopsis "Tar decompression and extraction in Guile Scheme")
+ (description "Bootar is a simple Tar extractor written in Guile
+Scheme. It supports running 'tar xvf' on uncompressed tarballs or
+tarballs that are compressed with BZip2, GZip, or XZ. It also provides
+standalone scripts for 'bzip2', 'gzip', and 'xz' that each support
+decompression to standard output.
+
+What makes this special is that Bootar is distributed as a
+self-extracting Scheme (SES) program. That is, a little script that
+outputs the source code of Bootar. This makes it possible to go from
+pure Scheme to Tar and decompression in one easy step.")
+ (license license:gpl3+)))
+
+(define gash-boot
+ (package
+ (inherit gash)
+ (name "gash-boot")
+ (source (origin
+ (inherit (package-source gash))
+ (modules '())))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:tests? #f
+ #:guile ,%bootstrap-guile
+ #:imported-modules ((guix build gnu-bootstrap)
+ ,@%gnu-build-system-modules)
+ #:phases
+ (begin
+ (use-modules (guix build gnu-bootstrap))
+ (modify-phases %standard-phases
+ (replace 'configure
+ (bootstrap-configure ,(package-version gash) "gash" "scripts"))
+ (replace 'build (bootstrap-build "gash"))
+ (replace 'install (bootstrap-install "gash" "scripts"))
+ (add-after 'install 'install-symlinks
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (symlink (string-append out "/bin/gash")
+ (string-append out "/bin/sh"))
+ (symlink (string-append out "/bin/gash")
+ (string-append out "/bin/bash"))
+ #t)))))))
+ (inputs `(("guile" ,%bootstrap-guile)))
+ (native-inputs `(("bootar" ,bootar)))))
+
+(define gash-utils-boot
+ (package
+ (inherit gash-utils)
+ (name "gash-utils-boot")
+ (arguments
+ `(#:implicit-inputs? #f
+ #:tests? #f
+ #:guile ,%bootstrap-guile
+ #:imported-modules ((guix build gnu-bootstrap)
+ ,@%gnu-build-system-modules)
+ #:phases
+ (begin
+ (use-modules (guix build gnu-bootstrap))
+ (modify-phases %standard-phases
+ (add-after 'unpack 'set-load-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gash (assoc-ref inputs "gash")))
+ (add-to-load-path (string-append gash "/share/guile/site/"
+ (effective-version))))
+ #t))
+ (add-before 'configure 'pre-configure
+ (lambda _
+ (format #t "Creating gash/commands/testb.scm~%")
+ (copy-file "gash/commands/test.scm"
+ "gash/commands/testb.scm")
+ (substitute* "gash/commands/testb.scm"
+ (("gash commands test") "gash commands testb")
+ (("apply test [(]cdr") "apply test/bracket (cdr"))
+ (for-each (lambda (script)
+ (let ((target (string-append "scripts/"
+ script ".in")))
+ (format #t "Creating scripts/~a~%" target)
+ (copy-file "scripts/template.in" target)
+ (substitute* target
+ (("@UTILITY@") script))))
+ '("awk" "basename" "cat" "chmod" "cmp" "command"
+ "compress" "cp" "cut" "diff" "dirname" "expr"
+ "false" "find" "grep" "head" "ln" "ls" "mkdir"
+ "mv" "printf" "pwd" "reboot" "rm" "rmdir"
+ "sed" "sleep" "sort" "tar" "test" "touch" "tr"
+ "true" "uname" "uniq" "wc" "which"))
+ (format #t "Creating scripts/[.in~%")
+ (copy-file "scripts/template.in" "scripts/[.in")
+ (substitute* "scripts/[.in"
+ (("@UTILITY@") "testb"))
+ (delete-file "scripts/template.in")
+ #t))
+ (replace 'configure
+ (bootstrap-configure ,(package-version gash-utils)
+ "gash" "scripts"))
+ (replace 'build (bootstrap-build "gash"))
+ (replace 'install (bootstrap-install "gash" "scripts"))
+ ;; XXX: The scripts should add Gash to their load paths and
+ ;; this phase should not exist.
+ (add-after 'install 'copy-gash
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (moddir (string-append out "/share/guile/site/"
+ (effective-version)))
+ (godir (string-append out "/lib/guile/"
+ (effective-version)
+ "/site-ccache"))
+ (gash (assoc-ref inputs "gash"))
+ (gash-moddir (string-append gash "/share/guile/site/"
+ (effective-version)))
+ (gash-godir (string-append gash "/lib/guile/"
+ (effective-version)
+ "/site-ccache")))
+ (copy-file (string-append gash-moddir "/gash/compat.scm")
+ (string-append moddir "/gash/compat.scm"))
+ (copy-recursively (string-append gash-moddir "/gash/compat")
+ (string-append moddir "/gash/compat"))
+ (copy-file (string-append gash-godir "/gash/compat.go")
+ (string-append godir "/gash/compat.go"))
+ (copy-recursively (string-append gash-godir "/gash/compat")
+ (string-append godir "/gash/compat"))
+ #t)))))))
+ (inputs `(("gash" ,gash-boot)
+ ("guile" ,%bootstrap-guile)))
+ (native-inputs `(("bootar" ,bootar)))))
+
+(define (%boot-gash-inputs)
+ `(("bash" , gash-boot) ; gnu-build-system wants "bash"
+ ("coreutils" , gash-utils-boot)
+ ("bootar" ,bootar)
+ ("guile" ,%bootstrap-guile)))
+
+(define %bootstrap-mes-rewired
+ (package
+ (inherit mes)
+ (name "bootstrap-mes-rewired")
+ (version "0.19")
+ (source #f)
+ (native-inputs `(("mes" ,%bootstrap-mes)
+ ("gash" ,gash-boot)))
+ (inputs '())
+ (propagated-inputs '())
+ (outputs '("out"))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:modules ((guix build utils))
+
+ #:builder (begin
+ (use-modules (guix build utils)
+ (srfi srfi-26))
+
+ (let* ((mes (assoc-ref %build-inputs "mes"))
+ (gash (assoc-ref %build-inputs "gash"))
+ (mes-bin (string-append mes "/bin"))
+ (guile (string-append mes-bin "/mes"))
+ (mes-module (string-append mes "/share/mes/module"))
+ (out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin"))
+ (mescc (string-append bin "/mescc"))
+ (module (string-append out "/share/mes/module")))
+ (define (rewire file)
+ (substitute* file
+ ((mes) out)
+ (("/gnu/store[^ ]+mes-minimal-[^/)}\"]*") out)
+ (("/gnu/store[^ ]+guile-[^/]*/bin/guile") guile)
+ (("/gnu/store[^ ]+bash-[^/)}\"]*") gash)))
+
+ (mkdir-p bin)
+ (for-each (lambda (file) (install-file file bin))
+ (find-files mes-bin))
+ (mkdir-p module)
+ (copy-recursively (string-append mes-module "/mes")
+ (string-append module "/mes"))
+ (copy-recursively (string-append mes-module "/srfi")
+ (string-append module "/srfi"))
+ (for-each rewire
+ ;; Cannot easily rewire "mes" because it
+ ;; contains NUL characters; would require
+ ;; remove-store-references alike trick
+ (filter (negate (cut string-suffix? "/mes" <>))
+ (find-files bin)))
+ (rewire (string-append module "/mes/boot-0.scm"))
+
+ (delete-file mescc)
+ (with-output-to-file mescc
+ (lambda _
+ (display (string-append
+ "\
+#! " gash "/bin/sh
+LANG=C
+LC_ALL=C
+export LANG LC_ALL
+
+MES_PREFIX=${MES_REWIRED_PREFIX-" out "/share/mes}
+MES=" bin "/mes
+export MES MES_PREFIX
+
+MES_ARENA=${MES_REWIRED_ARENA-10000000}
+MES_MAX_ARENA=${MES_REWIRED_ARENA-10000000}
+MES_STACK=${MES_REWIRED_STACK-1000000}
+export MES_ARENA MES_MAX_ARENA MES_STACK
+
+$MES -e '(mescc)' module/mescc.scm -- \"$@\"
+"))))
+ (chmod mescc #o555)
+
+ (with-directory-excursion module
+ (chmod "mes/base.mes" #o644)
+ (copy-file "mes/base.mes" "mes/base.mes.orig")
+ (let ((base.mes (open-file "mes/base.mes" "a")))
+ (display "
+;; A fixed map, from Mes 0.21, required to bootstrap Mes 0.21
+(define (map f h . t)
+ (if (or (null? h)
+ (and (pair? t) (null? (car t)))
+ (and (pair? t) (pair? (cdr t)) (null? (cadr t)))) '()
+ (if (null? t) (cons (f (car h)) (map f (cdr h)))
+ (if (null? (cdr t))
+ (cons (f (car h) (caar t)) (map f (cdr h) (cdar t)))
+ (if (null? (cddr t))
+ (cons (f (car h) (caar t) (caadr t)) (map f (cdr h) (cdar t) (cdadr t)))
+ (error 'unsupported (cons* 'map-4: f h t))b )))))
+" base.mes)
+ (close base.mes))
+
+ (chmod "mes/guile.mes" #o644)
+ (copy-file "mes/guile.mes" "mes/guile.mes.orig")
+ (let ((guile.mes (open-file "mes/guile.mes" "a")))
+ (display "
+;; After booting guile.scm; use Mes 0.21; especially: MesCC 0.21
+(let* ((self (car (command-line)))
+ (prefix (dirname (dirname self))))
+ (set! %moduledir (string-append prefix \"/mes/module/\"))
+ (setenv \"%numbered_arch\" \"true\"))
+
+" guile.mes)
+ (close guile.mes)))
+ #t))))))
+
(define mes-boot
(package
(inherit mes)
(name "mes-boot")
- (version "0.19")
+ (version "0.22")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/mes/"
"mes-" version ".tar.gz"))
(sha256
(base32
- "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0"))))
+ "0p1jsrrmcbc0zrvbvnjbb6iyxr0in71km293q8qj6gnar6bw09av"))))
(inputs '())
(propagated-inputs '())
(native-inputs
- `(("mescc-tools" ,%bootstrap-mescc-tools)
- ("nyacc-source" ,(bootstrap-origin
- (package-source nyacc-0.86)))
-
- ("coreutils" , %bootstrap-coreutils&co)
- ("bootstrap-mes" ,%bootstrap-mes)))
+ `(("nyacc-source" ,(origin (inherit (package-source nyacc))
+ (snippet #f)))
+ ("mes" ,%bootstrap-mes-rewired)
+ ("mescc-tools" ,%bootstrap-mescc-tools)
+ ,@(%boot-gash-inputs)))
(arguments
`(#:implicit-inputs? #f
+ #:tests? #f
#:guile ,%bootstrap-guile
#:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'unpack-seeds
(lambda _
- (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source"))
- (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes")))
+ (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source")))
(with-directory-excursion ".."
- (mkdir-p "nyacc-source")
- (invoke "tar" "--strip=1" "-C" "nyacc-source" "-xvf" nyacc-source)
- (symlink (string-append bootstrap-mes "/share/mes/lib") "mes-seed"))
- #t)))
+ (invoke "tar" "-xvf" nyacc-source)))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref %outputs "out")))
- (setenv "GUILE" "mes")
- (setenv "GUILE_EFFECTIVE_VERSION" "2.2")
- (setenv "GUILE_LOAD_PATH" "nyacc")
- (symlink (string-append "../nyacc-source/module") "nyacc")
- (invoke "bash" "configure.sh"
- (string-append "--prefix=" out)))))
+ (let ((out (assoc-ref %outputs "out"))
+ (gash (assoc-ref %build-inputs "bash"))
+ (mes (assoc-ref %build-inputs "mes"))
+ (dir (with-directory-excursion ".." (getcwd))))
+ (setenv "AR" (string-append "gash " (getcwd) "/scripts/mesar"))
+ (setenv "BASH" (string-append gash "/bin/bash"))
+ (setenv "CC" (string-append mes "/bin/mescc"))
+ (setenv "GUILE_LOAD_PATH"
+ (string-append
+ mes "/share/mes/module"
+ ":" dir "/nyacc-0.99.0/module"))
+ (invoke "gash" "configure.sh"
+ (string-append "--prefix=" out)
+ (string-append "--host=i686-linux-gnu")))))
(replace 'build
(lambda _
- (let ((mes (assoc-ref %build-inputs "bootstrap-mes")))
- (setenv "MES_PREFIX" (string-append mes "/share/mes"))
- (setenv "MES_ARENA" "100000000")
- (setenv "MES_MAX_ARENA" "100000000")
- (setenv "MES_STACK" "10000000")
- (invoke "sh" "bootstrap.sh"))))
- (replace 'check
- (lambda _
- (setenv "DIFF" "sh scripts/diff.scm")
- ;; fail fast tests
- ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t")
- ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/63-struct-cell")
- (invoke "sh" "check.sh")))
+ (invoke "sh" "bootstrap.sh")))
+ (delete 'check)
(replace 'install
(lambda _
- (invoke "sh" "install.sh"))))))
+ (substitute* "install.sh" ; show some progress
+ ((" -xf") " -xvf")
+ (("^( *)((cp|mkdir|tar) [^']*[^\\])\n" all space cmd)
+ (string-append space "echo '" cmd "'\n"
+ space cmd "\n")))
+ (invoke "sh" "install.sh")
+ ;; Keep ASCII output, for friendlier comparison and bisection
+ (let* ((out (assoc-ref %outputs "out"))
+ (cache (string-append out "/lib/cache")))
+ (define (objects-in-dir dir)
+ (find-files dir
+ (lambda (name stat)
+ (and (equal? (dirname name) dir)
+ (or (string-suffix? ".o" name)
+ (string-suffix? ".s" name))))))
+ (for-each (lambda (x) (install-file x cache))
+ (append (objects-in-dir ".")
+ (objects-in-dir "mescc-lib"))))
+ #t)))))
(native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
(list (search-path-specification
(variable "C_INCLUDE_PATH")
- (files '("share/mes/include")))
+ (files '("include")))
(search-path-specification
(variable "LIBRARY_PATH")
- (files '("share/mes/lib")))))))
+ (files '("lib")))
+ (search-path-specification
+ (variable "MES_PREFIX")
+ (separator #f)
+ (files '("")))))))
+
(define tcc-boot0
;; Pristine tcc cannot be built by MesCC, we are keeping a delta of 11
@@ -163,266 +454,467 @@
;; bootstrappable effort; we will try again later. These patches have been
;; ported to 0.9.27, alas the resulting tcc is buggy. Once MesCC is more
;; mature, this package should use the 0.9.27 sources (or later).
- (let ((version "0.9.26")
- (revision "6")
- (commit "c004e9a34fb026bb44d211ab98bb768e79900eef"))
- (package
- (inherit tcc)
- (name "tcc-boot0")
- (version (string-append version "-" revision "." (string-take commit 7)))
- (source (origin
- (method url-fetch)
- (uri (list (string-append "mirror://gnu/guix/mirror"
- "/tinycc-" commit ".tar.gz")
- (string-append "https://gitlab.com/janneke/tinycc"
- "/-/archive/" commit
- "/tinycc-" commit ".tar.gz")))
- (sha256
- (base32
- "1hmzn1pq0x22ppd80hyrn5qzqq94mxd0ychzj6vrr2vnj2frjv5b"))))
- (build-system gnu-build-system)
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs
- `(("mes" ,mes-boot)
- ("mescc-tools" ,%bootstrap-mescc-tools)
- ("nyacc-source" ,(bootstrap-origin
- (package-source nyacc-0.86)))
-
- ("coreutils" , %bootstrap-coreutils&co)
- ("bootstrap-mes" ,%bootstrap-mes)))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'unpack-seeds
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
- (nyacc-source (assoc-ref %build-inputs "nyacc-source"))
- (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes")))
- (setenv "PATH" (string-append
- coreutils "/bin"))
- (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
- (with-directory-excursion ".."
- (mkdir-p "nyacc-source")
- (invoke "tar" "--strip=1" "-C" "nyacc-source"
- "-xvf" nyacc-source)
- (symlink (string-append bootstrap-mes "/share/mes/lib") "mes-seed"))
- #t)))
- (replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref %outputs "out"))
- (dir (with-directory-excursion ".." (getcwd)))
- (coreutils (assoc-ref %build-inputs "coreutils"))
- (mes (assoc-ref %build-inputs "mes"))
- (mescc-tools (assoc-ref %build-inputs "mescc-tools"))
- (libc (assoc-ref %build-inputs "libc"))
- (interpreter (if libc
- ;; also for x86_64-linux, we are still on i686-linux
- (string-append libc ,(glibc-dynamic-linker "i686-linux"))
- (string-append mes "/lib/mes-loader"))))
- (setenv "PATH" (string-append
- coreutils "/bin"
- ":" mes "/bin"
- ":" mescc-tools "/bin"))
- (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
-
- (setenv "PREFIX" out)
- (symlink (string-append mes "/share/mes") "mes")
- (symlink (string-append "../nyacc-source/module") "nyacc")
- (setenv "MES_PREFIX" "mes")
- (setenv "MES_ARENA" "100000000")
- (setenv "MES_MAX_ARENA" "100000000")
- (setenv "MES_STACK" "10000000")
- (setenv "MES" "mes")
- (setenv "GUILE_LOAD_PATH" "nyacc")
- (invoke "sh" "configure"
- "--prefix=$PREFIX"
- (string-append "--elfinterp=" interpreter)
- "--crtprefix=."
- "--tccdir=."))))
- (replace 'build
- (lambda _
- (substitute* "bootstrap.sh"
- (("^ cmp") "# cmp"))
- (invoke "sh" "bootstrap.sh")))
- (replace 'check
- (lambda _
- (setenv "DIFF" "diff.scm")
- (setenv "OBJDUMP" "true")
- ;; fail fast tests
- ;; (invoke "sh" "test.sh" "mes/scaffold/tests/30-strlen")
- ;; (invoke "sh" "-x" "test.sh" "mes/scaffold/tinycc/00_assignment")
- (setenv "TCC" "./tcc")
- (invoke "sh" "check.sh")))
- (replace 'install
- (lambda _
- (invoke "sh" "install.sh"))))))
- (native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
- (list (search-path-specification
- (variable "C_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "LIBRARY_PATH")
- (files '("lib"))))))))
-
-(define tcc-boot
(package
- (inherit tcc-boot0)
- (name "tcc-boot")
- (version "0.9.27")
- (source (bootstrap-origin
- (origin
- (inherit (package-source tcc))
- (patches (search-patches "tcc-boot-0.9.27.patch")))))
+ (inherit tcc)
+ (name "tcc-boot0")
+ (version "0.9.26-1103-g6e62e0e")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://lilypond.org/janneke/mes/20191117/"
+ "/tcc-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1qbybw7mxbgkv3sazvz1v7c8byq998vk8f1h25ik8w3d2l63lxng"))))
(build-system gnu-build-system)
+ (supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
(native-inputs
`(("mes" ,mes-boot)
- ("tcc" ,tcc-boot0)
-
- ("coreutils" , %bootstrap-coreutils&co)))
+ ("nyacc-source" ,(origin (inherit (package-source nyacc))
+ (snippet #f)))
+ ("mescc-tools" ,%bootstrap-mescc-tools)
+ ,@(%boot-gash-inputs)))
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
-
- ;; Binutils' 'strip' b0rkes MesCC/M1/hex2 binaries, tcc-boot also comes
- ;; with MesCC/M1/hex2-built binaries.
- #:strip-binaries? #f
-
+ #:validate-runpath? #f ; no dynamic executables
+ #:strip-binaries? #f ; no strip yet
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'unpack-seeds
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source")))
+ (with-directory-excursion ".."
+ (invoke "tar" "-xvf" nyacc-source)))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref %outputs "out"))
- (coreutils (assoc-ref %build-inputs "coreutils"))
- (mes (assoc-ref %build-inputs "mes"))
- (tcc (assoc-ref %build-inputs "tcc"))
- (libc (assoc-ref %build-inputs "libc"))
- (interpreter (if libc
- ;; also for x86_64-linux, we are still on i686-linux
- (string-append libc ,(glibc-dynamic-linker "i686-linux"))
- (string-append mes "/lib/mes-loader"))))
- ;; unpack
- (setenv "PATH" (string-append
- coreutils "/bin"
- ":" tcc "/bin"))
- (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
+ (dir (with-directory-excursion ".." (getcwd)))
+ (interpreter "/lib/mes-loader"))
+
+ (setenv "prefix" out)
+ (setenv "GUILE_LOAD_PATH"
+ (string-append dir "/nyacc-0.99.0/module"))
+
+ (substitute* "conftest.c"
+ (("volatile") ""))
+
(invoke "sh" "configure"
- (string-append "--cc=tcc")
- (string-append "--cpu=i386")
+ "--cc=mescc"
(string-append "--prefix=" out)
(string-append "--elfinterp=" interpreter)
- (string-append "--crtprefix=" tcc "/lib")
- (string-append "--sysincludepaths=" tcc "/include")
- (string-append "--libpaths=" tcc "/lib")))))
+ "--crtprefix=."
+ "--tccdir=."))))
(replace 'build
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref %outputs "out"))
- (mes (assoc-ref %build-inputs "mes"))
- (tcc (assoc-ref %build-inputs "tcc"))
- (libc (assoc-ref %build-inputs "libc"))
- (interpreter (if libc
- ;; also for x86_64-linux, we are still on i686-linux
- (string-append libc ,(glibc-dynamic-linker "i686-linux"))
- (string-append mes "/lib/mes-loader"))))
- (invoke "tcc"
- "-vvv"
- "-D" "BOOTSTRAP=1"
- "-D" "ONE_SOURCE=1"
- "-D" "TCC_TARGET_I386=1"
- "-D" "CONFIG_TCC_STATIC=1"
- "-D" "CONFIG_USE_LIBGCC=1"
- "-D" (string-append "CONFIG_TCCDIR=\"" out "/lib/tcc\"")
- "-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"")
- "-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out
- "/lib:{B}/lib:.\"")
- "-D" (string-append "CONFIG_TCC_ELFINTERP=\"" interpreter "\"")
- "-D" (string-append "CONFIG_TCC_LIBPATHS=\"" tcc "/lib:{B}/lib:.\"")
- "-D" (string-append "CONFIG_TCC_SYSINCLUDEPATHS=\"" tcc "/include" ":/include:{B}/include\"")
- "-D" (string-append "TCC_LIBGCC=\"" tcc "/lib/libc.a\"")
- "-o" "tcc"
- "tcc.c"))))
+ (lambda _
+ (substitute* "bootstrap.sh" ; Show some progress
+ (("^( *)((cp|ls|mkdir|rm|[.]/tcc|[.]/[$][{PROGRAM_PREFIX[}]tcc) [^\"]*[^\\])\n" all space cmd)
+ (string-append space "echo \"" cmd "\"\n"
+ space cmd "\n")))
+ (invoke "sh" "bootstrap.sh")))
(replace 'check
(lambda _
- ;; FIXME: add sensible check target (without depending on make)
- ;; ./check.sh ?
- (= 1 (status:exit-val (system* "./tcc" "--help")))))
+ ;; fail fast tests
+ (system* "./tcc" "--help") ; --help exits 1
+ ;; (invoke "sh" "test.sh" "mes/scaffold/tests/30-strlen")
+ ;; (invoke "sh" "-x" "test.sh" "mes/scaffold/tinycc/00_assignment")
+ ;; TODO: add sensible check target (without depending on make)
+ ;; (invoke "sh" "check.sh")
+ #t))
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref %outputs "out"))
- (tcc (assoc-ref %build-inputs "tcc")))
- (mkdir-p (string-append out "/bin"))
- (copy-file "tcc" (string-append out "/bin/tcc"))
- (mkdir-p (string-append out "/lib/tcc"))
- (copy-recursively (string-append tcc "/include")
- (string-append out "/include"))
- (copy-recursively (string-append tcc "/lib")
- (string-append out "/lib"))
- (invoke "tcc" "-D" "TCC_TARGET_I386=1" "-c" "-o" "libtcc1.o" "lib/libtcc1.c")
- (invoke "tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o")
- (copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a"))
- (delete-file (string-append out "/lib/tcc/libtcc1.a"))
- (copy-file "libtcc1.a" (string-append out "/lib/tcc/libtcc1.a"))
- #t))))))))
+ (lambda _
+ (substitute* "install.sh" ; Show some progress
+ (("^( *)((cp|ls|mkdir|rm|tar|./[$][{PROGRAM_PREFIX[}]tcc) [^\"]*[^\\])\n" all space cmd)
+ (string-append space "echo \"" cmd "\"\n"
+ space cmd "\n")))
-(define make-mesboot0
+ (invoke "sh" "install.sh"))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (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 gnu-make-mesboot0
+ ;; The initial make
(package
(inherit gnu-make)
(name "make-mesboot0")
(version "3.80")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://gnu/make/make-"
- version ".tar.gz"))
+ (uri (string-append "mirror://gnu/make/make-" version ".tar.gz"))
(sha256
(base32
"1pb7fb7fqf9wz9najm85qdma1xhxzf1rhj5gwrlzdsz2zm0hpcv4"))))
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
- (native-inputs `(("tcc" ,tcc-boot)
-
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)))
+ (native-inputs `(("tcc" ,tcc-boot0)
+ ,@(%boot-gash-inputs)))
(arguments
`(#:implicit-inputs? #f
- #:tests? #f ; check depends on perl
#:guile ,%bootstrap-guile
- #:configure-flags `("CC=tcc -DO_RDONLY=0"
+ #:configure-flags '("CC=tcc"
+ "CPP=tcc -E"
"LD=tcc"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
"--disable-nls")
+ #:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1))
+ #:strip-binaries? #f ; no strip yet
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'scripted-patch
+ (lambda _
+ (substitute* "build.sh.in"
+ (("@LIBOBJS@") "getloadavg.o")
+ (("@REMOTE@") "stub"))
+ #t))
(add-after 'configure 'configure-fixup
(lambda _
- (substitute* "build.sh"
- (("^REMOTE=.*") "REMOTE=stub\n")
- (("^extras=.*") "extras=getloadavg.c\n"))
(substitute* "make.h"
(("^extern long int lseek.*" all) (string-append "// " all)))
#t))
- (delete 'patch-generated-file-shebangs) ; no perl
(replace 'build
(lambda _
(invoke "sh" "./build.sh")))
+ (replace 'check ; proper check needs awk
+ (lambda _
+ (invoke "./make" "--version")))
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
(bin (string-append out "/bin")))
- (install-file "make" bin)
+ (install-file "make" bin)))))))))
+
+(define (%boot-tcc0-inputs)
+ `(("make" ,gnu-make-mesboot0)
+ ("tcc" ,tcc-boot0)
+ ,@(%boot-gash-inputs)))
+
+(define bzip2-mesboot
+ ;; The initial bzip2
+ (package
+ (inherit bzip2)
+ (name "bzip2-mesboot")
+ (version (package-version bzip2))
+ (source (bootstrap-origin (package-source bzip2)))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs (%boot-tcc0-inputs))
+ (outputs '("out"))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:parallel-build? #f
+ #:tests? #f ; check is naive, also checks non-built PROGRAMS
+ #:strip-binaries? #f ; no strip yet
+ #:make-flags (list "CC=tcc -I ." "AR=tcc -ar" "bzip2"
+ (string-append "PREFIX="
+ (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'scripted-patch
+ (lambda _
+ (substitute* "Makefile"
+ (("\tln " all)
+ (string-append "\t#" all)))
+ (substitute* "bzip2.c"
+ (("struct utimbuf uTimBuf;" all)
+ (string-append "// " all))
+ (("uTimBuf[.]" all)
+ (string-append "// " all))
+ (("retVal = utime [(] dstName, &uTimBuf [)];" all)
+ (string-append "retVal = 0; // " all)))
+ #t))
+ (replace 'configure
+ (lambda _
+ (with-output-to-file "utime.h"
+ (lambda _ (display "
+#define fchown(filedes, owner, group) 0
+#define fchmod(filedes, mode) 0
+")))
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "./bzip2" "--help")))
+ ;; FIXME: no compressing gzip yet
+ (delete 'compress-documentation))))))
+
+(define bash-mesboot0
+ ;; The initial Bash
+ (package
+ (inherit static-bash)
+ (name "bash-mesboot0")
+ (version "2.05b")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/bash/bash-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1r1z2qdw3rz668nxrzwa14vk2zcn00hw7mpjn384picck49d80xs"))))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs (%boot-tcc0-inputs))
+ (outputs '("out"))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:parallel-build? #f
+ #:strip-binaries? #f ; no strip yet
+ #:configure-flags
+ (list "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+
+ "--without-bash-malloc"
+ "--disable-readline"
+ "--disable-history"
+ "--disable-help-builtin"
+ "--disable-progcomp"
+ "--disable-net-redirections"
+ "--disable-nls"
+
+ ;; Pretend 'dlopen' is missing so we don't build loadable
+ ;; modules and related code.
+ "ac_cv_func_dlopen=no")
+ #:make-flags '("bash")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'setenv
+ (lambda _
+ (let* ((gash (assoc-ref %build-inputs "bash"))
+ (shell (string-append gash "/bin/gash")))
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "SHELL" shell)
+ (setenv "CC" "tcc")
+ (setenv "LD" "tcc")
+ (setenv "AR" "tcc -ar")
+ (setenv "CFLAGS" "-D _POSIX_VERSION=1")
+ #t)))
+ (add-after 'unpack 'scripted-patch
+ (lambda _
+ (substitute* "Makefile.in"
+ (("mksyntax\\.c\n") "mksyntax.c -lgetopt\n")
+ (("buildversion[.]o\n") "buildversion.o -lgetopt\n")
+ ;; No size in Gash
+ (("\tsize ") "#\tsize"))
+ (substitute* "lib/sh/oslib.c"
+ (("int name, namelen;") "char *name; int namelen;"))
+ (substitute* "lib/sh/snprintf.c"
+ (("^#if (defined [(]HAVE_LOCALE_H[)])" all define) (string-append "#if 0 //" define)))
+ (substitute* "configure"
+ ((" egrep") " grep"))
+ #t))
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (let ((configure-flags (filter (lambda (x)
+ (and (not (string-prefix? "CONFIG_SHELL=" x))
+ (not (string-prefix? "SHELL=" x))))
+ configure-flags)))
+ (format (current-error-port)
+ "running ./configure ~a\n" (string-join configure-flags)))
+ (apply invoke (cons "./configure" configure-flags))))
+ (add-after 'configure 'configure-fixups
+ (lambda _
+ (substitute* "config.h"
+ (("#define GETCWD_BROKEN 1") "#undef GETCWD_BROKEN"))
+ (let ((config.h (open-file "config.h" "a")))
+ (display (string-append "
+// tcc: error: undefined symbol 'enable_hostname_completion'
+#define enable_hostname_completion(on_or_off) 0
+
+// /gnu/store/cq0cmv35s9dhilx14zaghlc08gpc0hwr-tcc-boot0-0.9.26-6.c004e9a/lib/libc.a: error: 'sigprocmask' defined twice
+#define HAVE_POSIX_SIGNALS 1
+#define endpwent(x) 0
+")
+ config.h)
+ (close config.h))
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "./bash" "--version")))
+ (replace 'install
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (copy-file "bash" (string-append bin "/bash"))
+ (copy-file "bash" (string-append bin "/sh"))
#t))))))))
+(define tcc-boot
+ ;; The final tcc.
+ (package
+ (inherit tcc-boot0)
+ (name "tcc-boot")
+ (version "0.9.27")
+ (source (origin
+ (inherit (package-source tcc))
+ ;; `patches' needs XZ
+ ;; (patches (search-patches "tcc-boot-0.9.27.patch"))
+ ))
+ (build-system gnu-build-system)
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs `(;;("boot-patch" ,(search-patch "tcc-boot-0.9.27.patch"))
+ ("bzip2" ,bzip2-mesboot)
+ ,@(%boot-tcc0-inputs)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:validate-runpath? #f ; no dynamic executables
+ #:strip-binaries? #f ; no strip yet
+ #:phases
+ (modify-phases %standard-phases
+ ;; tar xvf ..bz2 gives
+ ;; bzip2: PANIC -- internal consistency error
+ (replace 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (copy-file source "tarball.tar.bz2")
+ (invoke "bzip2" "-d" "tarball.tar.bz2")
+ (invoke "tar" "xvf" "tarball.tar")
+ (chdir (string-append "tcc-" ,version))
+ #t))
+ ;; no patch yet
+ ;; (add-after 'unpack 'apply-boot-patch
+ ;; (lambda* (#:key inputs #:allow-other-keys)
+ ;; (let ((patch-file (assoc-ref inputs "boot-patch")))
+ ;; (invoke "patch" "-p1" "-i" patch-file))))
+ (add-after 'unpack 'scripted-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "libtcc.c"
+ (("s->alacarte_link = 1;" all)
+ (string-append all "
+ s->static_link = 1;")))
+ #t))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (tcc (assoc-ref %build-inputs "tcc"))
+ (libc (assoc-ref %build-inputs "libc"))
+ (interpreter "/mes/loader"))
+ (invoke "sh" "configure"
+ (string-append "--cc=tcc")
+ (string-append "--cpu=i386")
+ (string-append "--prefix=" out)
+ (string-append "--elfinterp=" interpreter)
+ (string-append "--crtprefix=" tcc "/lib")
+ (string-append "--sysincludepaths=" tcc "/include")
+ (string-append "--libpaths=" tcc "/lib")))))
+ (replace 'build
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (tcc (assoc-ref %build-inputs "tcc"))
+ (libc (assoc-ref %build-inputs "libc"))
+ (interpreter "/mes/loader"))
+ (invoke
+ "tcc"
+ "-vvv"
+ "-D" "BOOTSTRAP=1"
+ "-D" "ONE_SOURCE=1"
+ "-D" "TCC_TARGET_I386=1"
+ "-D" "CONFIG_TCC_STATIC=1"
+ "-D" "CONFIG_USE_LIBGCC=1"
+ "-D" (string-append "CONFIG_TCCDIR=\"" out "/lib/tcc\"")
+ "-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"")
+ "-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"")
+ "-D" (string-append "CONFIG_TCC_ELFINTERP=\"" interpreter "\"")
+ "-D" (string-append "CONFIG_TCC_LIBPATHS=\"" tcc "/lib:{B}/lib:.\"")
+ "-D" (string-append "CONFIG_TCC_SYSINCLUDEPATHS=\""
+ tcc "/include" ":/include:{B}/include\"")
+ "-D" (string-append "TCC_LIBGCC=\"" tcc "/lib/libc.a\"")
+ "-o" "tcc"
+ "tcc.c"))))
+ (replace 'check
+ (lambda _
+ ;; FIXME: add sensible check target (without depending on make)
+ ;; ./check.sh ?
+ (= 1 (status:exit-val (system* "./tcc" "--help")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref %outputs "out"))
+ (tcc (assoc-ref %build-inputs "tcc")))
+ (and
+ (mkdir-p (string-append out "/bin"))
+ (copy-file "tcc" (string-append out "/bin/tcc"))
+ (mkdir-p (string-append out "/lib/tcc"))
+ (copy-recursively (string-append tcc "/include")
+ (string-append out "/include"))
+ (copy-recursively (string-append tcc "/lib")
+ (string-append out "/lib"))
+ (invoke "tcc" "-D" "TCC_TARGET_I386=1" "-c" "-o" "libtcc1.o" "lib/libtcc1.c")
+ (invoke "tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o")
+ (copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a"))
+ (delete-file (string-append out "/lib/tcc/libtcc1.a"))
+ (copy-file "libtcc1.a" (string-append out "/lib/tcc/libtcc1.a"))
+ #t)))))))))
+
(define diffutils-mesboot
+ ;; The initial diffutils.
(package
(inherit diffutils)
(name "diffutils-mesboot")
@@ -437,12 +929,7 @@
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
- (native-inputs `(("mes" ,mes-boot)
- ("tcc" ,tcc-boot)
-
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("make" ,make-mesboot0)))
+ (native-inputs (%boot-tcc0-inputs))
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
@@ -451,97 +938,207 @@
#:strip-binaries? #f ; no strip yet
#:phases
(modify-phases %standard-phases
- ;; diffutils-2.7 needs more traditional configure
- (replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bash (assoc-ref %build-inputs "bash")))
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (setenv "CC" "tcc")
- (setenv "LD" "tcc")
- (invoke "./configure" (string-append "--prefix=" out)))))
(add-before 'configure 'remove-diff3-sdiff
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile.in"
- (("PROGRAMS = .*" all) "PROGRAMS = cmp diff"))
- #t)))))))
+ (("PROGRAMS = .*" all) "PROGRAMS = cmp diff"))))
+ (replace 'configure ; needs classic invocation of configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "CC" "tcc")
+ (setenv "LD" "tcc")
+ (format (current-error-port)
+ "running ./configure ~a\n" (string-join configure-flags))
+ (apply invoke (cons "./configure" configure-flags)))))
+ (replace 'install
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (install-file "cmp" bin)
+ (install-file "diff" bin)
+ #t))))))))
+
+(define patch-mesboot
+ ;; The initial patch.
+ (package
+ (inherit patch)
+ (name "patch-mesboot")
+ (version "2.5.9")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/patch/patch-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "12nv7jx3gxfp50y11nxzlnmqqrpicjggw6pcsq0wyavkkm3cddgc"))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs (%boot-tcc0-inputs))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:parallel-build? #f
+ #:tests? #f ; check is naive, also checks non-built PROGRAMS
+ #:strip-binaries? #f ; no strip yet
+ #:configure-flags '("AR=tcc -ar" "CC=tcc" "LD-tcc")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'scripted-patch
+ (lambda _
+ ;; avoid another segfault
+ (substitute* "pch.c"
+ (("while [(]p_end >= 0[)]" all)
+ "p_end = -1;\nwhile (0)"))
+ #t))
+ ;; FIXME: no compressing gzip yet
+ (delete 'compress-documentation))))))
+
+(define sed-mesboot0
+ ;; The initial sed.
+ (package
+ (inherit sed)
+ (name "sed-mesboot0")
+ (version "1.18")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/sed/sed-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1hyv7i82jd0q18xcql51ylc8jwadp3gb3irgcqlis3v61p35jsv2"))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs (%boot-tcc0-inputs))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:parallel-build? #f
+ #:configure-flags '("CC=tcc")
+ #:make-flags '("CC=tcc" "extra_objs=" "DEFS=-D HAVE_BCOPY")
+ #:strip-binaries? #f ; no strip yet
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'scripted-patch
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (substitute* "configure"
+ (("/bin/sh") shell))
+ #t)))
+ (replace 'check
+ (lambda _
+ (invoke "./sed" "--version")))
+ (replace 'install
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "sed" bin)
+ #t))))))))
+
+(define (%boot-tcc-inputs)
+ `(("bash" ,bash-mesboot0)
+ ("bzip2" ,bzip2-mesboot)
+ ("diffutils" ,diffutils-mesboot)
+ ("gzip" ,gzip-mesboot)
+ ("patch" ,patch-mesboot)
+ ("sed" ,sed-mesboot0)
+ ("tcc" ,tcc-boot)
+ ,@(alist-delete "tcc" (%boot-tcc0-inputs))))
(define binutils-mesboot0
+ ;; The initial Binutils
(package
(inherit binutils)
(name "binutils-mesboot0")
- (version "2.20.1a")
- (source (bootstrap-origin
- (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/binutils/binutils-"
- version ".tar.bz2"))
- (patches (search-patches "binutils-boot-2.20.1a.patch"))
- (sha256
- (base32
- "0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi")))))
+ (version "2.14")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/binutils/binutils-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1w8xp7k44bkijr974x9918i4p1sw4g2fcd5mxvspkjpg38m214ds"))))
(inputs '())
(propagated-inputs '())
- (native-inputs `(("tcc" ,tcc-boot)
-
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("diffutils" ,diffutils-mesboot)
- ("make" ,make-mesboot0)))
+ (native-inputs (%boot-tcc-inputs))
(supported-systems '("i686-linux" "x86_64-linux"))
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
- #:tests? #f ; runtest: command not found
+ #:tests? #f ; runtest: command not found
#:parallel-build? #f
- #:strip-binaries? #f ; no strip yet
+ #:strip-binaries? #f ; no strip yet
#:configure-flags
- (let ((cppflags (string-append " -D __GLIBC_MINOR__=6"
- " -D MES_BOOTSTRAP=1"))
- (bash (assoc-ref %build-inputs "bash")))
- `(,(string-append "CONFIG_SHELL=" bash "/bin/sh")
- ,(string-append "CPPFLAGS=" cppflags)
- "AR=tcc -ar"
- "CXX=false"
- "RANLIB=true"
- ,(string-append "CC=tcc" cppflags)
- "--disable-nls"
+ (let ((out (assoc-ref %outputs "out")))
+ `("--disable-nls"
"--disable-shared"
"--disable-werror"
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- "--with-sysroot=/"))))))
+ "--build=i386-unknown-linux"
+ "--host=i386-unknown-linux"
+ "--target=i386-unknown-linux"
+ "--with-sysroot=/"
+ ,(string-append "--prefix=" out)))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'setenv
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "SHELL" shell)
+ (setenv "AR" "tcc -ar")
+ (setenv "RANLIB" "true")
+ (setenv "CC" "tcc -D __GLIBC_MINOR__=6")
+ #t)))
+ (add-after 'unpack 'scripted-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "bfd/configure"
+ (("^sed -e '/SRC-POTFILES.*" all)
+ "echo -e 'all:\\n\\ttrue\\n\\ninstall:\\n\\ttrue\\n' > po/Makefile\n"))
+ #t))
+ (replace 'configure ; needs classic invocation of configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (format (current-error-port)
+ "running ./configure ~a\n" (string-join configure-flags))
+ (apply system* "./configure" configure-flags)
+ (substitute* "config.status"
+ (("[.]//dev/null") "/dev/null"))
+ (invoke "sh" "./config.status"))))))))
-(define gcc-core-mesboot
+(define gcc-core-mesboot0
;; Gcc-2.95.3 is the most recent GCC that is supported by what the Mes C
;; Library v0.16 offers. Gcc-3.x (and 4.x) place higher demands on a C
;; library, such as dir.h/struct DIR/readdir, locales, signals... Also,
- ;; with gcc-2.95.3, binutils-boot-2.20.1a and glibc-2.2.5 we found a GNU
- ;; toolchain triplet "that works".
+ ;; with gcc-2.95.3, binutils (2.14.0, 2.20.1a) and glibc-2.2.5 we found a
+ ;; GNU toolchain triplet "that works".
(package
(inherit gcc)
- (name "gcc-core-mesboot")
+ (name "gcc-core-mesboot0")
(version "2.95.3")
- (source (bootstrap-origin
- (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-"
- version
- ".tar.gz"))
- (patches (search-patches "gcc-boot-2.95.3.patch"))
- (sha256
- (base32
- "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an")))))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-"
+ version
+ ".tar.gz"))
+ ;; `patches' needs XZ
+ ;; (patches (search-patches "gcc-boot-2.95.3.patch"))
+ (sha256
+ (base32
+ "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
- (native-inputs `(("binutils" ,binutils-mesboot0)
- ("tcc" ,tcc-boot)
-
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("diffutils" ,diffutils-mesboot)
- ("make" ,make-mesboot0)))
+ (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-2.95.3.patch"))
+ ("binutils" ,binutils-mesboot0)
+ ,@(%boot-tcc-inputs)))
(outputs '("out"))
(arguments
`(#:implicit-inputs? #f
@@ -557,32 +1154,37 @@
"--build=i686-unknown-linux-gnu"
"--host=i686-unknown-linux-gnu"
,(string-append "--prefix=" out)))
- #:make-flags (list
- "CC=tcc -static -D __GLIBC_MINOR__=6"
- "OLDCC=tcc -static -D __GLIBC_MINOR__=6"
- "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6"
- "AR=ar"
- "RANLIB=ranlib"
- (string-append "LIBGCC2_INCLUDES=-I "
- (assoc-ref %build-inputs "tcc")
- "/include")
- "LANGUAGES=c"
- (string-append "BOOT_LDFLAGS="
- " -B" (assoc-ref %build-inputs "tcc")
- "/lib/"))
+ #:make-flags
+ `("CC=tcc -static -D __GLIBC_MINOR__=6"
+ "OLDCC=tcc -static -D __GLIBC_MINOR__=6"
+ "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6"
+ "AR=ar"
+ "RANLIB=ranlib"
+ ,(string-append "LIBGCC2_INCLUDES=-I "
+ (assoc-ref %build-inputs "tcc")
+ "/include")
+ "LANGUAGES=c"
+ ,(string-append "BOOT_LDFLAGS="
+ " -B" (assoc-ref %build-inputs "tcc")
+ "/lib/"))
#:modules ((guix build gnu-build-system)
(guix build utils)
(srfi srfi-1))
#:phases
(modify-phases %standard-phases
- ;; gcc-2.95.3 needs more traditional configure
+ (add-after 'unpack 'apply-boot-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch-file (assoc-ref inputs "boot-patch")))
+ (system* "patch" "--force" "-p1" "-i" patch-file)
+ #t)))
(add-before 'configure 'setenv
(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (tcc (assoc-ref %build-inputs "tcc"))
- (cppflags " -D __GLIBC_MINOR__=6"))
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash"))
+ (tcc (assoc-ref %build-inputs "tcc"))
+ (cppflags " -D __GLIBC_MINOR__=6"))
+ (setenv "CONFIG_SHELL" shell)
(setenv "CPPFLAGS" cppflags)
(setenv "CC" (string-append "tcc" cppflags))
(setenv "CC_FOR_BUILD" (string-append "tcc" cppflags))
@@ -591,9 +1193,9 @@
(lambda _
(display "
ac_cv_c_float_format='IEEE (little-endian)'
-")))
- #t)))
- (replace 'configure
+"))))))
+ ;; gcc-2.95.3
+ (replace 'configure ; needs classic invocation of configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port)
"running ./configure ~a\n" (string-join configure-flags))
@@ -611,34 +1213,36 @@ ac_cv_c_float_format='IEEE (little-endian)'
(gcc-dir (string-append
out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
(mkdir-p "tmp")
- (zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a")))
- (zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o")))
+ (with-directory-excursion "tmp"
+ (invoke "ar" "x" (string-append "../gcc/libgcc2.a"))
+ (invoke "ar" "x" (string-append tcc "/lib/libtcc1.a"))
+ (apply invoke "ar" "r" (string-append gcc-dir "/libgcc.a")
+ (find-files "." "\\.o")))
(copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))
(copy-file (string-append tcc "/lib/libtcc1.a")
(string-append out "/lib/libtcc1.a"))
+ (invoke "ar" "x" (string-append tcc "/lib/libtcc1.a"))
+ (invoke "ar" "x" (string-append tcc "/lib/libc.a"))
(invoke "ar" "r" (string-append gcc-dir "/libc.a")
- (string-append tcc-lib "/libc+gnu.o")
- (string-append tcc-lib "/libtcc1.o"))
- (invoke "ar" "r" (string-append out "/lib/libc.a")
- (string-append tcc-lib "/libc+gnu.o")
- (string-append tcc-lib "/libtcc1.o"))
- (invoke "ls" "-ltrF" gcc-dir)
- (copy-recursively (string-append tcc "/include")
- (string-append out "/include"))
+ "libc.o" "libtcc1.o")
#t))))))
(native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
(list (search-path-specification
(variable "C_INCLUDE_PATH")
- (files '("include" "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include")))
+ (files '("include"
+
+ ;; Needed to get things like GCC's <stddef.h>.
+ "lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include")))
(search-path-specification
(variable "LIBRARY_PATH")
(files '("lib")))))))
+(define (%boot-mesboot-core-inputs)
+ `(("binutils" ,binutils-mesboot0)
+ ("gawk" ,gawk-mesboot0)
+ ("gcc" ,gcc-core-mesboot0)
+ ,@(alist-delete "tcc" (%boot-tcc-inputs))))
+
(define mesboot-headers
(package
(inherit mes-boot)
@@ -646,8 +1250,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
- (native-inputs `(("coreutils" ,%bootstrap-coreutils&co)
- ("headers" ,%bootstrap-linux-libre-headers)))
+ (native-inputs `(("kernel-headers" ,%bootstrap-linux-libre-headers)
+ ,@(%boot-tcc-inputs)))
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
@@ -661,20 +1265,79 @@ ac_cv_c_float_format='IEEE (little-endian)'
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(include (string-append out "/include"))
- (headers (assoc-ref %build-inputs "headers" )))
+ (headers (assoc-ref %build-inputs "kernel-headers")))
(mkdir-p include)
(copy-recursively "include" out)
(copy-recursively headers out)
- #t))))))
- (native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
- (list (search-path-specification
- (variable "C_INCLUDE_PATH")
- (files '("include")))))))
+ #t))))))))
+
+(define gawk-mesboot0
+ ;; The initial Gawk.
+ (package
+ (inherit gawk)
+ (name "gawk-mesboot0")
+ (version "3.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gawk/gawk-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "087s7vpc8zawn3l7bwv9f44bf59rc398hvaiid63klw6fkbvabr3"))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs (%boot-tcc-inputs))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:configure-flags '("--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ "--disable-nls")
+ #:make-flags '("gawk")
+ #:parallel-build? #f
+ #:parallel-tests? #f
+ #:strip-binaries? #f ; no strip yet
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'scripted-patch
+ (lambda _
+ (substitute* "Makefile.in"
+ (("date ") "echo today ")
+ ((" autoheader") "true")
+ ((" -lm ") " "))
+ (substitute* "test/Makefile.in"
+ (("^bigtest:.*") "bigtest: basic\n")
+ (("( |\t)(childin|convfmt|fflush|longwrds|math|negexp)" all sep) sep))))
+ (add-before 'configure 'setenv
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "SHELL" shell)
+ (setenv "CC" "tcc")
+ (setenv "CPP" "tcc -E")
+ (setenv "LD" "tcc")
+ (setenv "ac_cv_func_getpgrp_void" "yes")
+ (setenv "ac_cv_func_tzset" "yes"))
+ #t))
+ (replace 'configure ; needs classic invocation of configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (configure-flags
+ `(,@configure-flags
+ ,(string-append "--prefix=" out))))
+ (format (current-error-port) "running ./configure ~a\n" (string-join configure-flags))
+ (system* "touch" "configure") ; aclocal.m4 is newer than configure
+ (apply invoke (cons "./configure" configure-flags)))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "gawk" bin)
+ (symlink "gawk" (string-append bin "/awk"))
+ #t))))))))
(define glibc-mesboot0
;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
@@ -684,33 +1347,30 @@ ac_cv_c_float_format='IEEE (little-endian)'
(inherit glibc)
(name "glibc-mesboot0")
(version "2.2.5")
- (source (bootstrap-origin
- (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/glibc/glibc-"
- version
- ".tar.gz"))
- (patches (search-patches "glibc-boot-2.2.5.patch"))
- (sha256
- (base32
- "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q")))))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/glibc/glibc-"
+ version
+ ".tar.gz"))
+ ;; Patch needs XZ
+ ;; (patches (search-patches "glibc-boot-2.2.5.patch"))
+ (sha256
+ (base32
+ "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
- (native-inputs `(("binutils" ,binutils-mesboot0)
- ("gcc" ,gcc-core-mesboot)
-
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("diffutils" ,diffutils-mesboot)
+ (native-inputs `(("boot-patch" ,(search-patch "glibc-boot-2.2.5.patch"))
+ ("system-patch" ,(search-patch "glibc-bootstrap-system-2.2.5.patch"))
("headers" ,mesboot-headers)
- ("make" ,make-mesboot0)))
+ ,@(%boot-mesboot-core-inputs)))
(outputs '("out"))
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
#:tests? #f
#:strip-binaries? #f
+ #:validate-runpath? #f ; no dynamic executables
#:parallel-build? #f ; gcc-2.95.3 ICEs on massively parallel builds
#:make-flags (list (string-append
"SHELL="
@@ -719,25 +1379,31 @@ ac_cv_c_float_format='IEEE (little-endian)'
#:configure-flags
(let ((out (assoc-ref %outputs "out"))
(headers (assoc-ref %build-inputs "headers")))
- (list
- "--disable-shared"
- "--enable-static"
- "--disable-sanity-checks"
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- (string-append "--with-headers=" headers "/include")
- "--enable-static-nss"
- "--without-__thread"
- "--without-cvs"
- "--without-gd"
- "--without-tls"
- (string-append "--prefix=" out)))
+ `("--disable-shared"
+ "--enable-static"
+ "--disable-sanity-checks"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ ,(string-append "--with-headers=" headers "/include")
+ "--enable-static-nss"
+ "--without-__thread"
+ "--without-cvs"
+ "--without-gd"
+ "--without-tls"
+ ,(string-append "--prefix=" out)))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'apply-boot-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (and (let ((patch (assoc-ref inputs "boot-patch")))
+ (invoke "patch" "--force" "-p1" "-i" patch))
+ (let ((patch (assoc-ref inputs "system-patch")))
+ (invoke "patch" "--force" "-p1" "-i" patch)))))
(add-before 'configure 'setenv
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash"))
(gcc (assoc-ref %build-inputs "gcc"))
(headers (assoc-ref %build-inputs "headers"))
(cppflags (string-append
@@ -745,88 +1411,63 @@ ac_cv_c_float_format='IEEE (little-endian)'
" -D MES_BOOTSTRAP=1"
" -D BOOTSTRAP_GLIBC=1"))
(cflags (string-append " -L " (getcwd))))
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (setenv "SHELL" (getenv "CONFIG_SHELL"))
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "SHELL" shell)
(setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
(setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
#t)))
- ;; glibc-2.2.5 needs a more classic invocation of configure
- ;; configure: warning: CONFIG_SHELL=/gnu/store/…-bash-minimal-4.4.12/bin/bash: invalid host type
- (replace 'configure
+ (replace 'configure ; needs classic invocation of configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port)
"running ./configure ~a\n" (string-join configure-flags))
- (apply invoke "./configure" configure-flags))))))
- (native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
- (list (search-path-specification
- (variable "C_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "CPLUS_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "LIBRARY_PATH")
- (files '("lib")))))))
+ (apply invoke "./configure" configure-flags)))
+ (add-after 'configure 'fixup-configure
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (substitute* "config.make"
+ (("INSTALL = scripts/") "INSTALL = $(..)./scripts/"))
+ (substitute* "config.make"
+ (("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
+ (("BASH = ") (string-append
+ "SHELL = " shell "
+ BASH = ")))
+ #t))))))))
(define gcc-mesboot0
(package
- (inherit gcc-core-mesboot)
+ (inherit gcc-core-mesboot0)
(name "gcc-mesboot0")
- (native-inputs `(("binutils" ,binutils-mesboot0)
- ("gcc" ,gcc-core-mesboot)
+ (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-2.95.3.patch"))
+ ;; Packages are given in an order that's relevant for
+ ;; #include_next purposes.
("libc" ,glibc-mesboot0)
-
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("diffutils" ,diffutils-mesboot)
("kernel-headers" ,%bootstrap-linux-libre-headers)
- ("make" ,make-mesboot0)))
+ ,@(%boot-mesboot-core-inputs)))
(arguments
- (substitute-keyword-arguments (package-arguments gcc-core-mesboot)
+ (substitute-keyword-arguments (package-arguments gcc-core-mesboot0)
((#:phases phases)
`(modify-phases ,phases
(replace 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (glibc (assoc-ref %build-inputs "libc"))
- (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
- (setenv "C_INCLUDE_PATH" (string-append
- gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
- ":" kernel-headers "/include"
- ":" glibc "/include"))
- (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
- (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
- ;; FIXME: add glibc dirs to paths manually
- (setenv "LIBRARY_PATH" (string-join
- (list (string-append glibc "/lib")
- (getenv "LIBRARY_PATH"))
- ":"))
- (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
- (with-output-to-file "config.cache"
- (lambda _
- (display "
+ (lambda _
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (with-output-to-file "config.cache"
+ (lambda _
+ (display "
ac_cv_c_float_format='IEEE (little-endian)'
")))
- #t)))
+ #t))
(replace 'install2
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(gcc-dir (string-append
out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
- (mkdir-p "tmp")
- (zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a")))
- (zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o")))
- (copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))
- #t)))))
+ (and
+ (mkdir-p "tmp")
+ (zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a")))
+ (zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o")))
+ (copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))))))))
((#:configure-flags configure-flags)
`(let ((out (assoc-ref %outputs "out")))
`("--disable-shared"
@@ -840,32 +1481,166 @@ ac_cv_c_float_format='IEEE (little-endian)'
,(string-append "LIBGCC2_INCLUDES=-I " gcc "/include")
"LANGUAGES=c")))))))
-(define binutils-mesboot
+(define (%boot-mesboot0-inputs)
+ `(("gcc" ,gcc-mesboot0)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)
+ ("libc" ,glibc-mesboot0)
+ ,@(alist-delete "gcc" (%boot-mesboot-core-inputs))))
+
+(define tar-mesboot
+ ;; Initial tar with support for xz compression.
(package
- (inherit binutils-mesboot0)
- (name "binutils-mesboot")
- (native-inputs `(("binutils" ,binutils-mesboot0)
- ("libc" ,glibc-mesboot0)
- ("gcc" ,gcc-mesboot0)
+ (inherit tar)
+ (name "tar-mesboot")
+ (version "1.22")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/tar/tar-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "19nvix64y95n5v6rr5g9g3fn08zz85cb5anzd7csfv4a4sz9lw4y"))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs (%boot-mesboot0-inputs))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:parallel-build? #f
+ #:tests? #f ; check is naive, also checks non-built PROGRAMS
+ #:strip-binaries? #f ; no strip yet
+ #:configure-flags '("--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ "--disable-nls")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "SHELL" shell)
+ (setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv")
+ (setenv "gl_cv_func_rename_dest_works" "yes")
+ (format (current-error-port)
+ "running ./configure ~a\n" (string-join configure-flags))
+ (apply invoke (cons "./configure" configure-flags)))))
+ (add-after 'unpack 'scripted-patch
+ (lambda _
+ (let* ((bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (substitute* "configure"
+ ((" /bin/sh") shell)))
+ (substitute* "Makefile.in"
+ (("^SUBDIRS = doc") "SUBDIRS ="))
+ #t))
+ (replace 'install
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "src/tar" bin)
+ #t))))))))
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("diffutils" ,diffutils-mesboot)
- ("kernel-headers" ,%bootstrap-linux-libre-headers)
- ("make" ,make-mesboot0)))
+(define grep-mesboot
+ ;; The initial grep.
+ (package
+ (inherit grep)
+ (name "grep-mesboot")
+ (version "2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/grep/grep-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1w862l80lgc5mxvpiy4cfwk761d6xxavn0m3xd2l7xs2kmzvp6lq"))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs (%boot-mesboot0-inputs))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:parallel-build? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'patch-configure
+ (lambda _
+ (let* ((bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (substitute* "configure"
+ ((" [|][|] ./config.status") " || sh ./config.status")))))
+ (replace 'install
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "grep" bin)
+ (symlink "grep" (string-append bin "/egrep"))
+ (symlink "grep" (string-append bin "/fgrep"))
+ #t))))))))
+
+(define binutils-mesboot1
+ (package
+ (inherit binutils-mesboot0)
+ (name "binutils-mesboot1")
+ (native-inputs (%boot-mesboot0-inputs))
(arguments
(substitute-keyword-arguments (package-arguments binutils-mesboot0)
((#:configure-flags configure-flags)
- '(list "--disable-nls"
- "--disable-shared"
- "--disable-werror"
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- "--with-sysroot=/"))))))
+ '(let ((out (assoc-ref %outputs "out")))
+ `("--disable-nls"
+ "--disable-shared"
+ "--disable-werror"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ "--with-sysroot=/"
+ ,(string-append "--prefix=" out))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'setenv
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (setenv "CONFIG_SHELL" shell)
+ #t)))))))))
+
+(define coreutils-mesboot0
+ (package
+ (inherit coreutils)
+ (name "coreutils-mesboot0")
+ ;; The latest .gz release of Coreutils is 8.13; which does not build with gcc-2.95.3:
+ ;; randperm.c: In function `sparse_swap':
+ ;; randperm.c:117: invalid lvalue in unary `&'
+ (version "5.0") ; 2003-04
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/coreutils/coreutils-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "10wq6k66i8adr4k08p0xmg87ff4ypiazvwzlmi7myib27xgffz62"))))
+ (native-inputs (%boot-mesboot0-inputs))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (arguments
+ `(#:implicit-inputs? #f
+ #:tests? #f ; WARNING: `perl' is needed, ...
+ #:parallel-build? #f
+ #:strip-binaries? #f ; strip: unrecognized option `--only-keep-debug'
+ #:guile ,%bootstrap-guile
+ #:configure-flags
+ '("--disable-doc"
+ "LIBS=-lc -lnss_files -lnss_dns -lresolv"
+ "ac_cv_func_gethostbyname=no"
+ "gl_cv_func_rename_dest_works=yes")))))
-(define make-mesboot
+(define gnu-make-mesboot
(package
- (inherit make-mesboot0)
+ (inherit gnu-make)
(name "make-mesboot")
(version "3.82")
(source (origin
@@ -875,27 +1650,178 @@ ac_cv_c_float_format='IEEE (little-endian)'
(sha256
(base32
"1rs2f9hmvy3q6zkl15jnlmnpgffm0bhw5ax0h5c7q604wqrip69x"))))
- (native-inputs `(("binutils" ,binutils-mesboot0)
- ("libc" ,glibc-mesboot0)
- ("gcc" ,gcc-mesboot0)
- ("make" ,make-mesboot0)
+ (native-inputs (%boot-mesboot0-inputs))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (arguments
+ `(#:implicit-inputs? #f
+ #:parallel-build? #f
+ #:guile ,%bootstrap-guile
+ #:configure-flags '("LIBS=-lc -lnss_files -lnss_dns -lresolv")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "./make" "--version")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "make" bin)
+ #t))))))))
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("kernel-headers" ,%bootstrap-linux-libre-headers)))
+(define gawk-mesboot
+ (package
+ (inherit gawk)
+ (name "gawk-mesboot")
+ (version "3.1.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gawk/gawk-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "03d5y7jabq7p2s7ys9alay9446mm7i5g2wvy8nlicardgb6b6ii1"))))
+ (native-inputs `(,@(%boot-mesboot0-inputs)
+ ("mesboot-headers" ,mesboot-headers)))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
(arguments
- (substitute-keyword-arguments (package-arguments make-mesboot0)
- ((#:configure-flags configure-flags)
- `(let ((out (assoc-ref %outputs "out")))
- `(,(string-append "--prefix=" out))))
- ((#:phases phases)
- `(modify-phases ,phases
- (delete 'configure-fixup)
- (add-before 'configure 'setenv
- (lambda _
- (setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv")
+ `(#:implicit-inputs? #f
+ #:parallel-build? #f
+ #:guile ,%bootstrap-guile
+ #:configure-flags '("ac_cv_func_connect=no")
+ #:make-flags '("gawk")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "./gawk" "--version")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "gawk" bin)
+ (symlink "gawk" (string-append bin "/awk"))
#t))))))))
+(define sed-mesboot
+ (package
+ (inherit sed)
+ (name "sed-mesboot")
+ (version "4.0.6") ; 2003-04
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/sed/sed-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0861ij94cqc4vaaki6r2wlapwcmhpx4ggp4r70f46mb21a8fkvf1"))))
+ (native-inputs (%boot-mesboot0-inputs))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (arguments
+ `(#:implicit-inputs? #f
+ #:parallel-build? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f ; 8to7 fails
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack '/bin/sh
+ (lambda _
+ (let* ((bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (substitute* "testsuite/Makefile.tests"
+ (("^SHELL = /bin/sh")
+ (string-append "SHELL = " shell)))
+ #t))))))))
+
+(define bash-mesboot
+ (package
+ (inherit bash-mesboot0)
+ (version "4.4")
+ (name "bash-mesboot")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/bash/bash-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1jyz6snd63xjn6skk7za6psgidsd53k05cr3lksqybi0q6936syq"))))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs (%boot-mesboot0-inputs))
+ (outputs '("out"))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:parallel-build? #f
+ #:configure-flags
+ '("--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+
+ "--without-bash-malloc"
+ "--disable-readline"
+ "--disable-history"
+ "--disable-help-builtin"
+ "--disable-progcomp"
+ "--disable-net-redirections"
+ "--disable-nls"
+
+ ;; Pretend 'dlopen' is missing so we don't build loadable
+ ;; modules and related code.
+ "ac_cv_func_dlopen=no")
+ #:make-flags '("bash")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'scripted-patch
+ (lambda _
+ (substitute* "shell.c"
+ ((";;") ";"))
+ #t))
+ (add-before 'configure 'setenv
+ (lambda _
+ (setenv "AWK" "gawk")
+ (setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv")
+ (setenv "gl_cv_func_rename_dest_works" "yes")
+ #t))
+ (add-after 'configure 'configure-fixups
+ (lambda _
+ (let ((config.h (open-file "config.h" "a")))
+ (display (string-append "
+#define enable_hostname_completion(on_or_off) 0
+")
+ config.h)
+ (close config.h))
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "./bash" "--version")))
+ (replace 'install
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (copy-file "bash" (string-append bin "/bash"))
+ (copy-file "bash" (string-append bin "/sh"))
+ #t))))))))
+
+(define (%boot-mesboot1-inputs)
+ `(("bash" ,bash-mesboot)
+ ("binutils" ,binutils-mesboot1)
+ ("coreutils" ,coreutils-mesboot0)
+ ("gawk" ,gawk-mesboot)
+ ("grep" ,grep-mesboot)
+ ("make" ,gnu-make-mesboot)
+ ("sed" ,sed-mesboot)
+ ("tar" ,tar-mesboot)
+ ,@(fold alist-delete (%boot-mesboot0-inputs)
+ '("bash" "binutils" "bootar" "coreutils" "gash"
+ "gawk" "grep" "guile" "make" "sed" "tar"))))
+
(define gmp-boot
(package
(inherit gmp)
@@ -930,180 +1856,320 @@ ac_cv_c_float_format='IEEE (little-endian)'
(base32
"1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"))))))
-(define gcc-mesboot1
+(define gcc-core-mesboot1
+ ;; GCC 4.6.4 is the latest modular distribution. This package is not
+ ;; stricly needed, but very helpful for development because it builds
+ ;; relatively fast. If this configures and builds then gcc-mesboot1 also
+ ;; builds.
(package
(inherit gcc-mesboot0)
- (name "gcc-mesboot1")
- (version "4.7.4")
- (source (bootstrap-origin
- (origin (inherit (package-source gcc-4.7))
- (patches (search-patches "gcc-boot-4.7.4.patch")))))
+ (name "gcc-core-mesboot1")
+ (version "4.6.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gcc/gcc-"
+ version "/gcc-core-" version ".tar.gz"))
+ (sha256
+ (base32
+ "173kdb188qg79pcz073cj9967rs2vzanyjdjyxy9v0xb0p5sad75"))
+ ;; Patch needs XZ
+ ;; (patches (search-patches "gcc-boot-4.6.4.patch"))
+ ))
(inputs `(("gmp-source" ,(package-source gmp-boot))
("mpfr-source" ,(package-source mpfr-boot))
("mpc-source" ,(package-source mpc-boot))))
- (native-inputs `(("binutils" ,binutils-mesboot)
- ("gcc" ,gcc-mesboot0)
- ("libc" ,glibc-mesboot0)
+ (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-4.6.4.patch"))
+ ,@(%boot-mesboot1-inputs)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f
+ #:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1))
+ #:parallel-build? #f ; for debugging
+ #:make-flags
+ (let* ((libc (assoc-ref %build-inputs "libc"))
+ (ldflags (string-append
+ "-B" libc "/lib "
+ "-Wl,-dynamic-linker "
+ "-Wl," libc
+ ,(glibc-dynamic-linker "i686-linux"))))
+ (list (string-append "LDFLAGS=" ldflags)
+ (string-append "LDFLAGS_FOR_TARGET=" ldflags)))
+ #:configure-flags
+ (let ((out (assoc-ref %outputs "out"))
+ (glibc (assoc-ref %build-inputs "libc")))
+ (list (string-append "--prefix=" out)
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ (string-append "--with-native-system-header-dir=" glibc "/include")
+ (string-append "--with-build-sysroot=" glibc "/include")
+ "--disable-bootstrap"
+ "--disable-decimal-float"
+ "--disable-libatomic"
+ "--disable-libcilkrts"
+ "--disable-libgomp"
+ "--disable-libitm"
+ "--disable-libmudflap"
+ "--disable-libquadmath"
+ "--disable-libsanitizer"
+ "--disable-libssp"
+ "--disable-libvtv"
+ "--disable-lto"
+ "--disable-lto-plugin"
+ "--disable-multilib"
+ "--disable-plugin"
+ "--disable-threads"
+ "--enable-languages=c"
+ "--enable-static"
+ "--disable-shared"
+ "--enable-threads=single"
+ "--disable-libstdcxx-pch"
+ "--disable-build-with-cxx"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'apply-boot-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch-file (assoc-ref inputs "boot-patch")))
+ (format (current-error-port) "patch file=~s\n" patch-file)
+ (system* "patch" "--force" "-p1" "-i" patch-file))
+ #t))
+ ;; c&p from commencement.scm:gcc-boot0
+ (add-after 'unpack 'unpack-gmp&co
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gmp (assoc-ref %build-inputs "gmp-source"))
+ (mpfr (assoc-ref %build-inputs "mpfr-source"))
+ (mpc (assoc-ref %build-inputs "mpc-source")))
+
+ ;; To reduce the set of pre-built bootstrap inputs, build
+ ;; GMP & co. from GCC.
+ (for-each (lambda (source)
+ (or (invoke "tar" "xvf" source)
+ (error "failed to unpack tarball"
+ source)))
+ (list gmp mpfr mpc))
+
+ ;; Create symlinks like `gmp' -> `gmp-x.y.z'.
+ ,@(map (lambda (lib)
+ ;; Drop trailing letters, as gmp-6.0.0a unpacks
+ ;; into gmp-6.0.0.
+ `(symlink ,(string-trim-right
+ (package-full-name lib "-")
+ char-set:letter)
+ ,(package-name lib)))
+ (list gmp-boot mpfr-boot mpc-boot))
+ #t)))
+ (add-before 'configure 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (binutils (assoc-ref %build-inputs "binutils"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (glibc (assoc-ref %build-inputs "libc"))
+ (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
+ (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (setenv "C_INCLUDE_PATH" (string-append
+ gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
+ ":" kernel-headers "/include"
+ ":" glibc "/include"
+ ":" (getcwd) "/mpfr/src"))
+ (setenv "LIBRARY_PATH" (string-append glibc "/lib"
+ ":" gcc "/lib"))
+ (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
+ (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
+ #t))))))))
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("diffutils" ,diffutils-mesboot)
- ("kernel-headers" ,%bootstrap-linux-libre-headers)
- ("make" ,make-mesboot)))
+(define gcc-mesboot1
+ (package
+ (inherit gcc-core-mesboot1)
+ (name "gcc-mesboot1")
+ (version "4.6.4")
+ (native-inputs
+ `(("gcc-g++"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gcc/gcc-"
+ version "/gcc-g++-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1fqqk5zkmdg4vmqzdmip9i42q6b82i3f6yc0n86n9021cr7ms2k9"))))
+ ,@(package-native-inputs gcc-core-mesboot1)))
(arguments
- (substitute-keyword-arguments (package-arguments gcc-core-mesboot)
- ((#:make-flags make-flags)
- `(let* ((libc (assoc-ref %build-inputs "libc"))
- (ldflags (string-append
- "-B" libc "/lib "
- "-Wl,-dynamic-linker "
- "-Wl," libc
- ,(glibc-dynamic-linker "i686-linux"))))
- (list (string-append "LDFLAGS=" ldflags)
- (string-append "LDFLAGS_FOR_TARGET=" ldflags))))
+ (substitute-keyword-arguments (package-arguments gcc-core-mesboot1)
+ ((#:configure-flags configure-flags)
+ `(let ((out (assoc-ref %outputs "out")))
+ `("--enable-languages=c,c++"
+ ,@(filter
+ (negate (lambda (x) (string-prefix? "--enable-languages=" x)))
+ ,configure-flags))))
((#:phases phases)
`(modify-phases ,phases
- ;; c&p from commencement.scm:gcc-boot0
- (add-after 'unpack 'unpack-gmp&co
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((gmp (assoc-ref %build-inputs "gmp-source"))
- (mpfr (assoc-ref %build-inputs "mpfr-source"))
- (mpc (assoc-ref %build-inputs "mpc-source")))
-
- ;; To reduce the set of pre-built bootstrap inputs, build
- ;; GMP & co. from GCC.
- (for-each (lambda (source)
- (or (invoke "tar" "xvf" source)
- (error "failed to unpack tarball"
- source)))
- (list gmp mpfr mpc))
-
- ;; Create symlinks like `gmp' -> `gmp-x.y.z'.
- ,@(map (lambda (lib)
- ;; Drop trailing letters, as gmp-6.0.0a unpacks
- ;; into gmp-6.0.0.
- `(symlink ,(string-trim-right
- (package-full-name lib "-")
- char-set:letter)
- ,(package-name lib)))
- (list gmp-boot mpfr-boot mpc-boot))
- #t)))
- (delete 'remove-info)
+ (add-before 'unpack 'unpack-g++
+ (lambda _
+ (let ((source-g++ (assoc-ref %build-inputs "gcc-g++")))
+ (invoke "tar" "xvf" source-g++))
+ #t))
(replace 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (binutils (assoc-ref %build-inputs "binutils"))
- (bash (assoc-ref %build-inputs "bash"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (glibc (assoc-ref %build-inputs "libc"))
- (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (setenv "C_INCLUDE_PATH" (string-append
- gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
- ":" kernel-headers "/include"
- ":" glibc "/include"
- ":" (getcwd) "/mpfr/src"))
- (setenv "LIBRARY_PATH" (string-append glibc "/lib"
- ":" gcc "/lib"))
- (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
- (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
- #t)))
- (delete 'install2)))
- ((#:configure-flags configure-flags)
- `(let ((out (assoc-ref %outputs "out"))
- (glibc (assoc-ref %build-inputs "libc")))
- (list (string-append "--prefix=" out)
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
-
- (string-append "--with-native-system-header-dir=" glibc "/include")
- (string-append "--with-build-sysroot=" glibc "/include")
-
- "--disable-bootstrap"
- "--disable-decimal-float"
- "--disable-libatomic"
- "--disable-libcilkrts"
- "--disable-libgomp"
- "--disable-libitm"
- "--disable-libmudflap"
- "--disable-libquadmath"
- "--disable-libsanitizer"
- "--disable-libssp"
- "--disable-libvtv"
- "--disable-lto"
- "--disable-lto-plugin"
- "--disable-multilib"
- "--disable-plugin"
- "--disable-threads"
- "--enable-languages=c,c++"
-
- "--enable-static"
- ;; libstdc++.so: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH ()
- "--disable-shared"
- "--enable-threads=single"
-
- ;; No pre-compiled libstdc++ headers, to save space.
- "--disable-libstdcxx-pch"
-
- ;; for libcpp ...
- "--disable-build-with-cxx")))))))
+ (lambda _
+ (setenv "CONFIG_SHELL" (which "sh"))
-(define gcc-mesboot1-wrapper
- ;; We need this so gcc-mesboot1 can be used to create shared binaries that
- ;; have the correct interpreter, otherwise configuring gcc-mesboot using
- ;; --enable-shared will fail.
+ ;; Allow MPFR headers to be found.
+ (setenv "C_INCLUDE_PATH"
+ (string-append (getcwd) "/mpfr/src:"
+ (getenv "C_INCLUDE_PATH")))
+
+ ;; Set the C++ search path so that C headers can be found as
+ ;; libstdc++ is being compiled.
+ (setenv "CPLUS_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
+ #t))))))))
+
+(define (%boot-mesboot2-inputs)
+ `(("gcc" ,gcc-mesboot1)
+ ,@(alist-delete "gcc" (%boot-mesboot1-inputs))))
+
+(define xz-mesboot
+ ;; Finally, we can build xz.
(package
- (inherit gcc-mesboot1)
- (name "gcc-mesboot1-wrapper")
- (source #f)
+ (inherit xz)
+ (name "xz-mesboot")
+ (version "5.0.0")
+ (source (bootstrap-origin
+ (origin
+ (method url-fetch)
+ (uri (list (string-append "http://tukaani.org/xz/xz-" version
+ ".tar.gz")
+ (string-append "http://multiprecision.org/guix/xz-"
+ version ".tar.gz")))
+ (sha256
+ (base32
+ "0kf40ggbs1vaaj5s9k4csycahzqcf65n20pa6lngqhm6j0cj3agb")))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
- (native-inputs `(("bash" ,%bootstrap-coreutils&co)
- ("libc" ,glibc-mesboot)
- ("gcc" ,gcc-mesboot1)))
+ (outputs '("out"))
+ (propagated-inputs '())
+ (native-inputs (%boot-mesboot2-inputs))
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
+ #:parallel-build? #f
+ #:configure-flags
+ `("--disable-assembler"
+ "--disable-shared"
+ "--enable-small"
+ "--disable-threads"
+ "--disable-xzdec"
+ "--disable-lzmadec"
+ "--disable-lzmainfo"
+ "--disable-lzma-links"
+ "--disable-scripts"
+ "--disable-doc"
+ "--disable-nls"
+ "--disable-symbol-versions"
+ ;; configure disqualifies BASH, CPP, GCC and GREP
+ ;; all of which seem fine for the build
+ "ac_cv_prog_cc_c99=-std=gnu9x"
+ "ac_cv_path_GREP=grep"
+ "gl_cv_posix_shell=bash"
+ "ac_cv_have_decl_optreset=no"
+ "CPPFLAGS=-D__GNUC__=1")))))
+
+(define hello-mesboot
+ ;; Check for Scheme-only bootstrap.
+ (package
+ (inherit hello)
+ (name "hello-mesboot")
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs (%boot-mesboot2-inputs))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:parallel-build? #f
+ ;; checking for grep that handles long lines and -e...
+ ;; configure: error: no acceptable grep could be found
+ #:configure-flags '("ac_cv_path_GREP=grep")
#:phases
(modify-phases %standard-phases
- (delete 'unpack)
- (delete 'configure)
- (delete 'install)
- (replace 'build
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (libc (assoc-ref %build-inputs "libc"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (bin (string-append out "/bin")))
- (mkdir-p bin)
- (for-each
- (lambda (program)
- (let ((wrapper (string-append bin "/" program)))
- (with-output-to-file wrapper
- (lambda _
- (display (string-append "#! " bash "/bin/bash
-exec " gcc "/bin/" program
-" -Wl,--dynamic-linker"
-;; also for x86_64-linux, we are still on i686-linux
-" -Wl," libc ,(glibc-dynamic-linker "i686-linux")
-" -Wl,--rpath"
-" -Wl," libc "/lib"
-" \"$@\"
-"))
- (chmod wrapper #o555)))))
- '(
- "gcc"
- "g++"
- "i686-unknown-linux-gnu-gcc"
- "i686-unknown-linux-gnu-g++"
- ))
- #t)))
(replace 'check
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (program (string-append bin "/gcc")))
- (invoke program "--help")))))))))
+ (lambda _
+ (invoke "./hello"))))))))
+
+(define binutils-mesboot
+ (package
+ (inherit binutils)
+ (name "binutils-mesboot")
+ (version "2.20.1a")
+ (source (bootstrap-origin
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/binutils/binutils-"
+ version ".tar.bz2"))
+ (patches (search-patches "binutils-boot-2.20.1a.patch"))
+ (sha256
+ (base32
+ "0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi")))))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs `(("xz" ,xz-mesboot)
+ ,@(%boot-mesboot2-inputs)))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f ; runtest: command not found
+ #:parallel-build? #f
+ #:strip-binaries? #f ; no strip yet
+ #:configure-flags
+ `("CC=gcc"
+ "CXX=false"
+ "RANLIB=true"
+ "--disable-doc"
+ "--disable-nls"
+ "--disable-shared"
+ "--disable-werror"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ "--with-sysroot=/"
+ ;; checking for grep that handles long lines and -e
+ "ac_cv_path_GREP=grep")
+ ;; FIXME: ac_cv_path_GREP=grep doesn't seem to be forwarded to
+ ;; cascading configure's?
+ #:make-flags '("ac_cv_path_GREP=grep")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'scripted-patch
+ (lambda _
+ ;; sed-mesboot0 cannot build these
+ (copy-file "binutils/Makefile.in" "binutils/Makefile.in.orig")
+ (substitute* "binutils/Makefile.in"
+ ;; binutils/binutils uses an amazingly complex install
+ ;; command, using FOR, SED, READ, IF, ECHO, SED, SED, AWK,
+ ;; READ, and then LIBTOOL (to do something like
+ ;; `mkdir $DESTDIR$bindir; cp readline $DESTDIR$bindir ...')
+
+ ;; Some tool [debugme!] cannot handle two escaped newlines
+ ;; (bash?), and the install stops after $(am__EXEEXT_11)
+ ;; ("objcopy"), so $(am__EXEEXT_13) ("readelf") and others do
+ ;; not get installed. Remove the stray newline:
+ (("^\t@BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ .*") ""))
+ (substitute* "opcodes/Makefile.in"
+ (("^SUBDIRS = [.] po") "SUBDIRS = ."))
+ (substitute* "binutils/Makefile.in"
+ (("^SUBDIRS = doc po") "SUBDIRS ="))
+ (substitute* "gas/Makefile.in"
+ (("^SUBDIRS = doc po") "SUBDIRS ="))
+ (substitute* "gprof/Makefile.in"
+ (("^SUBDIRS = po") "SUBDIRS ="))
+ (substitute* "ld/Makefile.in"
+ (("^SUBDIRS = po") "SUBDIRS ="))
+ #t)))))))
+
+(define (%boot-mesboot3-inputs)
+ `(("binutils" ,binutils-mesboot)
+ ("xz" ,xz-mesboot)
+ ,@(alist-delete "binutils" (%boot-mesboot2-inputs))))
(define glibc-headers-mesboot
(package
@@ -1121,17 +2187,8 @@ exec " gcc "/bin/" program
(sha256
(base32
"0vlz4x6cgz7h54qq4528q526qlhnsjzbsvgc4iizn76cb0bfanx7")))))
- (native-inputs `(("binutils" ,binutils-mesboot)
- ("libc" ,glibc-mesboot0)
- ("gcc" ,gcc-mesboot1)
- ("headers" ,mesboot-headers)
-
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("diffutils" ,diffutils-mesboot)
- ("kernel-headers" ,%bootstrap-linux-libre-headers)
- ("make" ,make-mesboot)))
-
+ (native-inputs `(("headers" ,mesboot-headers)
+ ,@(%boot-mesboot3-inputs)))
(arguments
(substitute-keyword-arguments (package-arguments glibc-mesboot0)
((#:configure-flags configure-flags)
@@ -1146,49 +2203,51 @@ exec " gcc "/bin/" program
"--with-pthread"
"--without-cvs"
"--without-gd"
- "--enable-add-ons=nptl")))
+ "--enable-add-ons=nptl"
+ ;; avoid: configure: error: confusing output from nm -u
+ "libc_cv_predef_stack_protector=no")))
((#:make-flags make-flags)
- `(let ((bash (assoc-ref %build-inputs "bash")))
- (list (string-append "SHELL=" bash "/bin/sh")
- "install-bootstrap-headers=yes" "install-headers")))
+ '(list "install-bootstrap-headers=yes" "install-headers"))
((#:phases phases)
`(modify-phases ,phases
+ (delete 'apply-boot-patch)
+ (delete 'fixup-configure)
+ (delete 'set-path)
+ (replace 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (invoke "tar" "xvf" source)
+ (chdir (string-append "glibc-" ,version))
+ #t))
(replace 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (headers (assoc-ref %build-inputs "headers"))
- (bash (assoc-ref %build-inputs "bash"))
- (coreutils (assoc-ref %build-inputs "coreutils"))
- (libc (assoc-ref %build-inputs "libc"))
- (gcc (assoc-ref %build-inputs "gcc"))
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((headers (assoc-ref inputs "headers"))
+ (libc (assoc-ref inputs "libc"))
+ (gcc (assoc-ref inputs "gcc"))
(cppflags (string-append
" -I " (getcwd) "/nptl/sysdeps/pthread/bits"
" -D BOOTSTRAP_GLIBC=1"))
(cflags (string-append " -L " (getcwd)
" -L " libc "/lib")))
(setenv "libc_cv_friendly_stddef" "yes")
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (setenv "SHELL" (getenv "CONFIG_SHELL"))
- (format (current-error-port) "CONFIG_SHELL=~s\n" (getenv "CONFIG_SHELL"))
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (setenv "SHELL" (which "sh"))
(setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
(setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
+ (setenv "LD" "gcc")
;; avoid -fstack-protector
(setenv "libc_cv_ssp" "false")
(substitute* "configure"
- (("/bin/pwd") (string-append coreutils "/bin/pwd")))
- (setenv "C_INCLUDE_PATH" (string-append libc "/include"
- headers "/include"))
- (setenv "LIBRARY_PATH" (string-append libc "/lib"))
+ (("/bin/pwd") "pwd"))
#t)))
(replace 'install
(lambda* (#:key outputs make-flags #:allow-other-keys)
(let ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
(out (assoc-ref outputs "out")))
- (apply invoke "make" make-flags)
- (copy-recursively kernel-headers out)
- #t)))
+ (and (apply invoke "make" make-flags)
+ (copy-recursively kernel-headers out)
+ #t))))
(replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port) "running ../configure ~a\n" (string-join configure-flags))
@@ -1197,36 +2256,37 @@ exec " gcc "/bin/" program
(apply invoke "../configure" configure-flags)))
(add-after 'configure 'remove-sunrpc
(lambda _
- (invoke "make" (string-append (getcwd) "/sysd-sorted" )
- (string-append "SHELL=" (getenv "CONFIG_SHELL")))
- (substitute* "sysd-sorted"
- ((" sunrpc") " ")
- ((" nis") " "))
- ;; 'rpcgen' needs native libc headers to be built.
- (substitute* "../Makefile"
- (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL"))))
- (substitute* "../Makeconfig"
- (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL"))))
- (substitute* "../elf/Makefile"
- (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL"))))))))))))
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+
+ (let ((Makefile (open-file "Makefile" "a")))
+ (display (string-append "
+
+SHELL := " shell "
+")
+ Makefile)
+ (close Makefile))
+ (substitute* "../Makefile"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
+ (substitute* "../Makeconfig"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
+ (substitute* "../elf/Makefile"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
+ (invoke "make" (string-append (getcwd) "/sysd-sorted" ))
+ (substitute* "sysd-sorted"
+ ((" sunrpc") " ")
+ ((" nis") " "))
+ #t)))))))))
(define glibc-mesboot
(package
(inherit glibc-headers-mesboot)
(name "glibc-mesboot")
- (native-inputs `(("binutils" ,binutils-mesboot)
- ("libc" ,glibc-mesboot0)
- ("headers" ,glibc-headers-mesboot)
- ("gcc" ,gcc-mesboot1)
-
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("diffutils" ,diffutils-mesboot)
- ("kernel-headers" ,%bootstrap-linux-libre-headers)
- ("make" ,make-mesboot)))
-
+ (native-inputs `(("headers" ,glibc-headers-mesboot)
+ ,@(%boot-mesboot3-inputs)))
(arguments
- `(#:validate-runpath? #f ; fails when using --enable-shared
+ `(#:validate-runpath? #f ; fails when using --enable-shared
,@(substitute-keyword-arguments (package-arguments glibc-headers-mesboot)
((#:make-flags make-flags)
`(let ((bash (assoc-ref %build-inputs "bash")))
@@ -1238,41 +2298,82 @@ exec " gcc "/bin/" program
(let* ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
(out (assoc-ref outputs "out"))
(install-flags (cons "install" make-flags)))
- (apply invoke "make" install-flags)
- (copy-recursively kernel-headers out)
- #t))))))))
- (native-search-paths ;; FIXME: move to glibc-mesboot0
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
- (list (search-path-specification
- (variable "C_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "CPLUS_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "LIBRARY_PATH")
- (files '("lib")))))))
+ (and (apply invoke "make" install-flags)
+ (copy-recursively kernel-headers out)
+ #t)))))))))))
+
+(define (%boot-mesboot4-inputs)
+ `(("libc" ,glibc-mesboot)
+ ,@(alist-delete "libc" (%boot-mesboot3-inputs))))
+
+(define gcc-mesboot1-wrapper
+ ;; We need this so gcc-mesboot1 can be used to create shared binaries that
+ ;; have the correct interpreter, otherwise configuring gcc-mesboot using
+ ;; --enable-shared will fail.
+ (package
+ (inherit gcc-mesboot1)
+ (name "gcc-mesboot1-wrapper")
+ (source #f)
+ (inputs '())
+ (native-inputs `(("bash" ,bash-mesboot)
+ ("coreutils" ,coreutils-mesboot0)
+ ("libc" ,glibc-mesboot)
+ ("gcc" ,gcc-mesboot1)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'unpack)
+ (delete 'configure)
+ (delete 'install)
+ (replace 'build
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (libc (assoc-ref %build-inputs "libc"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (for-each
+ (lambda (program)
+ (let ((wrapper (string-append bin "/" program)))
+ (with-output-to-file wrapper
+ (lambda _
+ (display (string-append "#! " bash "/bin/bash
+exec " gcc "/bin/" program
+" -Wl,--dynamic-linker"
+;; also for x86_64-linux, we are still on i686-linux
+" -Wl," libc ,(glibc-dynamic-linker "i686-linux")
+" -Wl,--rpath"
+" -Wl," libc "/lib"
+" \"$@\"
+"))
+ (chmod wrapper #o555)))))
+ '("cpp"
+ "gcc"
+ "g++"
+ "i686-unknown-linux-gnu-cpp"
+ "i686-unknown-linux-gnu-gcc"
+ "i686-unknown-linux-gnu-g++"))
+ #t)))
+ (replace 'check
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (program (string-append bin "/gcc")))
+ (invoke program "--help")))))))))
(define gcc-mesboot
(package
(inherit gcc-mesboot1)
(name "gcc-mesboot")
- (version "4.9.4")
+ (version (package-version gcc-4.9))
(source (bootstrap-origin (package-source gcc-4.9)))
- (native-inputs `(("binutils" ,binutils-mesboot)
- ("gcc-wrapper" ,gcc-mesboot1-wrapper)
+ (native-inputs `(("gcc-wrapper" ,gcc-mesboot1-wrapper)
("gcc" ,gcc-mesboot1)
- ("libc" ,glibc-mesboot)
-
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("diffutils" ,diffutils-mesboot)
- ("kernel-headers" ,%bootstrap-linux-libre-headers)
- ("make" ,make-mesboot)))
+ ("headers" ,glibc-headers-mesboot)
+ ,@(%boot-mesboot4-inputs)))
(arguments
`(#:validate-runpath? #f
,@(substitute-keyword-arguments (package-arguments gcc-mesboot1)
@@ -1317,6 +2418,9 @@ exec " gcc "/bin/" program
"--disable-build-with-cxx")))
((#:phases phases)
`(modify-phases ,phases
+ (delete 'apply-boot-patch)
+ (delete 'unpack-g++) ; sadly, gcc-4.9.4 does not provide
+ ; modular core/language downloads
(replace 'setenv
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1327,12 +2431,12 @@ exec " gcc "/bin/" program
(kernel-headers (assoc-ref %build-inputs "kernel-headers")))
(setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
(setenv "C_INCLUDE_PATH" (string-append
- gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.7.4/include"
+ gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.6.4/include"
":" kernel-headers "/include"
":" glibc "/include"
":" (getcwd) "/mpfr/src"))
(setenv "CPLUS_INCLUDE_PATH" (string-append
- gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.7.4/include"
+ gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.6.4/include"
":" kernel-headers "/include"
":" glibc "/include"
":" (getcwd) "/mpfr/src"))
@@ -1352,49 +2456,41 @@ exec " gcc "/bin/" program
(version (package-version gcc-mesboot))
(source #f)
(inputs '())
- (native-inputs `(("bash" ,%bootstrap-coreutils&co)
+ (native-inputs `(("bash" ,bash-mesboot)
+ ("coreutils" ,coreutils-mesboot0)
("libc" ,glibc-mesboot)
("gcc" ,gcc-mesboot)))))
-(define m4-mesboot
+(define (%boot-mesboot5-inputs)
+ `(("gcc-wrapper" ,gcc-mesboot-wrapper)
+ ("gcc" ,gcc-mesboot)
+ ,@(fold alist-delete (%boot-mesboot4-inputs) '("gcc" "gcc-wrapper"))))
+
+(define-public coreutils-mesboot
(package
- (inherit m4)
- (name "m4-mesboot")
- (version "1.4")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/m4/m4-"
- version ".tar.gz"))
- (sha256
- (base32
- "1f9bxj176kf3pvs350w2dfs8jgwhminywri5pyn01b11yc4yhsjw"))))
+ (inherit coreutils)
+ (name "coreutils-mesboot")
+ (source (bootstrap-origin (package-source coreutils)))
+ (native-inputs (%boot-mesboot5-inputs))
(supported-systems '("i686-linux" "x86_64-linux"))
- (native-inputs `(("mes" ,mes-boot)
- ("tcc" ,tcc-boot)))
+ (inputs '())
+ (propagated-inputs '())
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (setenv "CONFIG_SHELL" (string-append
- (assoc-ref %build-inputs "bash")
- "/bin/sh"))
- (setenv "CC" "tcc -static")
- (setenv "CPP" "tcc -E")
- (invoke "./configure" (string-append "--prefix=" out))))))))))
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f))))
+
+(define (%boot-mesboot6-inputs)
+ `(("coreutils" ,coreutils-mesboot)
+ ,@(fold alist-delete (%boot-mesboot5-inputs)
+ '("coreutils" "kernel-headers"))))
(define (%bootstrap-inputs+toolchain)
- ;; The traditional bootstrap-inputs. For the i686-linux Reduced Binary Seed
- ;; the actual reduced set with bootstrapped toolchain.
+ ;; The traditional bootstrap-inputs. For the i686-linux, x86_64-linux
+ ;; Scheme-only bootstrap the actual reduced set with bootstrapped toolchain.
(match (%current-system)
((or "i686-linux" "x86_64-linux")
- `(("libc" ,glibc-mesboot)
- ("binutils" ,binutils-mesboot)
- ("gcc-wrapper" ,gcc-mesboot-wrapper)
- ("gcc" ,gcc-mesboot)
- ,@(fold alist-delete (%bootstrap-inputs)
- '("bootstrap-mescc-tools" "mes"))))
+ (%boot-mesboot6-inputs))
(_
(%bootstrap-inputs))))
@@ -1408,6 +2504,11 @@ exec " gcc "/bin/" program
#:implicit-inputs? #f
#:tests? #f ; cannot run "make check"
,@(substitute-keyword-arguments (package-arguments gnu-make)
+ ((#:configure-flags flags ''())
+ ;; The generated config.status has some problems due to the
+ ;; bootstrap environment. Disable dependency tracking to work
+ ;; around it.
+ `(cons "--disable-dependency-tracking" ,flags))
((#:phases phases)
`(modify-phases ,phases
(replace 'build
@@ -1422,6 +2523,35 @@ exec " gcc "/bin/" program
(native-inputs '()) ; no need for 'pkg-config'
(inputs (%bootstrap-inputs+toolchain))))
+(define bzip2-boot0
+ (package
+ (inherit bzip2)
+ (name "bzip2-boot0")
+ (native-inputs `())
+ (inputs
+ `(("diffutils" ,diffutils-boot0)
+ ("make" ,gnu-make-boot0)
+ ,@(%bootstrap-inputs+toolchain)))
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:implicit-inputs? #f
+ ,@(package-arguments bzip2)))))
+
+(define coreutils-boot0
+ (package
+ (inherit coreutils)
+ (source (bootstrap-origin (package-source coreutils)))
+ (name "coreutils-boot0")
+ (native-inputs `())
+ (inputs
+ `(("make" ,gnu-make-boot0)
+ ,@(%bootstrap-inputs+toolchain)))
+ (arguments
+ `(#:tests? #f
+ #:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ ,@(package-arguments coreutils)))))
+
(define diffutils-boot0
(package
(inherit diffutils)
@@ -1434,7 +2564,15 @@ exec " gcc "/bin/" program
`(#:tests? #f ; the test suite needs diffutils
#:guile ,%bootstrap-guile
#:implicit-inputs? #f
- ,@(package-arguments diffutils)))))
+ ,@(match (%current-system)
+ ((or "arm-linux" "aarch64-linux")
+ (substitute-keyword-arguments (package-arguments diffutils)
+ ((#:configure-flags flags ''())
+ ;; The generated config.status has some problems due to the
+ ;; bootstrap environment. Disable dependency tracking to work
+ ;; around it.
+ `(cons "--disable-dependency-tracking" ,flags))))
+ (_ '()))))))
(define findutils-boot0
(package
@@ -1448,7 +2586,31 @@ exec " gcc "/bin/" program
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
- ,@(package-arguments findutils)))))
+
+ ;; The build system assumes we have done a mistake when time_t is 32-bit
+ ;; on a 64-bit system. Ignore that for our bootstrap toolchain.
+ ,@(substitute-keyword-arguments (package-arguments findutils)
+ ((#:configure-flags flags ''())
+ `(append
+ ,(if (target-64bit?)
+ ''("TIME_T_32_BIT_OK=yes")
+ ''())
+ ,(match (%current-system)
+ ((or "arm-linux" "aarch64-linux")
+ ''("--disable-dependency-tracking"))
+ (_ ''()))
+ ,flags)))))))
+
+(define file
+ (package
+ (inherit (@ (gnu packages file) file))
+ (arguments
+ `(#:configure-flags
+ `("--disable-bzlib"
+ ,,@(match (%current-system)
+ ((or "arm-linux" "aarch64-linux")
+ '("--disable-dependency-tracking"))
+ (_ '())))))))
(define file-boot0
(package
@@ -1459,13 +2621,87 @@ exec " gcc "/bin/" program
`(("make" ,gnu-make-boot0)
,@(%bootstrap-inputs+toolchain)))
(arguments
- `(#:implicit-inputs? #f
+ `(#:tests? #f ; merge test fails
+ #:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:configure-flags '("--disable-bzlib")
+ #:strip-binaries? #f
+ #:validate-runpath? #f
+ ,@(package-arguments file)))))
+
+(define gawk-boot0
+ (package
+ (inherit patch)
+ (source (bootstrap-origin (package-source gawk)))
+ (name "gawk-boot0")
+ (native-inputs '())
+ (inputs
+ `(("make" ,gnu-make-boot0)
+ ,@(%bootstrap-inputs+toolchain)))
+ (arguments
+ `(#:tests? #f
+ #:implicit-inputs? #f
#:guile ,%bootstrap-guile
#:strip-binaries? #f
#:validate-runpath? #f))))
+(define patch-boot0
+ (package
+ (inherit patch)
+ (source (bootstrap-origin (package-source patch)))
+ (name "patch-boot0")
+ (native-inputs '())
+ (inputs
+ `(("make" ,gnu-make-boot0)
+ ,@(%bootstrap-inputs+toolchain)))
+ (arguments
+ `(#:tests? #f ; merge test fails
+ #:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:strip-binaries? #f
+ #:validate-runpath? #f))))
+
+(define sed-boot0
+ (package
+ (inherit sed)
+ (name "sed-boot0")
+ (source (bootstrap-origin (package-source sed)))
+ (native-inputs '())
+ (inputs
+ `(("make" ,gnu-make-boot0)
+ ,@(%bootstrap-inputs+toolchain)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:tests? #f
+ #:guile ,%bootstrap-guile
+ ,@(package-arguments sed)))))
+
+(define tar-boot0
+ (package
+ (inherit tar)
+ (name "tar-boot0")
+ (source (bootstrap-origin (package-source tar)))
+ (native-inputs '())
+ (inputs
+ `(("make" ,gnu-make-boot0)
+ ,@(%bootstrap-inputs+toolchain)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:tests? #f
+ #:guile ,%bootstrap-guile
+ ,@(package-arguments tar)))))
+
(define (%boot0-inputs)
- `(("make" ,gnu-make-boot0)
+ `(,@(match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ `(("bzip2" ,bzip2-boot0)
+ ("coreutils" ,coreutils-boot0)
+ ("gawk" ,gawk-boot0)
+ ("patch" ,patch-boot0)
+ ("sed" ,sed-boot0)
+ ("tar" ,tar-boot0)))
+ (_ '()))
+ ("make" ,gnu-make-boot0)
("diffutils" ,diffutils-boot0)
("findutils" ,findutils-boot0)
("file" ,file-boot0)
@@ -1714,20 +2950,13 @@ exec " gcc "/bin/" program
#:implicit-inputs? #f
,@(package-arguments m4)))))
-(define m4-boot0*
- (package
- ;; TODO: On the next rebuild cycle, use M4-BOOT0 as is.
- (inherit m4-boot0)
- (name "m4")))
-
(define bison-boot0
;; This Bison is needed to build MiG so we need it early in the process.
;; Recent versions of Linux-Libre headers also depend on this.
(package
(inherit bison)
- ;; TODO: On the next build cycle, do:
- ;;(name "bison-boot0")
- (propagated-inputs `(("m4" ,m4-boot0*)))
+ (name "bison-boot0")
+ (propagated-inputs `(("m4" ,m4-boot0)))
(native-inputs `(("perl" ,perl-boot0)))
(inputs (%boot0-inputs)) ;remove Flex...
(arguments
@@ -1735,17 +2964,6 @@ exec " gcc "/bin/" program
#:implicit-inputs? #f
#:guile ,%bootstrap-guile
- ;; XXX: These flags should be unconditional, but for now
- ;; we just add them on x86 to avoid a full rebuild.
- ;; TODO: On the next core-updates, use
- ;; 'substitute-keyword-arguments' to inherit them from
- ;; BISON.
- ,@(if (member (%current-system)
- '("x86_64-linux" "i686-linux"))
- '(#:parallel-build? #f
- #:parallel-tests? #f)
- '())
-
;; Zero timestamps in liby.a; this must be done
;; explicitly here because the bootstrap Binutils don't
;; do that (default is "cru".)
@@ -1756,25 +2974,31 @@ exec " gcc "/bin/" program
"RANLIB=ranlib")
(_
"RANLIB=ranlib -D"))
- "V=1")))))
+ "V=1")
+
+ ,@(package-arguments bison)))))
(define flex-boot0
;; This Flex is needed to build MiG as well as Linux-Libre headers.
(package
(inherit flex)
(native-inputs `(("bison" ,bison-boot0)))
- (propagated-inputs
- ;; XXX: Here we use an 'm4-boot0' package that's not eq? so that it
- ;; appears twice in '%build-inputs', like when we were using
- ;; 'package-with-explicit-inputs'.
- ;; TODO: Remove this hack on the next rebuild cycle.
- `(("m4" ,(package (inherit m4-boot0*)))))
+ (propagated-inputs `(("m4" ,m4-boot0)))
(inputs (%boot0-inputs))
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
#:tests? #f))))
+(define rsync-boot0
+ (package
+ (inherit rsync)
+ (native-inputs `(("perl" ,perl-boot0)))
+ (inputs (%boot0-inputs))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile))))
+
(define linux-libre-headers-boot0
(mlambda ()
"Return Linux-Libre header files for the bootstrap environment."
@@ -1794,6 +3018,9 @@ exec " gcc "/bin/" program
;; Flex and Bison are required since version 4.16.
("flex" ,flex-boot0)
("bison" ,bison-boot0)
+
+ ;; Rsync is required since version 5.3.
+ ("rsync" ,rsync-boot0)
,@(%boot0-inputs))))))
(define with-boot0
@@ -1891,16 +3118,24 @@ the bootstrap environment."
;; pthreads, which is missing on non-x86 platforms at this stage.
;; Python 3.6 technically supports being built without threading
;; support, but requires additional patches.
- (version "3.5.7")
+ (version "3.5.9")
(source (bootstrap-origin
(origin
- (inherit (package-source python))
+ (method url-fetch)
(uri (string-append "https://www.python.org/ftp/python/"
version "/Python-" version ".tar.xz"))
- (patches '())
(sha256
(base32
- "1p67pnp2ca5przx2s45r8m55dcn6f5hsm0l4s1zp7mglkf4r4n18")))))
+ "0jdh9pvx6m6lfz2liwvvhn7vks7qrysqgwn517fkpxb77b33fjn2"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete the bundled copy of libexpat.
+ (delete-file-recursively "Modules/expat")
+ (substitute* "Modules/Setup.dist"
+ ;; Link Expat instead of embedding the bundled one.
+ (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n"))
+ #t)))))
(inputs
`(,@(%boot0-inputs)
("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc.
@@ -2299,15 +3534,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
char-set:letter)
,(package-name lib)))
(list gmp-6.0 mpfr mpc))
- #t)))
- (add-before 'configure 'treat-glibc-as-system-header
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((libc (assoc-ref inputs "libc")))
- ;; Make sure Glibc is treated as a "system header" so
- ;; #include_next does the right thing.
- (for-each (lambda (var)
- (setenv var (string-append libc "/include")))
- '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"))
#t))))))))
;; This time we want Texinfo, so we get the manual. Add
@@ -2363,7 +3589,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; This package must be public because other modules refer to it. However,
;; mark it as hidden so that 'fold-packages' ignores it.
(with-boot4 (hidden-package
- (package-with-bootstrap-guile guile-2.2/fixed))))
+ (package-with-bootstrap-guile guile-3.0/fixed))))
(define glibc-utf8-locales-final
;; Now that we have GUILE-FINAL, build the UTF-8 locales. They are needed
@@ -2396,9 +3622,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define gnu-make-final
;; The final GNU Make, which uses the final Guile.
- ;; FIXME: This is a mistake: we shouldn't be propagating GUILE-FINAL to
- ;; PKG-CONFIG.
- ;; TODO: Fix that on the next rebuild cycle.
(let ((pkg-config (package
(inherit %pkg-config) ;the native pkg-config
(inputs `(("guile" ,guile-final)
@@ -2419,7 +3642,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define coreutils-final
;; The final Coreutils. Treat them specially because some packages, such as
;; Findutils, keep a reference to the Coreutils they were built with.
- (with-boot5 (package-with-bootstrap-guile coreutils)
+ (with-boot5 (package-with-bootstrap-guile
+ (package
+ (inherit coreutils-minimal)
+ (name "coreutils")))
;; Use the final Guile, linked against the
;; final libc with working iconv, so that
;; 'substitute*' works well when touching
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 2e1fe04dde..dfec9ac277 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -260,16 +260,14 @@ file; as a result, it is often used in conjunction with \"tar\", resulting in
(define-public bzip2
(package
(name "bzip2")
- (version "1.0.6")
+ (version "1.0.8")
(source (origin
(method url-fetch)
- ;; XXX The bzip.org domain was allowed to expire.
- (uri (string-append "https://web.archive.org/web/20180624184806/"
- "http://www.bzip.org/"
- version "/bzip2-" version ".tar.gz"))
+ (uri (string-append "https://sourceware.org/pub/bzip2/bzip2-"
+ version ".tar.gz"))
(sha256
(base32
- "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152"))))
+ "0s92986cv0p692icqlw1j42y9nld8zd83qwhzbqd61p1dqbh6nmb"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((guix build gnu-build-system)
@@ -278,6 +276,22 @@ file; as a result, it is often used in conjunction with \"tar\", resulting in
(srfi srfi-1))
#:phases
(modify-phases %standard-phases
+ (add-after 'set-paths 'hide-input-bzip2
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((bzip2 (assoc-ref inputs "bzip2")))
+ (if bzip2
+ ;; Prevent the build system from retaining a reference to
+ ;; BZIP2 from INPUTS.
+ (begin
+ (setenv "LIBRARY_PATH"
+ (string-join (delete (string-append bzip2 "/lib")
+ (string-split (getenv "LIBRARY_PATH")
+ #\:))
+ ":"))
+ (format #t "environment variable `LIBRARY_PATH' set to `~a'~%"
+ (getenv "LIBRARY_PATH")))
+ (format #t "no bzip2 found, nothing done~%"))
+ #t)))
(replace 'configure
(lambda* (#:key target #:allow-other-keys)
(when ,(%current-target-system)
@@ -1335,18 +1349,18 @@ or junctions, and always follows hard links.")
(define-public zstd
(package
(name "zstd")
- (version "1.4.2")
+ (version "1.4.4")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/facebook/zstd/releases/download/"
"v" version "/zstd-" version ".tar.gz"))
(sha256
- (base32 "1ja3nrjynmiwwdjrf6crraizkbagp7y414bqqq2ady91nn1hjwqj"))))
+ (base32 "05ckxap00qvc0j51d3ci38150cxsw82w7s9zgd5fgzspnzmp1vsr"))))
(build-system gnu-build-system)
- (outputs '("out" ;1.1MiB executables and documentation
- "lib" ;1MiB shared library and headers
- "static")) ;1MiB static library
+ (outputs '("out" ;1.2MiB executables and documentation
+ "lib" ;1.2MiB shared library and headers
+ "static")) ;1.2MiB static library
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -1366,12 +1380,10 @@ or junctions, and always follows hard links.")
(delete-file ar))
(find-files shared-libs "\\.a$"))
- ;; While here, remove prefix= from the pkg-config file because it
- ;; is unused, and because it contains a needless reference to $out.
- ;; XXX: It would be great if #:disallow-references worked between
- ;; outputs.
+ ;; Make sure the pkg-config file refers to the right output.
(substitute* (string-append shared-libs "/pkgconfig/libzstd.pc")
- (("^prefix=.*") ""))
+ (("^prefix=.*")
+ (string-append "prefix=" lib "\n")))
#t))))
#:make-flags
@@ -1548,13 +1560,13 @@ recreates the stored directory structure by default.")
(package
(name "zziplib")
(version "0.13.69")
- (replacement zziplib/fixed)
(home-page "https://github.com/gdraheim/zziplib")
(source (origin
(method git-fetch)
(uri (git-reference (url home-page)
(commit (string-append "v" version))))
(file-name (git-file-name name version))
+ (patches (search-patches "zziplib-CVE-2018-16548.patch"))
(sha256
(base32
"0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92"))))
@@ -1586,13 +1598,6 @@ recreates the stored directory structure by default.")
;; files carry the Zlib license; see "docs/copying.html" for details.
(license (list license:lgpl2.0+ license:mpl1.1))))
-(define zziplib/fixed
- (package
- (inherit zziplib)
- (source (origin
- (inherit (package-source zziplib))
- (patches (search-patches "zziplib-CVE-2018-16548.patch"))))))
-
(define-public libzip
(package
(name "libzip")
@@ -1781,17 +1786,7 @@ single-member files which can't be decompressed in parallel.")
(build-system cmake-build-system)
(arguments
`(#:tests? #f
- #:phases (modify-phases %standard-phases
- (add-before 'configure 'glibc-is-already-a-system-library
- (lambda _
- ;; Prevent the build system from passing the glibc
- ;; header files to GCC as "system headers", because
- ;; it conflicts with the system headers already known
- ;; to GCC, causing #include_next failures.
- (substitute* "CMakeLists.txt"
- (("include_directories\\(SYSTEM \\$\\{iconv")
- "include_directories(${iconv"))
- #t)))))
+ #:configure-flags '("-DBoost_NO_BOOST_CMAKE=ON")))
(inputs `(("boost" ,boost)
("libiconv" ,libiconv)
("xz" ,xz)))
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 565fef8628..8426285b7a 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm