mate-power-manager: portability patches from Alpine.
This commit is contained in:
parent
1f6e9cec4f
commit
e4c21b45cf
4 changed files with 242 additions and 2 deletions
56
srcpkgs/mate-power-manager/patches/0001-execinfo-patch.patch
Normal file
56
srcpkgs/mate-power-manager/patches/0001-execinfo-patch.patch
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
From f117ad21ce676d67df265e522bfc1047118958ba Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alan Lacerda <alacerda@alpinelinux.org>
|
||||||
|
Date: Thu, 16 Apr 2015 18:53:43 +0000
|
||||||
|
Subject: [PATCH] execinfo patch
|
||||||
|
|
||||||
|
---
|
||||||
|
applets/brightness/egg-debug.c | 2 ++
|
||||||
|
applets/inhibit/egg-debug.c | 2 ++
|
||||||
|
src/egg-debug.c | 2 ++
|
||||||
|
3 files changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/applets/brightness/egg-debug.c b/applets/brightness/egg-debug.c
|
||||||
|
index 2f140f2..3a8e6e7 100644
|
||||||
|
--- a/applets/brightness/egg-debug.c
|
||||||
|
+++ b/applets/brightness/egg-debug.c
|
||||||
|
@@ -39,7 +39,9 @@
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <time.h>
|
||||||
|
+#if defined (__GLIBC__)
|
||||||
|
#include <execinfo.h>
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#include "egg-debug.h"
|
||||||
|
|
||||||
|
diff --git a/applets/inhibit/egg-debug.c b/applets/inhibit/egg-debug.c
|
||||||
|
index 2f140f2..3a8e6e7 100644
|
||||||
|
--- a/applets/inhibit/egg-debug.c
|
||||||
|
+++ b/applets/inhibit/egg-debug.c
|
||||||
|
@@ -39,7 +39,9 @@
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <time.h>
|
||||||
|
+#if defined (__GLIBC__)
|
||||||
|
#include <execinfo.h>
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#include "egg-debug.h"
|
||||||
|
|
||||||
|
diff --git a/src/egg-debug.c b/src/egg-debug.c
|
||||||
|
index 2f140f2..3a8e6e7 100644
|
||||||
|
--- a/src/egg-debug.c
|
||||||
|
+++ b/src/egg-debug.c
|
||||||
|
@@ -39,7 +39,9 @@
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <time.h>
|
||||||
|
+#if defined (__GLIBC__)
|
||||||
|
#include <execinfo.h>
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#include "egg-debug.h"
|
||||||
|
|
||||||
|
--
|
||||||
|
2.3.3
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
From 274b58cef2501ff45e18e8ba98ce7a2e0f1478a3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alan Lacerda <alacerda@alpinelinux.org>
|
||||||
|
Date: Fri, 17 Apr 2015 20:02:16 +0000
|
||||||
|
Subject: [PATCH] get_nprocs patch
|
||||||
|
|
||||||
|
---
|
||||||
|
src/gpm-load.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/gpm-load.c b/src/gpm-load.c
|
||||||
|
index 3b0f572..5e78cb7 100644
|
||||||
|
--- a/src/gpm-load.c
|
||||||
|
+++ b/src/gpm-load.c
|
||||||
|
@@ -29,9 +29,9 @@
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
+#include <sys/sysinfo.h>
|
||||||
|
#if defined(sun) && defined(__SVR4)
|
||||||
|
#include <kstat.h>
|
||||||
|
-#include <sys/sysinfo.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
--
|
||||||
|
2.3.3
|
||||||
|
|
152
srcpkgs/mate-power-manager/patches/0001-removing-backtrace.patch
Normal file
152
srcpkgs/mate-power-manager/patches/0001-removing-backtrace.patch
Normal file
|
@ -0,0 +1,152 @@
|
||||||
|
From b8907c90dec6a7f6fc2a3c682ddb48d4ebf8406e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alan Lacerda <alacerda@alpinelinux.org>
|
||||||
|
Date: Fri, 17 Apr 2015 11:34:47 +0000
|
||||||
|
Subject: [PATCH] removing backtrace
|
||||||
|
|
||||||
|
---
|
||||||
|
applets/brightness/egg-debug.c | 28 ----------------------------
|
||||||
|
applets/inhibit/egg-debug.c | 28 ----------------------------
|
||||||
|
src/egg-debug.c | 28 ----------------------------
|
||||||
|
3 files changed, 84 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/applets/brightness/egg-debug.c b/applets/brightness/egg-debug.c
|
||||||
|
index 3a8e6e7..b06b540 100644
|
||||||
|
--- a/applets/brightness/egg-debug.c
|
||||||
|
+++ b/applets/brightness/egg-debug.c
|
||||||
|
@@ -75,31 +75,6 @@ pk_set_console_mode (guint console_code)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
- * egg_debug_backtrace:
|
||||||
|
- **/
|
||||||
|
-void
|
||||||
|
-egg_debug_backtrace (void)
|
||||||
|
-{
|
||||||
|
- void *call_stack[512];
|
||||||
|
- int call_stack_size;
|
||||||
|
- char **symbols;
|
||||||
|
- int i = 1;
|
||||||
|
-
|
||||||
|
- call_stack_size = backtrace (call_stack, G_N_ELEMENTS (call_stack));
|
||||||
|
- symbols = backtrace_symbols (call_stack, call_stack_size);
|
||||||
|
- if (symbols != NULL) {
|
||||||
|
- pk_set_console_mode (CONSOLE_RED);
|
||||||
|
- g_print ("Traceback:\n");
|
||||||
|
- while (i < call_stack_size) {
|
||||||
|
- g_print ("\t%s\n", symbols[i]);
|
||||||
|
- i++;
|
||||||
|
- }
|
||||||
|
- pk_set_console_mode (CONSOLE_RESET);
|
||||||
|
- free (symbols);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-/**
|
||||||
|
* pk_log_line:
|
||||||
|
**/
|
||||||
|
static void
|
||||||
|
@@ -229,9 +204,6 @@ egg_error_real (const gchar *func, const gchar *file, const int line, const gcha
|
||||||
|
pk_print_line (func, file, line, buffer, CONSOLE_RED);
|
||||||
|
g_free(buffer);
|
||||||
|
|
||||||
|
- /* we want to fix this! */
|
||||||
|
- egg_debug_backtrace ();
|
||||||
|
-
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/applets/inhibit/egg-debug.c b/applets/inhibit/egg-debug.c
|
||||||
|
index 3a8e6e7..b06b540 100644
|
||||||
|
--- a/applets/inhibit/egg-debug.c
|
||||||
|
+++ b/applets/inhibit/egg-debug.c
|
||||||
|
@@ -75,31 +75,6 @@ pk_set_console_mode (guint console_code)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
- * egg_debug_backtrace:
|
||||||
|
- **/
|
||||||
|
-void
|
||||||
|
-egg_debug_backtrace (void)
|
||||||
|
-{
|
||||||
|
- void *call_stack[512];
|
||||||
|
- int call_stack_size;
|
||||||
|
- char **symbols;
|
||||||
|
- int i = 1;
|
||||||
|
-
|
||||||
|
- call_stack_size = backtrace (call_stack, G_N_ELEMENTS (call_stack));
|
||||||
|
- symbols = backtrace_symbols (call_stack, call_stack_size);
|
||||||
|
- if (symbols != NULL) {
|
||||||
|
- pk_set_console_mode (CONSOLE_RED);
|
||||||
|
- g_print ("Traceback:\n");
|
||||||
|
- while (i < call_stack_size) {
|
||||||
|
- g_print ("\t%s\n", symbols[i]);
|
||||||
|
- i++;
|
||||||
|
- }
|
||||||
|
- pk_set_console_mode (CONSOLE_RESET);
|
||||||
|
- free (symbols);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-/**
|
||||||
|
* pk_log_line:
|
||||||
|
**/
|
||||||
|
static void
|
||||||
|
@@ -229,9 +204,6 @@ egg_error_real (const gchar *func, const gchar *file, const int line, const gcha
|
||||||
|
pk_print_line (func, file, line, buffer, CONSOLE_RED);
|
||||||
|
g_free(buffer);
|
||||||
|
|
||||||
|
- /* we want to fix this! */
|
||||||
|
- egg_debug_backtrace ();
|
||||||
|
-
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/egg-debug.c b/src/egg-debug.c
|
||||||
|
index 3a8e6e7..b06b540 100644
|
||||||
|
--- a/src/egg-debug.c
|
||||||
|
+++ b/src/egg-debug.c
|
||||||
|
@@ -75,31 +75,6 @@ pk_set_console_mode (guint console_code)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
- * egg_debug_backtrace:
|
||||||
|
- **/
|
||||||
|
-void
|
||||||
|
-egg_debug_backtrace (void)
|
||||||
|
-{
|
||||||
|
- void *call_stack[512];
|
||||||
|
- int call_stack_size;
|
||||||
|
- char **symbols;
|
||||||
|
- int i = 1;
|
||||||
|
-
|
||||||
|
- call_stack_size = backtrace (call_stack, G_N_ELEMENTS (call_stack));
|
||||||
|
- symbols = backtrace_symbols (call_stack, call_stack_size);
|
||||||
|
- if (symbols != NULL) {
|
||||||
|
- pk_set_console_mode (CONSOLE_RED);
|
||||||
|
- g_print ("Traceback:\n");
|
||||||
|
- while (i < call_stack_size) {
|
||||||
|
- g_print ("\t%s\n", symbols[i]);
|
||||||
|
- i++;
|
||||||
|
- }
|
||||||
|
- pk_set_console_mode (CONSOLE_RESET);
|
||||||
|
- free (symbols);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-/**
|
||||||
|
* pk_log_line:
|
||||||
|
**/
|
||||||
|
static void
|
||||||
|
@@ -229,9 +204,6 @@ egg_error_real (const gchar *func, const gchar *file, const int line, const gcha
|
||||||
|
pk_print_line (func, file, line, buffer, CONSOLE_RED);
|
||||||
|
g_free(buffer);
|
||||||
|
|
||||||
|
- /* we want to fix this! */
|
||||||
|
- egg_debug_backtrace ();
|
||||||
|
-
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.3.3
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
# Template file for 'mate-power-manager'
|
# Template file for 'mate-power-manager'
|
||||||
pkgname=mate-power-manager
|
pkgname=mate-power-manager
|
||||||
version=1.8.1
|
version=1.8.1
|
||||||
revision=2
|
revision=3
|
||||||
|
patch_args="-Np1"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--with-gtk=2.0 --disable-schemas-compile"
|
configure_args="--with-gtk=2.0 --disable-schemas-compile"
|
||||||
hostmakedepends="pkg-config intltool itstool libtool glib-devel dbus-glib-devel"
|
hostmakedepends="pkg-config intltool itstool libtool glib-devel dbus-glib-devel mate-common"
|
||||||
makedepends="gtk+-devel dbus-glib-devel libnotify-devel libunique1-devel
|
makedepends="gtk+-devel dbus-glib-devel libnotify-devel libunique1-devel
|
||||||
upower0-devel libcanberra-devel libgnome-keyring-devel libmate-panel-devel"
|
upower0-devel libcanberra-devel libgnome-keyring-devel libmate-panel-devel"
|
||||||
depends="dconf"
|
depends="dconf"
|
||||||
|
@ -14,3 +15,7 @@ license="GPL-2"
|
||||||
homepage="http://mate-desktop.org"
|
homepage="http://mate-desktop.org"
|
||||||
distfiles="http://pub.mate-desktop.org/releases/1.8/${pkgname}-${version}.tar.xz"
|
distfiles="http://pub.mate-desktop.org/releases/1.8/${pkgname}-${version}.tar.xz"
|
||||||
checksum=6fa72d4e6a018a44144d06b68c8f67e067e3847ad83b4b8a8aaa0e2a8c9b6147
|
checksum=6fa72d4e6a018a44144d06b68c8f67e067e3847ad83b4b8a8aaa0e2a8c9b6147
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
|
NOCONFIGURE=1 ./autogen.sh
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue