diff options
author | marino <marino> | 2012-03-31 06:39:20 +0000 |
---|---|---|
committer | marino <marino> | 2012-03-31 06:39:20 +0000 |
commit | 5955a8132f975dbae25f71d04630482a95249be1 (patch) | |
tree | 13b83765aa7d4c23e7889adce0c2f89c17e6283e /x11 | |
parent | bcfb6f8a826e66634b6253fc69736461d5abe067 (diff) | |
download | pkgsrc-5955a8132f975dbae25f71d04630482a95249be1.tar.gz |
x11/kde-workspace4: Patch for DragonFly
DragonFly for kde-workspace4 is built using FreeBSD-specific files. In
the future, DragonFly probably needs its OS-specific directory. These
patches will fix all but one problem on DragonFly. They use macros so
no revbump is required.
The remaining is with cmake using the wrong include path for the QT4
tools mkspecs file qplatformdefs.h. How to best resolve that is still
being determined.
Diffstat (limited to 'x11')
4 files changed, 122 insertions, 1 deletions
diff --git a/x11/kde-workspace4/distinfo b/x11/kde-workspace4/distinfo index f452047a5ba..df836c6340a 100644 --- a/x11/kde-workspace4/distinfo +++ b/x11/kde-workspace4/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.1 2012/03/19 19:44:03 markd Exp $ +$NetBSD: distinfo,v 1.2 2012/03/31 06:39:20 marino Exp $ SHA1 (Daemon.README) = eb1e6af52adc02ded77af17e8953134b7e60d23b RMD160 (Daemon.README) = 39edd92ed4314397080f32a8caff0ac3f716ecf4 @@ -17,6 +17,9 @@ SHA1 (patch-kdm_config.def) = ac0907cc59c5f0976cdbe152bb7fb0a4592bbe84 SHA1 (patch-kdm_kcm_main.cpp) = bb692c83fa189342105744cc9c3c180b970571b7 SHA1 (patch-kdm_kfrontend_CMakeLists.txt) = 0b0c541c7305d31e01a45f0a6a7f5ddb2d2e57fe SHA1 (patch-ksysguard_example_CMakeLists.txt) = bd10f03a308442b8febe8864010987fb504b2d21 +SHA1 (patch-ksysguard_ksysguard_FreeBSD_ProcessList.c) = 42970c40f8e0e18f36570b504f708c7c100e96b8 +SHA1 (patch-ksysguard_ksysguard_FreeBSD_cpuinfo.c) = e827d09a853b479294a7771b47534d4ba71ef7cb +SHA1 (patch-ksysguard_ksysguard_FreeBSD_uptime.c) = 96169c0c846c7337b65986dc1ce0b1c1b386ff30 SHA1 (patch-ksysguard_ksysguardd_NetBSD_CPU.c) = 05312793f0c66cacf1bb61c081a8b15e6e7a2619 SHA1 (patch-ksysguard_ksysguardd_NetBSD_CPU.h) = e682d488c61ca2540ed4b2112c9bffc45bbe5e8d SHA1 (patch-ksysguard_ksysguardd_NetBSD_Memory.c) = 9d02eaa299847ac32a128696bb6d35f73bae0551 diff --git a/x11/kde-workspace4/patches/patch-ksysguard_ksysguard_FreeBSD_ProcessList.c b/x11/kde-workspace4/patches/patch-ksysguard_ksysguard_FreeBSD_ProcessList.c new file mode 100644 index 00000000000..0e30feec30f --- /dev/null +++ b/x11/kde-workspace4/patches/patch-ksysguard_ksysguard_FreeBSD_ProcessList.c @@ -0,0 +1,83 @@ +$NetBSD: patch-ksysguard_ksysguard_FreeBSD_ProcessList.c,v 1.1 2012/03/31 06:39:20 marino Exp $ + +--- ksysguard/ksysguardd/FreeBSD/ProcessList.c.orig 2012-03-30 20:44:17.924143000 +0000 ++++ ksysguard/ksysguardd/FreeBSD/ProcessList.c +@@ -54,6 +54,24 @@ + + #define MONITORBUF 20 + ++#if defined(__DragonFly__) ++#include <kvm.h> ++#include <limits.h> ++#define ki_comm kp_comm ++#define ki_nice kp_nice ++#define ki_pid kp_pid ++#define ki_pgid kp_pgid ++#define ki_ppid kp_ppid ++#define ki_ruid kp_ruid ++#define ki_runtime kp_lwp.kl_pctcpu ++#define ki_rssize kp_vm_rssize ++#define ki_size kp_vm_map_size ++#define ki_stat kp_stat ++#define ki_start kp_start ++#define ki_uid kp_uid ++#define KERN_PROC_PROC KERN_PROC_ALL ++#endif ++ + static struct kinfo_proc proc_buf[PROCBUF], prev_list[PROCBUF]; + static int nproc, prev_nproc, sorted_proc[PROCBUF], prev_sorted[PROCBUF]; + +@@ -230,7 +248,11 @@ void printProcessList(const char* cmd) + *arg_fix = '*'; + } + ++#if defined(__DragonFly__) ++ if (args[0] == '\0' && (ps->kp_flags & P_SYSTEM)) { ++#else + if (args[0] == '\0' && (ps->ki_flag & P_SYSTEM || ps->ki_args == NULL)) { ++#endif + int cpy; + cpy = strlcpy(buf3 + 1, ps->ki_comm, NAMEBUF - 1); + if (cpy > NAMEBUF - 2) +@@ -246,6 +268,17 @@ void printProcessList(const char* cmd) + name = "????"; + + switch (ps->ki_stat) { ++#if defined(__DragonFly__) ++ case SACTIVE: ++ if (smpmode) ++ state = cpunames[ps->kp_lwp.kl_cpuid]; ++ else ++ state = statuses[2]; ++ break; ++ case SIDL: ++ case SSTOP: ++ case SZOMB: ++#else + case SRUN: + if (smpmode && ps->ki_oncpu != 0xff) + state = cpunames[ps->ki_oncpu]; +@@ -269,6 +302,7 @@ void printProcessList(const char* cmd) + case SSTOP: + case SZOMB: + case SWAIT: ++#endif + state = statuses[(int)ps->ki_stat]; + break; + +@@ -300,10 +334,15 @@ void printProcessList(const char* cmd) + ++prev_proc; + } + ++#if defined(__DragonFly__) ++ /* XXX */ ++ load = 0; ++#else + if (last_ps != NULL) + load = (ps->ki_runtime - last_ps->ki_runtime) / 1000000.0 / scale; + else + load = ps->ki_runtime / 1000000.0 / scale; ++#endif + + if (!ps->ki_pid) + // XXX: TODO: add support for displaying kernel process diff --git a/x11/kde-workspace4/patches/patch-ksysguard_ksysguard_FreeBSD_cpuinfo.c b/x11/kde-workspace4/patches/patch-ksysguard_ksysguard_FreeBSD_cpuinfo.c new file mode 100644 index 00000000000..a7e814ab4be --- /dev/null +++ b/x11/kde-workspace4/patches/patch-ksysguard_ksysguard_FreeBSD_cpuinfo.c @@ -0,0 +1,20 @@ +$NetBSD: patch-ksysguard_ksysguard_FreeBSD_cpuinfo.c,v 1.1 2012/03/31 06:39:20 marino Exp $ + +--- ksysguard/ksysguardd/FreeBSD/cpuinfo.c.orig 2012-03-30 18:23:17.735747000 +0000 ++++ ksysguard/ksysguardd/FreeBSD/cpuinfo.c +@@ -39,6 +39,15 @@ + #define FREQ_LEVEL_BUFFER 256 + #define SYSCTL_ID_LEN 35 + ++#if defined(__DragonFly__) && !defined(CPUSTATES) ++#define CP_USER 0 ++#define CP_NICE 1 ++#define CP_SYS 2 ++#define CP_INTR 3 ++#define CP_IDLE 4 ++#define CPUSTATES 5 ++#endif ++ + static void get_mmfreq(int, int*, int*); + + static long percentages(int cnt, long *out, long *new, long *old, long *diffs); diff --git a/x11/kde-workspace4/patches/patch-ksysguard_ksysguard_FreeBSD_uptime.c b/x11/kde-workspace4/patches/patch-ksysguard_ksysguard_FreeBSD_uptime.c new file mode 100644 index 00000000000..dcd0e9483c3 --- /dev/null +++ b/x11/kde-workspace4/patches/patch-ksysguard_ksysguard_FreeBSD_uptime.c @@ -0,0 +1,15 @@ +$NetBSD: patch-ksysguard_ksysguard_FreeBSD_uptime.c,v 1.1 2012/03/31 06:39:20 marino Exp $ + +--- ksysguard/ksysguardd/FreeBSD/uptime.c.orig 2012-03-30 22:35:19.995531000 +0000 ++++ ksysguard/ksysguardd/FreeBSD/uptime.c +@@ -38,8 +38,10 @@ void printUptime( const char* cmd ) { + struct timespec tp; + float uptime = 0.; + ++#if defined(CLOCK_UPTIME) + if (clock_gettime(CLOCK_UPTIME, &tp) != -1) + uptime = tp.tv_nsec / 1000000000.0 + tp.tv_sec; ++#endif + fprintf( CurrentClient, "%f\n", uptime); + } + |