diff options
Diffstat (limited to 'x11-wm/icewm/files')
-rw-r--r-- | x11-wm/icewm/files/patch-am | 49 | ||||
-rw-r--r-- | x11-wm/icewm/files/patch-at | 210 | ||||
-rw-r--r-- | x11-wm/icewm/files/patch-au | 44 | ||||
-rw-r--r-- | x11-wm/icewm/files/patch-av | 18 | ||||
-rw-r--r-- | x11-wm/icewm/files/patch-aw | 12 | ||||
-rw-r--r-- | x11-wm/icewm/files/patch-ax | 11 | ||||
-rw-r--r-- | x11-wm/icewm/files/patch-configure | 11 | ||||
-rw-r--r-- | x11-wm/icewm/files/patch-configure.in | 54 | ||||
-rw-r--r-- | x11-wm/icewm/files/patch-src_Makefile.in | 9 | ||||
-rw-r--r-- | x11-wm/icewm/files/patch-src_ylocale.cc | 12 |
10 files changed, 48 insertions, 382 deletions
diff --git a/x11-wm/icewm/files/patch-am b/x11-wm/icewm/files/patch-am deleted file mode 100644 index da482f7634b8..000000000000 --- a/x11-wm/icewm/files/patch-am +++ /dev/null @@ -1,49 +0,0 @@ ---- src/apppstatus.cc.orig Sat Mar 17 00:17:37 2001 -+++ src/apppstatus.cc Thu Apr 5 22:45:29 2001 -@@ -270,6 +270,7 @@ - return isUpIsdn(); - #endif - -+#ifndef __FreeBSD__ - char buffer[32 * sizeof(struct ifreq)]; - struct ifconf ifc; - struct ifreq *ifr; -@@ -301,6 +302,38 @@ - } - - close(s); -+ -+#else // __FreeBSD__ -+ // FreeBSD code by Ronald Klop <ronald@cs.vu.nl> -+ struct ifmibdata ifmd; -+ size_t ifmd_size=sizeof(ifmibdata); -+ int nr_network_devs; -+ size_t int_size=sizeof(int); -+ int name[6]; -+ name[0] = CTL_NET; -+ name[1] = PF_LINK; -+ name[2] = NETLINK_GENERIC; -+ name[3] = IFMIB_IFDATA; -+ name[5] = IFDATA_GENERAL; -+ -+ if(sysctlbyname("net.link.generic.system.ifcount",&nr_network_devs, -+ &int_size,(void*)0,0) == -1) { -+ printf("%s@%d: %s\n",__FILE__,__LINE__,strerror(errno)); -+ } else { -+ for(int i=1;i<=nr_network_devs;i++) { -+ name[4] = i; /* row of the ifmib table */ -+ -+ if(sysctl(name, 6, &ifmd, &ifmd_size, (void *)0, 0) == -1) { -+ printf(_("%s@%d: %s\n"),__FILE__,__LINE__,strerror(errno)); -+ continue; -+ } -+ -+ if (strcmp(ifmd.ifmd_name, netDevice) == 0 && (ifmd.ifmd_flags & IFF_RUNNING)) { -+ return true; -+ } -+ } -+ } -+#endif // __FreeBSD__ - return false; - #endif // if 0 - } diff --git a/x11-wm/icewm/files/patch-at b/x11-wm/icewm/files/patch-at deleted file mode 100644 index dee6b6bfec5a..000000000000 --- a/x11-wm/icewm/files/patch-at +++ /dev/null @@ -1,210 +0,0 @@ ---- src/acpustatus.cc.orig Tue Aug 19 15:16:17 2003 -+++ src/acpustatus.cc Tue Aug 26 00:30:57 2003 -@@ -27,7 +27,16 @@ - - #include "intl.h" - --#if (defined(linux) || defined(HAVE_KSTAT_H)) -+#if (defined(linux) || defined(HAVE_KSTAT_H) || defined(__FreeBSD__)) -+ -+#ifdef __FreeBSD__ -+#include <fcntl.h> -+#include <kvm.h> -+#include <nlist.h> -+#include <sys/dkstat.h> -+#include <sys/resource.h> -+#include <devstat.h> -+#endif - - #define UPDATE_INTERVAL 500 - -@@ -50,13 +59,42 @@ - color[IWM_SYS] = new YColor(clrCpuSys); - color[IWM_IDLE] = *clrCpuIdle - ? new YColor(clrCpuIdle) : NULL; -- -+#ifdef __FreeBSD__ -+ color[IWM_INTR] = new YColor(clrCpuIntr); -+ for (unsigned int i = 0; i < taskBarCPUSamples; i++) { -+ cpu[i][IWM_USER] = cpu[i][IWM_NICE] = -+ cpu[i][IWM_SYS] = cpu[i][IWM_INTR] = 0; -+ cpu[i][IWM_IDLE] = 1; -+ } -+ setSize(taskBarCPUSamples, 20); -+ last_cpu[IWM_USER] = last_cpu[IWM_NICE] = last_cpu[IWM_SYS] = -+ last_cpu[IWM_IDLE] = last_cpu[IWM_INTR] = 0; -+ if( setegid( 2 ) == 0 ) { -+ char errbuf[_POSIX2_LINE_MAX]; -+ kd = kvm_openfiles( NULL, NULL, NULL, O_RDONLY, errbuf ); -+ setegid( getgid() ); -+ if( kd == NULL ) -+ fprintf( stderr, "kvm_openfiles: %s\n", errbuf ); -+ else { -+ memset( namelist, 0, sizeof(namelist) ); -+ namelist[0].n_name = (char*)("_cp_time"); -+ if( kvm_nlist( kd, namelist ) != 0 ) { -+ kvm_close( kd ); -+ kd = NULL; -+ } -+ } -+ } else { -+ fprintf( stderr, "can't setegid(2), I'm not a setgid exec ?\n" ); -+ kd = NULL; -+ } -+#else - for (int i(0); i < taskBarCPUSamples; i++) { - cpu[i][IWM_USER] = cpu[i][IWM_NICE] = cpu[i][IWM_SYS] = 0; - cpu[i][IWM_IDLE] = 1; - } - setSize(taskBarCPUSamples, 20); - last_cpu[IWM_USER] = last_cpu[IWM_NICE] = last_cpu[IWM_SYS] = last_cpu[IWM_IDLE] = 0; -+#endif - getStatus(); - updateStatus(); - updateToolTip(); -@@ -71,6 +109,13 @@ - delete color[IWM_NICE]; color[IWM_NICE] = 0; - delete color[IWM_SYS]; color[IWM_SYS] = 0; - delete color[IWM_IDLE]; color[IWM_IDLE] = 0; -+#ifdef __FreeBSD__ -+ delete color[IWM_INTR]; color[IWM_INTR] = 0; -+ if( kd != NULL ) { -+ kvm_close( kd ); -+ kd = NULL; -+ } -+#endif - } - - void CPUStatus::paint(Graphics &g, const YRect &/*r*/) { -@@ -81,13 +126,34 @@ - int nice = cpu[i][IWM_NICE]; - int sys = cpu[i][IWM_SYS]; - int idle = cpu[i][IWM_IDLE]; -+#ifdef __FreeBSD__ -+ int intr = cpu[i][IWM_INTR]; -+ int total = user + sys + intr + nice + idle; -+ int totald = total; -+#else - int total = user + sys + nice + idle; -+#endif - - int y = height() - 1; - - if (total > 0) { -+#ifdef __FreeBSD__ -+ if (intr) { -+ totald -= intr; -+ n = (h * totald) / total; // check rounding -+ if (n >= y) n = y; -+ g.setColor(color[IWM_INTR]); -+ g.drawLine(i, y, i, n); -+ y = n - 1; -+ } -+#endif - if (sys) { -+#ifdef __FreeBSD__ -+ totald -= sys; -+ n = (h * totald)/ total; -+#else - n = (h * (total - sys)) / total; // check rounding -+#endif - if (n >= y) n = y; - g.setColor(color[IWM_SYS]); - g.drawLine(i, y, i, n); -@@ -95,7 +161,12 @@ - } - - if (nice) { -+#ifdef __FreeBSD__ -+ totald -= nice; -+ n = (h * totald)/ total; -+#else - n = (h * (total - sys - nice))/ total; -+#endif - if (n >= y) n = y; - g.setColor(color[IWM_NICE]); - g.drawLine(i, y, i, n); -@@ -103,7 +174,12 @@ - } - - if (user) { -+#ifdef __FreeBSD__ -+ totald -= user; -+ n = (h * totald)/ total; -+#else - n = (h * (total - sys - nice - user))/ total; -+#endif - if (n >= y) n = y; - g.setColor(color[IWM_USER]); - g.drawLine(i, y, i, n); -@@ -153,6 +229,14 @@ - sprintf(load, _("CPU Load: %3.2f %3.2f %3.2f, %d processes."), - l1, l5, l15, sys.procs); - setToolTip(load); -+#elif defined(__FreeBSD__) -+ char load[31]; // enough for "CPU Load: 999.99 999.99 999.99\0" -+ double loadavg[3]; -+ if( kd != NULL && kvm_getloadavg( kd, loadavg, 3 ) != 3 ) -+ return; -+ snprintf(load, sizeof(load), "CPU Load: %3.2f %3.2f %3.2f", -+ loadavg[0], loadavg[1], loadavg[2]); -+ setToolTip(load); - #endif - } - -@@ -170,13 +254,43 @@ - cpu[i - 1][IWM_NICE] = cpu[i][IWM_NICE]; - cpu[i - 1][IWM_SYS] = cpu[i][IWM_SYS]; - cpu[i - 1][IWM_IDLE] = cpu[i][IWM_IDLE]; -+#ifdef __FreeBSD__ -+ cpu[i - 1][IWM_INTR] = cpu[i][IWM_INTR]; -+#endif - } - getStatus(), - repaint(); - } - - void CPUStatus::getStatus() { --#ifdef linux -+#ifdef __FreeBSD__ -+ -+ cpu[taskBarCPUSamples-1][IWM_USER] = 0; -+ cpu[taskBarCPUSamples-1][IWM_NICE] = 0; -+ cpu[taskBarCPUSamples-1][IWM_SYS] = 0; -+ cpu[taskBarCPUSamples-1][IWM_INTR] = 0; -+ cpu[taskBarCPUSamples-1][IWM_IDLE] = 0; -+ -+ if( kd == NULL ) return; -+ -+ long cp_time[CPUSTATES]; -+ int c = sizeof( cp_time ); -+ if (kvm_read(kd, namelist[0].n_value, &cp_time, c) != c) -+ return; -+ -+ long cur[IWM_STATES]; -+ cur[IWM_USER] = cp_time[CP_USER]; -+ cur[IWM_NICE] = cp_time[CP_NICE]; -+ cur[IWM_SYS] = cp_time[CP_SYS]; -+ cur[IWM_INTR] = cp_time[CP_INTR]; -+ cur[IWM_IDLE] = cp_time[CP_IDLE]; -+ -+ for (int i = 0; i < IWM_STATES; i++) { -+ cpu[taskBarCPUSamples-1][i] = cur[i] - last_cpu[i]; -+ last_cpu[i] = cur[i]; -+ } -+ -+#elif defined(linux) - char *p, buf[128]; - long cur[IWM_STATES]; - int len, fd = open("/proc/stat", O_RDONLY); -@@ -210,8 +324,8 @@ - cpu[taskBarCPUSamples-1][IWM_USER], cpu[taskBarCPUSamples-1][IWM_NICE], - cpu[taskBarCPUSamples-1][IWM_SYS], cpu[taskBarCPUSamples-1][IDLE]); - #endif --#endif /* linux */ --#ifdef HAVE_KSTAT_H -+ -+#elif defined(HAVE_KSTAT_H) - #ifdef HAVE_OLD_KSTAT - #define ui32 ul - #endif diff --git a/x11-wm/icewm/files/patch-au b/x11-wm/icewm/files/patch-au deleted file mode 100644 index bbee4e712182..000000000000 --- a/x11-wm/icewm/files/patch-au +++ /dev/null @@ -1,44 +0,0 @@ ---- src/acpustatus.h.orig Sun Mar 9 04:37:52 2003 -+++ src/acpustatus.h Sun Apr 13 12:02:47 2003 -@@ -1,19 +1,29 @@ - #ifndef __CPUSTATUS_H - #define __CPUSTATUS_H - --#if defined(linux) || defined(HAVE_KSTAT_H) -+#if (defined(linux) || defined(HAVE_KSTAT_H)) || defined (__FreeBSD__) - - #ifdef HAVE_KSTAT_H - #include <kstat.h> - #include <sys/sysinfo.h> - #endif /* have_kstat_h */ - -+#ifdef __FreeBSD__ -+#include <kvm.h> -+#include <nlist.h> -+#endif - - #define IWM_USER (0) - #define IWM_NICE (1) - #define IWM_SYS (2) -+#ifdef __FreeBSD__ -+#define IWM_INTR (3) -+#define IWM_IDLE (4) -+#define IWM_STATES (5) -+#else - #define IWM_IDLE (3) - #define IWM_STATES (4) -+#endif - - #include "ywindow.h" - #include "ytimer.h" -@@ -38,6 +48,10 @@ - long last_cpu[IWM_STATES]; - YColor *color[IWM_STATES]; - YTimer *fUpdateTimer; -+#ifdef __FreeBSD__ -+ struct nlist namelist[2]; -+ kvm_t *kd; -+#endif - }; - #else - #undef CONFIG_APPLET_CPU_STATUS diff --git a/x11-wm/icewm/files/patch-av b/x11-wm/icewm/files/patch-av deleted file mode 100644 index 5167594e4e3c..000000000000 --- a/x11-wm/icewm/files/patch-av +++ /dev/null @@ -1,18 +0,0 @@ ---- src/default.h.orig Thu May 16 14:00:02 2002 -+++ src/default.h Tue May 28 04:44:02 2002 -@@ -455,6 +455,7 @@ - XSV(const char *, clrLabelText, "rgb:00/00/00") - XSV(const char *, clrCpuUser, "rgb:00/FF/00") - XSV(const char *, clrCpuSys, "rgb:FF/00/00") -+XSV(const char *, clrCpuIntr, "rgb:FF/FF/00") - XSV(const char *, clrCpuNice, "rgb:00/00/FF") - XSV(const char *, clrCpuIdle, "rgb:00/00/00") - XSV(const char *, clrNetSend, "rgb:FF/FF/00") -@@ -837,6 +838,7 @@ - #ifdef CONFIG_APPLET_CPU_STATUS - OSV("ColorCPUStatusUser", &clrCpuUser, "User load on the CPU monitor"), - OSV("ColorCPUStatusSystem", &clrCpuSys, "System load on the CPU monitor"), -+ OSV("ColorCPUStatusInterrupts", &clrCpuIntr, "Inturrupts on the CPU monitor"), - OSV("ColorCPUStatusNice", &clrCpuNice, "Nice load on the CPU monitor"), - OSV("ColorCPUStatusIdle", &clrCpuIdle, "Idle (non) load on the CPU monitor, leave empty to force transparency"), - #endif diff --git a/x11-wm/icewm/files/patch-aw b/x11-wm/icewm/files/patch-aw deleted file mode 100644 index 750c25ddb965..000000000000 --- a/x11-wm/icewm/files/patch-aw +++ /dev/null @@ -1,12 +0,0 @@ ---- src/wmapp.cc.orig Sun Mar 9 04:37:52 2003 -+++ src/wmapp.cc Sun Apr 13 00:09:19 2003 -@@ -1503,6 +1503,9 @@ - #endif - - int main(int argc, char **argv) { -+#ifdef __FreeBSD__ -+ setegid( getgid() ); -+#endif - YLocale locale; - - #ifndef NO_CONFIGURE diff --git a/x11-wm/icewm/files/patch-ax b/x11-wm/icewm/files/patch-ax deleted file mode 100644 index 1e12bd630eb6..000000000000 --- a/x11-wm/icewm/files/patch-ax +++ /dev/null @@ -1,11 +0,0 @@ ---- src/wmclient.h.orig Tue Mar 26 14:29:05 2002 -+++ src/wmclient.h Tue Mar 26 14:29:13 2002 -@@ -5,6 +5,8 @@ - #include "ymenu.h" - #include "MwmUtil.h" - -+#include <X11/Xutil.h> -+ - class YFrameWindow; - class WindowListItem; - diff --git a/x11-wm/icewm/files/patch-configure b/x11-wm/icewm/files/patch-configure deleted file mode 100644 index f32d878f7811..000000000000 --- a/x11-wm/icewm/files/patch-configure +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.orig Mon Mar 15 03:48:52 2004 -+++ configure Mon Mar 15 03:49:27 2004 -@@ -3332,7 +3332,7 @@ - ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - if test x"$ac_cv_c_compiler_gnu" != x; then -- CXX_LINK=${CC} -+ CXX_LINK=${CXX} - fi - - diff --git a/x11-wm/icewm/files/patch-configure.in b/x11-wm/icewm/files/patch-configure.in index 56a54e511fc4..86fa0c8893e8 100644 --- a/x11-wm/icewm/files/patch-configure.in +++ b/x11-wm/icewm/files/patch-configure.in @@ -1,38 +1,56 @@ ---- configure.in.orig Mon Mar 15 03:46:35 2004 -+++ configure.in Mon Mar 15 03:46:25 2004 -@@ -25,35 +25,6 @@ +--- configure.in.orig Sun May 23 15:18:18 2004 ++++ configure.in Mon May 24 14:00:32 2004 +@@ -21,53 +21,8 @@ + + dnl ---------- Checking for a C compiler in hope that it understands C++ too --- + dnl +-ICE_PROG_CXX_LIGHT AC_LANG_CPLUSPLUS AC_PROG_CXX - +- -dnl ----------- If both CC and CXX are GNU compilers, it is better to use CC --- --dnl ---- for linking. Also check how to turn off RTTI and exception handling --- --if test x"$ac_cv_prog_gxx" != x; then +-dnl ---- for linking. +-if test x"$ac_cv_prog_gxx" = x; then - AC_PROG_CC -- if test x"$ac_cv_prog_gcc" != x; then +- if test x"$ac_cv_prog_gcc" = x; then - CXX_LINK=${CC} - fi -- +-fi +- +-dnl ---------- Also check how to turn off RTTI and exception handling --- +- +-dnl --- SunONE C++ supports no-rtti flag only in compat=4 mode +-if test -z "`${CXX} -V 2>&1 | grep Sun`"; then - ICE_CXX_FLAG_ACCEPT(no_rtti, -fno-rtti) -- dnl --- Intel C++ supports -fno-rtti, but doens't support -fno-*-exceptions -- if test $(basename $CXX) != "icc"; then -- ICE_CXX_FLAG_ACCEPT(no_exceptions, -fno-exceptions) +-fi +-dnl --- Intel C++ supports -fno-rtti, but doens't support -fno-*-exceptions +-if test $(basename $CXX) != "icc"; then +- if test -n "`${CXX} -V 2>&1 | grep Sun`"; then +- dnl --- Sun ONE C++ syntax for "no exceptions" +- ICE_CXX_FLAG_ACCEPT(no_exceptions, -features=no%except) +- else +- if test $(basename $CXX) = "g++" || +- test $(basename $CXX) = "gcc"; then +- ICE_CXX_FLAG_ACCEPT(no_exceptions, -fno-exceptions) - if test x"$no_exceptions_ok" = xno; then -- ICE_CXX_FLAG_ACCEPT(no_exceptions, -fno-handle-exceptions) +- ICE_CXX_FLAG_ACCEPT(no_exceptions, -fno-handle-exceptions) +- fi - fi - fi -fi - --if test x"$ac_cv_prog_gxx" != x; then +-if test $(basename $CXX) = "g++" || +- test $(basename $CXX) = "gcc" ; then +- ICE_CXX_FLAG_ACCEPT(warn_xxx, -Wall -Wpointer-arith -Wconversion -Wwrite-strings -Winline -Woverloaded-virtual -W) +- ICE_CXX_FLAG_ACCEPT(permissive, -fpermissive) +-else +- dnl --- Sun ONE doesn't support GCC -W* and -fpermissive - dnl --- Intel C++ doesn't supports lots of GCC -W* and -fpermissive - if test $(basename $CXX) = "icc"; then - dnl --- Using -w0 to avoid noisy "remark" messages - ICE_CXX_FLAG_ACCEPT(warn_xxx, -w0) -- else -- ICE_CXX_FLAG_ACCEPT(warn_xxx, -Wall -Wpointer-arith -Wconversion -Wwrite-strings -Winline -Woverloaded-virtual -W) -- ICE_CXX_FLAG_ACCEPT(permissive, -fpermissive) - fi -fi -- + if test x"$CXX_LINK" = x; then CXX_LINK=$CXX - fi diff --git a/x11-wm/icewm/files/patch-src_Makefile.in b/x11-wm/icewm/files/patch-src_Makefile.in index a3349e7980bb..42e5bed90daf 100644 --- a/x11-wm/icewm/files/patch-src_Makefile.in +++ b/x11-wm/icewm/files/patch-src_Makefile.in @@ -12,12 +12,3 @@ @CORE_CFLAGS@ @IMAGE_CFLAGS@ @AUDIO_CFLAGS@ # `fc-config --cflags` LFLAGS = @LDFLAGS@ LIBS = @LIBS@ -@@ -53,7 +53,7 @@ - genpref.o - - icewm_LIBS = \ -- $(CORE_LIBS) $(IMAGE_LIBS) -+ $(CORE_LIBS) $(IMAGE_LIBS) -lkvm - icewm_OBJS = \ - ymsgbox.o ydialog.o yurl.o \ - wmsession.o wmwinlist.o wmtaskbar.o wmwinmenu.o \ diff --git a/x11-wm/icewm/files/patch-src_ylocale.cc b/x11-wm/icewm/files/patch-src_ylocale.cc new file mode 100644 index 000000000000..0ca66acf6c4d --- /dev/null +++ b/x11-wm/icewm/files/patch-src_ylocale.cc @@ -0,0 +1,12 @@ +--- src/ylocale.cc.orig Wed Apr 21 05:06:34 2004 ++++ src/ylocale.cc Sun Apr 25 19:40:07 2004 +@@ -149,7 +149,8 @@ + return NULL; + + YUChar * uStr(new YUChar[lLen + 1]); +- char * inbuf((char *) lStr), * outbuf((char *) uStr); ++ const char * inbuf((char *) lStr); ++ char * outbuf((char *) uStr); + size_t inlen(lLen), outlen(4 * lLen); + + if (0 > (int) iconv(instance->toUnicode, &inbuf, &inlen, &outbuf, &outlen)) |