diff options
author | jlam <jlam@pkgsrc.org> | 2001-06-09 04:32:13 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-06-09 04:32:13 +0000 |
commit | 76c9a0c91a3362418f74eafb09676f2f4415476c (patch) | |
tree | 1d1fcbd0f6f432632deee2758f5d8a041979fb2d /security/cfs | |
parent | 5841d452727c7efb40f30a43381f7fc14e30c388 (diff) | |
download | pkgsrc-76c9a0c91a3362418f74eafb09676f2f4415476c.tar.gz |
Add patches from Simon Burge <simonb@wasabisystems.com> to build cfs
without needing -traditional. This fixes socklen_t lossage mentioned in
the README.netbsd file. This was tested on i386 NetBSD-1.5 and -current.
Diffstat (limited to 'security/cfs')
-rw-r--r-- | security/cfs/Makefile | 31 | ||||
-rw-r--r-- | security/cfs/distinfo | 6 | ||||
-rw-r--r-- | security/cfs/files/unansi.sh | 22 | ||||
-rw-r--r-- | security/cfs/patches/patch-aa | 20 | ||||
-rw-r--r-- | security/cfs/patches/patch-ae | 22 | ||||
-rw-r--r-- | security/cfs/patches/patch-af | 11 |
6 files changed, 94 insertions, 18 deletions
diff --git a/security/cfs/Makefile b/security/cfs/Makefile index 6bf9d8a6add..bedb6e82d0c 100644 --- a/security/cfs/Makefile +++ b/security/cfs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2001/06/07 15:35:14 jlam Exp $ +# $NetBSD: Makefile,v 1.5 2001/06/09 04:32:13 jlam Exp $ DISTNAME= cfs-1.4.1 CATEGORIES= security @@ -26,11 +26,12 @@ CFS_SUBST+= cpasswd->cfs_passwd CPASSWD->CFS_PASSWD .include "../../mk/bsd.prefs.mk" +MAKE_ENV+= OPSYS="${OPSYS}" + # Required settings necessary to build CFS on various platforms. This is # copied from ${WRKSRC}/Makefile and from browsing the various README files. # .if ${OPSYS} == "NetBSD" -CFLAGS+= -traditional # uses strange preprocessor behaviour CFLAGS+= -DPROTOTYPES=1 CFLAGS+= -DBSD44 -DANYPORT -DCFS_PORT=2049 -DSHORTLINKS MAKE_ENV+= MAKE=${MAKE_PROGRAM} @@ -63,25 +64,27 @@ MAKE_ENV+= RPCOPTS="-k -b" CFS_BUILD_SCRIPT= ${WRKSRC}/make_with_bad_rpcgen .endif -CFS_SUBST_SED= ${CFS_SUBST:S/->/!/:S/$/!g/:S/^/ -e s!/} +CFS_SUBST_SED= ${CFS_SUBST:S/->/!/:S/$/!g/:S/^/ -e s!/} DOCDIR= ${PREFIX}/share/doc/cfs post-extract: - @${RM} -f ${WRKSRC}/esm.1 - @cd ${WRKSRC}; for file in *; do \ - ${MV} -f $${file} $${file}.orig; \ - dest=`${ECHO} $${file} | ${SED} ${CFS_SUBST_SED}`; \ - ${SED} ${CFS_SUBST_SED} $${file}.orig > $${dest}; \ - ${RM} -f $${file}.orig; \ - done + ${RM} -f ${WRKSRC}/esm.1 post-patch: - @${CHMOD} +x ${CFS_BUILD_SCRIPT} + cd ${WRKSRC}; for file in *; do \ + ${MV} -f $${file} $${file}.presubst; \ + dest=`${ECHO} $${file} | ${SED} ${CFS_SUBST_SED}`; \ + ${SED} ${CFS_SUBST_SED} $${file}.presubst > $${dest}; \ + ${RM} -f $${file}.presubst; \ + done + ${CHMOD} +x ${CFS_BUILD_SCRIPT} -do-build: - cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} \ - ${SH} ${CFS_BUILD_SCRIPT} ${ALL_TARGET} +pre-build: + ${SED} -e "s|@AWK@|${AWK}|g" \ + -e "s|@MV@|${MV}|g" \ + ${FILESDIR}/unansi.sh > ${WRKSRC}/unansi + ${CHMOD} +x ${WRKSRC}/unansi pre-install: ${SED} -e "s|@PREFIX@|${PREFIX}|g" \ diff --git a/security/cfs/distinfo b/security/cfs/distinfo index 6a8d0f52f50..fe48580e5c9 100644 --- a/security/cfs/distinfo +++ b/security/cfs/distinfo @@ -1,8 +1,10 @@ -$NetBSD: distinfo,v 1.3 2001/06/07 15:35:14 jlam Exp $ +$NetBSD: distinfo,v 1.4 2001/06/09 04:32:14 jlam Exp $ SHA1 (cfs-1.4.1.tar.gz) = be3f73b233149477b739456498c71b120d5f2fb5 Size (cfs-1.4.1.tar.gz) = 98943 bytes -SHA1 (patch-aa) = ab443ca956c48d186072acb3042d36966dbc105a +SHA1 (patch-aa) = 7cb790ac11d0626728db113ad8cccb11bd72d75d SHA1 (patch-ab) = 1ff2d2e32b87332ec66cc8f01299fa4b1ddac81a SHA1 (patch-ac) = 354290ff606fab97b73980e6e512f10ef1397f01 SHA1 (patch-ad) = 2ed5967d59d8f91948b2dd9ed4b18c5073d63615 +SHA1 (patch-ae) = 68b440cda27353d1035bae3002a83d8131087a24 +SHA1 (patch-af) = 19bbedcf0c37356dab747087c64617608ff91838 diff --git a/security/cfs/files/unansi.sh b/security/cfs/files/unansi.sh new file mode 100644 index 00000000000..58a83b555b0 --- /dev/null +++ b/security/cfs/files/unansi.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# +# We need to disable ANSI prototypes for the rpcgen'd functions because of +# the way the build script redefines some functions in terms of other +# functions which have different prototypes. + +case $1 in +NetBSD) + set -e + @AWK@ ' + /__STDC__/ { last = NR - 1 } + { lines[linec++] = $0 } + END { + gsub("__STDC__", "__STDC__XXX", lines[last]); + for (i = 0; i < linec; i++) + print lines[i] + }' < $2 > $2.tmp + @MV@ -f $2.tmp $2 + ;; +*) + ;; +esac diff --git a/security/cfs/patches/patch-aa b/security/cfs/patches/patch-aa index a23447df2cf..db8b2499343 100644 --- a/security/cfs/patches/patch-aa +++ b/security/cfs/patches/patch-aa @@ -1,7 +1,7 @@ -$NetBSD: patch-aa,v 1.3 2001/06/07 15:35:15 jlam Exp $ +$NetBSD: patch-aa,v 1.4 2001/06/09 04:32:14 jlam Exp $ --- Makefile.orig Thu May 3 11:29:21 2001 -+++ Makefile Thu Jun 7 07:28:23 2001 ++++ Makefile Fri Jun 8 21:15:13 2001 @@ -74,18 +74,19 @@ #CC=cc #COPT=-O -DNOT_ANSI_C -DPROTOTYPES=0 @@ -37,3 +37,19 @@ $NetBSD: patch-aa,v 1.3 2001/06/07 15:35:15 jlam Exp $ # now you're done with local configuration. +@@ -322,6 +323,7 @@ + + nfsproto.h: nfsproto.x + rpcgen $(RPCOPTS) -h -o nfsproto.h nfsproto.x ++ ./unansi ${OPSYS} nfsproto.h + + admproto_xdr.c: admproto.x + rpcgen $(RPCOPTS) -c -o admproto_xdr.c admproto.x +@@ -331,6 +333,7 @@ + + admproto.h: admproto.x + rpcgen $(RPCOPTS) -h -o admproto.h admproto.x ++ ./unansi ${OPSYS} admproto.h + + admproto_clnt.c: admproto.x + rpcgen $(RPCOPTS) -l -o admproto_clnt.c admproto.x diff --git a/security/cfs/patches/patch-ae b/security/cfs/patches/patch-ae new file mode 100644 index 00000000000..79aec8194e3 --- /dev/null +++ b/security/cfs/patches/patch-ae @@ -0,0 +1,22 @@ +$NetBSD: patch-ae,v 1.1 2001/06/09 04:32:14 jlam Exp $ + +--- cfs_adm.c.orig Mon Dec 25 01:41:30 1995 ++++ cfs_adm.c Fri Jun 8 21:14:35 2001 +@@ -43,7 +43,7 @@ + cfsstat * + admproc_attach_2(ap,rp) + cfs_attachargs *ap; +- SR *rp; ++ SR rp; + { + static cfsstat ret; + int i; +@@ -156,7 +156,7 @@ + cfsstat * + admproc_detach_2(ap,rp) + cfs_detachargs *ap; +- SR *rp; ++ SR rp; + { + static cfsstat ret; + int i; diff --git a/security/cfs/patches/patch-af b/security/cfs/patches/patch-af new file mode 100644 index 00000000000..987d47ab238 --- /dev/null +++ b/security/cfs/patches/patch-af @@ -0,0 +1,11 @@ +$NetBSD: patch-af,v 1.1 2001/06/09 04:32:14 jlam Exp $ + +--- cfs.h.orig Wed Dec 3 13:31:31 1997 ++++ cfs.h Fri Jun 8 21:13:28 2001 +@@ -224,4 +224,5 @@ + #define d_fileno d_ino + */ + #endif +-#include<stdlib.h> ++#include <stdlib.h> ++#include <string.h> |