pkgsrc-Bugs archive

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

pkg/36788: sysutils/skill: please update to 4.1.4, plus build on freebsd/linux



>Number:         36788
>Category:       pkg
>Synopsis:       sysutils/skill: update to 4.1.4, and make this build on linux 
>and freebsd too
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 15 11:10:00 +0000 2007
>Originator:     Yakovetsky Vladimir
>Release:        
>Environment:
System: FreeBSD solo.x.ua 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #0: Sun Aug 12 
18:14:48 EEST 2007 yx%solo.x.ua@localhost:/usr/obj/usr/src/sys/solo i386

>Description:
        sysutils/skill:
        update to 4.1.4, and make this build on linux and freebsd too
        (it is checked on freebsd-6.2 and linux-2.6.21)

>How-To-Repeat:

>Fix:
        - update Makefile to 4.1.4
        - regenerate previous patches (-aa, -ab)
        - add FreeBSD/nbsd-44 and Linux/linux-1 lines in Makefile
        - suppress annoying warnings (patch-ac)

--- sysutils/skill/Makefile.~1~
+++ sysutils/skill/Makefile
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.22 2007/01/07 09:14:13 rillig Exp $
 #
 
-DISTNAME=      skill-4.1.1
+DISTNAME=      skill-4.1.4
 CATEGORIES=    sysutils
 MASTER_SITES=  ftp://ftp.flux.utah.edu/pub/skill/
 EXTRACT_SUFX=  .tgz
@@ -24,6 +24,11 @@
 .elif ${OPSYS} == "SunOS"
 BINMODE=       02555
 MAKE_ENV+=     OSTYPE=sys-5r4 BINGRP=sys CPPFLAGS=
+.elif ${OPSYS} == "FreeBSD"
+MAKE_ENV+=     OSTYPE=nbsd-44
+.elif ${OPSYS} == "Linux"
+MAKE_ENV+=     OSTYPE=linux-1
+CPPFLAGS+=     -DHAS_STRERROR=1
 .endif
 
 pre-install:


:r /usr/pkgsrc/sysutils/skill/patches/patch-aa
--- Makefile.orig
+++ Makefile
@@ -62,15 +62,15 @@
 
 # CONFIGURE: Set location of executable, it's group and mode.
 BINDIR=        ${PREFIX}/bin
-BINGRP=        wheel
-BINMOD=        555
+#BINGRP=       wheel
+#BINMOD=       555
 
 # CONFIGURE: Set location of man directory and man page suffix.
 MANDIR=        ${PREFIX}/man/man1
 MANSFX=        1
 
 # CONFIGURE(Config): Select an OSTYPE for your machine from the list above.
-OSTYPE=        nbsd-44
+#OSTYPE=       nbsd-44
 
 # CONFIGURE(Config): Add any OS-specific options here.
 COPTS= 
@@ -82,7 +82,7 @@
 OBJS=  main.o argparse.o getproc.o
 HDRS=  conf.h
 
-CFLAGS=        -O ${COPTS}
+CFLAGS+=${COPTS}
 
 all:   skill
 
@@ -96,23 +96,23 @@
 ${OBJS}: ${HDRS}
 
 install: skill
-       -test -d ${DESTDIR}/${BINDIR} || mkdir -p -m 755 ${DESTDIR}/${BINDIR}
-       -test -d ${DESTDIR}/${MANDIR} || mkdir -p -m 755 ${DESTDIR}/${MANDIR}
+#      -test -d ${DESTDIR}/${BINDIR} || mkdir -p -m 755 ${DESTDIR}/${BINDIR}
+#      -test -d ${DESTDIR}/${MANDIR} || mkdir -p -m 755 ${DESTDIR}/${MANDIR}
 #(SysV)        filepriv -d ${DESTDIR}/${BINDIR}/skill
-       rm -f ${DESTDIR}/${BINDIR}/skill ${DESTDIR}/${MANDIR}/skill.${MANSFX}
-       rm -f ${DESTDIR}/${BINDIR}/snice ${DESTDIR}/${MANDIR}/snice.${MANSFX}
+#      rm -f ${DESTDIR}/${BINDIR}/skill ${DESTDIR}/${MANDIR}/skill.${MANSFX}
+#      rm -f ${DESTDIR}/${BINDIR}/snice ${DESTDIR}/${MANDIR}/snice.${MANSFX}
 #      install -c -g ${BINGRP} -m ${BINMOD} -s skill ${DESTDIR}/${BINDIR}
-       cp skill ${DESTDIR}/${BINDIR}/skill
-       strip ${DESTDIR}/${BINDIR}/skill
-       chgrp ${BINGRP} ${DESTDIR}/${BINDIR}/skill
-       chmod ${BINMOD} ${DESTDIR}/${BINDIR}/skill
-       ln ${DESTDIR}/${BINDIR}/skill ${DESTDIR}/${BINDIR}/snice
+#      cp skill ${DESTDIR}/${BINDIR}/skill
+#      strip ${DESTDIR}/${BINDIR}/skill
+#      chgrp ${BINGRP} ${DESTDIR}/${BINDIR}/skill
+#      chmod ${BINMOD} ${DESTDIR}/${BINDIR}/skill
+#      ln ${DESTDIR}/${BINDIR}/skill ${DESTDIR}/${BINDIR}/snice
 #(SysV)        filepriv -f dacread ${DESTDIR}/${BINDIR}/skill
 #      install -c -m 644 skill.1 ${DESTDIR}/${MANDIR}/skill.${MANSFX}
-       cp skill.1 ${DESTDIR}/${MANDIR}/skill.${MANSFX}
-       chmod 644 ${DESTDIR}/${MANDIR}/skill.${MANSFX}
-       ln ${DESTDIR}/${MANDIR}/skill.${MANSFX}\
-               ${DESTDIR}/${MANDIR}/snice.${MANSFX}
+#      cp skill.1 ${DESTDIR}/${MANDIR}/skill.${MANSFX}
+#      chmod 644 ${DESTDIR}/${MANDIR}/skill.${MANSFX}
+#      ln ${DESTDIR}/${MANDIR}/skill.${MANSFX}\
+#              ${DESTDIR}/${MANDIR}/snice.${MANSFX}
 
 config Config: FRC
        ./Config


:r /usr/pkgsrc/sysutils/skill/patches/patch-ab
--- main.c.orig
+++ main.c
@@ -46,7 +46,14 @@
 #include <stdio.h>
 #include <errno.h>
 #include <pwd.h>
+#ifdef __NetBSD__
+#include <sys/sysctl.h>
+#endif
 
+#ifndef KI_MAXCOMLEN   /* Pre NetBSD/1.5.  Missing on !NetBSD */
+#define KI_MAXCOMLEN   24
+#endif
+ 
 /*
  * Processes which could not be checked -- usually due to permission
  * problems (SunOS 4.1, SysVR4) -- are tallied in "MissedProcCnt".
@@ -137,7 +144,7 @@
                        for (i = 0; i < CmdIndx; i++) {
                                cmdp = (CmdList + i);
                                if ((cmdp->flags & CMD_FLAG_EXACT) != 0 &&
-                                               STREQU(CMD, cmdp->cmd.cmdstr))
+                                               STRNEQU(CMD, cmdp->cmd.cmdstr, 
KI_MAXCOMLEN-8))
                                        break;
                                else if ((cmdp->flags & CMD_FLAG_REGEX) != 0 &&
                                                RegexMatch(CMD, cmdp) != 0)


:r /usr/pkgsrc/sysutils/skill/patches/patch-ac
--- argparse.c.~1~
+++ argparse.c
@@ -29,6 +29,9 @@
 #undef NO_AEXTERN
 
 #include <stdio.h>
+#ifdef __STDC__
+#include <stdlib.h>
+#endif
 #include <ctype.h>
 #include <pwd.h>
 
--- main.c.~1~
+++ main.c
@@ -44,6 +44,9 @@
 #include "conf.h"
 
 #include <stdio.h>
+#ifdef __STDC__
+#include <stdlib.h>
+#endif
 #include <errno.h>
 #include <pwd.h>
 #ifdef __NetBSD__




Home | Main Index | Thread Index | Old Index