summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2002-12-20 18:15:52 +0000
committerschmonz <schmonz@pkgsrc.org>2002-12-20 18:15:52 +0000
commitf2197af27c6a2266e744b0dd4343ad461b18e3b0 (patch)
treea444a7dc46870dc29c979e88a94b707aecfd0e39 /pkgtools
parent55c0604b89b34ae6d16219723abcde3111975fed (diff)
downloadpkgsrc-f2197af27c6a2266e744b0dd4343ad461b18e3b0.tar.gz
As the sources are now in ${FILESDIR}, there's no distfile to fetch,
and the "do-extract" target copies the sources into ${WRKSRC}. We automagically determine VERSION by inspecting ${FILESDIR}/lib/version.h. Thanks to autoconf, all the patches and almost all of the cruftulent ${OPSYS}-specific stuff in the Makefile are gone.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/DESCR8
-rw-r--r--pkgtools/pkg_install/Makefile76
-rw-r--r--pkgtools/pkg_install/distinfo14
-rw-r--r--pkgtools/pkg_install/patches/patch-aa23
-rw-r--r--pkgtools/pkg_install/patches/patch-ab13
-rw-r--r--pkgtools/pkg_install/patches/patch-ac16
-rw-r--r--pkgtools/pkg_install/patches/patch-ad44
-rw-r--r--pkgtools/pkg_install/patches/patch-ae39
-rw-r--r--pkgtools/pkg_install/patches/patch-af14
-rw-r--r--pkgtools/pkg_install/patches/patch-ag16
-rw-r--r--pkgtools/pkg_install/patches/patch-ah75
-rw-r--r--pkgtools/pkg_install/patches/patch-ai71
-rw-r--r--pkgtools/pkg_install/patches/patch-aj16
13 files changed, 28 insertions, 397 deletions
diff --git a/pkgtools/pkg_install/DESCR b/pkgtools/pkg_install/DESCR
index 7669b9e955e..31d349ff13c 100644
--- a/pkgtools/pkg_install/DESCR
+++ b/pkgtools/pkg_install/DESCR
@@ -1,4 +1,4 @@
-This is a copy of NetBSD-current's pkg_* tools in a format which is
-able to be installed as a package. They simply replace the tools in
-/usr/sbin, but don't register themselves as a package, so that no
-de-installation can take place.
+This is a copy of NetBSD-current's pkg_* tools in a format which
+is able to be installed as a package. To prevent deinstallation,
+they don't register themselves as a package. On NetBSD, they simply
+replace the tools in /usr/sbin.
diff --git a/pkgtools/pkg_install/Makefile b/pkgtools/pkg_install/Makefile
index f8a910cfabb..84a2137245c 100644
--- a/pkgtools/pkg_install/Makefile
+++ b/pkgtools/pkg_install/Makefile
@@ -1,77 +1,49 @@
-# $NetBSD: Makefile,v 1.57 2002/12/12 01:50:47 hubertf Exp $
+# $NetBSD: Makefile,v 1.58 2002/12/20 18:15:52 schmonz Exp $
-# Note to package maintainers:
+# Notes to package maintainers:
#
-# To update the distfile of this pkg, cd to /usr/src/usr.sbin,
-# edit PKGTOOLS_VERSION in lib/version.h to `date +%Y%m%d`, do
-# "tar pzvcf pkg_install-`date +%Y%m%d`.tar.gz pkg_install" and upload
-# that file to ${MASTER_SITE_LOCAL}.
+# To update this package, import from src/usr.sbin/pkg_install.
#
-# XXX Modify PKGTOOLS_REQD value in pkgsrc/mk/bsd.pkg.mk to the new
-# value ONLY(!) if there is a critical change in the pkg_* tools that
-# bsd.pkg.mk and friends rely on.
+# Updating this package does not automatically necessitate bumping
+# PKGTOOLS_REQD in bsd.pkg.mk. Do so if and only if there is a critical
+# change in the pkg_* tools that pkgsrc relies on for proper operation.
-DISTNAME= pkg_install-20021123
+DISTNAME= pkg_install-${VERSION}
CATEGORIES= pkgtools
-MASTER_SITES= ${MASTER_SITE_LOCAL}
+MASTER_SITES= # empty
+DISTFILES= # empty
MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.netbsd.org/
COMMENT= NetBSD-current's pkg_* tools
-# No special options needed for IPv6 support
WRKSRC= ${WRKDIR}/pkg_install
-MAKE_ENV+= BINDIR=/usr/sbin MANDIR=/usr/share/man NOLINT=1
-NO_CONFIGURE= yes
-NO_MTREE= yes
-NO_PKG_REGISTER= yes
-NO_PACKAGE= No package registration is done
-MANCOMPRESSED_IF_MANZ= yes
+
+GNU_CONFIGURE= # defined
+CONFIGURE_ARGS+= --with-pkgdbdir=${PKG_DBDIR}
+
+NO_CHECKSUM= # defined
+NO_PATCH= # defined
+NO_MTREE= # defined
+NO_PKG_REGISTER= # defined
+NO_PACKAGE= Deinstallation is not permitted
+MANCOMPRESSED_IF_MANZ= # defined
BUILD_DEFS+= MANINSTALL
.include "../../mk/bsd.prefs.mk"
-.if ${OPSYS} == "SunOS" || ${OPSYS} == "Linux"
-SHLOCK:= ${LOCALBASE}/bin/shlock
-.endif
+VERSION!= ${AWK} -F '"' '/PKGTOOLS_VERSION/ {print $$2}' \
+ ${FILESDIR}/lib/version.h
-LOCALBASE:= ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
+LOCALBASE:= ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
PKG_DBDIR?= /var/db/pkg
.if ${OPSYS} == "NetBSD" && !exists(/usr/share/tmac/tmac.andoc)
PKG_FAIL_REASON+= "You need to have the 'text' set installed to build this package!"
.endif
-.if ${OPSYS} == "SunOS"
-MAKEFLAGS+= NETBSD_COMPATIBLE=YES
-MANINSTALL=
-MAKE_ENV+= MANINSTALL= MKMAN=no NOMAN=YES
-MAKE_ENV+= ZOULARISBASE=${ZOULARISBASE}
-.endif
-
-.if ${OPSYS} == "OpenBSD"
-CPPFLAGS+= -D__COPYRIGHT\(x\)=\; -D__RCSID\(x\)=\;
-MAKE_ENV+= BINGRP=${BINGRP} BINOWN=${BINOWN}
-MAKE_ENV+= BINDIR=${PKG_TOOLS_BIN}
-MAKE_ENV+= MANDIR=${PKG_TOOLS_BIN}/../man
-.endif
-
-.if ${OPSYS} == "Linux"
-MAKE_ENV+= DIGESTDIR=${.CURDIR}/../digest/files
-CPPFLAGS+= -I${DIGESTDIR} -I${DIGESTDIR}
-CPPFLAGS+= -D__COPYRIGHT\(x\)=\; -D__RCSID\(x\)=\;
-MAKE_ENV+= BINGRP=${BINGRP} BINOWN=${BINOWN}
-MAKE_ENV+= BINDIR=${PKG_TOOLS_BIN}
-MAKE_ENV+= MANDIR=${PKG_TOOLS_BIN}/../man
-.endif
-
-.if ${OPSYS} == "Darwin"
-MAKE_ENV+= DIGESTDIR=${.CURDIR}/../digest/files
-CPPFLAGS+= -I${DIGESTDIR} -I${DIGESTDIR}
-MAKE_ENV+= BINGRP=${BINGRP} BINOWN=${BINOWN}
-MAKE_ENV+= BINDIR=${PKG_TOOLS_BIN}
-MAKE_ENV+= MANDIR=${PKG_TOOLS_BIN}/../man
-.endif
+do-extract:
+ @${CP} -Rp ${FILESDIR} ${WRKSRC}
post-install:
if [ ! -f ${PKG_DBDIR}/pkgdb.byfile.db ]; then \
diff --git a/pkgtools/pkg_install/distinfo b/pkgtools/pkg_install/distinfo
deleted file mode 100644
index 978da4472ad..00000000000
--- a/pkgtools/pkg_install/distinfo
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: distinfo,v 1.24 2002/11/23 23:14:40 wiz Exp $
-
-SHA1 (pkg_install-20021123.tar.gz) = 7c67cfd6a6fc3d9b4c6835a7f3e8652637c5597f
-Size (pkg_install-20021123.tar.gz) = 83299 bytes
-SHA1 (patch-aa) = 97e9444d5dff2d614da27c61e0a333768a3e7382
-SHA1 (patch-ab) = 0b5effbb41b34f96877d3f9494d6cf5054795414
-SHA1 (patch-ac) = fb24ffdc0fbf4ca85d588afcfac39a960b763706
-SHA1 (patch-ad) = ae78ead382ee34455c0dcf5e2055be3cf5de8e48
-SHA1 (patch-ae) = 1e9ca0cd01c27337fb7ad688b16775cea325d7e6
-SHA1 (patch-af) = b1d9ce8d3c3e592a67db7ac9676a72317a1485c5
-SHA1 (patch-ag) = e30435f0a626a893934c725c605486a145e27690
-SHA1 (patch-ah) = ae0cee4e6f6efd740fc0d4288f8f71dd0039a913
-SHA1 (patch-ai) = 9636b51fdc386cd445684a934f5f77a6612c6bca
-SHA1 (patch-aj) = f87df801155e859bc61e045c13f6b12e25692cf2
diff --git a/pkgtools/pkg_install/patches/patch-aa b/pkgtools/pkg_install/patches/patch-aa
deleted file mode 100644
index 5dadc23537a..00000000000
--- a/pkgtools/pkg_install/patches/patch-aa
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-aa,v 1.11 2002/11/23 22:49:48 jschauma Exp $
-
---- Makefile.inc.orig Sat Nov 23 17:37:17 2002
-+++ Makefile.inc Sat Nov 23 17:39:38 2002
-@@ -3,6 +3,9 @@
-
- .include <bsd.own.mk>
-
-+.if !defined(PRINTOBJDIR)
-+PRINTOBJDIR= printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -B -s -f-
-+.endif
- LIBINSTALL != cd ${.CURDIR}/../lib && ${PRINTOBJDIR}
- CPPFLAGS+=-I${.CURDIR}/../lib ${DEBUG} -DBINDIR='"${BINDIR}"'
-
-@@ -29,7 +32,7 @@
- #CHMOD_CMD?= /bin/chmod
- #CHOWN_CMD?= /usr/sbin/chown
- #CHGRP_CMD?= /usr/bin/chgrp
--WARNS=2
-+WARNS=1
-
- #CPPFLAGS+= -DCHMOD_CMD='"${CHMOD_CMD}"' -DCHOWN_CMD='"${CHOWN_CMD}"'
- #CPPFLAGS+= -DCHGRP_CMD='"${CHGRP_CMD}"'
diff --git a/pkgtools/pkg_install/patches/patch-ab b/pkgtools/pkg_install/patches/patch-ab
deleted file mode 100644
index 00b6baf6d32..00000000000
--- a/pkgtools/pkg_install/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ab,v 1.6 2002/07/03 22:43:40 abs Exp $
-
---- Makefile.orig Tue Jan 9 03:13:43 2001
-+++ Makefile
-@@ -2,5 +2,7 @@
- # Original from FreeBSD, no rcs id.
-
--SUBDIR=lib .WAIT add admin create delete info
-+SUBDIR=lib add admin create delete info
-+
-+all-add all-admin all-create all-delete all-info: all-lib
-
- .include <bsd.subdir.mk>
diff --git a/pkgtools/pkg_install/patches/patch-ac b/pkgtools/pkg_install/patches/patch-ac
deleted file mode 100644
index 1cc2aedec54..00000000000
--- a/pkgtools/pkg_install/patches/patch-ac
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ac,v 1.5 2002/08/01 09:31:16 martti Exp $
-
---- add/perform.c.orig Thu Aug 1 10:46:30 2002
-+++ add/perform.c Thu Aug 1 10:56:47 2002
-@@ -182,7 +182,11 @@
- goto bomb;
- }
- }
-+#ifdef TAR_MISSING_FAST_READ
-+ (void) snprintf(extract_contents, sizeof(extract_contents), "%s", CONTENTS_FNAME);
-+#else
- (void) snprintf(extract_contents, sizeof(extract_contents), "--fast-read %s", CONTENTS_FNAME);
-+#endif
- extract = extract_contents;
- } else {
- /* some values for stdin */
diff --git a/pkgtools/pkg_install/patches/patch-ad b/pkgtools/pkg_install/patches/patch-ad
deleted file mode 100644
index 61af3681742..00000000000
--- a/pkgtools/pkg_install/patches/patch-ad
+++ /dev/null
@@ -1,44 +0,0 @@
-$NetBSD: patch-ad,v 1.8 2002/11/23 23:14:41 wiz Exp $
-
---- lib/Makefile.orig Wed Sep 18 15:31:55 2002
-+++ lib/Makefile
-@@ -2,4 +2,19 @@
- # Original from FreeBSD, no rcs id.
-
-+OPSYS!= uname -s
-+RELEASE!= uname -r
-+
-+.if ${OPSYS} == "Darwin"
-+SRCS+= md5c.c md5hl.c strlcpy.c
-+.endif
-+
-+.if ${OPSYS} == "Linux"
-+SRCS+= fgetln.c md5c.c md5hl.c strlcpy.c
-+.endif
-+
-+.if ${OPSYS} == "NetBSD" && (${RELEASE:M1.4.[12]} != "" || ${RELEASE:M1.4} != "")
-+SRCS+= strlcpy.c
-+.endif
-+
- NOLINT= # defined
- NOMAN= # defined
-@@ -7,4 +22,9 @@ NOPIC= # defined
- NOPROFILE= # defined
-
-+MKLINT= no
-+MKMAN= no
-+MKPIC= no
-+MKPROFILE= no
-+
- LIB+= install
- SRCS+= exec.c file.c ftpio.c global.c lpkg.c pen.c pkgdb.c \
-@@ -12,5 +32,9 @@ SRCS+= exec.c file.c ftpio.c global.c l
-
- # only needed during build - prevent installation of library
-+.if ${OPSYS} == "Darwin"
-+install::
-+.else
- libinstall::
-+.endif
-
- version.o: version.h version.c
diff --git a/pkgtools/pkg_install/patches/patch-ae b/pkgtools/pkg_install/patches/patch-ae
deleted file mode 100644
index 015d3f685e2..00000000000
--- a/pkgtools/pkg_install/patches/patch-ae
+++ /dev/null
@@ -1,39 +0,0 @@
-$NetBSD: patch-ae,v 1.4 2002/09/23 12:57:27 abs Exp $
-
---- lib/lib.h.orig Thu Aug 1 09:46:31 2002
-+++ lib/lib.h Mon Sep 23 13:50:19 2002
-@@ -40,6 +40,10 @@
-
- #include "path.h"
-
-+#if defined(__NetBSD__) && (__NetBSD_Version__ < 104000300)
-+size_t strlcpy(char *, const char *, size_t);
-+#endif
-+
- /* Macros */
- #define SUCCESS (0)
- #define FAIL (-1)
-@@ -109,10 +113,11 @@
- #define PKG_PATTERN_MAX FILENAME_MAX /* max length of pattern, including nul */
- #define PKG_SUFFIX_MAX 10 /* max length of suffix, including nul */
-
--/* This should only happen on 1.3 and 1.3.1, not 1.3.2 and up */
-+/* For NetBSD 1.3.1 and earlier, and some non NetBSD systems */
- #ifndef TAILQ_FIRST
- #define TAILQ_FIRST(head) ((head)->tqh_first)
- #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
-+#define TAILQ_HEAD_INITIALIZER(head) { NULL, &(head).tqh_first }
- #endif
-
-
-@@ -281,6 +286,10 @@
- /* For all */
- int pkg_perform(lpkg_head_t *);
-
-+#ifdef FGETLN_MISSING
-+char *fgetln(FILE *, size_t *);
-+#endif
-+
- /* Externs */
- extern Boolean Verbose;
- extern Boolean Fake;
diff --git a/pkgtools/pkg_install/patches/patch-af b/pkgtools/pkg_install/patches/patch-af
deleted file mode 100644
index 75340c8ebf1..00000000000
--- a/pkgtools/pkg_install/patches/patch-af
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-af,v 1.1 2002/07/03 22:43:41 abs Exp $
-
---- lib/pen.c.orig Fri Jan 5 03:27:28 2001
-+++ lib/pen.c
-@@ -34,6 +34,9 @@
- #include <sys/signal.h>
- #include <sys/param.h>
- #include <sys/mount.h>
-+#ifdef __linux__
-+#include <sys/vfs.h>
-+#endif
-
- /* For keeping track of where we are */
- static char Current[FILENAME_MAX];
diff --git a/pkgtools/pkg_install/patches/patch-ag b/pkgtools/pkg_install/patches/patch-ag
deleted file mode 100644
index 8096c065eb0..00000000000
--- a/pkgtools/pkg_install/patches/patch-ag
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2002/07/03 22:43:41 abs Exp $
-
---- lib/pkgdb.c.orig Sun Sep 16 17:34:45 2001
-+++ lib/pkgdb.c
-@@ -35,7 +35,11 @@
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-+#ifdef __linux__
-+#include <db1/db.h>
-+#else
- #include <db.h>
-+#endif
- #include <err.h>
- #include <errno.h>
- #include <fcntl.h>
diff --git a/pkgtools/pkg_install/patches/patch-ah b/pkgtools/pkg_install/patches/patch-ah
deleted file mode 100644
index cdbdaaf0322..00000000000
--- a/pkgtools/pkg_install/patches/patch-ah
+++ /dev/null
@@ -1,75 +0,0 @@
-$NetBSD: patch-ah,v 1.2 2002/07/05 13:14:24 wiz Exp $
-
---- lib/fgetln.c.orig Fri Jul 5 15:12:30 2002
-+++ lib/fgetln.c
-@@ -0,0 +1,70 @@
-+/*
-+ * Copyright 1999 Luke Mewburn <lukem@netbsd.org>.
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the author may not be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include "lib.h"
-+#include <err.h>
-+
-+#define BUFCHUNKS BUFSIZ
-+
-+char *
-+fgetln(FILE *fp, size_t *len)
-+{
-+ static char *buf;
-+ static size_t bufsize;
-+ size_t buflen;
-+ char curbuf[BUFCHUNKS];
-+ char *p;
-+
-+ if (buf == NULL) {
-+ bufsize = BUFCHUNKS;
-+ buf = (char *)malloc(bufsize);
-+ if (buf == NULL)
-+ err(1, "Unable to allocate buffer for fgetln()");
-+ }
-+
-+ *buf = '\0';
-+ buflen = 0;
-+ while ((p = fgets(curbuf, sizeof(curbuf), fp)) != NULL) {
-+ size_t l;
-+
-+ l = strlen(p);
-+ if (bufsize < buflen + l) {
-+ bufsize += BUFCHUNKS;
-+ if ((buf = (char *)realloc(buf, bufsize)) == NULL)
-+ err(1, "Unable to allocate %ld bytes of memory",
-+ (long)bufsize);
-+ }
-+ strcpy(buf + buflen, p);
-+ buflen += l;
-+ if (p[l - 1] == '\n')
-+ break;
-+ }
-+ if (p == NULL && *buf == '\0')
-+ return (NULL);
-+ *len = strlen(buf);
-+ return (buf);
-+}
diff --git a/pkgtools/pkg_install/patches/patch-ai b/pkgtools/pkg_install/patches/patch-ai
deleted file mode 100644
index 562dc7d2e1e..00000000000
--- a/pkgtools/pkg_install/patches/patch-ai
+++ /dev/null
@@ -1,71 +0,0 @@
-$NetBSD: patch-ai,v 1.2 2002/08/06 11:51:02 wiz Exp $
-
---- lib/strlcpy.c.orig Mon Aug 5 18:09:56 2002
-+++ lib/strlcpy.c
-@@ -0,0 +1,66 @@
-+/*
-+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the author may not be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <sys/types.h>
-+#include <assert.h>
-+#include <string.h>
-+
-+size_t strlcpy(char *, const char *, size_t);
-+
-+/*
-+ * Copy src to string dst of size siz. At most siz-1 characters
-+ * will be copied. Always NUL terminates (unless siz == 0).
-+ * Returns strlen(src); if retval >= siz, truncation occurred.
-+ */
-+size_t
-+strlcpy(dst, src, siz)
-+ char *dst;
-+ const char *src;
-+ size_t siz;
-+{
-+ char *d = dst;
-+ const char *s = src;
-+ size_t n = siz;
-+
-+ /* Copy as many bytes as will fit */
-+ if (n != 0 && --n != 0) {
-+ do {
-+ if ((*d++ = *s++) == 0)
-+ break;
-+ } while (--n != 0);
-+ }
-+
-+ /* Not enough room in dst, add NUL and traverse rest of src */
-+ if (n == 0) {
-+ if (siz != 0)
-+ *d = '\0'; /* NUL-terminate dst */
-+ while (*s++)
-+ ;
-+ }
-+
-+ return(s - src - 1); /* count does not include NUL */
-+}
diff --git a/pkgtools/pkg_install/patches/patch-aj b/pkgtools/pkg_install/patches/patch-aj
deleted file mode 100644
index c170266695a..00000000000
--- a/pkgtools/pkg_install/patches/patch-aj
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-aj,v 1.2 2002/11/23 22:49:48 jschauma Exp $
-
---- lib/path.h.orig Sat Nov 23 17:44:03 2002
-+++ lib/path.h Sat Nov 23 17:44:59 2002
-@@ -38,3 +38,11 @@
- void path_prepend_from_pkgname(const char *);
- void path_prepend_clear(void);
- void path_setenv(const char *);
-+
-+#ifndef TAILQ_FOREACH
-+#define TAILQ_FOREACH(var, head, field) \
-+ for ((var) = ((head)->tqh_first); \
-+ (var); \
-+ (var) = ((var)->field.tqe_next))
-+#endif
-+