catch up with change kinfo_proc2 -> kinfo_proc
This commit is contained in:
parent
4b0fead1bd
commit
303928706f
@ -1,8 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2010/11/20 17:22:40 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2012/01/08 22:49:55 naddy Exp $
|
||||
|
||||
COMMENT = display a tree of processes
|
||||
|
||||
DISTNAME = dtpstree-1.0.3
|
||||
REVISION = 0
|
||||
CATEGORIES = sysutils
|
||||
|
||||
HOMEPAGE = http://code.douglasthrift.net/trac/dtpstree
|
||||
@ -26,8 +27,12 @@ SEPARATE_BUILD = concurrent
|
||||
MAKE_FILE = GNUmakefile
|
||||
USE_GMAKE = Yes
|
||||
USE_GROFF = Yes
|
||||
CONFIGURE_STYLE = gnu
|
||||
CONFIGURE_STYLE = autoconf no-autoheader
|
||||
AUTOCONF_VERSION = 2.65
|
||||
|
||||
NO_REGRESS = Yes
|
||||
|
||||
post-patch:
|
||||
@cd ${WRKDIST}; cat check_gnu_make.m4 >> aclocal.m4
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
12
sysutils/dtpstree/patches/patch-GNUmakefile_in
Normal file
12
sysutils/dtpstree/patches/patch-GNUmakefile_in
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-GNUmakefile_in,v 1.1 2012/01/08 22:49:56 naddy Exp $
|
||||
--- GNUmakefile.in.orig Mon Aug 2 00:42:56 2010
|
||||
+++ GNUmakefile.in Sun Jan 8 23:44:59 2012
|
||||
@@ -23,7 +23,7 @@ VPATH := @srcdir@
|
||||
srcdir := @srcdir@
|
||||
top_builddir := @top_builddir@
|
||||
|
||||
-CPPFLAGS := @CPPFLAGS@ $(filter -DPACKAGE_TARNAME% -DPACKAGE_VERSION% -DHAVE_NCURSES% -DHAVE_TERM% -DHAVE_STRUCT_KINFO_PROC% -DHAVE_DECL_KERN_PROC_PROC% -DHAVE_DECL_KERN_PROC_KTHREAD%,@DEFS@)
|
||||
+CPPFLAGS := @CPPFLAGS@ $(filter -DPACKAGE_TARNAME% -DPACKAGE_VERSION% -DHAVE_NCURSES% -DHAVE_TERM% -DHAVE_STRUCT_KINFO_PROC% -DHAVE_KINFO_NEWABI% -DHAVE_DECL_KERN_PROC_PROC% -DHAVE_DECL_KERN_PROC_KTHREAD%,@DEFS@)
|
||||
CXX := @CXX@
|
||||
CXXFLAGS := @CXXFLAGS@ -Wall -Wno-long-long -Wno-parentheses
|
||||
LDFLAGS := @LDFLAGS@
|
16
sysutils/dtpstree/patches/patch-configure_ac
Normal file
16
sysutils/dtpstree/patches/patch-configure_ac
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.1 2012/01/08 22:49:56 naddy Exp $
|
||||
--- configure.ac.orig Sat Aug 14 05:50:04 2010
|
||||
+++ configure.ac Sun Jan 8 23:31:08 2012
|
||||
@@ -124,7 +124,11 @@ AC_CHECK_TYPE([struct kinfo_proc2],
|
||||
[AC_CHECK_TYPE([struct kinfo_proc],
|
||||
[AC_DEFINE([HAVE_STRUCT_KINFO_PROC])
|
||||
AC_CHECK_FUNC([kvm_getargv], [], [DT_MSG_KVM])
|
||||
- AC_CHECK_FUNC([kvm_getprocs], [], [DT_MSG_KVM])
|
||||
+ AC_CHECK_FUNC([kvm_getprocs],
|
||||
+ [AC_TRY_COMPILE(DT_INCLUDES_KVM,
|
||||
+ [kvm_getprocs(NULL, 0, 0, 0, NULL);],
|
||||
+ [AC_DEFINE([HAVE_KINFO_NEWABI])]
|
||||
+ )], [DT_MSG_KVM])
|
||||
DT_CHECK_MEMBERS_KVM([kinfo_proc], [ki], [kp], [p])],
|
||||
[DT_MSG_KVM], [DT_INCLUDES_KVM]
|
||||
)], [DT_INCLUDES_KVM]
|
37
sysutils/dtpstree/patches/patch-dtpstree_cpp
Normal file
37
sysutils/dtpstree/patches/patch-dtpstree_cpp
Normal file
@ -0,0 +1,37 @@
|
||||
$OpenBSD: patch-dtpstree_cpp,v 1.1 2012/01/08 22:49:56 naddy Exp $
|
||||
--- dtpstree.cpp.orig Sun Jan 8 23:02:45 2012
|
||||
+++ dtpstree.cpp Sun Jan 8 23:09:20 2012
|
||||
@@ -92,8 +92,25 @@ template <typename Type>
|
||||
inline char *comm(Type *proc);
|
||||
|
||||
#ifndef HAVE_STRUCT_KINFO_PROC2
|
||||
+#ifdef HAVE_KINFO_NEWABI
|
||||
typedef kinfo_proc Proc;
|
||||
|
||||
+const int Flags(KVM_NO_FILES);
|
||||
+
|
||||
+template <>
|
||||
+inline kinfo_proc *getprocs(kvm_t *kd, int &count)
|
||||
+{
|
||||
+ return kvm_getprocs(kd, All, 0, sizeof (kinfo_proc), &count);
|
||||
+}
|
||||
+
|
||||
+template <>
|
||||
+inline char **getargv(kvm_t *kd, const kinfo_proc *proc)
|
||||
+{
|
||||
+ return kvm_getargv(kd, proc, 0);
|
||||
+}
|
||||
+#else
|
||||
+typedef kinfo_proc Proc;
|
||||
+
|
||||
const int Flags(O_RDONLY);
|
||||
|
||||
template <>
|
||||
@@ -107,6 +124,7 @@ inline char **getargv(kvm_t *kd, const kinfo_proc *pro
|
||||
{
|
||||
return kvm_getargv(kd, proc, 0);
|
||||
}
|
||||
+#endif
|
||||
#else
|
||||
typedef kinfo_proc2 Proc;
|
||||
|
Loading…
Reference in New Issue
Block a user