diff options
author | gusi <gusi@df743ca5-7f9a-e211-a948-0013205c9059> | 2014-04-04 15:28:02 +0800 |
---|---|---|
committer | gusi <gusi@df743ca5-7f9a-e211-a948-0013205c9059> | 2014-04-04 15:28:02 +0800 |
commit | 92618ffee291ebd8b2f9cde4e36f95ae9f2de738 (patch) | |
tree | e78d1fd02d8465754f285082439d76f959236754 | |
parent | cda4e93597649258e1036bdcec9ba99dc95f8807 (diff) | |
download | marcuscom-ports-92618ffee291ebd8b2f9cde4e36f95ae9f2de738.tar marcuscom-ports-92618ffee291ebd8b2f9cde4e36f95ae9f2de738.tar.gz marcuscom-ports-92618ffee291ebd8b2f9cde4e36f95ae9f2de738.tar.bz2 marcuscom-ports-92618ffee291ebd8b2f9cde4e36f95ae9f2de738.tar.lz marcuscom-ports-92618ffee291ebd8b2f9cde4e36f95ae9f2de738.tar.xz marcuscom-ports-92618ffee291ebd8b2f9cde4e36f95ae9f2de738.tar.zst marcuscom-ports-92618ffee291ebd8b2f9cde4e36f95ae9f2de738.zip |
Fix the build of cinnamon-settings-daemon after the upower version bump. While
here switch to tar:xz and do some cosmetic changes all around.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@19448 df743ca5-7f9a-e211-a948-0013205c9059
3 files changed, 109 insertions, 4 deletions
diff --git a/sysutils/cinnamon-settings-daemon/Makefile b/sysutils/cinnamon-settings-daemon/Makefile index ca8500e3c..4e4704565 100644 --- a/sysutils/cinnamon-settings-daemon/Makefile +++ b/sysutils/cinnamon-settings-daemon/Makefile @@ -4,6 +4,7 @@ PORTNAME= cinnamon-settings-daemon PORTVERSION= 2.0.8 +PORTREVISION= 1 CATEGORIES= sysutils gnome MASTER_SITES= http://github.com/linuxmint/${PORTNAME}/archive/${PORTVERSION}.tar.gz?dummy=/ DIST_SUBDIR= gnome3 @@ -28,16 +29,15 @@ LIB_DEPENDS= libcanberra-gtk3.so:${PORTSDIR}/audio/libcanberra-gtk3 \ RUN_DEPENDS= cinnamon-session:${PORTSDIR}/x11/cinnamon-session \ ${LOCALBASE}/libdata/pkgconfig/gsettings-desktop-schemas.pc:${PORTSDIR}/devel/gsettings-desktop-schemas -USE_XORG= xxf86misc -USE_XZ= yes -USE_LDCONFIG= yes USE_GNOME= gnomehier gnomeprefix intlhack libgnomekbd \ libxslt:build -USES= gettext gmake pathfix pkgconfig +USES= gettext gmake pathfix pkgconfig tar:xz +USE_XORG= xxf86misc GNU_CONFIGURE= yes USE_AUTOTOOLS= libtool autoconf automake PATHFIX_MAKEFILEIN= Makefile.am INSTALLS_ICONS= yes +USE_LDCONFIG= yes CONFIGURE_ARGS= --disable-gudev \ --disable-systemd \ --disable-packagekit \ diff --git a/sysutils/cinnamon-settings-daemon/files/patch-configure.ac b/sysutils/cinnamon-settings-daemon/files/patch-configure.ac new file mode 100644 index 000000000..fbd1beeae --- /dev/null +++ b/sysutils/cinnamon-settings-daemon/files/patch-configure.ac @@ -0,0 +1,17 @@ +--- configure.ac.orig 2014-04-04 08:09:33.522271204 +0000 ++++ configure.ac 2014-04-04 08:09:38.282271249 +0000 +@@ -73,6 +73,14 @@ + x11 + ) + ++# We can only support old upower ++# 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) ++AS_IF([test x$have_old_upower = xyes], [ ++ AC_DEFINE([HAVE_OLD_UPOWER], [1], [Define if we have an older upower]) ++]) ++AM_CONDITIONAL(HAVE_OLD_UPOWER, test x$have_old_upower = xyes) ++ + PKG_CHECK_MODULES(XI23, gtk+-3.0 >= $GTK_XINPUT_2_3_VERSION, have_xi_23=yes, have_xi_23=no) + if test x$have_xi_23 = xyes ; then + AC_DEFINE(XI_23, 1, [Defined if GTK version is higher than 3.7.8]) diff --git a/sysutils/cinnamon-settings-daemon/files/patch-plugins_power_csd-power-manager.c b/sysutils/cinnamon-settings-daemon/files/patch-plugins_power_csd-power-manager.c new file mode 100644 index 000000000..973ac5101 --- /dev/null +++ b/sysutils/cinnamon-settings-daemon/files/patch-plugins_power_csd-power-manager.c @@ -0,0 +1,88 @@ +--- plugins/power/csd-power-manager.c.orig 2013-11-25 18:39:23.000000000 +0000 ++++ plugins/power/csd-power-manager.c 2014-04-04 09:06:44.968035344 +0000 +@@ -1158,7 +1158,11 @@ + GError *error = NULL; + + /* get devices from UPower */ ++#ifdef HAVE_OLD_UPOWER + ret = up_client_enumerate_devices_sync (manager->priv->up_client, NULL, &error); ++#else ++ ret = FALSE; ++#endif + if (!ret) { + g_warning ("failed to get device list: %s", error->message); + g_error_free (error); +@@ -1306,13 +1310,17 @@ + + policy = g_settings_get_enum (manager->priv->settings, "critical-battery-action"); + if (policy == CSD_POWER_ACTION_SUSPEND) { ++#ifdef HAVE_OLD_UPOWER + if (is_ups == FALSE && + up_client_get_can_suspend (manager->priv->up_client)) + return policy; ++#endif + return CSD_POWER_ACTION_SHUTDOWN; + } else if (policy == CSD_POWER_ACTION_HIBERNATE) { ++#ifdef HAVE_OLD_UPOWER + if (up_client_get_can_hibernate (manager->priv->up_client)) + return policy; ++#endif + return CSD_POWER_ACTION_SHUTDOWN; + } + +@@ -2303,7 +2311,11 @@ + /* check we won't melt when the lid is closed */ + if (action_type != CSD_POWER_ACTION_SUSPEND && + action_type != CSD_POWER_ACTION_HIBERNATE) { ++#ifdef HAVE_OLD_UPOWER + if (up_client_get_lid_force_sleep (manager->priv->up_client)) { ++#else ++ if (0){ ++#endif + g_warning ("to prevent damage, now forcing suspend"); + do_power_action_type (manager, CSD_POWER_ACTION_SUSPEND); + return; +@@ -2377,7 +2389,11 @@ + } + + /* same state */ ++#ifdef HAVE_OLD_UPOWER + tmp = up_client_get_lid_is_closed (manager->priv->up_client); ++#else ++ tmp = FALSE; ++#endif + if (manager->priv->lid_is_closed == tmp) + return; + manager->priv->lid_is_closed = tmp; +@@ -3539,6 +3555,7 @@ + manager); + } + ++#ifdef HAVE_OLD_UPOWER + static void + upower_notify_sleep_cb (UpClient *client, + UpSleepKind sleep_kind, +@@ -3602,6 +3619,7 @@ + g_error_free (error); + } + } ++#endif + + static void + idle_send_to_sleep (CsdPowerManager *manager) +@@ -3838,11 +3856,15 @@ + G_CALLBACK (engine_settings_key_changed_cb), manager); + manager->priv->settings_screensaver = g_settings_new ("org.cinnamon.desktop.screensaver"); + manager->priv->up_client = up_client_new (); ++#ifdef HAVE_OLD_UPOWER + g_signal_connect (manager->priv->up_client, "notify-sleep", + G_CALLBACK (upower_notify_sleep_cb), manager); + g_signal_connect (manager->priv->up_client, "notify-resume", + G_CALLBACK (upower_notify_resume_cb), manager); + manager->priv->lid_is_closed = up_client_get_lid_is_closed (manager->priv->up_client); ++#else ++ manager->priv->lid_is_closed = FALSE; ++#endif + g_signal_connect (manager->priv->up_client, "device-added", + G_CALLBACK (engine_device_added_cb), manager); + g_signal_connect (manager->priv->up_client, "device-removed", |