Advertisement
gusibsd

Untitled

Apr 20th, 2014
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.67 KB | None | 0 0
  1. diff --git sysutils/mate-power-manager/files/patch-configure sysutils/mate-power-manager/files/patch-configure
  2. new file mode 100644
  3. index 0000000..26dd034
  4. --- /dev/null
  5. +++ sysutils/mate-power-manager/files/patch-configure
  6. @@ -0,0 +1,93 @@
  7. +--- configure.orig 2014-04-20 19:21:13.253223081 +0000
  8. ++++ configure 2014-04-20 19:23:58.216210372 +0000
  9. +@@ -13884,6 +13884,90 @@
  10. + ;;
  11. + esac
  12. +
  13. ++# We can only support old upower
  14. ++
  15. ++pkg_failed=no
  16. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UPOWER" >&5
  17. ++$as_echo_n "checking for UPOWER... " >&6; }
  18. ++
  19. ++if test -n "$UPOWER_CFLAGS"; then
  20. ++ pkg_cv_UPOWER_CFLAGS="$UPOWER_CFLAGS"
  21. ++ elif test -n "$PKG_CONFIG"; then
  22. ++ if test -n "$PKG_CONFIG" && \
  23. ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"upower-glib < 0.99.0\""; } >&5
  24. ++ ($PKG_CONFIG --exists --print-errors "upower-glib < 0.99.0") 2>&5
  25. ++ ac_status=$?
  26. ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  27. ++ test $ac_status = 0; }; then
  28. ++ pkg_cv_UPOWER_CFLAGS=`$PKG_CONFIG --cflags "upower-glib < 0.99.0" 2>/dev/null`
  29. ++ test "x$?" != "x0" && pkg_failed=yes
  30. ++else
  31. ++ pkg_failed=yes
  32. ++fi
  33. ++ else
  34. ++ pkg_failed=untried
  35. ++fi
  36. ++if test -n "$UPOWER_LIBS"; then
  37. ++ pkg_cv_UPOWER_LIBS="$UPOWER_LIBS"
  38. ++ elif test -n "$PKG_CONFIG"; then
  39. ++ if test -n "$PKG_CONFIG" && \
  40. ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"upower-glib < 0.99.0\""; } >&5
  41. ++ ($PKG_CONFIG --exists --print-errors "upower-glib < 0.99.0") 2>&5
  42. ++ ac_status=$?
  43. ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  44. ++ test $ac_status = 0; }; then
  45. ++ pkg_cv_UPOWER_LIBS=`$PKG_CONFIG --libs "upower-glib < 0.99.0" 2>/dev/null`
  46. ++ test "x$?" != "x0" && pkg_failed=yes
  47. ++else
  48. ++ pkg_failed=yes
  49. ++fi
  50. ++ else
  51. ++ pkg_failed=untried
  52. ++fi
  53. ++if test $pkg_failed = yes; then
  54. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  55. ++$as_echo "no" >&6; }
  56. ++
  57. ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  58. ++ _pkg_short_errors_supported=yes
  59. ++else
  60. ++ _pkg_short_errors_supported=no
  61. ++fi
  62. ++ if test $_pkg_short_errors_supported = yes; then
  63. ++ UPOWER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "upower-glib < 0.99.0" 2>&1`
  64. ++ else
  65. ++ UPOWER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "upower-glib < 0.99.0" 2>&1`
  66. ++ fi
  67. ++ # Put the nasty error message in config.log where it belongs
  68. ++ echo "$UPOWER_PKG_ERRORS" >&5
  69. ++
  70. ++ have_old_upower=no
  71. ++elif test $pkg_failed = untried; then
  72. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  73. ++$as_echo "no" >&6; }
  74. ++ have_old_upower=no
  75. ++else
  76. ++ UPOWER_CFLAGS=$pkg_cv_UPOWER_CFLAGS
  77. ++ UPOWER_LIBS=$pkg_cv_UPOWER_LIBS
  78. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  79. ++$as_echo "yes" >&6; }
  80. ++ have_old_upower=yes
  81. ++fi
  82. ++if test x$have_old_upower = xyes; then :
  83. ++
  84. ++
  85. ++$as_echo "#define HAVE_OLD_UPOWER 1" >>confdefs.h
  86. ++
  87. ++
  88. ++fi
  89. ++ if test x$have_old_upower = xyes; then
  90. ++ HAVE_OLD_UPOWER_TRUE=
  91. ++ HAVE_OLD_UPOWER_FALSE='#'
  92. ++else
  93. ++ HAVE_OLD_UPOWER_TRUE='#'
  94. ++ HAVE_OLD_UPOWER_FALSE=
  95. ++fi
  96. ++
  97. +
  98. + pkg_failed=no
  99. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
  100. diff --git sysutils/mate-power-manager/files/patch-src_gpm-control.c sysutils/mate-power-manager/files/patch-src_gpm-control.c
  101. new file mode 100644
  102. index 0000000..93111de
  103. --- /dev/null
  104. +++ sysutils/mate-power-manager/files/patch-src_gpm-control.c
  105. @@ -0,0 +1,26 @@
  106. +--- src/gpm-control.c.orig 2014-04-20 19:32:33.624174324 +0000
  107. ++++ src/gpm-control.c 2014-04-20 19:33:52.860168682 +0000
  108. +@@ -290,7 +290,11 @@
  109. + g_object_unref(proxy);
  110. + }
  111. + else {
  112. ++#ifdef HAVE_OLD_UPOWER
  113. + ret = up_client_suspend_sync (control->priv->client, NULL, error);
  114. ++#else
  115. ++ ret = FALSE;
  116. ++#endif
  117. + }
  118. +
  119. + egg_debug ("emitting resume");
  120. +@@ -400,7 +404,11 @@
  121. + }
  122. + }
  123. + else {
  124. ++#ifdef HAVE_OLD_UPOWER
  125. + ret = up_client_hibernate_sync (control->priv->client, NULL, error);
  126. ++#else
  127. ++ ret = FALSE;
  128. ++#endif
  129. + }
  130. +
  131. + egg_debug ("emitting resume");
  132. diff --git sysutils/mate-power-manager/files/patch-src_gpm-engine.c sysutils/mate-power-manager/files/patch-src_gpm-engine.c
  133. new file mode 100644
  134. index 0000000..b90ba56
  135. --- /dev/null
  136. +++ sysutils/mate-power-manager/files/patch-src_gpm-engine.c
  137. @@ -0,0 +1,14 @@
  138. +--- src/gpm-engine.c.orig 2014-04-20 19:34:27.136166463 +0000
  139. ++++ src/gpm-engine.c 2014-04-20 19:35:40.970161631 +0000
  140. +@@ -812,7 +812,11 @@
  141. + g_return_val_if_fail (GPM_IS_ENGINE (engine), FALSE);
  142. +
  143. + /* get devices from UPower */
  144. ++#ifdef HAVE_OLD_UPOWER
  145. + ret = up_client_enumerate_devices_sync (engine->priv->client, NULL, &error);
  146. ++#else
  147. ++ ret = FALSE;
  148. ++#endif
  149. + if (!ret) {
  150. + egg_error ("failed to get device list: %s", error->message);
  151. + g_error_free (error);
  152. diff --git sysutils/mate-power-manager/files/patch-src_gpm-prefs-core.c sysutils/mate-power-manager/files/patch-src_gpm-prefs-core.c
  153. new file mode 100644
  154. index 0000000..47b3a72
  155. --- /dev/null
  156. +++ sysutils/mate-power-manager/files/patch-src_gpm-prefs-core.c
  157. @@ -0,0 +1,28 @@
  158. +--- src/gpm-prefs-core.c.orig 2014-04-20 19:36:10.387159774 +0000
  159. ++++ src/gpm-prefs-core.c 2014-04-20 19:38:42.711413590 +0000
  160. +@@ -898,8 +898,13 @@
  161. + /* are we allowed to shutdown? */
  162. + egg_console_kit_can_stop (prefs->priv->console, &prefs->priv->can_shutdown, NULL);
  163. + /* get values from UpClient */
  164. ++#ifdef HAVE_OLD_UPOWER
  165. + prefs->priv->can_suspend = up_client_get_can_suspend (prefs->priv->client);
  166. + prefs->priv->can_hibernate = up_client_get_can_hibernate (prefs->priv->client);
  167. ++#else
  168. ++ prefs->priv->can_suspend = FALSE;
  169. ++ prefs->priv->can_hibernate = FALSE;
  170. ++#endif
  171. + }
  172. +
  173. + if (LOGIND_RUNNING()) {
  174. +@@ -955,7 +960,11 @@
  175. + g_object_unref (brightness);
  176. +
  177. + /* get device list */
  178. ++#ifdef HAVE_OLD_UPOWER
  179. + ret = up_client_enumerate_devices_sync (prefs->priv->client, NULL, &error);
  180. ++#else
  181. ++ ret = FALSE;
  182. ++#endif
  183. + if (!ret) {
  184. + egg_warning ("failed to get device list: %s", error->message);
  185. + g_error_free (error);
  186. diff --git sysutils/mate-power-manager/files/patch-src_gpm-statistics.c sysutils/mate-power-manager/files/patch-src_gpm-statistics.c
  187. new file mode 100644
  188. index 0000000..faa3bc2
  189. --- /dev/null
  190. +++ sysutils/mate-power-manager/files/patch-src_gpm-statistics.c
  191. @@ -0,0 +1,14 @@
  192. +--- src/gpm-statistics.c.orig 2014-04-20 19:31:29.658178466 +0000
  193. ++++ src/gpm-statistics.c 2014-04-20 19:32:20.889177637 +0000
  194. +@@ -1796,7 +1796,11 @@
  195. + g_signal_connect (wakeups, "data-changed", G_CALLBACK (gpm_stats_data_changed_cb), NULL);
  196. +
  197. + /* coldplug */
  198. ++#ifdef HAVE_OLD_UPOWER
  199. + ret = up_client_enumerate_devices_sync (client, NULL, NULL);
  200. ++#else
  201. ++ ret = FALSE;
  202. ++#endif
  203. + if (!ret)
  204. + goto out;
  205. + devices = up_client_get_devices (client);
  206. diff --git x11/mate-session-manager/files/patch-configure x11/mate-session-manager/files/patch-configure
  207. new file mode 100644
  208. index 0000000..03ccb0c
  209. --- /dev/null
  210. +++ x11/mate-session-manager/files/patch-configure
  211. @@ -0,0 +1,92 @@
  212. +--- configure.orig 2014-04-20 19:14:11.248250628 +0000
  213. ++++ configure 2014-04-20 19:14:11.260251121 +0000
  214. +@@ -13329,7 +13329,89 @@
  215. + esac
  216. +
  217. +
  218. ++# We can only support old upower
  219. +
  220. ++pkg_failed=no
  221. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UPOWER" >&5
  222. ++$as_echo_n "checking for UPOWER... " >&6; }
  223. ++
  224. ++if test -n "$UPOWER_CFLAGS"; then
  225. ++ pkg_cv_UPOWER_CFLAGS="$UPOWER_CFLAGS"
  226. ++ elif test -n "$PKG_CONFIG"; then
  227. ++ if test -n "$PKG_CONFIG" && \
  228. ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"upower-glib < 0.99.0\""; } >&5
  229. ++ ($PKG_CONFIG --exists --print-errors "upower-glib < 0.99.0") 2>&5
  230. ++ ac_status=$?
  231. ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  232. ++ test $ac_status = 0; }; then
  233. ++ pkg_cv_UPOWER_CFLAGS=`$PKG_CONFIG --cflags "upower-glib < 0.99.0" 2>/dev/null`
  234. ++ test "x$?" != "x0" && pkg_failed=yes
  235. ++else
  236. ++ pkg_failed=yes
  237. ++fi
  238. ++ else
  239. ++ pkg_failed=untried
  240. ++fi
  241. ++if test -n "$UPOWER_LIBS"; then
  242. ++ pkg_cv_UPOWER_LIBS="$UPOWER_LIBS"
  243. ++ elif test -n "$PKG_CONFIG"; then
  244. ++ if test -n "$PKG_CONFIG" && \
  245. ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"upower-glib < 0.99.0\""; } >&5
  246. ++ ($PKG_CONFIG --exists --print-errors "upower-glib < 0.99.0") 2>&5
  247. ++ ac_status=$?
  248. ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  249. ++ test $ac_status = 0; }; then
  250. ++ pkg_cv_UPOWER_LIBS=`$PKG_CONFIG --libs "upower-glib < 0.99.0" 2>/dev/null`
  251. ++ test "x$?" != "x0" && pkg_failed=yes
  252. ++else
  253. ++ pkg_failed=yes
  254. ++fi
  255. ++ else
  256. ++ pkg_failed=untried
  257. ++fi
  258. ++if test $pkg_failed = yes; then
  259. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  260. ++$as_echo "no" >&6; }
  261. ++
  262. ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  263. ++ _pkg_short_errors_supported=yes
  264. ++else
  265. ++ _pkg_short_errors_supported=no
  266. ++fi
  267. ++ if test $_pkg_short_errors_supported = yes; then
  268. ++ UPOWER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "upower-glib < 0.99.0" 2>&1`
  269. ++ else
  270. ++ UPOWER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "upower-glib < 0.99.0" 2>&1`
  271. ++ fi
  272. ++ # Put the nasty error message in config.log where it belongs
  273. ++ echo "$UPOWER_PKG_ERRORS" >&5
  274. ++
  275. ++ have_old_upower=no
  276. ++elif test $pkg_failed = untried; then
  277. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  278. ++$as_echo "no" >&6; }
  279. ++ have_old_upower=no
  280. ++else
  281. ++ UPOWER_CFLAGS=$pkg_cv_UPOWER_CFLAGS
  282. ++ UPOWER_LIBS=$pkg_cv_UPOWER_LIBS
  283. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  284. ++$as_echo "yes" >&6; }
  285. ++ have_old_upower=yes
  286. ++fi
  287. ++if test x$have_old_upower = xyes; then :
  288. ++
  289. ++
  290. ++$as_echo "#define HAVE_OLD_UPOWER 1" >>confdefs.h
  291. ++
  292. ++
  293. ++fi
  294. ++ if test x$have_old_upower = xyes; then
  295. ++ HAVE_OLD_UPOWER_TRUE=
  296. ++ HAVE_OLD_UPOWER_FALSE='#'
  297. ++else
  298. ++ HAVE_OLD_UPOWER_TRUE='#'
  299. ++ HAVE_OLD_UPOWER_FALSE=
  300. ++fi
  301. +
  302. +
  303. +
  304. diff --git x11/mate-session-manager/files/patch-mate-session_gsm-logout-dialog.c x11/mate-session-manager/files/patch-mate-session_gsm-logout-dialog.c
  305. new file mode 100644
  306. index 0000000..83910fc
  307. --- /dev/null
  308. +++ x11/mate-session-manager/files/patch-mate-session_gsm-logout-dialog.c
  309. @@ -0,0 +1,26 @@
  310. +--- mate-session/gsm-logout-dialog.c.orig 2014-03-05 20:39:13.000000000 +0000
  311. ++++ mate-session/gsm-logout-dialog.c 2014-04-20 18:19:12.537577789 +0000
  312. +@@ -214,8 +214,10 @@
  313. + #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
  314. + else
  315. + #endif
  316. +-#ifdef HAVE_UPOWER
  317. ++#ifdef HAVE_OLD_UPOWER
  318. + ret = up_client_get_can_suspend (logout_dialog->priv->up_client);
  319. ++#else
  320. ++ ret = FALSE;
  321. + #endif
  322. + return ret;
  323. + }
  324. +@@ -232,8 +234,10 @@
  325. + #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
  326. + else
  327. + #endif
  328. +-#ifdef HAVE_UPOWER
  329. ++#ifdef HAVE_OLD_UPOWER
  330. + ret = up_client_get_can_hibernate (logout_dialog->priv->up_client);
  331. ++#else
  332. ++ ret = FALSE;
  333. + #endif
  334. + return ret;
  335. + }
  336. diff --git x11/mate-session-manager/files/patch-mate-session_gsm-manager.c x11/mate-session-manager/files/patch-mate-session_gsm-manager.c
  337. new file mode 100644
  338. index 0000000..63d84cc
  339. --- /dev/null
  340. +++ x11/mate-session-manager/files/patch-mate-session_gsm-manager.c
  341. @@ -0,0 +1,64 @@
  342. +--- mate-session/gsm-manager.c.orig 2014-03-05 20:39:13.000000000 +0000
  343. ++++ mate-session/gsm-manager.c 2014-04-20 18:31:08.980429286 +0000
  344. +@@ -1166,22 +1166,28 @@
  345. + #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
  346. + else {
  347. + #endif
  348. +-#ifdef HAVE_UPOWER
  349. ++#ifdef HAVE_OLD_UPOWER
  350. + can_hibernate = up_client_get_can_hibernate (manager->priv->up_client);
  351. ++#else
  352. ++ can_hibernate = FALSE;
  353. ++#endif
  354. + if (can_hibernate) {
  355. +
  356. + /* lock the screen before we suspend */
  357. + manager_perhaps_lock (manager);
  358. +
  359. + error = NULL;
  360. ++#ifdef HAVE_OLD_UPOWER
  361. + ret = up_client_hibernate_sync (manager->priv->up_client, NULL, &error);
  362. ++#else
  363. ++ ret = FALSE;
  364. ++#endif
  365. + if (!ret) {
  366. + g_warning ("Unexpected hibernate failure: %s",
  367. + error->message);
  368. + g_error_free (error);
  369. + }
  370. + }
  371. +-#endif
  372. + #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
  373. + }
  374. + #endif
  375. +@@ -1211,22 +1217,28 @@
  376. + #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
  377. + else {
  378. + #endif
  379. +-#ifdef HAVE_UPOWER
  380. ++#ifdef HAVE_OLD_UPOWER
  381. + can_suspend = up_client_get_can_suspend (manager->priv->up_client);
  382. ++#else
  383. ++ can_suspend = FALSE;
  384. ++#endif
  385. + if (can_suspend) {
  386. +
  387. + /* lock the screen before we suspend */
  388. + manager_perhaps_lock (manager);
  389. +
  390. + error = NULL;
  391. ++#ifdef HAVE_OLD_UPOWER
  392. + ret = up_client_suspend_sync (manager->priv->up_client, NULL, &error);
  393. ++#else
  394. ++ ret = FALSE;
  395. ++#endif
  396. + if (!ret) {
  397. + g_warning ("Unexpected suspend failure: %s",
  398. + error->message);
  399. + g_error_free (error);
  400. + }
  401. + }
  402. +-#endif
  403. + #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
  404. + }
  405. + #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement