Commit Graph

13 Commits

Author SHA1 Message Date
Ludovic Courtès 189be331ac
build-system/gnu: Add 'bootstrap' phase.
This factorizes what has become a widespread idiom.

* guix/build/gnu-build-system.scm (%bootstrap-scripts): New variable.
(bootstrap): New procedure.
(%standard-phases): Add it after 'unpack'.
* guix/build/ant-build-system.scm (%standard-phases): Delete 'bootstrap.
* guix/build/asdf-build-system.scm (%standard-phases/source)
(%standard-phases): Likewise.
* guix/build/cargo-build-system.scm (%standard-phases): Likewise.
* guix/build/cmake-build-system.scm (%standard-phases): Likewise.
* guix/build/dub-build-system.scm (%standard-phases): Likewise.
* guix/build/emacs-build-system.scm (%standard-phases): Likewise.
* guix/build/font-build-system.scm (%standard-phases): Likewise.
* guix/build/go-build-system.scm (%standard-phases): Likewise.
* guix/build/haskell-build-system.scm (%standard-phases): Likewise.
* guix/build/minify-build-system.scm (%standard-phases): Likewise.
* guix/build/ocaml-build-system.scm (%standard-phases): Likewise.
* guix/build/perl-build-system.scm (%standard-phases): Likewise.
* guix/build/python-build-system.scm (%standard-phases): Likewise.
* guix/build/r-build-system.scm (%standard-phases): Likewise.
* guix/build/ruby-build-system.scm (%standard-phases): Likewise.
* guix/build/scons-build-system.scm (%standard-phases): Likewise.
* guix/build/texlive-build-system.scm (%standard-phases): Likewise.
* guix/build/waf-build-system.scm (%standard-phases): Likewise.
* gnu/packages/audio.scm (faad2)[arguments]: Replace 'bootstrap.
(soundtouch, cuetools, bluez-alsa): Remove 'arguments'.
(cava)[arguments]: Replace 'bootstrap.
* gnu/packages/backup.scm (rdup): Remove 'bootstrap.
* gnu/packages/bioinformatics.scm (seek)[arguments]: Replace
'bootstrap.
* gnu/packages/bioinformatics.scm (htslib-for-sambamba): Remove
'arguments'.
* gnu/packages/ci.scm (hydra, cuirass): Remove 'bootstrap'.
* gnu/packages/crypto.scm (libb2): Remove #:phases.
* gnu/packages/databases.scm (guile-wiredtiger): Likewise.
* gnu/packages/debug.scm (stress-make): Remove 'bootstrap'.
* gnu/packages/documentation.scm (asciidoc): Likewise.
* gnu/packages/fontutils.scm (libuninameslist): Remove 'arguments'.
* gnu/packages/ftp.scm (weex): Remove 'arguments'.
* gnu/packages/game-development.scm (ois): Remove 'arguments'.
* gnu/packages/games.scm (pioneer): Remove 'bootstrap.
* gnu/packages/gnome.scm (vte-ng, byzanz): Replace 'bootstrap.
(arc-theme): Remove 'arguments'.
(faba-icon-theme): Remove 'bootstrap.
(arc-icon-theme): Remove 'arguments'.
* gnu/packages/gnunet.scm (guile-gnunet): Likewise.
* gnu/packages/gtk.scm (guile-rsvg): Likewise.
* gnu/packages/guile.scm (mcron2): Remove 'bootstrap.
(guile-bash): Remove #:phases.
(guile-git): Remove 'bootstrap.
(guile-syntax-highlight): Remove 'arguments'.
(guile-sjson): Likewise.
* gnu/packages/java.scm (classpath-devel): Remove 'bootstrap.
* gnu/packages/kodi.scm (libdvdnav/kodi)
(libdvdread/kodi, libdvdcss/kodi): Likewise.
* gnu/packages/libreoffice.scm (hunspell): Remove 'arguments'.
* gnu/packages/libusb.scm (hidapi): Likewise.
* gnu/packages/linux.scm (bridge-utils): Rename 'bootstrap' to
'patch-stuff'; move it before 'bootstrap', without autoreconf
invocation.
(eudev): Rename 'bootstrap' to 'patch-file-names', without 'autogen.sh'
invocation; move it before 'bootstrap.
(gpm): Replace 'bootstrap'.
(f2fs-tools): Remove 'arguments'.
(rng-tools): Remove #:phases.
* gnu/packages/messaging.scm (hexchat): Rename 'bootstrap' to
'copy-intltool-makefile'; remove "autoreconf" invocation and move before
'bootstrap'.
(libmesode): Remove 'arguments'.
(libstrophe): Likewise.
* gnu/packages/microcom.scm (microcom): Likewise.
* gnu/packages/networking.scm (libnet): Remove 'bootstrap.
* gnu/packages/onc-rpc.scm (libnsl): Remove 'arguments'.
* gnu/packages/package-management.scm (guix): Replace 'bootstrap.
* gnu/packages/sawfish.scm (librep): Remove 'arguments'.
* gnu/packages/version-control.scm (findnewest): Likewise.
* gnu/packages/video.scm (liba52, handbrake, motion): Replace
'bootstrap.
* gnu/packages/web.scm (fcgiwrap): Remove #:phases.
(tidy): Replace 'bootstrap.
(gumbo-parser): Remove #:phases.
* gnu/packages/wget.scm (wget2): Replace 'bootstrap.
* gnu/packages/wm.scm (i3lock-color): Remove #:phases.
* gnu/packages/xdisorg.scm (xclip): Likewise.
* gnu/packages/xml.scm (libxls): Replace 'bootstrap'.
* gnu/packages/xorg.scm (xf86-video-freedreno)
(xf86-video-intel): Remove #:phases.
* gnu/packages/zile.scm (zile-on-guile): Replace 'bootstrap.
2018-03-11 22:04:40 +01:00
Andy Patterson 0383afa02a
build-system/asdf: Handle tests defined in external systems.
* guix/build-system/asdf.scm (asdf-build): Add a #:test-asd-file argument.
[builder]: Pass it to the build system.
(package-with-build-system)[transform]: Strip it from source systems' arguments.
* guix/build/asdf-build-system.scm (check): Pass the fully qualified path to
it on to the test-system procedure.
* guix/build/lisp-utils.scm (test-system): Load the file, or otherwise one of
the often used names for it, before running the tests.  Adjust the docstring
accordingly.
2017-05-16 15:18:16 +02:00
Andy Patterson 4209c31b8f
build-system/asdf: Retain references to source files for binary outputs.
In support of long-running programs in which the users would like to be able
to jump to the source of a definition of any of the dependencies (itself
included) of the program.

* guix/build/asdf-build-system.scm (library-outputs): Move from here ...
* guix/build/lisp-utils.scm (library-outputs): ... to here.
(build-program): Accept dependency-prefixes argument, to allow the caller to
specify references which should be retained.  Default to the library's output.
(build-image): Likewise.
(generate-executable): Likewise.
* gnu/packages/lisp.scm (sbcl-stumpwm+slynk, sbcl-slynk, sbcl-stumpwm): Adjust
accordingly to the new interface.
(sbcl-stumpwm+slynk)[native-inputs]: Move to ...
[inputs]: ... here.
2017-05-16 15:18:16 +02:00
Andy Patterson 40f56176c5
build-system/asdf: Handle unusually-named systems.
* guix/build/lisp-utils.scm (valid-char-set): New variable.
(normalize-string): New procedure.
(compiled-system): Truncate the name of a system which contains slashes.
(generate-system-definition, make-asd-file): Use `normalize-string' to alter
the names of the created system and its dependencies.
* guix/build/asdf-build-system.scm (create-asd-file): Normalize the name of
the asd file being created.
2017-05-16 15:18:15 +02:00
Andy Patterson 0186a463d0
build-system/asdf: Always pre-load the system's definition file.
* guix/build-system/asdf.scm (asdf-build)[builder]: Pass a default
`#:asd-file' argument to the build procedure, using the system's name.
* guix/build/asdf-build-system.scm (build, check): Adjust to assume that
`asd-file' will always be a string.
* guix/build/lisp-utils.scm (compile-system, system-dependencies)
(test-system): Likewise.
2017-05-16 15:18:15 +02:00
Andy Patterson 457702b1d9
build-system/asdf: Pass the system name as an argument to the builder.
* guix/build-system/asdf.scm (asdf-build): Use the user-defined system name,
or calculate it from the package's full name.
[builder]: Pass the value along to the build procedure.
(package-with-build-system): Remove #:asd-system-name from source packages'
arguments.
* guix/build/asdf-build-system.scm: Adjust accordingly.
* guix/build/lisp-utils.scm (remove-lisp-from-name): Delete variable.
2017-05-16 15:18:15 +02:00
Andy Patterson b4c9f0c50d
build-system/asdf: Parameterize the lisp type and implementation globally.
* guix/build-system/asdf.scm (asdf-build)[builder]: Parameterize %lisp-type
and %lisp before invoking the build procedure. Don't pass #:lisp-type as an
argument to said procedure.
* guix/build/asdf-build-system.scm: Adjust accordingly.
(source-install-prefix): Rename to %lisp-source-install-prefix.
* guix/build/lisp-utils.scm: Adjust accordingly.
(%lisp-type): New parameter.
(bundle-install-prefix): Rename to %bundle-install-prefix.
* gnu/packages/lisp.scm: Adjust accordingly.
2017-05-16 15:18:15 +02:00
Andy Patterson 6de91ba2a1
build-system/asdf: Make #:lisp a package argument.
* guix/build-system/asdf.scm (lower): Change argument name to `lisp-type'.
(asdf-build): Change argument name to `lisp-type'.  Remove `lisp' as an
argument to the returned procedure.  Change the argument passed to build
phases to `lisp-type'.
* guix/build/asdf-build-system.scm (copy-source, build, check)
(create-asd-file, symlink-asd-files, cleanup-files, strip): Respect
`lisp-type` argument.
* gnu/packages/lisp.scm (sbcl-stumpwm, sbcl-stumpwm+slynk): Likewise.
2017-05-16 15:18:15 +02:00
Andy Patterson 26a16d37ff
build-system/asdf: Keep ecl's generated archive files.
This may be necessary to produce programs or images with ecl.

* guix/build/asdf-build-system.scm (cleanup-files): Don't delete .a files.
2017-05-16 15:18:14 +02:00
Andy Patterson 35189728cd
build-system/asdf: Use asdf to determine dependencies.
This removes the need for conventions to determine which inputs are run-time
dependencies, and also the need to specify "special" dependencies.

* guix/build/lisp-utils.scm (patch-asd-file, lisp-dependencies)
(wrap-perform-method): Remove them.
(inputs->asd-file-map, system-dependencies, generate-system-definition)
(generate-dependency-links, make-asd-file): New procedures.
(lisp-eval-program): Add an error if no lisp matches.
(compile-system): Don't use asdf's in-built asd-file generator.
2017-05-16 15:18:14 +02:00
Andy Patterson 6c76ce39ac
build-system/asdf: Make it possible to use "lib" as the build output.
* guix/build/asdf-build-system.scm (library-output): New procedure.
(copy-source, build, check, patch-asd-files, symlink-asd-files)
(cleanup-files): Use it.
(copy-files-to-output): Rework to take an output instead of an outputs and
string pair.
(install, copy-source): Use the new method.
2017-05-16 15:18:14 +02:00
Andy Patterson bc389c20a9
build-system/asdf: Rename %install-prefix to %source-install-prefix.
* guix/build/lisp-utils.scm (%install-prefix): Rename to
%source-install-prefix.
(build-install-prefix): Use it.
* guix/build/asdf-build-system.scm (source-install-prefix)
(%system-install-prefix, source-directory, copy-source): Likewise.
2017-05-16 15:18:14 +02:00
Andy Patterson a1b30f99a8
build-system: Add asdf-build-system.
* guix/build-system/asdf.scm: New file.
* guix/build/asdf-build-system.scm: New file.
* guix/build/lisp-utils.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document 'asdf-build-system'.

Signed-off-by: 宋文武 <iyzsong@gmail.com>
2016-10-08 21:20:35 +08:00