gnu: upower: Build from Git sources.
* gnu/packages/gnome.scm (upower)[source]: Use GIT-FETCH and GIT-FILE-NAME. Adjust snippet. [native-inputs]: Add autoconf, automake, gtk-doc, libtool, and which. * gnu/packages/patches/upower-builddir.patch: Adjust to Makefile.am.
This commit is contained in:
parent
23bc34e443
commit
35188a8257
2 changed files with 54 additions and 32 deletions
|
@ -5394,27 +5394,32 @@ faster results and to avoid unnecessary server load.")
|
||||||
(package
|
(package
|
||||||
(name "upower")
|
(name "upower")
|
||||||
(version "0.99.11")
|
(version "0.99.11")
|
||||||
(source (origin
|
(source
|
||||||
(method url-fetch)
|
(origin
|
||||||
(uri (string-append "https://upower.freedesktop.org/releases/"
|
(method git-fetch)
|
||||||
"upower-" version ".tar.xz"))
|
(uri (git-reference
|
||||||
(sha256
|
(url "https://gitlab.freedesktop.org/upower/upower")
|
||||||
(base32
|
(commit (string-append "UPOWER_"
|
||||||
"1vxxvmz2cxb1qy6ibszaz5bskqdy9nd9fxspj9fv3gfmrjzzzdb4"))
|
(string-map (match-lambda (#\. #\_)
|
||||||
(patches (search-patches "upower-builddir.patch"))
|
(chr chr))
|
||||||
(modules '((guix build utils)))
|
version)))))
|
||||||
(snippet
|
(file-name (git-file-name name version))
|
||||||
'(begin
|
(sha256
|
||||||
;; Upstream commit
|
(base32 "0frs6ywvsz48d0zfviy40h6mj0icfc1q21hn7p99nchps39z85f8"))
|
||||||
;; <https://cgit.freedesktop.org/upower/commit/?id=18457c99b68786cd729b315723d680e6860d9cfa>
|
(patches (search-patches "upower-builddir.patch"))
|
||||||
;; moved 'dbus-1/system.d' from etc/ to share/. However,
|
(modules '((guix build utils)))
|
||||||
;; 'dbus-configuration-directory' in (gnu services dbus)
|
(snippet
|
||||||
;; expects it in etc/. Thus, move it back to its previous
|
'(begin
|
||||||
;; location.
|
;; Upstream commit
|
||||||
(substitute* "src/Makefile.in"
|
;; <https://cgit.freedesktop.org/upower/commit/?id=18457c99b68786cd729b315723d680e6860d9cfa>
|
||||||
(("^dbusconfdir =.*$")
|
;; moved 'dbus-1/system.d' from etc/ to share/. However,
|
||||||
"dbusconfdir = $(sysconfdir)/dbus-1/system.d\n"))
|
;; 'dbus-configuration-directory' in (gnu services dbus)
|
||||||
#t))))
|
;; expects it in etc/. Thus, move it back to its previous
|
||||||
|
;; location.
|
||||||
|
(substitute* "src/Makefile.am"
|
||||||
|
(("^dbusconfdir =.*$")
|
||||||
|
"dbusconfdir = $(sysconfdir)/dbus-1/system.d\n"))
|
||||||
|
#t))))
|
||||||
(build-system glib-or-gtk-build-system)
|
(build-system glib-or-gtk-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:phases
|
'(#:phases
|
||||||
|
@ -5430,10 +5435,15 @@ faster results and to avoid unnecessary server load.")
|
||||||
(assoc-ref %outputs "out")
|
(assoc-ref %outputs "out")
|
||||||
"/lib/udev/rules.d"))))
|
"/lib/udev/rules.d"))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("gobject-introspection" ,gobject-introspection)
|
`(("autoconf" ,autoconf)
|
||||||
("pkg-config" ,pkg-config)
|
("automake" ,automake)
|
||||||
|
("gobject-introspection" ,gobject-introspection)
|
||||||
|
("gtk-doc" ,gtk-doc)
|
||||||
("intltool" ,intltool)
|
("intltool" ,intltool)
|
||||||
|
("libtool" ,libtool)
|
||||||
|
("pkg-config" ,pkg-config)
|
||||||
("python" ,python)
|
("python" ,python)
|
||||||
|
("which" ,which) ; for ./autogen.sh
|
||||||
|
|
||||||
;; For tests.
|
;; For tests.
|
||||||
("python-dbus" ,python-dbus)
|
("python-dbus" ,python-dbus)
|
||||||
|
@ -5442,9 +5452,9 @@ faster results and to avoid unnecessary server load.")
|
||||||
("umockdev" ,umockdev)
|
("umockdev" ,umockdev)
|
||||||
|
|
||||||
;; For man pages.
|
;; For man pages.
|
||||||
("libxslt" ,libxslt) ;for 'xsltproc'
|
("docbook-xsl" ,docbook-xsl)
|
||||||
("libxml2" ,libxml2) ;for 'XML_CATALOG_FILES'
|
("libxslt" ,libxslt) ; for 'xsltproc'
|
||||||
("docbook-xsl" ,docbook-xsl)))
|
("libxml2" ,libxml2))) ; for 'XML_CATALOG_FILES'
|
||||||
(inputs
|
(inputs
|
||||||
`(("dbus-glib" ,dbus-glib)
|
`(("dbus-glib" ,dbus-glib)
|
||||||
("libgudev" ,libgudev)
|
("libgudev" ,libgudev)
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
From 27ae011b31d831752b97eb209bc2b2206fcf40f7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
|
Date: Mon, 28 Jun 2021 11:58:47 +0200
|
||||||
|
Subject: [PATCH] gnu: upower: Fix build directory.
|
||||||
|
|
||||||
Remove explicit set of UPOWER_CONF_FILE_NAME in up-self-test.c;
|
Remove explicit set of UPOWER_CONF_FILE_NAME in up-self-test.c;
|
||||||
instead the harness should set it. In Guix we set it explicitly; the
|
instead the harness should set it. In Guix we set it explicitly; the
|
||||||
right thing is to use AM_TEST_ENVIRONMENT and regenerate the
|
right thing is to use AM_TEST_ENVIRONMENT and regenerate the
|
||||||
|
@ -6,13 +11,17 @@ some things, so we patch the Makefile.in instead.
|
||||||
|
|
||||||
Also fix to not try to create /var/lib/upower if /var isn't writable.
|
Also fix to not try to create /var/lib/upower if /var isn't writable.
|
||||||
|
|
||||||
Patch by Andy Wingo <wingo@igalia.com>
|
Based on a patch by Andy Wingo <wingo@igalia.com>
|
||||||
Reduced to upower 0.99.10 by Tobias Geerinckx-Rice <me@tobias.gr>
|
---
|
||||||
|
src/Makefile.am | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
--- upower-0.99.2.orig/src/Makefile.in 2014-12-18 10:32:01.000000000 +0100
|
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||||
+++ upower-0.99.2/src/Makefile.in 2015-04-04 19:49:28.020843678 +0200
|
index 3400139..f51ee89 100644
|
||||||
@@ -1789,7 +1790,7 @@
|
--- a/src/Makefile.am
|
||||||
@HAVE_SYSTEMDSYSTEMUNITDIR_TRUE@ @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
|
+++ b/src/Makefile.am
|
||||||
|
@@ -181,7 +181,7 @@ $(systemdservice_DATA): $(systemdservice_in_files) Makefile
|
||||||
|
endif
|
||||||
|
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
- if test -w $(DESTDIR)$(prefix)/; then \
|
- if test -w $(DESTDIR)$(prefix)/; then \
|
||||||
|
@ -20,3 +29,6 @@ Reduced to upower 0.99.10 by Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
mkdir -p $(DESTDIR)$(historydir); \
|
mkdir -p $(DESTDIR)$(historydir); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
--
|
||||||
|
2.32.0
|
||||||
|
|
||||||
|
|
Reference in a new issue