diff options
author | Daniel de Kok <danieldk@pobox.com> | 2010-05-11 22:22:00 +0200 |
---|---|---|
committer | Michiel van Wessem <michiel@slackbuilds.org> | 2010-05-11 22:22:00 +0200 |
commit | 37b906fa0b44f2a8da36d998c2062ce1cd0616e5 (patch) | |
tree | e5ed31f5d20ac0d27d7f7acd1a0ae5cfde6c5767 | |
parent | d2bb5bddf4feda373c9dc9cada27938b63a97d80 (diff) |
desktop/matchbox-panel: Updated for version 0.9.3
-rw-r--r-- | desktop/matchbox-panel/matchbox-panel-0.9.3-gcc4-no-nested-functions.patch | 93 | ||||
-rw-r--r-- | desktop/matchbox-panel/matchbox-panel.SlackBuild | 2 |
2 files changed, 95 insertions, 0 deletions
diff --git a/desktop/matchbox-panel/matchbox-panel-0.9.3-gcc4-no-nested-functions.patch b/desktop/matchbox-panel/matchbox-panel-0.9.3-gcc4-no-nested-functions.patch new file mode 100644 index 0000000000000..8dcafbd7d93b1 --- /dev/null +++ b/desktop/matchbox-panel/matchbox-panel-0.9.3-gcc4-no-nested-functions.patch @@ -0,0 +1,93 @@ +diff -Naurp matchbox-panel-0.9.3.orig/applets/mb-applet-battery.c matchbox-panel-0.9.3/applets/mb-applet-battery.c +--- matchbox-panel-0.9.3.orig/applets/mb-applet-battery.c 2006-02-07 22:27:24.000000000 +0000 ++++ matchbox-panel-0.9.3/applets/mb-applet-battery.c 2006-06-20 18:12:00.000000000 +0000 +@@ -157,50 +157,50 @@ struct avg_consumption { + + static struct avg_consumption a; + ++enum ac_state { AC_UNKNOWN = -1, AC_OFFLINE = 0, AC_ONLINE = 1 }; ++enum bat_state { BAT_UNKNOWN = -1, BAT_CHARGING = 1, BAT_DISCHARGING = 2 }; ++ ++struct entry { ++ char *key; ++ char *value; ++ char *unit; ++}; ++ ++struct acpi_status { ++ enum ac_state ac_state; ++ enum bat_state bat_state; ++ unsigned long design_capacity; ++ unsigned long remaining_capacity; ++ unsigned long present_rate; ++}; ++ + static int +-read_apm(int *values) ++line_parse(char *line, struct entry *e) + { +- enum ac_state { AC_UNKNOWN = -1, AC_OFFLINE = 0, AC_ONLINE = 1 }; +- enum bat_state { BAT_UNKNOWN = -1, BAT_CHARGING = 1, BAT_DISCHARGING = 2 }; +- +- struct entry { +- char *key; +- char *value; +- char *unit; +- }; +- +- struct acpi_status { +- enum ac_state ac_state; +- enum bat_state bat_state; +- unsigned long design_capacity; +- unsigned long remaining_capacity; +- unsigned long present_rate; +- }; ++ char *ptr; + +- static int +- line_parse(char *line, struct entry *e) +- { +- char *ptr; +- +- ptr = strchr(line, ':'); +- if (!ptr) +- return -1; +- e->key = line; +- *ptr = 0; +- while (*++ptr && *ptr == ' '); +- e->value = ptr; +- while (*++ptr && *ptr != '\n' && *ptr != ' '); ++ ptr = strchr(line, ':'); ++ if (!ptr) ++ return -1; ++ e->key = line; ++ *ptr = 0; ++ while (*++ptr && *ptr == ' '); ++ e->value = ptr; ++ while (*++ptr && *ptr != '\n' && *ptr != ' '); ++ *ptr = 0; ++ if (*++ptr) { ++ e->unit = ptr; ++ while (*++ptr && *ptr != '\n'); + *ptr = 0; +- if (*++ptr) { +- e->unit = ptr; +- while (*++ptr && *ptr != '\n'); +- *ptr = 0; +- } else +- e->unit = 0; +- +- return 0; +- } ++ } else ++ e->unit = 0; ++ ++ return 0; ++} + ++static int ++read_apm(int *values) ++{ + FILE *f; + char line[1024]; + struct entry e; diff --git a/desktop/matchbox-panel/matchbox-panel.SlackBuild b/desktop/matchbox-panel/matchbox-panel.SlackBuild index 4d66768184fb4..4b30d92c6f3a0 100644 --- a/desktop/matchbox-panel/matchbox-panel.SlackBuild +++ b/desktop/matchbox-panel/matchbox-panel.SlackBuild @@ -30,6 +30,7 @@ VERSION=0.9.3 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -47,6 +48,7 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xjvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION +patch -p1 < $CWD/matchbox-panel-0.9.3-gcc4-no-nested-functions.patch chown -R root:root . chmod -R u+w,go+r-w,a-s . |