aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/glib.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-05-22 22:46:43 +0200
committerMarius Bakke <marius@gnu.org>2021-06-13 01:00:47 +0200
commit557084a0c9f2e1b91f7e7da68d3f9540c044bffb (patch)
treef524ee55e1d836c354319e1df5ddfab0592911ac /gnu/packages/glib.scm
parent425df5b081eed7d2a0eadf1bf968af201714b613 (diff)
downloadguix-557084a0c9f2e1b91f7e7da68d3f9540c044bffb.tar
guix-557084a0c9f2e1b91f7e7da68d3f9540c044bffb.tar.gz
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.
Diffstat (limited to 'gnu/packages/glib.scm')
-rw-r--r--gnu/packages/glib.scm49
1 files changed, 16 insertions, 33 deletions
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 <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")