[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/14: gnu: glib: Add "static" output.
From: |
guix-commits |
Subject: |
13/14: gnu: glib: Add "static" output. |
Date: |
Sat, 12 Jun 2021 19:05:10 -0400 (EDT) |
mbakke pushed a commit to branch core-updates
in repository guix.
commit 557084a0c9f2e1b91f7e7da68d3f9540c044bffb
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Sat May 22 22:46:43 2021 +0200
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(-)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 94276ae..f0be2dd 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -11,7 +11,7 @@
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2019, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
-;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
@@ -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 59b660d..34270ff 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")
- 01/14: gnu: OpenSSL: Remove replacement., (continued)
- 01/14: gnu: OpenSSL: Remove replacement., guix-commits, 2021/06/12
- 03/14: gnu: libx11: Update to 1.7.1., guix-commits, 2021/06/12
- 04/14: gnu: expat: Remove replacement., guix-commits, 2021/06/12
- 06/14: gnu: GCC: Switch to GCC 10., guix-commits, 2021/06/12
- 08/14: gnu: graphviz: Update to 2.47.1., guix-commits, 2021/06/12
- 05/14: gnu: curl: Absorb replacement., guix-commits, 2021/06/12
- 10/14: gnu: pango: Update to 1.48.4., guix-commits, 2021/06/12
- 11/14: gnu: poppler: Update to 21.05.0., guix-commits, 2021/06/12
- 07/14: gnu: python-attrs: Update to 21.2.0., guix-commits, 2021/06/12
- 09/14: gnu: harfbuzz: Update to 2.8.1., guix-commits, 2021/06/12
- 13/14: gnu: glib: Add "static" output.,
guix-commits <=
- 12/14: gnu: python-magic: Update to 0.4.22., guix-commits, 2021/06/12
- 14/14: gnu: expat: Install the static library., guix-commits, 2021/06/12