From 557084a0c9f2e1b91f7e7da68d3f9540c044bffb Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 22 May 2021 22:46:43 +0200 Subject: gnu: glib: Add "static" output. * gnu/packages/glib.scm (glib)[outputs]: Add "static". [arguments]: Add "--default-library=both" to #:configure-flags. Add phase move-static-libraries. (glib-static): Remove variable. * gnu/packages/virtualization.scm (qemu)[native-inputs]: Change from GLIB-STATIC to GLIB:STATIC. --- gnu/packages/glib.scm | 49 ++++++++++++++--------------------------- gnu/packages/virtualization.scm | 2 +- 2 files changed, 17 insertions(+), 34 deletions(-) (limited to 'gnu/packages') diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 94276ae0ef..f0be2ddaa4 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2018 Alex Vong ;;; Copyright © 2019, 2021 Maxim Cournoyer ;;; Copyright © 2019 Giacomo Leidi -;;; Copyright © 2019, 2020 Marius Bakke +;;; Copyright © 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2020 Nicolò Balzarotti ;;; Copyright © 2020 Florian Pelz ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen @@ -194,13 +194,14 @@ shared NFS home directories.") (substitute* "tests/spawn-test.c" (("/bin/sh") "sh")) #t)))) - ;; (properties '((hidden? . #t))) (build-system meson-build-system) - (outputs '("out" ; everything - "bin")) ; glib-mkenums, gtester, etc.; depends on Python + (outputs '("out" ;libraries, locales, etc + "static" ;static libraries + "bin")) ;executables; depends on Python (arguments `(#:disallowed-references (,tzdata-for-tests) - #:configure-flags '("-Dman=true" + #:configure-flags '("--default-library=both" + "-Dman=true" "-Dselinux=disabled") #:phases (modify-phases %standard-phases @@ -244,6 +245,16 @@ shared NFS home directories.") (setenv "HOME" (getcwd)) (setenv "XDG_CACHE_HOME" (getcwd)) #t)) + (add-after 'install 'move-static-libraries + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (static (assoc-ref outputs "static"))) + (mkdir-p (string-append static "/lib")) + (for-each (lambda (file) + (link file (string-append static "/lib/" + (basename file))) + (delete-file file)) + (find-files (string-append out "/lib") "\\.a$"))))) ;; Meson does not permit the bindir to be outside of prefix. (add-after 'install 'move-bin (lambda* (#:key outputs #:allow-other-keys) @@ -352,34 +363,6 @@ functions for strings and common data structures.") (string-append doc html)) #t))))))))) -;;; TODO: Merge into glib as a 'static' output on core-updates. -(define-public glib-static - (hidden-package - (package - (inherit glib) - (name "glib-static") - (outputs '("out")) - (arguments - (substitute-keyword-arguments (package-arguments glib) - ((#:configure-flags flags ''()) - `(cons* "--default-library=static" - "-Dselinux=disabled" - "-Dman=false" - "-Dgtk_doc=false" - "-Dinternal_pcre=false" - ,flags)) - ((#:phases phases) - `(modify-phases ,phases - (delete 'move-executables) - (replace 'install - ;; Only install the static libraries. - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) - (for-each (lambda (f) - (install-file f lib)) - (find-files "." "\\.a$")))))))))))) - (define gobject-introspection (package (name "gobject-introspection") diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 59b660de7c..34270ff8d3 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -366,7 +366,7 @@ exec smbd $@"))) ("texinfo" ,texinfo) ;; The following static libraries are required to build ;; the static output of QEMU. - ("glib-static" ,glib-static) + ("glib:static" ,glib "static") ("pcre:static" ,pcre "static") ("zlib:static" ,zlib "static"))) (home-page "https://www.qemu.org") -- cgit v1.2.3 nu/packages/code.scm, gnu/packages/compression.scm, gnu/packages/compton.scm, gnu/packages/coq.scm, gnu/packages/cpp.scm, gnu/packages/cran.scm, gnu/packages/crypto.scm, gnu/packages/curl.scm, gnu/packages/databases.scm, gnu/packages/datastructures.scm, gnu/packages/debug.scm, gnu/packages/disk.scm, gnu/packages/distributed.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/dns.scm, gnu/packages/docker.scm, gnu/packages/education.scm, gnu/packages/efi.scm, gnu/packages/elixir.scm, gnu/packages/emacs-xyz.scm, gnu/packages/embedded.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/erlang.scm, gnu/packages/fabric-management.scm, gnu/packages/file-systems.scm, gnu/packages/finance.scm, gnu/packages/firmware.scm, gnu/packages/flashing-tools.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/fpga.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/genealogy.scm, gnu/packages/genimage.scm, gnu/packages/geo.scm, gnu/packages/gimp.scm, gnu/packages/gl.scm, gnu/packages/gnome-xyz.scm, gnu/packages/gnome.scm, gnu/packages/gnuzilla.scm, gnu/packages/golang.scm, gnu/packages/gpodder.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/groff.scm, gnu/packages/groovy.scm, gnu/packages/gtk.scm, gnu/packages/guile-xyz.scm, gnu/packages/guile.scm, gnu/packages/hardware.scm, gnu/packages/haskell-apps.scm, gnu/packages/haskell-xyz.scm, gnu/packages/hexedit.scm, gnu/packages/i2p.scm, gnu/packages/ibus.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/ipfs.scm, gnu/packages/java-graphics.scm, gnu/packages/java-maths.scm, gnu/packages/java.scm, gnu/packages/javascript.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/jupyter.scm, gnu/packages/kodi.scm, gnu/packages/language.scm, gnu/packages/lego.scm, gnu/packages/less.scm, gnu/packages/libusb.scm, gnu/packages/linux.scm, gnu/packages/lirc.scm, gnu/packages/lisp-xyz.scm, gnu/packages/llvm.scm, gnu/packages/logging.scm, gnu/packages/lolcode.scm, gnu/packages/lua.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/maths.scm, gnu/packages/maven.scm, gnu/packages/mes.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/node-xyz.scm, gnu/packages/ocaml.scm, gnu/packages/ocr.scm, gnu/packages/onc-rpc.scm, gnu/packages/opencl.scm, gnu/packages/opencog.scm, gnu/packages/pantheon.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/perl6.scm, gnu/packages/phabricator.scm, gnu/packages/popt.scm, gnu/packages/printers.scm, gnu/packages/prolog.scm, gnu/packages/protobuf.scm, gnu/packages/pulseaudio.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python-xyz.scm, gnu/packages/qt.scm, gnu/packages/radio.scm, gnu/packages/rails.scm, gnu/packages/rdf.scm, gnu/packages/rednotebook.scm, gnu/packages/rpc.scm, gnu/packages/rsync.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/screen.scm, gnu/packages/security-token.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/shellutils.scm, gnu/packages/simh.scm, gnu/packages/sml.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/stenography.scm, gnu/packages/sync.scm, gnu/packages/syncthing.scm, gnu/packages/synergy.scm, gnu/packages/telephony.scm, gnu/packages/terminals.scm, gnu/packages/tex.scm, gnu/packages/texinfo.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tmux.scm, gnu/packages/tor.scm, gnu/packages/toys.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/virtualization.scm, gnu/packages/vlang.scm, gnu/packages/vnc.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wireservice.scm, gnu/packages/wm.scm, gnu/packages/wxwidgets.scm, gnu/packages/xdisorg.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, tests/lint.scm: Remove trailing ".git" from 'git-reference' URL. Ludovic Courtès 2020-07-09gnu: m2-planet: Fix typo in description....* gnu/packages/mes.scm (m2-planet)[description]: Fix typo. Tobias Geerinckx-Rice