pkgsrc-WIP-changes archive

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

htop: better patch from upstream



Module Name:	pkgsrc-wip
Committed By:	coypu <coypu%sdf.org@localhost>
Pushed By:	coypu
Date:		Mon Feb 15 11:59:05 2016 +0000
Changeset:	41e2377fcda218a726a4124ccf2ada89d4b08b98

Modified Files:
	htop/Makefile
	htop/distinfo
	htop/patches/patch-linux_LinuxProcess.c
Removed Files:
	htop/patches/patch-Makefile.am

Log Message:
htop: better patch from upstream

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=41e2377fcda218a726a4124ccf2ada89d4b08b98

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 htop/Makefile                           |  1 +
 htop/distinfo                           |  3 +--
 htop/patches/patch-Makefile.am          | 28 ----------------------------
 htop/patches/patch-linux_LinuxProcess.c | 24 ++++++++----------------
 4 files changed, 10 insertions(+), 46 deletions(-)

diffs:
diff --git a/htop/Makefile b/htop/Makefile
index c111768..daf8903 100644
--- a/htop/Makefile
+++ b/htop/Makefile
@@ -34,6 +34,7 @@ CONFIGURE_ARGS+=	--with-proc=/system/lxproc
 REPLACE_PYTHON+=	scripts/MakeHeader.py
 CONFIGURE_ENV+=		ac_cv_file__proc_stat=yes ac_cv_file__proc_meminfo=yes
 
+.include "../../lang/python/application.mk"
 .include "../../devel/ncursesw/buildlink3.mk"
 .include "../../sysutils/desktop-file-utils/desktopdb.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/htop/distinfo b/htop/distinfo
index 992a3ea..ca316ac 100644
--- a/htop/distinfo
+++ b/htop/distinfo
@@ -4,6 +4,5 @@ SHA1 (htop-2.0.0.tar.gz) = 73bf8b97d4ee74066c75c0f9e0c1eacbaff11ba0
 RMD160 (htop-2.0.0.tar.gz) = 2d5e812fcabde1922b9fdd35413795200f306eb8
 SHA512 (htop-2.0.0.tar.gz) = 2df1b96e4c07a1de360dc7b7b20db0e663d7fa2c9a8a9dcc3d7dc1ce5e5b59f72d927e8e7ae919631cf0e950a82450b45116a1f8d788f63c5762bd73332ec32c
 Size (htop-2.0.0.tar.gz) = 473765 bytes
-SHA1 (patch-Makefile.am) = 5139fca6858abcba7db51d6a1345936a6e1d17a6
 SHA1 (patch-configure.ac) = 7f76263003cd0ec76aa40fa47131122e38f254b4
-SHA1 (patch-linux_LinuxProcess.c) = bf20e9afbd795ae3c6f99403828ff9c05713a89f
+SHA1 (patch-linux_LinuxProcess.c) = 64f1a0c67928cae375d807b8a74772c72b808147
diff --git a/htop/patches/patch-Makefile.am b/htop/patches/patch-Makefile.am
deleted file mode 100644
index b72136d..0000000
--- a/htop/patches/patch-Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD$
-
---- Makefile.am.orig	2016-02-02 14:58:45.000000000 +0000
-+++ Makefile.am
-@@ -70,6 +70,14 @@ myhtopplatheaders = darwin/Platform.h da
- darwin/DarwinProcessList.h darwin/DarwinCRT.h darwin/Battery.h
- endif
- 
-+if HTOP_NETBSD
-+myhtopplatsources = linux/Platform.c linux/IOPriorityPanel.c linux/IOPriority.c \
-+linux/LinuxProcess.c linux/LinuxProcessList.c linux/LinuxCRT.c linux/Battery.c
-+
-+myhtopplatheaders = linux/Platform.h linux/IOPriorityPanel.h linux/IOPriority.h \
-+linux/LinuxProcess.h linux/LinuxProcessList.h linux/LinuxCRT.h linux/Battery.h
-+endif
-+
- if HTOP_UNSUPPORTED
- myhtopplatsources = unsupported/Platform.c \
- unsupported/UnsupportedProcess.c unsupported/UnsupportedProcessList.c \
-@@ -98,7 +106,7 @@ coverage:
- 	$(MAKE) all CFLAGS="" AM_CPPFLAGS="-fprofile-arcs -ftest-coverage -DDEBUG" AM_LDFLAGS="-lgcov"
- 
- .c.h:
--	@srcdir@/scripts/MakeHeader.py $<
-+#	@srcdir@/scripts/MakeHeader.py $<
- 
- cppcheck:
- 	cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS
diff --git a/htop/patches/patch-linux_LinuxProcess.c b/htop/patches/patch-linux_LinuxProcess.c
index c0da33e..ed391f5 100644
--- a/htop/patches/patch-linux_LinuxProcess.c
+++ b/htop/patches/patch-linux_LinuxProcess.c
@@ -2,31 +2,23 @@ $NetBSD$
 
 --- linux/LinuxProcess.c.orig	2016-02-02 15:30:44.000000000 +0000
 +++ linux/LinuxProcess.c
-@@ -14,6 +14,7 @@ in the source distribution for its full 
- #include <stdlib.h>
- #include <unistd.h>
- #include <string.h>
-+#include <sys/resource.h>
- #include <sys/syscall.h>
- 
- /*{
-@@ -268,13 +269,21 @@ io_priority = (cpu_nice + 20) / 5. -- Fr
+@@ -268,13 +268,20 @@ io_priority = (cpu_nice + 20) / 5. -- Fr
  #define LinuxProcess_effectiveIOPriority(p_) (IOPriority_class(p_->ioPriority) == IOPRIO_CLASS_NONE ? IOPriority_tuple(IOPRIO_CLASS_BE, (p_->super.nice + 20) / 5) : p_->ioPriority)
  
  IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this) {
-+#if defined(__NetBSD__)
-+   IOPriority ioprio = getpriority(this->super.pid, IOPRIO_WHO_PROCESS);
-+#else
-    IOPriority ioprio = syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, this->super.pid);
+-   IOPriority ioprio = syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, this->super.pid);
++   IOPriority ioprio = 0;
++// Other OSes masquerading as Linux (NetBSD?) don't have this syscall 
++#ifdef SYS_ioprio_get
++   ioprio = syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, this->super.pid);
 +#endif
     this->ioPriority = ioprio;
     return ioprio;
  }
  
  bool LinuxProcess_setIOPriority(LinuxProcess* this, IOPriority ioprio) {
-+#if defined(__NetBSD__)
-+   setpriority(this->super.pid, IOPRIO_WHO_PROCESS, ioprio);
-+#else
++// Other OSes masquerading as Linux (NetBSD?) don't have this syscall
++#ifdef SYS_ioprio_get
     syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, this->super.pid, ioprio);
 +#endif
     return (LinuxProcess_updateIOPriority(this) == ioprio);


Home | Main Index | Thread Index | Old Index