mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
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>
This commit is contained in:
parent
c2896b8c9c
commit
d711d31700
7 changed files with 122 additions and 6 deletions
|
@ -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 \
|
||||
|
|
|
@ -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=""
|
||||
|
|
31
desktop/icewm/patches/aapm_power.patch
Normal file
31
desktop/icewm/patches/aapm_power.patch
Normal file
|
@ -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");
|
11
desktop/icewm/patches/acpustatus_read_cpuinfo_cur_freq.patch
Normal file
11
desktop/icewm/patches/acpustatus_read_cpuinfo_cur_freq.patch
Normal file
|
@ -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);
|
17
desktop/icewm/patches/no_proc_acpi.patch
Normal file
17
desktop/icewm/patches/no_proc_acpi.patch
Normal file
|
@ -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))
|
21
desktop/icewm/patches/use_ICEWM_deprecated.patch
Normal file
21
desktop/icewm/patches/use_ICEWM_deprecated.patch
Normal file
|
@ -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 ********************************************************/
|
25
desktop/icewm/patches/wmclient.patch
Normal file
25
desktop/icewm/patches/wmclient.patch
Normal file
|
@ -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);
|
Loading…
Reference in a new issue