mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 04:59:27 -05:00
gnu: glib: Update to 2.70, specify a bindir prefix and hide package.
* gnu/packages/glib.scm (glib): Update to 2.70. Remove trailing #t.
[outputs]: Add a debug output.
[configure-flags]: Specify --bindir and disable manpage generation.
[phases]{disable-failing-tests}: Disable the flaky testfilemonitor test.
{move-static-libraries}: Use rename-file instead of link and delete.
{move-bin}: Rename to...
{patch-pkg-config-files}: ... this, and adjust the substitutions.
[native-inputs]: Remove docbook-xsl, libxml2 and libxslt.
[properties]: Re-add the hidden? property that commit 18f73d8041
had
temporarily removed.
(glib-with-documentation)[properties]: Revert to a visible package.
[native-inputs]: Add docbook-xsl and libxslt.
[configure-flags]: Delete the inherited "-Dman=false" flag.
This commit is contained in:
parent
6d08d40cfa
commit
f22f6fc3b6
1 changed files with 42 additions and 46 deletions
|
@ -9,7 +9,7 @@
|
||||||
;;; Copyright © 2017 Petter <petter@mykolab.ch>
|
;;; Copyright © 2017 Petter <petter@mykolab.ch>
|
||||||
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
|
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
|
||||||
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2019, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
|
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
|
||||||
;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
|
;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
|
||||||
;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
|
;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
|
||||||
|
@ -179,7 +179,7 @@ (define dbus
|
||||||
(define glib
|
(define glib
|
||||||
(package
|
(package
|
||||||
(name "glib")
|
(name "glib")
|
||||||
(version "2.68.3")
|
(version "2.70.0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
|
@ -188,7 +188,7 @@ (define glib
|
||||||
name "/" (string-take version 4) "/"
|
name "/" (string-take version 4) "/"
|
||||||
name "-" version ".tar.xz"))
|
name "-" version ".tar.xz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0f1iprj7v0b5wn9njj39dkl25g6filfs7i4ybk20jq821k1a7qg7"))
|
(base32 "0hh7hk02fkm1bn48k4z8f3kgv9qbni5z22gizd567fn527w7s390"))
|
||||||
(patches
|
(patches
|
||||||
(search-patches "glib-appinfo-watch.patch"
|
(search-patches "glib-appinfo-watch.patch"
|
||||||
"glib-skip-failing-test.patch"))
|
"glib-skip-failing-test.patch"))
|
||||||
|
@ -196,12 +196,12 @@ (define glib
|
||||||
(snippet
|
(snippet
|
||||||
'(begin
|
'(begin
|
||||||
(substitute* "tests/spawn-test.c"
|
(substitute* "tests/spawn-test.c"
|
||||||
(("/bin/sh") "sh"))
|
(("/bin/sh") "sh"))))))
|
||||||
#t))))
|
|
||||||
(build-system meson-build-system)
|
(build-system meson-build-system)
|
||||||
(outputs '("out" ;libraries, locales, etc
|
(outputs '("out" ;libraries, locales, etc
|
||||||
"static" ;static libraries
|
"static" ;static libraries
|
||||||
"bin")) ;executables; depends on Python
|
"bin" ;executables; depends on Python
|
||||||
|
"debug"))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:disallowed-references
|
`(#:disallowed-references
|
||||||
(,tzdata-for-tests
|
(,tzdata-for-tests
|
||||||
|
@ -212,9 +212,12 @@ (define glib
|
||||||
`(,(this-package-native-input "python")
|
`(,(this-package-native-input "python")
|
||||||
,(this-package-native-input "python-wrapper")))
|
,(this-package-native-input "python-wrapper")))
|
||||||
'()))
|
'()))
|
||||||
#:configure-flags '("--default-library=both"
|
#:configure-flags (list "--default-library=both"
|
||||||
"-Dman=true"
|
"-Dman=false"
|
||||||
"-Dselinux=disabled")
|
"-Dselinux=disabled"
|
||||||
|
(string-append "--bindir="
|
||||||
|
(assoc-ref %outputs "bin")
|
||||||
|
"/bin"))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
;; Needed to pass the test phase on slower ARM and i686 machines.
|
;; Needed to pass the test phase on slower ARM and i686 machines.
|
||||||
|
@ -225,6 +228,9 @@ (define glib
|
||||||
(string-append first " = " second "0")))))
|
(string-append first " = " second "0")))))
|
||||||
(add-after 'unpack 'disable-failing-tests
|
(add-after 'unpack 'disable-failing-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
|
(substitute* "gio/tests/meson.build"
|
||||||
|
((".*'testfilemonitor'.*") ;marked as flaky
|
||||||
|
""))
|
||||||
(with-directory-excursion "glib/tests"
|
(with-directory-excursion "glib/tests"
|
||||||
(substitute* '("unix.c" "utils.c")
|
(substitute* '("unix.c" "utils.c")
|
||||||
(("[ \t]*g_test_add_func.*;") "")))
|
(("[ \t]*g_test_add_func.*;") "")))
|
||||||
|
@ -242,8 +248,7 @@ (define glib
|
||||||
(string-append "//" all "\n"))
|
(string-append "//" all "\n"))
|
||||||
(("^ g_assert_cmpfloat \\(elapsed, ==.*" all)
|
(("^ g_assert_cmpfloat \\(elapsed, ==.*" all)
|
||||||
(string-append "//" all "\n"))))
|
(string-append "//" all "\n"))))
|
||||||
'())
|
'())))
|
||||||
#t))
|
|
||||||
;; Python references are not being patched in patch-phase of build,
|
;; Python references are not being patched in patch-phase of build,
|
||||||
;; despite using python-wrapper as input. So we patch them manually.
|
;; despite using python-wrapper as input. So we patch them manually.
|
||||||
;;
|
;;
|
||||||
|
@ -271,27 +276,19 @@ (define glib
|
||||||
"share/zoneinfo"))
|
"share/zoneinfo"))
|
||||||
;; Some tests want write access there.
|
;; Some tests want write access there.
|
||||||
(setenv "HOME" (getcwd))
|
(setenv "HOME" (getcwd))
|
||||||
(setenv "XDG_CACHE_HOME" (getcwd))
|
(setenv "XDG_CACHE_HOME" (getcwd))))
|
||||||
#t))
|
|
||||||
(add-after 'install 'move-static-libraries
|
(add-after 'install 'move-static-libraries
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(let ((out (assoc-ref outputs "out"))
|
||||||
(static (assoc-ref outputs "static")))
|
(static (assoc-ref outputs "static")))
|
||||||
(mkdir-p (string-append static "/lib"))
|
(mkdir-p (string-append static "/lib"))
|
||||||
(for-each (lambda (file)
|
(for-each (lambda (a)
|
||||||
(link file (string-append static "/lib/"
|
(rename-file a (string-append static "/lib/"
|
||||||
(basename file)))
|
(basename a))))
|
||||||
(delete-file file))
|
(find-files out "\\.a$")))))
|
||||||
(find-files (string-append out "/lib") "\\.a$")))))
|
(add-after 'install 'patch-pkg-config-files
|
||||||
;; Meson does not permit the bindir to be outside of prefix.
|
|
||||||
(add-after 'install 'move-bin
|
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(bin (assoc-ref outputs "bin")))
|
|
||||||
(mkdir-p bin)
|
|
||||||
(rename-file
|
|
||||||
(string-append out "/bin")
|
|
||||||
(string-append bin "/bin"))
|
|
||||||
;; Do not refer to "bindir", which points to "${prefix}/bin".
|
;; Do not refer to "bindir", which points to "${prefix}/bin".
|
||||||
;; We don't patch "bindir" to point to "$bin/bin", because that
|
;; We don't patch "bindir" to point to "$bin/bin", because that
|
||||||
;; would create a reference cycle between the "out" and "bin"
|
;; would create a reference cycle between the "out" and "bin"
|
||||||
|
@ -300,20 +297,18 @@ (define glib
|
||||||
(list
|
(list
|
||||||
(string-append out "/lib/pkgconfig/gio-2.0.pc")
|
(string-append out "/lib/pkgconfig/gio-2.0.pc")
|
||||||
(string-append out "/lib/pkgconfig/glib-2.0.pc"))
|
(string-append out "/lib/pkgconfig/glib-2.0.pc"))
|
||||||
(("bindir=\\$\\{prefix\\}/bin") "")
|
(("^bindir=.*")
|
||||||
(("=\\$\\{bindir\\}/") "="))
|
"")
|
||||||
#t))))))
|
(("=\\$\\{bindir\\}/")
|
||||||
|
"="))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("docbook-xsl" ,docbook-xsl)
|
`(("gettext" ,gettext-minimal)
|
||||||
("gettext" ,gettext-minimal)
|
|
||||||
("m4" ,m4) ; for installing m4 macros
|
("m4" ,m4) ; for installing m4 macros
|
||||||
("perl" ,perl) ; needed by GIO tests
|
("perl" ,perl) ; needed by GIO tests
|
||||||
("pkg-config" ,pkg-config)
|
("pkg-config" ,pkg-config)
|
||||||
("python" ,python) ; For 'patch-python-references
|
("python" ,python) ; For 'patch-python-references
|
||||||
("python-wrapper" ,python-wrapper)
|
("python-wrapper" ,python-wrapper)
|
||||||
("tzdata" ,tzdata-for-tests) ; for tests/gdatetime.c
|
("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
|
||||||
("xmllint" ,libxml2)
|
|
||||||
("xsltproc" ,libxslt)))
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("bash-completion" ,bash-completion)
|
`(("bash-completion" ,bash-completion)
|
||||||
;; "python", "python-wrapper" and "bash-minimal"
|
;; "python", "python-wrapper" and "bash-minimal"
|
||||||
|
@ -326,10 +321,10 @@ (define glib
|
||||||
("dbus" ,dbus)
|
("dbus" ,dbus)
|
||||||
("libelf" ,libelf)))
|
("libelf" ,libelf)))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc
|
`(("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc
|
||||||
("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc
|
("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc
|
||||||
("util-linux" ,util-linux "lib") ;for libmount
|
("util-linux" ,util-linux "lib") ;for libmount
|
||||||
("zlib" ,zlib))) ; in the Requires.private field of glib-2.0.pc
|
("zlib" ,zlib))) ; in the Requires.private field of glib-2.0.pc
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
;; This variable is not really "owned" by GLib, but several related
|
;; This variable is not really "owned" by GLib, but several related
|
||||||
;; packages refer to it: gobject-introspection's tools use it as a search
|
;; packages refer to it: gobject-introspection's tools use it as a search
|
||||||
|
@ -350,25 +345,28 @@ (define glib
|
||||||
used in GNOME, the main loop implementation, and a large set of utility
|
used in GNOME, the main loop implementation, and a large set of utility
|
||||||
functions for strings and common data structures.")
|
functions for strings and common data structures.")
|
||||||
(home-page "https://wiki.gnome.org/Projects/GLib")
|
(home-page "https://wiki.gnome.org/Projects/GLib")
|
||||||
(license license:lgpl2.1+)))
|
(license license:lgpl2.1+)
|
||||||
|
(properties '((hidden? . #t)))))
|
||||||
|
|
||||||
(define-public glib-with-documentation
|
(define-public glib-with-documentation
|
||||||
;; glib's doc must be built in a separate package since it requires gtk-doc,
|
;; glib's doc must be built in a separate package since it requires gtk-doc,
|
||||||
;; which in turn depends on glib.
|
;; which in turn depends on glib.
|
||||||
(package/inherit glib
|
(package/inherit glib
|
||||||
;; (properties (alist-delete 'hidden? (package-properties glib)))
|
(properties (alist-delete 'hidden? (package-properties glib)))
|
||||||
(properties '((hidden? . #t)))
|
|
||||||
(outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference
|
(outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("docbook-xml-4.2" ,docbook-xml-4.2)
|
`(("docbook-xml-4.2" ,docbook-xml-4.2)
|
||||||
("docbook-xml-4.5" ,docbook-xml)
|
("docbook-xml-4.5" ,docbook-xml)
|
||||||
("gtk-doc" ,gtk-doc) ; for the doc
|
("docbook-xsl" ,docbook-xsl)
|
||||||
|
("gtk-doc" ,gtk-doc)
|
||||||
("libxml2" ,libxml2)
|
("libxml2" ,libxml2)
|
||||||
|
("xsltproc" ,libxslt)
|
||||||
,@(package-native-inputs glib)))
|
,@(package-native-inputs glib)))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments glib)
|
(substitute-keyword-arguments (package-arguments glib)
|
||||||
((#:configure-flags flags ''())
|
((#:configure-flags flags ''())
|
||||||
`(cons "-Dgtk_doc=true" ,flags))
|
`(cons "-Dgtk_doc=true"
|
||||||
|
(delete "-Dman=false" ,flags)))
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(modify-phases ,phases
|
`(modify-phases ,phases
|
||||||
(add-after 'unpack 'patch-docbook-xml
|
(add-after 'unpack 'patch-docbook-xml
|
||||||
|
@ -380,8 +378,7 @@ (define-public glib-with-documentation
|
||||||
"/xml/dtd/docbook/"))
|
"/xml/dtd/docbook/"))
|
||||||
(("http://www.oasis-open.org/docbook/xml/4\\.2/")
|
(("http://www.oasis-open.org/docbook/xml/4\\.2/")
|
||||||
(string-append (assoc-ref inputs "docbook-xml-4.2")
|
(string-append (assoc-ref inputs "docbook-xml-4.2")
|
||||||
"/xml/dtd/docbook/"))))
|
"/xml/dtd/docbook/"))))))
|
||||||
#t))
|
|
||||||
(add-after 'install 'move-doc
|
(add-after 'install 'move-doc
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
@ -390,8 +387,7 @@ (define-public glib-with-documentation
|
||||||
(mkdir-p (string-append doc "/share"))
|
(mkdir-p (string-append doc "/share"))
|
||||||
(rename-file
|
(rename-file
|
||||||
(string-append out html)
|
(string-append out html)
|
||||||
(string-append doc html))
|
(string-append doc html)))))))))))
|
||||||
#t)))))))))
|
|
||||||
|
|
||||||
(define (python-extension-suffix python triplet)
|
(define (python-extension-suffix python triplet)
|
||||||
"Determine the suffix for C extensions for PYTHON when compiled
|
"Determine the suffix for C extensions for PYTHON when compiled
|
||||||
|
|
Loading…
Reference in a new issue