diff options
author | Andy Wingo <wingo@pobox.com> | 2015-04-12 23:31:36 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-04-13 00:02:59 +0200 |
commit | a1d5bb0ec790d55d6800ad7e740ded44a32ed215 (patch) | |
tree | 7b962829e9e59efd288fd7d9170268937cd7f8de /gnu/packages/patches/upower-builddir.patch | |
parent | 002c57c6f7d51077e4796106177456ebb564e25a (diff) | |
download | guix-a1d5bb0ec790d55d6800ad7e740ded44a32ed215.tar guix-a1d5bb0ec790d55d6800ad7e740ded44a32ed215.tar.gz |
gnu: Add upower.
* gnu/packages/gnome.scm (upower): New variable.
* gnu/packages/patches/upower-builddir.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/patches/upower-builddir.patch')
-rw-r--r-- | gnu/packages/patches/upower-builddir.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/patches/upower-builddir.patch b/gnu/packages/patches/upower-builddir.patch new file mode 100644 index 0000000000..13cef5876a --- /dev/null +++ b/gnu/packages/patches/upower-builddir.patch @@ -0,0 +1,44 @@ +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 +right thing is to use AM_TEST_ENVIRONMENT and regenerate the +makefiles, but we can't regenerate because current autotools carp on +some things, so we patch the Makefile.in instead. + +Also fix to not try to create /var/lib/upower if /var isn't writable. + +Patch by Andy Wingo <wingo@igalia.com> + +--- upower-0.99.2.orig/src/Makefile.in 2014-12-18 10:32:01.000000000 +0100 ++++ upower-0.99.2/src/Makefile.in 2015-04-04 19:49:28.020843678 +0200 +@@ -780,6 +780,7 @@ + + @UP_BUILD_TESTS_TRUE@up_self_test_CFLAGS = $(AM_CFLAGS) $(WARNINGFLAGS_C) + @UP_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = $(DBUS_LAUNCH) ++@UP_BUILD_TESTS_TRUE@AM_TESTS_ENVIRONMENT = UPOWER_CONF_FILE_NAME=$(top_srcdir)/etc/UPower.conf + dbusservicedir = $(datadir)/dbus-1/system-services + dbusservice_in_files = org.freedesktop.UPower.service.in + dbusservice_DATA = $(dbusservice_in_files:.service.in=.service) +@@ -1789,7 +1790,7 @@ + @HAVE_SYSTEMDSYSTEMUNITDIR_TRUE@ @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ + + install-data-hook: +- if test -w $(DESTDIR)$(prefix)/; then \ ++ if test -w $(DESTDIR)$(localstatedir)/; then \ + mkdir -p $(DESTDIR)$(historydir); \ + fi + +--- upower-0.99.2.orig/src/up-self-test.c 2014-07-17 09:46:15.000000000 +0200 ++++ upower-0.99.2/src/up-self-test.c 2015-04-04 18:43:04.952741927 +0200 +@@ -295,12 +295,6 @@ + #endif + g_test_init (&argc, &argv, NULL); + +- /* make check, vs. make distcheck */ +- if (g_file_test ("../etc/UPower.conf", G_FILE_TEST_EXISTS)) +- g_setenv ("UPOWER_CONF_FILE_NAME", "../etc/UPower.conf", TRUE); +- else +- g_setenv ("UPOWER_CONF_FILE_NAME", "../../etc/UPower.conf", TRUE); +- + /* tests go here */ + g_test_add_func ("/power/backend", up_test_backend_func); + g_test_add_func ("/power/device", up_test_device_func); |