gnu: glib: Use gexps.
* gnu/packages/glib.scm (glib)[arguments]: Use a plain list. [disallowed-references]: Adjust accordingly. [configure-flags]: Likewise. [phases]: Use gexps. (glib-with-documentation)[phases]: Use gexps.
This commit is contained in:
parent
0eab5926dd
commit
c6e4a14458
1 changed files with 129 additions and 134 deletions
|
@ -235,22 +235,23 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
|
||||||
"bin" ;executables; depends on Python
|
"bin" ;executables; depends on Python
|
||||||
"debug"))
|
"debug"))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:disallowed-references
|
(list
|
||||||
(,tzdata-for-tests
|
#:disallowed-references
|
||||||
|
(cons tzdata-for-tests
|
||||||
;; Verify glib-mkenums, gtester, ... use the cross-compiled
|
;; Verify glib-mkenums, gtester, ... use the cross-compiled
|
||||||
;; python.
|
;; python.
|
||||||
,@(if (%current-target-system)
|
(if (%current-target-system)
|
||||||
(map (cut gexp-input <> #:native? #t)
|
(map (cut gexp-input <> #:native? #t)
|
||||||
`(,(this-package-native-input "python")
|
`(,(this-package-native-input "python")
|
||||||
,(this-package-native-input "python-wrapper")))
|
,(this-package-native-input "python-wrapper")))
|
||||||
'()))
|
'()))
|
||||||
#:configure-flags ,#~(list "--default-library=both"
|
#:configure-flags #~(list "--default-library=both"
|
||||||
"-Dman=false"
|
"-Dman=false"
|
||||||
"-Dselinux=disabled"
|
"-Dselinux=disabled"
|
||||||
(string-append "--bindir="
|
(string-append "--bindir="
|
||||||
#$output:bin "/bin"))
|
#$output: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.
|
||||||
(add-after 'unpack 'increase-test-timeout
|
(add-after 'unpack 'increase-test-timeout
|
||||||
(lambda _
|
(lambda _
|
||||||
|
@ -270,7 +271,7 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
|
||||||
"gdbus-peer.c" "appinfo.c" "desktop-app-info.c")
|
"gdbus-peer.c" "appinfo.c" "desktop-app-info.c")
|
||||||
(("[ \t]*g_test_add_func.*;") "")))
|
(("[ \t]*g_test_add_func.*;") "")))
|
||||||
|
|
||||||
,@(if (target-x86-32?)
|
#$@(if (target-x86-32?)
|
||||||
;; Comment out parts of timer.c that fail on i686 due to
|
;; Comment out parts of timer.c that fail on i686 due to
|
||||||
;; excess precision when building with GCC 10:
|
;; excess precision when building with GCC 10:
|
||||||
;; <https://gitlab.gnome.org/GNOME/glib/-/issues/820>.
|
;; <https://gitlab.gnome.org/GNOME/glib/-/issues/820>.
|
||||||
|
@ -297,7 +298,7 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
|
||||||
(search-input-file (or native-inputs inputs)
|
(search-input-file (or native-inputs inputs)
|
||||||
(string-append
|
(string-append
|
||||||
"/bin/python"
|
"/bin/python"
|
||||||
,(version-major+minor
|
#$(version-major+minor
|
||||||
(package-version python))))))))
|
(package-version python))))))))
|
||||||
(add-before 'check 'pre-check
|
(add-before 'check 'pre-check
|
||||||
(lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
|
(lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
|
||||||
|
@ -309,38 +310,34 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
|
||||||
(setenv "HOME" (getcwd))
|
(setenv "HOME" (getcwd))
|
||||||
(setenv "XDG_CACHE_HOME" (getcwd))))
|
(setenv "XDG_CACHE_HOME" (getcwd))))
|
||||||
(add-after 'install 'move-static-libraries
|
(add-after 'install 'move-static-libraries
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(mkdir-p (string-append #$output:static "/lib"))
|
||||||
(static (assoc-ref outputs "static")))
|
|
||||||
(mkdir-p (string-append static "/lib"))
|
|
||||||
(for-each (lambda (a)
|
(for-each (lambda (a)
|
||||||
(rename-file a (string-append static "/lib/"
|
(rename-file a (string-append #$output:static "/lib/"
|
||||||
(basename a))))
|
(basename a))))
|
||||||
(find-files out "\\.a$")))))
|
(find-files #$output "\\.a$"))))
|
||||||
(add-after 'install 'patch-pkg-config-files
|
(add-after 'install 'patch-pkg-config-files
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
|
||||||
;; 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"
|
||||||
;; outputs.
|
;; outputs.
|
||||||
(substitute*
|
(substitute*
|
||||||
(list
|
(list (search-input-file outputs "lib/pkgconfig/gio-2.0.pc")
|
||||||
(string-append out "/lib/pkgconfig/gio-2.0.pc")
|
(search-input-file outputs "lib/pkgconfig/glib-2.0.pc"))
|
||||||
(string-append out "/lib/pkgconfig/glib-2.0.pc"))
|
|
||||||
(("^bindir=.*")
|
(("^bindir=.*")
|
||||||
"")
|
"")
|
||||||
(("=\\$\\{bindir\\}/")
|
(("=\\$\\{bindir\\}/")
|
||||||
"="))))))))
|
"=")))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("dbus" ,dbus)
|
(list dbus
|
||||||
("gettext" ,gettext-minimal)
|
gettext-minimal
|
||||||
("m4" ,m4) ; for installing m4 macros
|
m4 ;for installing m4 macros
|
||||||
("perl" ,perl) ; needed by GIO tests
|
perl ;needed by GIO tests
|
||||||
("pkg-config" ,pkg-config)
|
pkg-config
|
||||||
("python" ,python) ; For 'patch-python-references
|
python ;for 'patch-python-references
|
||||||
("python-wrapper" ,python-wrapper)
|
python-wrapper
|
||||||
("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
|
tzdata-for-tests)) ;for tests/gdatetime.c
|
||||||
(inputs
|
(inputs
|
||||||
(list ;; "python", "python-wrapper" and "bash-minimal"
|
(list ;; "python", "python-wrapper" and "bash-minimal"
|
||||||
;; are for the 'patch-shebangs' phase, to make
|
;; are for the 'patch-shebangs' phase, to make
|
||||||
|
@ -350,10 +347,10 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
|
||||||
python
|
python
|
||||||
python-wrapper))
|
python-wrapper))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list libffi ; in the Requires.private field of gobject-2.0.pc
|
(list libffi ;in the Requires.private field of gobject-2.0.pc
|
||||||
pcre ; in the Requires.private field of glib-2.0.pc
|
pcre ;in the Requires.private field of glib-2.0.pc
|
||||||
`(,util-linux "lib") ;for libmount
|
`(,util-linux "lib") ;for libmount
|
||||||
zlib)) ; in the Requires.private field of glib-2.0.pc
|
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
|
||||||
|
@ -397,7 +394,7 @@ functions for strings and common data structures.")
|
||||||
#~(cons "-Dgtk_doc=true"
|
#~(cons "-Dgtk_doc=true"
|
||||||
(delete "-Dman=false" #$flags)))
|
(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
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(with-directory-excursion "docs"
|
(with-directory-excursion "docs"
|
||||||
|
@ -409,14 +406,12 @@ functions for strings and common data structures.")
|
||||||
(string-append (assoc-ref inputs "docbook-xml-4.2")
|
(string-append (assoc-ref inputs "docbook-xml-4.2")
|
||||||
"/xml/dtd/docbook/"))))))
|
"/xml/dtd/docbook/"))))))
|
||||||
(add-after 'install 'move-doc
|
(add-after 'install 'move-doc
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let ((html "/share/gtk-doc"))
|
||||||
(doc (assoc-ref outputs "doc"))
|
(mkdir-p (string-append #$output:doc "/share"))
|
||||||
(html (string-append "/share/gtk-doc")))
|
|
||||||
(mkdir-p (string-append doc "/share"))
|
|
||||||
(rename-file
|
(rename-file
|
||||||
(string-append out html)
|
(string-append #$output html)
|
||||||
(string-append doc html)))))))))))
|
(string-append #$output:doc html)))))))))))
|
||||||
|
|
||||||
(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
|
||||||
|
|
Reference in a new issue