Исправлен ebuild

rasdark
Alexander Tratsevskiy 8 years ago
parent f53b124178
commit 7d3f38e666

@ -0,0 +1,50 @@
From 586c07b431e9b0e1f11a9017ee0b84dc9b8ec08a Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Mon, 5 May 2014 22:34:14 -0400
Subject: [PATCH] Make logind and old upower check non-automagic
---
configure.ac | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2f6fa7a..6e908cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,7 +56,15 @@ PKG_CHECK_MODULES(CINNAMON_SESSION,
dnl We can only support old upower
dnl https://bugzilla.gnome.org/show_bug.cgi?id=710383
-PKG_CHECK_MODULES(UPOWER, upower-glib < 0.99.0, have_old_upower=yes, have_old_upower=no)
+AC_ARG_ENABLE([old-upower],
+ AS_HELP_STRING([--disable-old-upower], [Do not check for old UPower API]),
+ [enable_old_upower=$enableval],
+ [enable_old_upower=auto])
+
+have_old_upower=no
+if test x$enable_old_upower != xno ; then
+ PKG_CHECK_MODULES(UPOWER, upower-glib < 0.99.0, have_old_upower=yes, have_old_upower=no)
+fi
AS_IF([test x$have_old_upower = xyes], [
AC_DEFINE([HAVE_OLD_UPOWER], [1], [Define if we have an older upower])
])
@@ -96,7 +104,15 @@ dnl ====================================================================
dnl Check for logind
dnl ====================================================================
-PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0 libsystemd-login >= 183], [have_logind=yes], [have_logind=no])
+AC_ARG_ENABLE([logind],
+ AS_HELP_STRING([--disable-logind], [Do not check for logind]),
+ [enable_logind=$enableval],
+ [enable_logind=auto])
+
+have_logind=no
+if test x$enable_logind != xno ; then
+ PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0 libsystemd-login >= 183], [have_logind=yes], [have_logind=no])
+fi
if test x$have_logind = xyes; then
AC_DEFINE(HAVE_LOGIND, 1, [Define if logind is supported])
--
2.4.3

@ -0,0 +1,38 @@
--- a/configure.ac~ 2016-05-20 13:03:13.000000000 +0200
+++ b/configure.ac 2016-06-25 17:36:55.389583194 +0200
@@ -56,7 +56,15 @@
dnl We can only support old upower
dnl https://bugzilla.gnome.org/show_bug.cgi?id=710383
-PKG_CHECK_MODULES(UPOWER, upower-glib < 0.99.0, have_old_upower=yes, have_old_upower=no)
+AC_ARG_ENABLE([old-upower],
+ AS_HELP_STRING([--disable-old-upower], [Do not check for old UPower API]),
+ [enable_old_upower=$enableval],
+ [enable_old_upower=auto])
+
+have_old_upower=no
+if test x$enable_old_upower != xno ; then
+ PKG_CHECK_MODULES(UPOWER, upower-glib < 0.99.0, have_old_upower=yes, have_old_upower=no)
+fi
AS_IF([test x$have_old_upower = xyes], [
AC_DEFINE([HAVE_OLD_UPOWER], [1], [Define if we have an older upower])
])
@@ -96,9 +104,15 @@
dnl Check for logind
dnl ====================================================================
-PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0 libsystemd-login], [have_logind=yes], [
- PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0 libsystemd], [have_logind=yes], [have_logind=no])
-])
+AC_ARG_ENABLE([logind],
+ AS_HELP_STRING([--disable-logind], [Do not check for logind]),
+ [enable_logind=$enableval],
+ [enable_logind=auto])
+
+have_logind=no
+if test x$enable_logind != xno ; then
+ PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0 libsystemd >= 183], [have_logind=yes], [have_logind=no])
+fi
if test x$have_logind = xyes; then
AC_DEFINE(HAVE_LOGIND, 1, [Define if logind is supported])
Loading…
Cancel
Save