Update of /cvsroot/fink/dists/10.4/stable/main/finkinfo/utils
In directory vz-cvs-3.sog:/tmp/cvs-serv21679

Added Files:
        proctools.info proctools.patch 
Log Message:
New proctools package

--- NEW FILE: proctools.patch ---
diff -ru proctools-0.4pre1/pfind/pfind.c proctools-0.4pre1-patched/pfind/pfind.c
--- proctools-0.4pre1/pfind/pfind.c     2003-12-06 11:45:21.000000000 +0100
+++ proctools-0.4pre1-patched/pfind/pfind.c     2012-08-10 15:12:16.000000000 
+0200
@@ -434,11 +434,11 @@
 PFIND_EVAL(pfind_pri_any)
 {
        int result;
-       result = !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, 
NULL, NULL);
+       result = !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, 
NULL, 0);
        if (!result) {
                const char *args;
                args = getProcArgs(baton, proctoolslist);
-               result = args && !regexec(&(*expression)->optarg.re.r, args, 0, 
NULL, NULL);
+               result = args && !regexec(&(*expression)->optarg.re.r, args, 0, 
NULL, 0);
                /* do not free(args) */
        }
        (*expression)->parent->result = (*expression)->result = 
(*expression)->invert_after ^ result;
@@ -450,7 +450,7 @@
        const char *args;
        int result;
        args = getProcArgs(baton, proctoolslist);
-       result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, 
NULL);
+       result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, 
0);
        (*expression)->parent->result = (*expression)->result = 
(*expression)->invert_after ^ result;
        /* do not free(args) */
        return 0;
@@ -490,7 +490,7 @@
                        (*expression)->parent->result = (*expression)->result = 
(*expression)->invert_after ^ !strcmp(proctoolslist->name, 
(*expression)->optarg.str);
        }
        else {
-               (*expression)->parent->result = (*expression)->result = 
(*expression)->invert_after ^ !regexec(&(*expression)->optarg.re.r, 
proctoolslist->name, 0, NULL, NULL);
+               (*expression)->parent->result = (*expression)->result = 
(*expression)->invert_after ^ !regexec(&(*expression)->optarg.re.r, 
proctoolslist->name, 0, NULL, 0);
        }
        return 0;
 }
Only in proctools-0.4pre1-patched/pgrep: pgrep
Only in proctools-0.4pre1-patched: pgrep.1
diff -ru proctools-0.4pre1/proctools/fmt.c 
proctools-0.4pre1-patched/proctools/fmt.c
--- proctools-0.4pre1/proctools/fmt.c   2003-12-06 11:13:20.000000000 +0100
+++ proctools-0.4pre1-patched/proctools/fmt.c   2012-08-10 15:04:35.000000000 
+0200
@@ -7,7 +7,6 @@
 #include <sys/sysctl.h>
 #include <sys/user.h>
 
-#include <kvm.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -28,31 +27,6 @@
 }
 
 void
-fmt_argv(kd, ki)
-       kvm_t *kd;
-       struct kinfo_proc *ki;
-{
-       int left = -1; /* no termwidth! */
-       char **argv, **p;
-       if (kd != NULL) {
-               argv = kvm_getargv(kd, ki, 0);
-               if ((p = argv) != NULL) {
-                       while (*p) {
-                               fmt_puts(*p, &left);
-                               p++;
-                               fmt_putc(' ', &left);
-                       }
-               }
-       }
-       if (argv == NULL || argv[0] == '\0' ||
-               strcmp(cmdpart(argv[0]), ki->kp_proc.p_comm)) {
-               fmt_putc('(', &left);
-               fmt_puts(ki->kp_proc.p_comm, &left);
-               fmt_putc(')', &left);
-       }
-}
-
-void
 fmt_puts(s, leftp)
        char *s;
        int *leftp;
diff -ru proctools-0.4pre1/proctools/proctools.c 
proctools-0.4pre1-patched/proctools/proctools.c
--- proctools-0.4pre1/proctools/proctools.c     2003-12-06 12:41:26.000000000 
+0100
+++ proctools-0.4pre1-patched/proctools/proctools.c     2012-08-10 
15:06:47.000000000 +0200
@@ -23,7 +23,6 @@
 
 extern char *cmdpart(char *);
 extern void  fmt_puts(char *, int *);
-extern void  fmt_argv(kvm_t *kd, struct kinfo_proc *ki);
 
 static char  dbuf[DUMPBUFSZ];
 
@@ -919,7 +918,7 @@
                                                                matched = 
!strcmp(name, pattern);
                                                }
                                                else {
-                                                       matched = 
regexec(&regex, name, 0, NULL, NULL) == 0;
+                                                       matched = 
regexec(&regex, name, 0, NULL, 0) == 0;
                                                }
                                        }
                                        else {
@@ -960,7 +959,7 @@
                                                }
                                        }
                                        else
-                                               if (regexec(&regex, name, 0, 
NULL, NULL) == 0)
+                                               if (regexec(&regex, name, 0, 
NULL, 0) == 0)
                                                        
pushProcList(proctoolslist, kp);
                                }
                                else
@@ -995,7 +994,7 @@
                                                                matched = 
!strcmp(name, pattern);
                                                }
                                                else {
-                                                       matched = 
regexec(&regex, name, 0, NULL, NULL) == 0;
+                                                       matched = 
regexec(&regex, name, 0, NULL, 0) == 0;
                                                }
                                        }
                                        else {
@@ -1037,7 +1036,7 @@
                                                }
                                        }
                                        else
-                                               if (regexec(&regex, name, 0, 
NULL, NULL) == REG_NOMATCH)
+                                               if (regexec(&regex, name, 0, 
NULL, 0) == REG_NOMATCH)
                                                        
pushProcList(proctoolslist, kp);
                                }
                                else
diff -ru proctools-0.4pre1/proctools/proctools.h 
proctools-0.4pre1-patched/proctools/proctools.h
--- proctools-0.4pre1/proctools/proctools.h     2003-12-06 12:12:04.000000000 
+0100
+++ proctools-0.4pre1-patched/proctools/proctools.h     2012-08-10 
15:05:54.000000000 +0200
@@ -5,19 +5,9 @@
 
 #include <sys/cdefs.h>
 #include <stdio.h>
-#include <kvm.h>
 
-#if !defined(USE_KVM) && !defined(USE_SYSCTL)
-#      if defined(KVM_NO_FILES)
-#              define USE_KVM
-#              define USE_KVM_NO_FILES
-#      elif defined(KERN_PROCARGS2)
-#              define USE_SYSCTL
-#      else
-#              define USE_KVM
-/* without USE_KVM_NO_FILES */
-#      endif
-#endif
+
+#define USE_SYSCTL
 
 #ifndef TRUE
 #define TRUE (1)

--- NEW FILE: proctools.info ---
# DISCLAIMER: Max Horn is the sole maintainer of this package.
# Please DO NOT MAKE MODIFICATIONS without informing the maintainer.
# Preferably, send a patch to me instead of making changes yourself!
# If that is not possible due to extra urgency, at least send me a mail.
#
# Explanation: I am sick and tired of getting back to my packages and
# discovering that people have messed with it. I am then forced to
# retrace their steps, find out who, when and why did make a certain
# change etc. -- i.e. it makes my life as maintainer harder.
# Furthermore, as maintainer I am responsible for problems caused by my
# packages. But I am not willing to take responsibility for something I
# did not do. In particular, for changes that other people introduced
# behind my back, no matter how good and noble their intentions were. As
# such, I may see myself forced to drop responsibility for (and hence,
# maintainership of) the affected package.

Package: proctools
Version: 0.4pre1
Revision: 1
Maintainer: Max Horn <m...@quendi.de>

Source: mirror:sourceforge:%n/%n-%v.tar.gz
Source-MD5: 714e4350749c680a7806635632d524b1

PatchFile: %n.patch
PatchFile-MD5: b17c1d4f4c0913c2ed7fd8a9eed2480e

CompileScript: <<
#!/bin/bash -ex
cc -Wall -c -o proctools.o proctools/proctools.c
cc -Wall -c -o fmt.o proctools/fmt.c

for tool in pkill pfind pgrep ; do
  cc -Wall -c -o $tool.o $tool/$tool.c
  cc $tool.o proctools.o fmt.o -o $tool/$tool
  cd $tool && soelim $tool.1 > ../$tool.1 && cd ..
done
<<
InstallScript: <<
#!/bin/bash -ex
install -d %i/bin
install -d %i/share/man/man1

for tool in pkill pfind pgrep ; do
  install -m 0755 $tool/$tool %i/bin
  install -m 0644 $tool.1 %i/share/man/man1/
done
<<
DocFiles: README LICENSE
#
Description: Scan for and send signals to processes
DescDetail: <<
The proctools are text-based utilities to scan for and send signals
to processes. Includes pgrep, pkill and pfind for OpenBSD and Darwin.
<<
DescPackaging: <<
The included Makefile is for BSD Make, and not compatible with GNU Make.
To overcome this, we simply compile the source files directly.
<<
License: BSD
Homepage: http://proctools.sourceforge.net/


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to