pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [patch] DragonFly support in kdebase3 updated



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oops, pasted wrong file, this one should be correct

Rumko wrote:
> Since the work on 1:1 threading in DragonFly-HEAD, kdebase3 was not
> compilable. I tried making the patch backwards compatible (on the 1.8.x
> release kdebase3 should remain compilable) so there should not be any
> regressions.
> 
> Instructions for usage:
> cd /usr/pkgsrc/x11/kdebase3 && patch < /path/to/kdebase3.patch
> 
> Thank you
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (DragonFly)

iD8DBQFGED0SxV3ce2RZW70RAn3lAJsFUa27OOvj+1EtyK8mMuV/rYLd6QCfSvPM
yBNBQ9EoObxMZox4LNzn2fQ=
=mpsz
-----END PGP SIGNATURE-----
--- distinfo.orig       2007-04-02 01:05:11.000000000 +0200
+++ distinfo    2007-04-02 01:04:39.000000000 +0200
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.95 2007/03/08 14:38:31 rillig Exp $
+$NetBSD$
 
 SHA1 (Daemon.README) = eb1e6af52adc02ded77af17e8953134b7e60d23b
 RMD160 (Daemon.README) = 39edd92ed4314397080f32a8caff0ac3f716ecf4
@@ -38,7 +38,7 @@
 SHA1 (patch-dc) = dd44652ad806d49d45ef86cbff58a01e506deeee
 SHA1 (patch-dd) = 4c98e62275ce9a632f79f99110e8fb4995e3f017
 SHA1 (patch-de) = 94d7f083784b8b56c2b23c320772a80a27df19d1
-SHA1 (patch-df) = ee6f6967d77d13217055d69dcf8be98b48d40598
+SHA1 (patch-df) = 9040bb55f2df4703eefd68d635f0275ff12199a9
 SHA1 (patch-ep) = 745f03daf088afdef4d5eff486311a49291eb947
 SHA1 (patch-er) = ead52469004abbb4e04278e038fad8f850d79701
 SHA1 (patch-ev) = 551dc4d79b637e15a580eb1dcd2f0930ff1e3dbc
--- patches/patch-df.orig       2005-11-08 19:25:44.000000000 +0100
+++ patches/patch-df    2007-04-02 00:56:11.000000000 +0200
@@ -1,18 +1,28 @@
-$NetBSD: patch-df,v 1.9 2005/11/08 18:25:44 joerg Exp $
-
---- ksysguard/ksysguardd/FreeBSD/ProcessList.c.orig    2005-08-18 
00:27:47.000000000 +0000
-+++ ksysguard/ksysguardd/FreeBSD/ProcessList.c
-@@ -217,23 +217,25 @@ updateProcess(int pid)
+--- ksysguard/ksysguardd/FreeBSD/ProcessList.c.orig    2007-04-01 
22:58:20.000000000 +0200
++++ ksysguard/ksysguardd/FreeBSD/ProcessList.c 2007-04-02 00:22:42.000000000 
+0200
+@@ -213,27 +213,41 @@
+         ps->priority  = p.ki_pri.pri_user;
+         ps->niceLevel = p.ki_nice;
+ #else
++#if defined(__DragonFly__) && __DragonFly_version >= 190000
++      ps->pid       = p.kp_pid;
++      ps->ppid      = p.kp_ppid;
++      ps->uid       = p.kp_uid;
++      ps->gid       = p.kp_pgid;
++      ps->priority  = p.kp_lwp.kl_tdprio;
++#else
+         ps->pid       = p.kp_proc.p_pid;
          ps->ppid      = p.kp_eproc.e_ppid;
          ps->uid       = p.kp_eproc.e_ucred.cr_uid;
          ps->gid       = p.kp_eproc.e_pgid;
 +#if defined(__DragonFly__)
-+        ps->priority  = p.kp_thread.td_pri;
++      ps->priority  = p.kp_thread.td_pri;
 +#else
          ps->priority  = p.kp_proc.p_priority;
 +#endif
          ps->niceLevel = p.kp_proc.p_nice;
  #endif
++#endif
  
          /* this isn't usertime -- it's total time (??) */
  #if __FreeBSD_version >= 500015
@@ -20,7 +30,11 @@
 -#elif __FreeBSD_version >= 300000
 -#if defined(__DragonFly__)
 +#elif defined(__DragonFly__)
++#if __DragonFly_version >= 190000
++      if (!getrusage(p.kp_pid, &pru))
++#else
        if (!getrusage(p.kp_proc.p_pid, &pru))
++#endif
        {
                errx(1, "failed to get rusage info");
        }
@@ -32,3 +46,44 @@
  #else
        ps->userTime = 
p.kp_proc.p_rtime.tv_sec*100+p.kp_proc.p_rtime.tv_usec/100;
  #endif
+@@ -256,16 +270,24 @@
+       strlcpy(ps->name,p.ki_comm? p.ki_comm:"????",sizeof(ps->name));
+       strcpy(ps->status,(p.ki_stat>=1)&&(p.ki_stat<=5)? 
statuses[p.ki_stat-1]:"????");
+ #else
+-              ps->userLoad = 100.0 * (double) p.kp_proc.p_pctcpu / fscale;
++#if defined (__DragonFly__) && __DragonFly_version >= 190000
++              ps->userLoad = 100.0 * (double) p.kp_lwp.kl_pctcpu / fscale;
++      ps->vmSize   = p.kp_vm_map_size;
++      ps->vmRss    = p.kp_vm_rssize * getpagesize();
++      strlcpy(ps->name,p.kp_comm ? p.kp_comm : "????", 
++              sizeof(ps->name));
++      strcpy(ps->status,(p.kp_stat>=1)&&(p.kp_stat<=5)? 
statuses[p.kp_stat-1]:"????");
++#else
++      ps->userLoad = 100.0 * (double) p.kp_proc.p_pctcpu / fscale;
+       ps->vmSize   = p.kp_eproc.e_vm.vm_map.size;
+       ps->vmRss    = p.kp_eproc.e_vm.vm_rssize * getpagesize();
+ #if defined (__DragonFly__)
+-      strlcpy(ps->name,p.kp_thread.td_comm ? p.kp_thread.td_comm : "????", 
++      strlcpy(ps->name,p.kp_thread.td_comm ? p.kp_thread.td_comm : "????",
+               sizeof(ps->name));
+ #else
+       strlcpy(ps->name,p.kp_proc.p_comm ? p.kp_proc.p_comm : "????", 
sizeof(ps->name));
+ #endif
+-      strcpy(ps->status,(p.kp_proc.p_stat>=1)&&(p.kp_proc.p_stat<=5)? 
statuses[p.kp_proc.p_stat-1]:"????");
++#endif
+ #endif
+ 
+         /* process command line */
+@@ -366,8 +388,12 @@
+ #if __FreeBSD_version >= 500015
+               updateProcess(p[num].ki_pid);
+ #else
++#if __DragonFly_version >= 190000
++              updateProcess(p[num].kp_pid);
++#else
+               updateProcess(p[num].kp_proc.p_pid);
+ #endif
++#endif
+       free(p);
+       cleanupProcessList();
+ 



Home | Main Index | Thread Index | Old Index