summaryrefslogtreecommitdiff
path: root/desktop/icewm
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2014-03-29 22:05:46 -0500
committerErik Hanson <erik@slackbuilds.org>2014-04-12 13:59:48 -0500
commitd711d3170082840c1eb1b92a5763da38dd8b5190 (patch)
treeb3035e9f16ad59662c5e40623befdeddf717e631 /desktop/icewm
parentc2896b8c9ca4a49e913133f5638c05abfcd99054 (diff)
downloadslackbuilds-d711d3170082840c1eb1b92a5763da38dd8b5190.tar.gz
desktop/icewm: Reverted to 1.3.7 plus some more patches
Thanks again to Janusz Kuśnierek for assistance with this and for noting a couple of fairly major bugs wrt usability that make the revert desirable. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'desktop/icewm')
-rw-r--r--desktop/icewm/icewm.SlackBuild17
-rw-r--r--desktop/icewm/icewm.info6
-rw-r--r--desktop/icewm/patches/aapm_power.patch31
-rw-r--r--desktop/icewm/patches/acpustatus_read_cpuinfo_cur_freq.patch11
-rw-r--r--desktop/icewm/patches/no_proc_acpi.patch17
-rw-r--r--desktop/icewm/patches/use_ICEWM_deprecated.patch21
-rw-r--r--desktop/icewm/patches/wmclient.patch25
7 files changed, 122 insertions, 6 deletions
diff --git a/desktop/icewm/icewm.SlackBuild b/desktop/icewm/icewm.SlackBuild
index 1e093cf2ce..63de462721 100644
--- a/desktop/icewm/icewm.SlackBuild
+++ b/desktop/icewm/icewm.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for icewm
-# Copyright 2006-2013 Robby Workman Northport, Alabama, USA
+# Copyright 2006-2014 Robby Workman Northport, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=icewm
-VERSION=${VERSION:-1.3.8}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-1.3.7}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -84,6 +84,17 @@ patch -p1 < $CWD/patches/icewm-1.3.7-menuiconsize.patch
# Set some sane keyboard shortcut defaults (thanks, Fedora)
patch -p1 < $CWD/patches/icewm-keys.patch
+# /proc/acpi is deprecated and may not be present
+patch -p1 < $CWD/patches/no_proc_acpi.patch
+
+# Allow use of deprecated functions without causing build failure
+patch -p1 < $CWD/patches/use_ICEWM_deprecated.patch
+
+# Unknown origin of these patches ; forwarded by a user
+patch -p0 < $CWD/patches/acpustatus_read_cpuinfo_cur_freq.patch
+patch -p1 < $CWD/patches/aapm_power.patch
+patch -p1 < $CWD/patches/wmclient.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/desktop/icewm/icewm.info b/desktop/icewm/icewm.info
index f22af2e8b1..07975726a1 100644
--- a/desktop/icewm/icewm.info
+++ b/desktop/icewm/icewm.info
@@ -1,8 +1,8 @@
PRGNAM="icewm"
-VERSION="1.3.8"
+VERSION="1.3.7"
HOMEPAGE="http://icewm.org"
-DOWNLOAD="http://downloads.sourceforge.net/icewm/icewm-1.3.8.tar.gz"
-MD5SUM="6d61aced3bd20b9e7caeb7e8380368c8"
+DOWNLOAD="http://downloads.sourceforge.net/icewm/icewm-1.3.7.tar.gz"
+MD5SUM="224695231aedb2b91db3254a13e1c8dd"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/desktop/icewm/patches/aapm_power.patch b/desktop/icewm/patches/aapm_power.patch
new file mode 100644
index 0000000000..292cdf4b8f
--- /dev/null
+++ b/desktop/icewm/patches/aapm_power.patch
@@ -0,0 +1,31 @@
+--- b/icewm-1.3.7/src/aapm.cc 2010-10-31 17:09:36.000000000 +0300
++++ icewm-1.3.7/src/aapm.cc 2013-06-02 14:24:04.778299294 +0400
+@@ -614,6 +614,10 @@
+ }
+ strcat3(buf, "/sys/class/power_supply/", BATname, "/current_now", sizeof(buf));
+ fd = fopen(buf, "r");
++ if (fd == NULL) {
++ strcat3(buf, "/sys/class/power_supply/", BATname, "/power_now", sizeof(buf));
++ fd = fopen(buf, "r");
++ }
+ if (fd != NULL && fgets(buf, sizeof(buf), fd)) {
+ //In case it contains non-numeric value
+ if (sscanf(buf,"%d", &BATrate) <= 0) {
+@@ -706,7 +710,7 @@
+ //did we parse the needed values successfully?
+ BATcapacity_full >= 0 && BATcapacity_remain >= 0 && BATrate > 0) {
+ BATtime_remain = (int) (60 * (double)(BATcapacity_remain) / BATrate);
+- sprintf(bat_info, "%d:%02d", BATtime_remain / 60, BATtime_remain % 60);
++ sprintf(bat_info, "%d:%02d %.1fW", BATtime_remain / 60, BATtime_remain % 60, (double) BATrate / 1000000);
+ }
+ else if (BATpresent == BAT_PRESENT &&
+ //did we parse the needed values successfully?
+@@ -1075,7 +1079,7 @@
+ if ((mode == ACPI || mode == SYSFS) && acpiBatteries[i]->present == BAT_ABSENT)
+ continue;
+ if (taskBarShowApmTime)
+- strcat(buf, "0:00");
++ strcat(buf, "0:00 0.0W");
+ else
+ strcat(buf, "100%");
+ strcat(buf, "C");
diff --git a/desktop/icewm/patches/acpustatus_read_cpuinfo_cur_freq.patch b/desktop/icewm/patches/acpustatus_read_cpuinfo_cur_freq.patch
new file mode 100644
index 0000000000..580a64d58f
--- /dev/null
+++ b/desktop/icewm/patches/acpustatus_read_cpuinfo_cur_freq.patch
@@ -0,0 +1,11 @@
+--- src/acpustatus.cc.orig 2010-10-31 17:09:36.000000000 +0300
++++ src/acpustatus.cc 2013-08-26 00:38:16.868170497 +0400
+@@ -323,7 +323,7 @@
+ int fd;
+ float cpufreq = 0;
+
+- sprintf(namebuf, "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_cur_freq", cpu);
++ sprintf(namebuf, "/sys/devices/system/cpu/cpu%d/cpufreq/cpuinfo_cur_freq", cpu);
+ fd = open(namebuf, O_RDONLY);
+ if (fd != -1) {
+ int len = read(fd, buf, sizeof(buf) - 1);
diff --git a/desktop/icewm/patches/no_proc_acpi.patch b/desktop/icewm/patches/no_proc_acpi.patch
new file mode 100644
index 0000000000..4cd92360ca
--- /dev/null
+++ b/desktop/icewm/patches/no_proc_acpi.patch
@@ -0,0 +1,17 @@
+Description: Check for sysfs' acpi file, procfs may not contain acpi data with recent kernels
+Author: Andrey Danin <danindrey@mail.ru>, Eduard Bloch <blade@debian.org>
+Bug: http://sourceforge.net/mailarchive/forum.php?thread_name=E1SHwYx-00029t-1N.danindrey-mail-ru%40f232.mail.ru&forum_name=icewm-devel
+Forwarded: Yes
+
+Index: icewm-1.3.7/src/wmtaskbar.cc
+===================================================================
+--- icewm-1.3.7.orig/src/wmtaskbar.cc 2010-10-31 15:09:36.000000000 +0100
++++ icewm-1.3.7/src/wmtaskbar.cc 2012-04-11 23:22:23.466564372 +0200
+@@ -467,6 +467,7 @@
+ #endif
+ #ifdef CONFIG_APPLET_APM
+ if (taskBarShowApm && (access(APMDEV, 0) == 0 ||
++ access("/sys/class/power_supply", 0) == 0 ||
+ access("/proc/acpi", 0) == 0 ||
+ access("/dev/acpi", 0) == 0 ||
+ access("/proc/pmu", R_OK|X_OK) == 0))
diff --git a/desktop/icewm/patches/use_ICEWM_deprecated.patch b/desktop/icewm/patches/use_ICEWM_deprecated.patch
new file mode 100644
index 0000000000..3533d31e34
--- /dev/null
+++ b/desktop/icewm/patches/use_ICEWM_deprecated.patch
@@ -0,0 +1,21 @@
+Description: Don't use "deprecated" as identifier, will FTBFS if another
+ library defines functions as deprecated.
+Author: Andreas Moog <amoog@ubuntu.com>
+Bug: https://sourceforge.net/tracker/?func=detail&aid=3494034&group_id=31&atid=100031
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/935179
+Forwarded: Yes
+
+--- icewm-1.3.7.orig/src/base.h
++++ icewm-1.3.7/src/base.h
+@@ -2,9 +2,9 @@
+ #define __BASE_H
+
+ #if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3
+-#define deprecated __attribute__((deprecated))
++#define ICEWM_deprecated __attribute__((deprecated))
+ #else
+-#define deprecated
++#define ICEWM_deprecated
+ #endif
+
+ /*** Atomar Data Types ********************************************************/
diff --git a/desktop/icewm/patches/wmclient.patch b/desktop/icewm/patches/wmclient.patch
new file mode 100644
index 0000000000..95f00614de
--- /dev/null
+++ b/desktop/icewm/patches/wmclient.patch
@@ -0,0 +1,25 @@
+diff -uNr icewm-1.3.7.orig/src/wmclient.cc icewm-1.3.7/src/wmclient.cc
+--- icewm-1.3.7.orig/src/wmclient.cc 2012-05-27 11:54:25.663101746 +0200
++++ icewm-1.3.7/src/wmclient.cc 2012-05-27 12:17:40.236339580 +0200
+@@ -1044,20 +1044,11 @@
+ while (XGetWindowProperty(display, handle,
+ propAtom, (itemCount * itemSize) / 32, 1024*32, False, AnyPropertyType,
+ &r_type, &r_format, &nitems, &bytes_remain,
+- &prop) == Success && prop && bytes_remain == 0)
++ &prop) == Success && prop)
+ {
+ if (r_format == itemSize1 && nitems > 0) {
+ data = realloc(data, (itemCount + nitems) * itemSize / 8);
+
+- // access to memory beyound 256MiB causes crashes! But anyhow, size
+- // >>2MiB looks suspicious. Detect this case ASAP. However, if
+- // the usable icon is somewhere in the beginning, it's okay to
+- // return truncated data.
+- if (itemCount * itemSize / 8 >= 2097152) {
+- XFree(prop);
+- break;
+- }
+-
+ memcpy((char *)data + itemCount * itemSize / 8, prop, nitems * itemSize / 8);
+ itemCount += nitems;
+ XFree(prop);