summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-08-25 18:38:05 +0000
committerjlam <jlam@pkgsrc.org>2002-08-25 18:38:05 +0000
commite2afa97f51a1f72e6618533019aaaae07b7d3cf2 (patch)
treed2b31bb9a6a069ebfb63079b9dddde1e6688bc4b /devel
parente97ad43756dc8382d2c6cb8a7ae09be0eb540f67 (diff)
downloadpkgsrc-e2afa97f51a1f72e6618533019aaaae07b7d3cf2.tar.gz
Merge changes in packages from the buildlink2 branch that have
buildlink2.mk files back into the main trunk. This provides sufficient buildlink2 infrastructure to start merging other packages from the buildlink2 branch that have already been converted to use the buildlink2 framework.
Diffstat (limited to 'devel')
-rw-r--r--devel/boehm-gc/Makefile4
-rw-r--r--devel/boehm-gc/buildlink2.mk22
-rw-r--r--devel/boehm-gc/distinfo2
-rw-r--r--devel/boehm-gc/patches/patch-ab2
-rw-r--r--devel/glib/Makefile6
-rw-r--r--devel/glib/buildlink.mk2
-rw-r--r--devel/glib/buildlink2.mk42
-rw-r--r--devel/glib/distinfo2
-rw-r--r--devel/glib/patches/patch-af2
-rw-r--r--devel/glib/patches/patch-ag2
-rw-r--r--devel/glib/patches/patch-ah2
-rw-r--r--devel/glib/patches/patch-ai2
-rw-r--r--devel/libmm/Makefile6
-rw-r--r--devel/libmm/PLIST2
-rw-r--r--devel/libmm/buildlink.mk2
-rw-r--r--devel/libmm/buildlink2.mk19
-rw-r--r--devel/libmm/distinfo2
-rw-r--r--devel/libnet/Makefile10
-rw-r--r--devel/libnet/buildlink2.mk20
-rw-r--r--devel/libproplist/Makefile4
-rw-r--r--devel/libproplist/buildlink2.mk19
-rw-r--r--devel/libtool-base/Makefile4
-rw-r--r--devel/libtool/Makefile2
-rw-r--r--devel/libtool/Makefile.common2
-rw-r--r--devel/libtool/buildlink2.mk19
-rw-r--r--devel/libtool/distinfo2
-rw-r--r--devel/libtool/patches/patch-aa2
-rw-r--r--devel/libtool/patches/patch-ag2
-rw-r--r--devel/libtool/patches/patch-am2
-rw-r--r--devel/lwp/Makefile5
-rw-r--r--devel/lwp/PLIST2
-rw-r--r--devel/lwp/buildlink2.mk19
-rw-r--r--devel/lwp/distinfo2
-rw-r--r--devel/ncurses/Makefile4
-rw-r--r--devel/ncurses/buildlink.mk2
-rw-r--r--devel/ncurses/buildlink2.mk105
-rw-r--r--devel/ncurses/distinfo8
-rw-r--r--devel/ncurses/patches/patch-ac54
-rw-r--r--devel/ncurses/patches/patch-ad16
-rw-r--r--devel/ncurses/patches/patch-ae13
-rw-r--r--devel/ncurses/patches/patch-af13
-rw-r--r--devel/ncurses/patches/patch-ag13
-rw-r--r--devel/ncurses/patches/patch-ah13
-rw-r--r--devel/pcre/Makefile6
-rw-r--r--devel/pcre/buildlink2.mk21
-rw-r--r--devel/pth/Makefile8
-rw-r--r--devel/pth/buildlink.mk2
-rw-r--r--devel/pth/buildlink2.mk21
-rw-r--r--devel/pth/distinfo2
-rw-r--r--devel/pth/patches/patch-ag2
-rw-r--r--devel/readline/Makefile17
-rw-r--r--devel/readline/buildlink.mk2
-rw-r--r--devel/readline/buildlink2.mk74
-rw-r--r--devel/rpc2/Makefile16
-rw-r--r--devel/rpc2/PLIST2
-rw-r--r--devel/rpc2/buildlink2.mk23
-rw-r--r--devel/rpc2/distinfo2
-rw-r--r--devel/rpc2/patches/patch-aa2
-rw-r--r--devel/rvm/Makefile13
-rw-r--r--devel/rvm/PLIST2
-rw-r--r--devel/rvm/buildlink2.mk25
-rw-r--r--devel/rvm/distinfo2
-rw-r--r--devel/rvm/patches/patch-aa2
-rw-r--r--devel/rvm/patches/patch-ab2
-rw-r--r--devel/zlib/Makefile8
-rw-r--r--devel/zlib/buildlink.mk2
-rw-r--r--devel/zlib/buildlink2.mk59
67 files changed, 576 insertions, 217 deletions
diff --git a/devel/boehm-gc/Makefile b/devel/boehm-gc/Makefile
index 010f89d0f9c..61e47acb548 100644
--- a/devel/boehm-gc/Makefile
+++ b/devel/boehm-gc/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2001/11/19 20:11:00 jlam Exp $
+# $NetBSD: Makefile,v 1.22 2002/08/25 18:38:25 jlam Exp $
# FreeBSD Id: Makefile,v 1.1 1996/11/16 01:51:25 jdp Exp
#
@@ -11,7 +11,7 @@ MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.hpl.hp.com/personal/Hans_Boehm/gc/
COMMENT= Garbage collection and memory leak detection for C and C++
-USE_BUILDLINK_ONLY= YES
+USE_BUILDLINK2= YES
USE_GMAKE= YES
MAKE_ENV+= COPTS="${CFLAGS}"
diff --git a/devel/boehm-gc/buildlink2.mk b/devel/boehm-gc/buildlink2.mk
new file mode 100644
index 00000000000..7f13759bae2
--- /dev/null
+++ b/devel/boehm-gc/buildlink2.mk
@@ -0,0 +1,22 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:26 jlam Exp $
+
+.if !defined(BOEHM_GC_BUILDLINK2_MK)
+BOEHM_GC_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= boehm-gc
+BUILDLINK_DEPENDS.boehm-gc?= boehm-gc>=5.3
+BUILDLINK_PKGSRCDIR.boehm-gc?= ../../devel/boehm-gc
+BUILDLINK_DEPMETHOD.boehm-gc?= build
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.boehm-gc=boehm-gc
+BUILDLINK_PREFIX.boehm-gc_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.boehm-gc= include/gc.h
+BUILDLINK_FILES.boehm-gc+= include/gc_cpp.h
+BUILDLINK_FILES.boehm-gc+= lib/libgc.a
+BUILDLINK_FILES.boehm-gc+= lib/libleak.a
+
+BUILDLINK_TARGETS+= boehm-gc-buildlink
+
+boehm-gc-buildlink: _BUILDLINK_USE
+
+.endif # BOEHM_GC_BUILDLINK2_MK
diff --git a/devel/boehm-gc/distinfo b/devel/boehm-gc/distinfo
index 5991cbc67b2..2139e237b83 100644
--- a/devel/boehm-gc/distinfo
+++ b/devel/boehm-gc/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2002/07/31 14:28:32 wiz Exp $
+$NetBSD: distinfo,v 1.7 2002/08/25 18:38:26 jlam Exp $
SHA1 (gc6.0.tar.gz) = 9698826b33472b314d7b2eb640c1669ce05f5277
Size (gc6.0.tar.gz) = 562188 bytes
diff --git a/devel/boehm-gc/patches/patch-ab b/devel/boehm-gc/patches/patch-ab
index 201838d35d8..8b6dcb2b0a4 100644
--- a/devel/boehm-gc/patches/patch-ab
+++ b/devel/boehm-gc/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.7 2002/07/31 14:28:32 wiz Exp $
+$NetBSD: patch-ab,v 1.8 2002/08/25 18:38:27 jlam Exp $
--- dyn_load.c.orig Tue Jun 26 04:37:38 2001
+++ dyn_load.c Wed Jul 31 15:57:28 2002
diff --git a/devel/glib/Makefile b/devel/glib/Makefile
index 8fb5801fc3c..dbe4ac35539 100644
--- a/devel/glib/Makefile
+++ b/devel/glib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.48 2002/08/08 16:17:07 jlam Exp $
+# $NetBSD: Makefile,v 1.49 2002/08/25 18:38:27 jlam Exp $
# FreeBSD Id: Makefile,v 1.2 1998/08/06 14:55:12 vanilla Exp
#
@@ -16,7 +16,7 @@ COMMENT= Some useful routines for C programming
CONFLICTS= gtk+-1.0.*
-USE_BUILDLINK_ONLY= yes
+USE_BUILDLINK2= yes
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
@@ -77,6 +77,6 @@ test: build
cd ${WRKSRC} && ${MAKE_ENV} ${MAKE_PROGRAM} check 2>&1 | \
tee ${WRKDIR}/check.log
-.include "../../mk/pthread.buildlink.mk"
+.include "../../mk/pthread.buildlink2.mk"
.include "../../mk/texinfo.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/glib/buildlink.mk b/devel/glib/buildlink.mk
index a07322c99f5..eaa09d11d0f 100644
--- a/devel/glib/buildlink.mk
+++ b/devel/glib/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.17 2002/08/01 05:48:08 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.18 2002/08/25 18:38:27 jlam Exp $
#
# This Makefile fragment is included by packages that use glib.
#
diff --git a/devel/glib/buildlink2.mk b/devel/glib/buildlink2.mk
new file mode 100644
index 00000000000..7de4241d369
--- /dev/null
+++ b/devel/glib/buildlink2.mk
@@ -0,0 +1,42 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:28 jlam Exp $
+
+.if !defined(GLIB_BUILDLINK2_MK)
+GLIB_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= glib
+BUILDLINK_DEPENDS.glib?= glib>=1.2.8
+BUILDLINK_PKGSRCDIR.glib?= ../../devel/glib
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.glib=glib
+BUILDLINK_PREFIX.glib_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.glib= include/glib/glib-1.2/*
+BUILDLINK_FILES.glib+= include/glib/*
+BUILDLINK_FILES.glib+= lib/glib/*/*
+BUILDLINK_FILES.glib+= lib/libglib.*
+BUILDLINK_FILES.glib+= lib/libgmodule.*
+BUILDLINK_FILES.glib+= lib/libgthread.*
+
+USE_PTHREAD= native pth
+
+.include "../../mk/pthread.buildlink2.mk"
+
+BUILDLINK_TARGETS+= glib-buildlink
+BUILDLINK_TARGETS+= glib-fix-glib-h
+
+glib-buildlink: _BUILDLINK_USE
+
+glib-fix-glib-h:
+.if exists(/usr/include/sys/null.h)
+ @cd ${BUILDLINK_DIR}/include/glib/glib-1.2; \
+ if ${GREP} "^\#define.NULL" glib.h > /dev/null; then \
+ ${ECHO} WARNING\!; \
+ ${ECHO} The installed glib package is broken, please rebuild it from source.;\
+ ${ECHO} For more information, see PR 14150.; \
+ ${SED} -e "s|^#define.NULL.*|#include <sys/null.h>|" \
+ glib.h > glib.h.fixed; \
+ ${RM} glib.h; \
+ ${MV} glib.h.fixed glib.h; \
+ fi
+.endif
+
+.endif # GLIB_BUILDLINK2_MK
diff --git a/devel/glib/distinfo b/devel/glib/distinfo
index 7a6dccd83e1..3a15affc933 100644
--- a/devel/glib/distinfo
+++ b/devel/glib/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2002/07/19 03:48:14 mycroft Exp $
+$NetBSD: distinfo,v 1.7 2002/08/25 18:38:28 jlam Exp $
SHA1 (glib-1.2.10.tar.gz) = e5a9361c594608d152d5d9650154c2e3260b87fa
Size (glib-1.2.10.tar.gz) = 421480 bytes
diff --git a/devel/glib/patches/patch-af b/devel/glib/patches/patch-af
index 3da906c31eb..d6405a0d938 100644
--- a/devel/glib/patches/patch-af
+++ b/devel/glib/patches/patch-af
@@ -1,4 +1,4 @@
-$NetBSD: patch-af,v 1.1 2002/07/18 02:19:30 rh Exp $
+$NetBSD: patch-af,v 1.2 2002/08/25 18:38:29 jlam Exp $
--- glib.pc.in.orig Thu Nov 30 11:15:33 2000
+++ glib.pc.in
diff --git a/devel/glib/patches/patch-ag b/devel/glib/patches/patch-ag
index 95aa5e73613..60d1e9168cf 100644
--- a/devel/glib/patches/patch-ag
+++ b/devel/glib/patches/patch-ag
@@ -1,4 +1,4 @@
-$NetBSD: patch-ag,v 1.1 2002/07/18 02:19:30 rh Exp $
+$NetBSD: patch-ag,v 1.2 2002/08/25 18:38:29 jlam Exp $
--- gmodule.pc.in.orig Thu Nov 30 11:15:33 2000
+++ gmodule.pc.in
diff --git a/devel/glib/patches/patch-ah b/devel/glib/patches/patch-ah
index a6015873083..c58f0b7da08 100644
--- a/devel/glib/patches/patch-ah
+++ b/devel/glib/patches/patch-ah
@@ -1,4 +1,4 @@
-$NetBSD: patch-ah,v 1.1 2002/07/18 02:19:31 rh Exp $
+$NetBSD: patch-ah,v 1.2 2002/08/25 18:38:29 jlam Exp $
--- gthread.pc.in.orig Thu Nov 30 11:15:33 2000
+++ gthread.pc.in
diff --git a/devel/glib/patches/patch-ai b/devel/glib/patches/patch-ai
index 1f4e66ae51e..dfbd421cc8d 100644
--- a/devel/glib/patches/patch-ai
+++ b/devel/glib/patches/patch-ai
@@ -1,4 +1,4 @@
-$NetBSD: patch-ai,v 1.2 2002/07/19 03:48:14 mycroft Exp $
+$NetBSD: patch-ai,v 1.3 2002/08/25 18:38:30 jlam Exp $
--- gthread/testgthread.c.orig Fri Jul 19 03:43:50 2002
+++ gthread/testgthread.c Fri Jul 19 03:42:15 2002
diff --git a/devel/libmm/Makefile b/devel/libmm/Makefile
index aed5963e96a..0147468e598 100644
--- a/devel/libmm/Makefile
+++ b/devel/libmm/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2002/08/01 00:28:16 mycroft Exp $
+# $NetBSD: Makefile,v 1.5 2002/08/25 18:38:30 jlam Exp $
#
DISTNAME= mm-1.2.1
@@ -10,10 +10,10 @@ MAINTAINER= cjones@netbsd.org
HOMEPAGE= http://www.ossp.org/pkg/lib/mm/
COMMENT= Portable abstraction layer for shared memory
-USE_BUILDLINK_ONLY= YES
+USE_BUILDLINK2= YES
GNU_CONFIGURE= YES
USE_LIBTOOL= YES
-LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
+LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/libmm/PLIST b/devel/libmm/PLIST
index b39a837ea3a..58e1f088a13 100644
--- a/devel/libmm/PLIST
+++ b/devel/libmm/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2002/08/01 00:28:16 mycroft Exp $
+@comment $NetBSD: PLIST,v 1.3 2002/08/25 18:38:30 jlam Exp $
bin/mm-config
include/mm.h
lib/libmm.a
diff --git a/devel/libmm/buildlink.mk b/devel/libmm/buildlink.mk
index bc6b366e487..b610ebfcf2f 100644
--- a/devel/libmm/buildlink.mk
+++ b/devel/libmm/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.2 2002/08/01 00:53:20 mycroft Exp $
+# $NetBSD: buildlink.mk,v 1.3 2002/08/25 18:38:30 jlam Exp $
#
# This Makefile fragment is included by packages that use libmm.
#
diff --git a/devel/libmm/buildlink2.mk b/devel/libmm/buildlink2.mk
new file mode 100644
index 00000000000..e21f6587085
--- /dev/null
+++ b/devel/libmm/buildlink2.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:31 jlam Exp $
+
+.if !defined(LIBMM_BUILDLINK2_MK)
+LIBMM_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= libmm
+BUILDLINK_DEPENDS.libmm?= libmm>=1.2.1
+BUILDLINK_PKGSRCDIR.libmm?= ../../devel/libmm
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.libmm=libmm
+BUILDLINK_PREFIX.libmm_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.libmm= include/mm.h
+BUILDLINK_FILES.libmm+= lib/libmm.*
+
+BUILDLINK_TARGETS+= libmm-buildlink
+
+libmm-buildlink: _BUILDLINK_USE
+
+.endif # LIBMM_BUILDLINK2_MK
diff --git a/devel/libmm/distinfo b/devel/libmm/distinfo
index 16ff54d7ac6..1bb8e9c5907 100644
--- a/devel/libmm/distinfo
+++ b/devel/libmm/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2002/08/01 00:28:16 mycroft Exp $
+$NetBSD: distinfo,v 1.3 2002/08/25 18:38:31 jlam Exp $
SHA1 (mm-1.2.1.tar.gz) = c2915c82adbf9be7b43375a5ced3dc08700b1810
Size (mm-1.2.1.tar.gz) = 217078 bytes
diff --git a/devel/libnet/Makefile b/devel/libnet/Makefile
index 7f76426aff6..dc7750bdf0a 100644
--- a/devel/libnet/Makefile
+++ b/devel/libnet/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2001/10/03 22:36:38 jlam Exp $
+# $NetBSD: Makefile,v 1.10 2002/08/25 18:38:31 jlam Exp $
#
DISTNAME= libnet-1.0.1b
@@ -9,10 +9,10 @@ MAINTAINER= sakamoto@netbsd.org
HOMEPAGE= http://www.packetfactory.net/libnet/
COMMENT= C library for portable packet creation and injection
-USE_BUILDLINK_ONLY= # defined
+USE_BUILDLINK2= # defined
-USE_LIBTOOL= #defined
-GNU_CONFIGURE= #defined
+USE_LIBTOOL= # defined
+GNU_CONFIGURE= # defined
CONFIGURE_ENV+= LIBNET_CONFIG_CFLAGS="-I${PREFIX}/include" \
LIBNET_CONFIG_LIBS="${LDFLAGS}"
@@ -29,7 +29,7 @@ post-install:
@${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
@(cd ${PREFIX}; \
${FIND} ${DOCDIR} -type f >> ${PLIST_SRC}; \
- ${FIND} ${DOCDIR} -type d| ${SED} -e 's|^|@dirrm |' | sort -r \
+ ${FIND} ${DOCDIR} -type d| ${SED} -e 's|^|@dirrm |' | ${SORT} -r \
>> ${PLIST_SRC})
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/libnet/buildlink2.mk b/devel/libnet/buildlink2.mk
new file mode 100644
index 00000000000..ee39e4ffdf3
--- /dev/null
+++ b/devel/libnet/buildlink2.mk
@@ -0,0 +1,20 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:32 jlam Exp $
+
+.if !defined(LIBNET_BUILDLINK2_MK)
+LIBNET_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= libnet
+BUILDLINK_DEPENDS.libnet?= libnet-[0-9]*
+BUILDLINK_PKGSRCDIR.libnet?= ../../devel/libnet
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.libnet=libnet
+BUILDLINK_PREFIX.libnet_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.libnet= include/libnet.h
+BUILDLINK_FILES.libnet+= include/libnet/*
+BUILDLINK_FILES.libnet+= lib/libnet.*
+
+BUILDLINK_TARGETS+= libnet-buildlink
+
+libnet-buildlink: _BUILDLINK_USE
+
+.endif # LIBNET_BUILDLINK2_MK
diff --git a/devel/libproplist/Makefile b/devel/libproplist/Makefile
index 35d257209db..e6018117cd8 100644
--- a/devel/libproplist/Makefile
+++ b/devel/libproplist/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2001/10/02 08:49:51 wiz Exp $
+# $NetBSD: Makefile,v 1.12 2002/08/25 18:38:32 jlam Exp $
DISTNAME= libPropList-0.10.1
PKGNAME= libproplist-0.10.1
@@ -9,7 +9,7 @@ MAINTAINER= jlam@netbsd.org
COMMENT= GNUstep/OPENSTEP property lists compatibility library
GNU_CONFIGURE= # defined
-USE_BUILDLINK_ONLY= # defined
+USE_BUILDLINK2= # defined
USE_LIBTOOL= # defined
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
diff --git a/devel/libproplist/buildlink2.mk b/devel/libproplist/buildlink2.mk
new file mode 100644
index 00000000000..bd6c8dda42d
--- /dev/null
+++ b/devel/libproplist/buildlink2.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:33 jlam Exp $
+
+.if !defined(LIBPROPLIST_BUILDLINK2_MK)
+LIBPROPLIST_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= libproplist
+BUILDLINK_DEPENDS.libproplist?= libproplist>=0.10.1
+BUILDLINK_PKGSRCDIR.libproplist?= ../../devel/libproplist
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.libproplist=libproplist
+BUILDLINK_PREFIX.libproplist_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.libproplist= include/proplist.h
+BUILDLINK_FILES.libproplist+= lib/libPropList.*
+
+BUILDLINK_TARGETS+= libproplist-buildlink
+
+libproplist-buildlink: _BUILDLINK_USE
+
+.endif # LIBPROPLIST_BUILDLINK2_MK
diff --git a/devel/libtool-base/Makefile b/devel/libtool-base/Makefile
index aa14507ccfb..1b8965edae6 100644
--- a/devel/libtool-base/Makefile
+++ b/devel/libtool-base/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2002/05/21 14:03:38 schmonz Exp $
+# $NetBSD: Makefile,v 1.11 2002/08/25 18:38:36 jlam Exp $
#
.include "../libtool/Makefile.common"
@@ -10,6 +10,8 @@ COMMENT= Generic shared library support script (the script itself)
CONFLICTS+= libtool<=1.3.5nb11
+USE_BUILDLINK2= # defined
+
test: build
cd ${WRKSRC} && ${MAKE} check
diff --git a/devel/libtool/Makefile b/devel/libtool/Makefile
index c4c814d5d5b..8b610db2bba 100644
--- a/devel/libtool/Makefile
+++ b/devel/libtool/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2002/05/23 20:07:00 schmonz Exp $
+# $NetBSD: Makefile,v 1.37 2002/08/25 18:38:33 jlam Exp $
#
DISTFILES= # empty
diff --git a/devel/libtool/Makefile.common b/devel/libtool/Makefile.common
index 364b0a5a992..267868daff2 100644
--- a/devel/libtool/Makefile.common
+++ b/devel/libtool/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.22 2002/05/21 14:03:36 schmonz Exp $
+# $NetBSD: Makefile.common,v 1.23 2002/08/25 18:38:34 jlam Exp $
#
DISTNAME= libtool-ml-20010614
diff --git a/devel/libtool/buildlink2.mk b/devel/libtool/buildlink2.mk
new file mode 100644
index 00000000000..a516bb0ab23
--- /dev/null
+++ b/devel/libtool/buildlink2.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:34 jlam Exp $
+
+.if !defined(LTDL_BUILDLINK2_MK)
+LTDL_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= ltdl
+BUILDLINK_DEPENDS.ltdl?= libtool-base>=${LIBTOOL_REQD}
+BUILDLINK_PKGSRCDIR.ltdl?= ../../devel/libtool-base
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.ltdl=libtool-base
+BUILDLINK_PREFIX.ltdl_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.ltdl= include/ltdl.h
+BUILDLINK_FILES.ltdl+= lib/libltdl.*
+
+BUILDLINK_TARGETS+= ltdl-buildlink
+
+ltdl-buildlink: _BUILDLINK_USE
+
+.endif # LTDL_BUILDLINK2_MK
diff --git a/devel/libtool/distinfo b/devel/libtool/distinfo
index d82739cd2ca..d0541ed33ea 100644
--- a/devel/libtool/distinfo
+++ b/devel/libtool/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2002/05/21 14:03:37 schmonz Exp $
+$NetBSD: distinfo,v 1.18 2002/08/25 18:38:35 jlam Exp $
SHA1 (libtool-ml-20010614.tar.gz) = ff746666737e420592c3017d65bf4c47f1430dac
Size (libtool-ml-20010614.tar.gz) = 784246 bytes
diff --git a/devel/libtool/patches/patch-aa b/devel/libtool/patches/patch-aa
index 5eb7a9232c9..cf1aa987289 100644
--- a/devel/libtool/patches/patch-aa
+++ b/devel/libtool/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.27 2002/05/21 14:03:37 schmonz Exp $
+$NetBSD: patch-aa,v 1.28 2002/08/25 18:38:35 jlam Exp $
--- ltconfig.in.orig Mon May 21 05:05:06 2001
+++ ltconfig.in
diff --git a/devel/libtool/patches/patch-ag b/devel/libtool/patches/patch-ag
index 3dee189d0a4..c18d9213da0 100644
--- a/devel/libtool/patches/patch-ag
+++ b/devel/libtool/patches/patch-ag
@@ -1,4 +1,4 @@
-$NetBSD: patch-ag,v 1.6 2002/05/21 14:03:37 schmonz Exp $
+$NetBSD: patch-ag,v 1.7 2002/08/25 18:38:35 jlam Exp $
--- ltcf-cxx.sh.orig Wed May 23 05:05:06 2001
+++ ltcf-cxx.sh
diff --git a/devel/libtool/patches/patch-am b/devel/libtool/patches/patch-am
index 68c23fc8422..30f2f5c49b5 100644
--- a/devel/libtool/patches/patch-am
+++ b/devel/libtool/patches/patch-am
@@ -1,4 +1,4 @@
-$NetBSD: patch-am,v 1.3 2002/05/21 14:03:37 schmonz Exp $
+$NetBSD: patch-am,v 1.4 2002/08/25 18:38:36 jlam Exp $
--- ltcf-c.sh.orig Wed Apr 25 00:05:02 2001
+++ ltcf-c.sh
diff --git a/devel/lwp/Makefile b/devel/lwp/Makefile
index 3619b43a183..99c455fddaf 100644
--- a/devel/lwp/Makefile
+++ b/devel/lwp/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2002/06/20 19:27:54 jlam Exp $
+# $NetBSD: Makefile,v 1.14 2002/08/25 18:38:36 jlam Exp $
#
DISTNAME= lwp-1.9
@@ -12,12 +12,13 @@ COMMENT= Light Weight Process style threads
# ${WRKSRC}/src/process.ss needs pmap handling assembly for
# each arch. Mips has it, but it evidently needs more work.
+#
ONLY_FOR_PLATFORM= NetBSD-*-i386 NetBSD-*-m68k NetBSD-*-sparc* \
NetBSD-*-arm32
+USE_BUILDLINK2= YES
GNU_CONFIGURE= YES
USE_LIBTOOL= YES
-USE_BUILDLINK_ONLY= YES
LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/lwp/PLIST b/devel/lwp/PLIST
index 80f30b61214..fd65b38d6d5 100644
--- a/devel/lwp/PLIST
+++ b/devel/lwp/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2002/06/20 19:27:54 jlam Exp $
+@comment $NetBSD: PLIST,v 1.3 2002/08/25 18:38:36 jlam Exp $
include/lwp/lock.h
include/lwp/lwp.h
include/lwp/timer.h
diff --git a/devel/lwp/buildlink2.mk b/devel/lwp/buildlink2.mk
new file mode 100644
index 00000000000..8fcf9cd987a
--- /dev/null
+++ b/devel/lwp/buildlink2.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:37 jlam Exp $
+
+.if !defined(LWP_BUILDLINK2_MK)
+LWP_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= lwp
+BUILDLINK_DEPENDS.lwp?= lwp>=1.6
+BUILDLINK_PKGSRCDIR.lwp?= ../../devel/lwp
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.lwp=lwp
+BUILDLINK_PREFIX.lwp_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.lwp= include/lwp/*
+BUILDLINK_FILES.lwp+= lib/liblwp.*
+
+BUILDLINK_TARGETS+= lwp-buildlink
+
+lwp-buildlink: _BUILDLINK_USE
+
+.endif # LWP_BUILDLINK2_MK
diff --git a/devel/lwp/distinfo b/devel/lwp/distinfo
index 4407770a073..20154abb188 100644
--- a/devel/lwp/distinfo
+++ b/devel/lwp/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2002/06/20 19:27:55 jlam Exp $
+$NetBSD: distinfo,v 1.5 2002/08/25 18:38:37 jlam Exp $
SHA1 (lwp-1.9.tar.gz) = e5f40cf36ac705ef5d9b0600cb1bab5bf00d817b
Size (lwp-1.9.tar.gz) = 246491 bytes
diff --git a/devel/ncurses/Makefile b/devel/ncurses/Makefile
index d769d2a5077..f33391e122b 100644
--- a/devel/ncurses/Makefile
+++ b/devel/ncurses/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2001/06/19 05:06:27 jlam Exp $
+# $NetBSD: Makefile,v 1.39 2002/08/25 18:38:38 jlam Exp $
DISTNAME= ncurses-${NC_VERS}
NC_VERS= 5.2
@@ -12,7 +12,7 @@ HOMEPAGE= http://dickey.his.com/ncurses/ncurses.html
COMMENT= CRT screen handling and optimization package
USE_LIBTOOL= # defined
-USE_BUILDLINK_ONLY= # defined
+USE_BUILDLINK2= # defined
GNU_CONFIGURE= # defined
CONFIGURE_ARGS+= --with-libtool
diff --git a/devel/ncurses/buildlink.mk b/devel/ncurses/buildlink.mk
index 29d33cf7b7d..2c1cba3221f 100644
--- a/devel/ncurses/buildlink.mk
+++ b/devel/ncurses/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.20 2002/08/07 19:29:30 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.21 2002/08/25 18:38:38 jlam Exp $
#
# This Makefile fragment is included by packages that use ncurses.
#
diff --git a/devel/ncurses/buildlink2.mk b/devel/ncurses/buildlink2.mk
new file mode 100644
index 00000000000..adeec58d5b4
--- /dev/null
+++ b/devel/ncurses/buildlink2.mk
@@ -0,0 +1,105 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:38 jlam Exp $
+#
+# Optionally define:
+#
+# USE_NCURSES force use of ncurses
+# INCOMPAT_CURSES specify MACHINE_PLATFORM versions that are missing
+# some needed functions.
+
+.if !defined(NCURSES_BUILDLINK2_MK)
+NCURSES_BUILDLINK2_MK= # defined
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILDLINK_DEPENDS.ncurses?= ncurses>=5.0
+BUILDLINK_PKGSRCDIR.ncurses?= ../../devel/ncurses
+
+.if defined(USE_NCURSES)
+_NEED_NCURSES= YES
+.else
+_NEED_NCURSES= NO
+#
+# These versions of NetBSD didn't have a curses library that was capable of
+# replacing ncurses.
+#
+_INCOMPAT_CURSES= NetBSD-0.*-* NetBSD-1.[0123]*-*
+_INCOMPAT_CURSES+= NetBSD-1.4.*-* NetBSD-1.4[A-X]-*
+#
+# This catch-all for SunOS is probably too broad, but better to err on
+# the safe side. We can narrow down the match when we have better
+# information.
+#
+_INCOMPAT_CURSES+= SunOS-*-*
+INCOMPAT_CURSES?= # empty
+. for _pattern_ in ${_INCOMPAT_CURSES} ${INCOMPAT_CURSES}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+_NEED_NCURSES= YES
+. endif
+. endfor
+.endif
+
+.if ${_NEED_NCURSES} == "YES"
+BUILDLINK_PACKAGES+= ncurses
+EVAL_PREFIX+= BUILDLINK_PREFIX.ncurses=ncurses
+BUILDLINK_PREFIX.ncurses_DEFAULT= ${LOCALBASE}
+.else
+BUILDLINK_PREFIX.ncurses= /usr
+.endif
+
+BUILDLINK_FILES.ncurses+= include/curses.h
+BUILDLINK_FILES.ncurses+= include/cursesapp.h
+BUILDLINK_FILES.ncurses+= include/cursesf.h
+BUILDLINK_FILES.ncurses+= include/cursesm.h
+BUILDLINK_FILES.ncurses+= include/cursesp.h
+BUILDLINK_FILES.ncurses+= include/cursesw.h
+BUILDLINK_FILES.ncurses+= include/cursslk.h
+BUILDLINK_FILES.ncurses+= include/eti.h
+BUILDLINK_FILES.ncurses+= include/etip.h
+BUILDLINK_FILES.ncurses+= include/form.h
+BUILDLINK_FILES.ncurses+= include/menu.h
+BUILDLINK_FILES.ncurses+= include/ncurses.h
+BUILDLINK_FILES.ncurses+= include/panel.h
+BUILDLINK_FILES.ncurses+= include/term.h
+BUILDLINK_FILES.ncurses+= include/termcap.h
+BUILDLINK_FILES.ncurses+= include/unctrl.h
+BUILDLINK_FILES.ncurses+= lib/libform.*
+BUILDLINK_FILES.ncurses+= lib/libmenu.*
+BUILDLINK_FILES.ncurses+= lib/libncurses++.*
+BUILDLINK_FILES.ncurses+= lib/libncurses.*
+BUILDLINK_FILES.ncurses+= lib/libpanel.*
+
+.if ${_NEED_NCURSES} == "NO"
+_BLNK_LIBNCURSES_LIST!= ${ECHO} /usr/lib/libncurses.*
+. if ${_BLNK_LIBNCURSES_LIST} == "/usr/lib/libncurses.*"
+BUILDLINK_FILES.ncurses+= lib/libcurses.*
+BUILDLINK_TRANSFORM.ncurses+= -e "s|/curses.h|/ncurses.h|g"
+BUILDLINK_TRANSFORM+= l:ncurses:curses
+. endif
+.endif
+
+BUILDLINK_TARGETS+= ncurses-buildlink
+BUILDLINK_TARGETS+= ncurses-curses-h
+BUILDLINK_TARGETS+= ncurses-extra-includes-buildlink
+
+ncurses-buildlink: _BUILDLINK_USE
+
+ncurses-extra-includes-buildlink:
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ extra_includes=" \
+ include/term.h \
+ "; \
+ for file in $${extra_includes}; do \
+ if [ ! -f ${BUILDLINK_DIR}/$${file} ]; then \
+ ${ECHO_BUILDLINK_MSG} "Touching extra ncurses header ($${file}) in ${BUILDLINK_DIR}."; \
+ ${TOUCH} ${TOUCH_FLAGS} ${BUILDLINK_DIR}/$${file}; \
+ fi; \
+ done
+
+ncurses-curses-h:
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ if [ ! -f ${BUILDLINK_DIR}/include/curses.h ]; then \
+ ${ECHO_BUILDLINK_MSG} "Linking curses.h to ncurses.h in ${BUILDLINK_DIR}."; \
+ ${LN} -s ${BUILDLINK_PREFIX.ncurses}/include/ncurses.h ${BUILDLINK_DIR}/include/curses.h; \
+ fi
+
+.endif # NCURSES_BUILDLINK2_MK
diff --git a/devel/ncurses/distinfo b/devel/ncurses/distinfo
index 90dff8ba4f7..8c84a4f2e2b 100644
--- a/devel/ncurses/distinfo
+++ b/devel/ncurses/distinfo
@@ -1,12 +1,6 @@
-$NetBSD: distinfo,v 1.4 2001/06/19 05:35:38 jlam Exp $
+$NetBSD: distinfo,v 1.5 2002/08/25 18:38:39 jlam Exp $
SHA1 (ncurses-5.2.tar.gz) = 47e13874118568c48bdb6034d716dcf424f3bf12
Size (ncurses-5.2.tar.gz) = 1743818 bytes
SHA1 (patch-aa) = 235774ae5a52a31b833ff3a8a48d4b3e8ead9d3b
SHA1 (patch-ab) = c523e86cf4faf08930c95f0aee59be85c962a147
-SHA1 (patch-ac) = 905fb542adc987817b5ad8c1b760e9f0109ed8a4
-SHA1 (patch-ad) = ae507553363a7c0514a18848b47bcd3de18d35c4
-SHA1 (patch-ae) = 5a2d1f13c0b202ddec6f966576498b9c6c693bf0
-SHA1 (patch-af) = aba9d358b7f79a432a8981eeb01e39bba74cb171
-SHA1 (patch-ag) = 5210e65902a912bb560dce856ddc93171fc1123a
-SHA1 (patch-ah) = 18565f7fdfbb3dbdf6e4e8a938ebb679ed8e1a36
diff --git a/devel/ncurses/patches/patch-ac b/devel/ncurses/patches/patch-ac
deleted file mode 100644
index 5789c2adab0..00000000000
--- a/devel/ncurses/patches/patch-ac
+++ /dev/null
@@ -1,54 +0,0 @@
-$NetBSD: patch-ac,v 1.9 2001/06/19 05:35:39 jlam Exp $
-
---- configure.orig Fri Oct 20 18:58:49 2000
-+++ configure
-@@ -6999,17 +6999,6 @@
- if test "$srcdir" != "."; then
- CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../include"
- fi
--if test "$GCC" != yes; then
-- CPPFLAGS="$CPPFLAGS -I\$(includedir)"
--elif test "$includedir" != "/usr/include"; then
-- if test "$includedir" = '${prefix}/include' ; then
-- if test $prefix != /usr ; then
-- CPPFLAGS="$CPPFLAGS -I\$(includedir)"
-- fi
-- else
-- CPPFLAGS="$CPPFLAGS -I\$(includedir)"
-- fi
--fi
-
-
-
-@@ -7017,17 +7006,6 @@
- if test "$srcdir" != "."; then
- ACPPFLAGS="$ACPPFLAGS -I\$(srcdir)/../../include"
- fi
--if test "$GCC" != yes; then
-- ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
--elif test "$includedir" != "/usr/include"; then
-- if test "$includedir" = '${prefix}/include' ; then
-- if test $prefix != /usr ; then
-- ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
-- fi
-- else
-- ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
-- fi
--fi
-
-
-
-@@ -7191,11 +7169,11 @@
- fi
- done
- echo "$ac_t""$cf_cv_src_modules" 1>&6
--TEST_ARGS="-L${LIB_DIR} -L\$(libdir) $TEST_ARGS"
-+TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
-
-
-
--PROG_ARGS="-L${LIB_DIR} -L\$(libdir) $PROG_ARGS"
-+PROG_ARGS="-L${LIB_DIR} $PROG_ARGS"
-
-
- SRC_SUBDIRS="man include"
diff --git a/devel/ncurses/patches/patch-ad b/devel/ncurses/patches/patch-ad
deleted file mode 100644
index b490171f073..00000000000
--- a/devel/ncurses/patches/patch-ad
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ad,v 1.6 2001/06/19 05:35:39 jlam Exp $
-
---- c++/Makefile.in.orig Sat Oct 14 20:43:38 2000
-+++ c++/Makefile.in
-@@ -87,9 +87,9 @@
- LIBNAME_NORMAL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.a
- LIBNAME = @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
-
--LINK_FLAGS = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) -l$(LIBROOT)
-+LINK_FLAGS = @EXTRA_LDFLAGS@ -L../lib -l$(LIBROOT)
-
--LINK_LIBTOOL = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) ../lib/$(LIBNAME)
-+LINK_LIBTOOL = @EXTRA_LDFLAGS@ -L../lib ../lib/$(LIBNAME)
- LINK_NORMAL = $(LINK_FLAGS)
- LINK_DEBUG = $(LINK_FLAGS)
- LINK_PROFILE = $(LINK_FLAGS)
diff --git a/devel/ncurses/patches/patch-ae b/devel/ncurses/patches/patch-ae
deleted file mode 100644
index 228aa4bcfa0..00000000000
--- a/devel/ncurses/patches/patch-ae
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ae,v 1.5 2001/06/19 05:35:39 jlam Exp $
-
---- form/Makefile.in.orig Sat Oct 14 13:57:02 2000
-+++ form/Makefile.in
-@@ -85,7 +85,7 @@
- LINK = $(LIBTOOL) $(CC)
- LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
-
--SHLIB_DIRS = -L../lib -L$(libdir)
-+SHLIB_DIRS = -L../lib
- SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
-
- MK_SHARED_LIB = @MK_SHARED_LIB@
diff --git a/devel/ncurses/patches/patch-af b/devel/ncurses/patches/patch-af
deleted file mode 100644
index 82ae744520b..00000000000
--- a/devel/ncurses/patches/patch-af
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-af,v 1.6 2001/06/19 05:35:39 jlam Exp $
-
---- menu/Makefile.in.orig Sat Oct 14 13:57:02 2000
-+++ menu/Makefile.in
-@@ -85,7 +85,7 @@
- LINK = $(LIBTOOL) $(CC)
- LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
-
--SHLIB_DIRS = -L../lib -L$(libdir)
-+SHLIB_DIRS = -L../lib
- SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
-
- MK_SHARED_LIB = @MK_SHARED_LIB@
diff --git a/devel/ncurses/patches/patch-ag b/devel/ncurses/patches/patch-ag
deleted file mode 100644
index 6b0c9c1fff7..00000000000
--- a/devel/ncurses/patches/patch-ag
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ag,v 1.5 2001/06/19 05:35:39 jlam Exp $
-
---- ncurses/Makefile.in.orig Sat Oct 14 18:55:35 2000
-+++ ncurses/Makefile.in
-@@ -99,7 +99,7 @@
- LINK = $(LIBTOOL) $(CC)
- LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
-
--SHLIB_DIRS = -L../lib -L$(libdir)
-+SHLIB_DIRS = -L../lib
- SHLIB_LIST = $(SHLIB_DIRS) @SHLIB_LIST@
- TINFO_LIST = $(SHLIB_DIRS) @TINFO_LIST@
-
diff --git a/devel/ncurses/patches/patch-ah b/devel/ncurses/patches/patch-ah
deleted file mode 100644
index 4c96720bc74..00000000000
--- a/devel/ncurses/patches/patch-ah
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ah,v 1.5 2001/06/19 05:35:39 jlam Exp $
-
---- panel/Makefile.in.orig Sat Oct 14 13:57:02 2000
-+++ panel/Makefile.in
-@@ -86,7 +86,7 @@
- LINK = $(LIBTOOL) $(CC)
- LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
-
--SHLIB_DIRS = -L../lib -L$(libdir)
-+SHLIB_DIRS = -L../lib
- SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
-
- MK_SHARED_LIB = @MK_SHARED_LIB@
diff --git a/devel/pcre/Makefile b/devel/pcre/Makefile
index 6d35a097270..068223b2fff 100644
--- a/devel/pcre/Makefile
+++ b/devel/pcre/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2001/11/30 10:20:01 martti Exp $
+# $NetBSD: Makefile,v 1.9 2002/08/25 18:38:42 jlam Exp $
# FreeBSD Id: Makefile,v 1.1.1.1 1998/07/12 22:59:19 steve Exp $
DISTNAME= pcre-3.7
@@ -12,10 +12,10 @@ MAINTAINER= proff@netbsd.org
HOMEPAGE= http://www.pcre.org/
COMMENT= Perl Compatible Regular Expressions library
-USE_BUILDLINK_ONLY= yes
+USE_BUILDLINK2= yes
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
-LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
+LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/pcre/buildlink2.mk b/devel/pcre/buildlink2.mk
new file mode 100644
index 00000000000..57d6d056fb1
--- /dev/null
+++ b/devel/pcre/buildlink2.mk
@@ -0,0 +1,21 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:43 jlam Exp $
+
+.if !defined(PCRE_BUILDLINK2_MK)
+PCRE_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= pcre
+BUILDLINK_DEPENDS.pcre?= pcre>=3.4
+BUILDLINK_PKGSRCDIR.pcre?= ../../devel/pcre
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.pcre=pcre
+BUILDLINK_PREFIX.pcre_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.pcre= include/pcre.h
+BUILDLINK_FILES.pcre+= include/pcreposix.h
+BUILDLINK_FILES.pcre+= lib/libpcre.*
+BUILDLINK_FILES.pcre+= lib/libpcreposix.*
+
+BUILDLINK_TARGETS+= pcre-buildlink
+
+pcre-buildlink: _BUILDLINK_USE
+
+.endif # PCRE_BUILDLINK2_MK
diff --git a/devel/pth/Makefile b/devel/pth/Makefile
index 91bb4c581d5..66a5926e3c0 100644
--- a/devel/pth/Makefile
+++ b/devel/pth/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.46 2002/08/01 13:36:08 skrll Exp $
+# $NetBSD: Makefile,v 1.47 2002/08/25 18:38:43 jlam Exp $
#
DISTNAME= pth-1.4.1
@@ -12,7 +12,7 @@ COMMENT= GNU Portable Thread library
CONFLICTS= pth-current-[0-9]* pth-syscall<1.4.1nb1
-USE_BUILDLINK_ONLY= YES
+USE_BUILDLINK2= YES
USE_LIBTOOL= YES
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
GNU_CONFIGURE= YES
@@ -37,3 +37,7 @@ post-install:
${PREFIX}/share/doc/pth/
.include "../../mk/bsd.pkg.mk"
+
+.if (${MACHINE_ARCH} == "i386" && ${CFLAGS:M-O2} == "-O2")
+CFLAGS:= ${CFLAGS:S/-O2/-O0/}
+.endif
diff --git a/devel/pth/buildlink.mk b/devel/pth/buildlink.mk
index f64b2d9eee5..9a34fa03420 100644
--- a/devel/pth/buildlink.mk
+++ b/devel/pth/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.10 2002/05/31 06:24:53 grant Exp $
+# $NetBSD: buildlink.mk,v 1.11 2002/08/25 18:38:44 jlam Exp $
#
# This Makefile fragment is included by packages that use pth.
#
diff --git a/devel/pth/buildlink2.mk b/devel/pth/buildlink2.mk
new file mode 100644
index 00000000000..11aa8d142a7
--- /dev/null
+++ b/devel/pth/buildlink2.mk
@@ -0,0 +1,21 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:44 jlam Exp $
+
+.if !defined(PTH_BUILDLINK2_MK)
+PTH_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= pth
+BUILDLINK_DEPENDS.pth?= pth>=1.4.0
+BUILDLINK_PKGSRCDIR.pth?= ../../devel/pth
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.pth=pth
+BUILDLINK_PREFIX.pth_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.pth= include/pth.h
+BUILDLINK_FILES.pth+= include/pthread.h
+BUILDLINK_FILES.pth+= lib/libpth.*
+BUILDLINK_FILES.pth+= lib/libpthread.*
+
+BUILDLINK_TARGETS+= pth-buildlink
+
+pth-buildlink: _BUILDLINK_USE
+
+.endif # PTH_BUILDLINK2_MK
diff --git a/devel/pth/distinfo b/devel/pth/distinfo
index 2cb0a4314c2..a29b5180a5f 100644
--- a/devel/pth/distinfo
+++ b/devel/pth/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2002/08/01 13:36:08 skrll Exp $
+$NetBSD: distinfo,v 1.7 2002/08/25 18:38:44 jlam Exp $
SHA1 (pth-1.4.1.tar.gz) = bc5b0847d57d2b78945a6c8d4ebab57e46213972
Size (pth-1.4.1.tar.gz) = 446287 bytes
diff --git a/devel/pth/patches/patch-ag b/devel/pth/patches/patch-ag
index acce8bca0c7..fb4d421e080 100644
--- a/devel/pth/patches/patch-ag
+++ b/devel/pth/patches/patch-ag
@@ -1,4 +1,4 @@
-$NetBSD: patch-ag,v 1.1 2002/08/01 13:36:09 skrll Exp $
+$NetBSD: patch-ag,v 1.2 2002/08/25 18:38:45 jlam Exp $
--- pth_lib.c.orig Sun Jan 27 11:03:40 2002
+++ pth_lib.c
diff --git a/devel/readline/Makefile b/devel/readline/Makefile
index 891b723b9ae..7690b9f2667 100644
--- a/devel/readline/Makefile
+++ b/devel/readline/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2002/02/18 15:14:15 seb Exp $
+# $NetBSD: Makefile,v 1.21 2002/08/25 18:38:45 jlam Exp $
#
DISTNAME= readline-4.2
@@ -9,7 +9,7 @@ MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.gnu.org/software/readline/
COMMENT= GNU library that can recall and edit previous input
-USE_BUILDLINK_ONLY= # defined
+USE_BUILDLINK2= # defined
GNU_CONFIGURE= # defined
USE_LIBTOOL= # defined
@@ -18,18 +18,5 @@ INSTALL_TARGET= install-la
INFO_FILES= readline.info history.info
-# Remove -I$(includedir) from the INCLUDES passed to the compiler as this
-# defeats buildlink.
-#
-post-patch:
- cd ${WRKSRC}; \
- files="Makefile.in"; \
- for file in $${files}; do \
- ${MV} -f $${file} $${file}.fixme; \
- ${SED} -e "s|[ ]*-I\$$(includedir)||" \
- $${file}.fixme > $${file}; \
- ${RM} $${file}.fixme; \
- done
-
.include "../../mk/texinfo.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/readline/buildlink.mk b/devel/readline/buildlink.mk
index 6424de84007..eacedb24ede 100644
--- a/devel/readline/buildlink.mk
+++ b/devel/readline/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.19 2002/08/07 19:29:30 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.20 2002/08/25 18:38:46 jlam Exp $
#
# This Makefile fragment is included by packages that use readline().
#
diff --git a/devel/readline/buildlink2.mk b/devel/readline/buildlink2.mk
new file mode 100644
index 00000000000..e8dce31bd34
--- /dev/null
+++ b/devel/readline/buildlink2.mk
@@ -0,0 +1,74 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:46 jlam Exp $
+#
+# Optionally define USE_GNU_READLINE to force use of GNU readline.
+#
+# NOTE: You may need to do some more work to get libedit recognized over
+# libreadline, especially by GNU configure scripts.
+
+.if !defined(READLINE_BUILDLINK2_MK)
+READLINE_BUILDLINK2_MK= # defined
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILDLINK_DEPENDS.readline?= readline>=2.2
+BUILDLINK_PKGSRCDIR.readline?= ../../devel/readline
+
+.if defined(USE_GNU_READLINE)
+_NEED_GNU_READLINE= YES
+.else
+. if exists(/usr/include/readline.h) || \
+ exists(/usr/include/readline/readline.h)
+_NEED_GNU_READLINE= NO
+. else
+_NEED_GNU_READLINE= YES
+. endif
+#
+# This catch-all for SunOS is probably too broad, but better to err on
+# the safe side. We can narrow down the match when we have better
+# information.
+#
+_INCOMPAT_READLINE= SunOS-*-*
+INCOMPAT_READLINE?= # empty
+. for _pattern_ in ${_INCOMPAT_READLINE} ${INCOMPAT_READLINE}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+_NEED_GNU_READLINE= YES
+. endif
+. endfor
+.endif
+
+.if ${_NEED_GNU_READLINE} == "YES"
+BUILDLINK_PACKAGES+= readline
+EVAL_PREFIX+= BUILDLINK_PREFIX.readline=readline
+BUILDLINK_PREFIX.readline_DEFAULT= ${LOCALBASE}
+.else
+BUILDLINK_PREFIX.readline= /usr
+.endif
+BUILDLINK_PREFIX.history= ${BUILDLINK_PREFIX.readline}
+
+BUILDLINK_FILES.readline= include/readline.h
+BUILDLINK_FILES.readline+= include/readline/*
+BUILDLINK_FILES.readline+= lib/libreadline.*
+
+BUILDLINK_FILES.history= include/history.h
+BUILDLINK_FILES.history+= lib/libhistory.*
+
+.if ${_NEED_GNU_READLINE} == "NO"
+_BLNK_LIBEDIT_LIST!= ${ECHO} /usr/lib/libedit.*
+. if ${_BLNK_LIBEDIT_LIST} != "/usr/lib/libedit.*"
+BUILDLINK_FILES.readline+= lib/libedit.*
+BUILDLINK_TRANSFORM.readline= -e "s|/readline.h|/readline/readline.h|g"
+BUILDLINK_TRANSFORM+= l:readline:edit
+
+BUILDLINK_FILES.history+= lib/libedit.*
+BUILDLINK_TRANSFORM.history= -e "s|/history.h|/readline/history.h|g"
+BUILDLINK_TRANSFORM+= l:history:edit
+. endif
+.endif
+
+BUILDLINK_TARGETS+= readline-buildlink
+BUILDLINK_TARGETS+= history-buildlink
+
+readline-buildlink: _BUILDLINK_USE
+history-buildlink: _BUILDLINK_USE
+
+.endif # READLINE_BUILDLINK2_MK
diff --git a/devel/rpc2/Makefile b/devel/rpc2/Makefile
index 8b81cf548c4..0554710c361 100644
--- a/devel/rpc2/Makefile
+++ b/devel/rpc2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2002/07/24 19:45:23 jlam Exp $
+# $NetBSD: Makefile,v 1.13 2002/08/25 18:38:47 jlam Exp $
#
DISTNAME= rpc2-1.13
@@ -10,15 +10,17 @@ MAINTAINER= phil@cs.wwu.edu
HOMEPAGE= http://www.coda.cs.cmu.edu/
COMMENT= CMU (Coda) remote procedure call package
+USE_BUILDLINK2= YES
+USE_GMAKE= YES
+
GNU_CONFIGURE= YES
+CONFIGURE_ENV+= PERL=${PERL5}
+
USE_PERL5= build
USE_LIBTOOL= YES
-USE_GMAKE= YES
-USE_BUILDLINK_ONLY= YES
-
LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
-CONFIGURE_ENV+= PERL=${PERL5}
-.include "../../devel/lwp/buildlink.mk"
-.include "../../devel/readline/buildlink.mk"
+.include "../../devel/lwp/buildlink2.mk"
+.include "../../devel/readline/buildlink2.mk"
+
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/rpc2/PLIST b/devel/rpc2/PLIST
index 979c06809fb..1b9998f77ae 100644
--- a/devel/rpc2/PLIST
+++ b/devel/rpc2/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2002/06/20 19:28:01 jlam Exp $
+@comment $NetBSD: PLIST,v 1.3 2002/08/25 18:38:47 jlam Exp $
bin/filcon
bin/rp2gen
include/rpc2/errors.h
diff --git a/devel/rpc2/buildlink2.mk b/devel/rpc2/buildlink2.mk
new file mode 100644
index 00000000000..130807e07f6
--- /dev/null
+++ b/devel/rpc2/buildlink2.mk
@@ -0,0 +1,23 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:48 jlam Exp $
+
+.if !defined(RPC2_BUILDLINK2_MK)
+RPC2_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= rpc2
+BUILDLINK_DEPENDS.rpc2?= rpc2>=1.10
+BUILDLINK_PKGSRCDIR.rpc2?= ../../devel/rpc2
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.rpc2=rpc2
+BUILDLINK_PREFIX.rpc2_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.rpc2= include/rpc2/*
+BUILDLINK_FILES.rpc2+= lib/libfail.*
+BUILDLINK_FILES.rpc2+= lib/librpc2.*
+BUILDLINK_FILES.rpc2+= lib/libse.*
+
+.include "../../devel/lwp/buildlink2.mk"
+
+BUILDLINK_TARGETS+= rpc2-buildlink
+
+rpc2-buildlink: _BUILDLINK_USE
+
+.endif # RPC2_BUILDLINK2_MK
diff --git a/devel/rpc2/distinfo b/devel/rpc2/distinfo
index 778164eac79..6416af60f52 100644
--- a/devel/rpc2/distinfo
+++ b/devel/rpc2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2002/06/20 19:28:01 jlam Exp $
+$NetBSD: distinfo,v 1.6 2002/08/25 18:38:48 jlam Exp $
SHA1 (rpc2-1.13.tar.gz) = b4f13fe3f878c632b66a6a1ac19883c735eeef4d
Size (rpc2-1.13.tar.gz) = 447572 bytes
diff --git a/devel/rpc2/patches/patch-aa b/devel/rpc2/patches/patch-aa
index 1be9f5607b3..d43b390354d 100644
--- a/devel/rpc2/patches/patch-aa
+++ b/devel/rpc2/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.2 2002/06/20 19:28:01 jlam Exp $
+$NetBSD: patch-aa,v 1.3 2002/08/25 18:38:49 jlam Exp $
--- fail/parser.c.orig Tue May 22 12:31:45 2001
+++ fail/parser.c
diff --git a/devel/rvm/Makefile b/devel/rvm/Makefile
index a8c93dfd970..da43af32ebc 100644
--- a/devel/rvm/Makefile
+++ b/devel/rvm/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2002/07/03 10:59:47 jdolecek Exp $
+# $NetBSD: Makefile,v 1.10 2002/08/25 18:38:49 jlam Exp $
#
DISTNAME= rvm-1.6
@@ -11,12 +11,13 @@ MAINTAINER= phil@cs.wwu.edu
HOMEPAGE= http://www.coda.cs.cmu.edu/
COMMENT= Recoverable Virtual Memory
-GNU_CONFIGURE= YES
-USE_LIBTOOL= YES
+USE_BUILDLINK2= YES
USE_GMAKE= YES
-USE_BUILDLINK_ONLY= YES
-CONFIGURE_ARGS+= --with-lwp-includes=${BUILDLINK_DIR}/include
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS+= --with-lwp-includes=${BUILDLINK_PREFIX.lwp}/include
+
+USE_LIBTOOL= YES
LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
pre-build:
@@ -25,5 +26,5 @@ pre-build:
${LN} -sf $${file} `${BASENAME} $${file} .c`_lwp.c; \
done
-.include "../../devel/lwp/buildlink.mk"
+.include "../../devel/lwp/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/rvm/PLIST b/devel/rvm/PLIST
index 8f458615416..575ae88ab61 100644
--- a/devel/rvm/PLIST
+++ b/devel/rvm/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2002/06/20 19:28:14 jlam Exp $
+@comment $NetBSD: PLIST,v 1.3 2002/08/25 18:38:49 jlam Exp $
include/rvm/rds.h
include/rvm/rvm.h
include/rvm/rvm_segment.h
diff --git a/devel/rvm/buildlink2.mk b/devel/rvm/buildlink2.mk
new file mode 100644
index 00000000000..a01204585ff
--- /dev/null
+++ b/devel/rvm/buildlink2.mk
@@ -0,0 +1,25 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:49 jlam Exp $
+
+.if !defined(RVM_BUILDLINK2_MK)
+RVM_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= rvm
+BUILDLINK_DEPENDS.rvm?= rvm>=1.3
+BUILDLINK_PKGSRCDIR.rvm?= ../../devel/rvm
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.rvm=rvm
+BUILDLINK_PREFIX.rvm_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.rvm= include/rvm/*
+BUILDLINK_FILES.rvm+= lib/librds.*
+BUILDLINK_FILES.rvm+= lib/librdslwp.*
+BUILDLINK_FILES.rvm+= lib/librvm.*
+BUILDLINK_FILES.rvm+= lib/librvmlwp.*
+BUILDLINK_FILES.rvm+= lib/libseg.*
+
+.include "../../devel/lwp/buildlink2.mk"
+
+BUILDLINK_TARGETS+= rvm-buildlink
+
+rvm-buildlink: _BUILDLINK_USE
+
+.endif # RVM_BUILDLINK2_MK
diff --git a/devel/rvm/distinfo b/devel/rvm/distinfo
index dbb0e196ebb..13a7e868a61 100644
--- a/devel/rvm/distinfo
+++ b/devel/rvm/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2002/07/03 10:59:47 jdolecek Exp $
+$NetBSD: distinfo,v 1.6 2002/08/25 18:38:50 jlam Exp $
SHA1 (rvm-1.6.tar.gz) = d6b27b37601d5d1666f3956feb6582c3cb6b1d99
Size (rvm-1.6.tar.gz) = 374944 bytes
diff --git a/devel/rvm/patches/patch-aa b/devel/rvm/patches/patch-aa
index a87b914109d..9ffbd1ad29e 100644
--- a/devel/rvm/patches/patch-aa
+++ b/devel/rvm/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.1 2002/06/20 19:28:15 jlam Exp $
+$NetBSD: patch-aa,v 1.2 2002/08/25 18:38:50 jlam Exp $
--- rvm/Makefile.in.orig Tue Jun 12 12:24:35 2001
+++ rvm/Makefile.in
diff --git a/devel/rvm/patches/patch-ab b/devel/rvm/patches/patch-ab
index c23c3cc46db..a37084a2fe1 100644
--- a/devel/rvm/patches/patch-ab
+++ b/devel/rvm/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.1 2002/07/03 10:59:48 jdolecek Exp $
+$NetBSD: patch-ab,v 1.2 2002/08/25 18:38:51 jlam Exp $
--- rvm/rvm_utils.c.orig Wed Jul 3 12:39:26 2002
+++ rvm/rvm_utils.c Wed Jul 3 12:40:30 2002
diff --git a/devel/zlib/Makefile b/devel/zlib/Makefile
index 36f003ab084..74a15eb8e65 100644
--- a/devel/zlib/Makefile
+++ b/devel/zlib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2002/08/07 13:25:36 wiz Exp $
+# $NetBSD: Makefile,v 1.14 2002/08/25 18:38:51 jlam Exp $
DISTNAME= zlib-1.1.4
CATEGORIES= devel
@@ -13,13 +13,15 @@ COMMENT= General purpose data compression library
BUILD_DEPENDS+= libtool-base>=${LIBTOOL_VERSION}:../../devel/libtool-base
+USE_BUILDLINK2= # defined
NOT_FOR_PLATFORM= NetBSD-1.[4-9]*-* # in base NetBSD system
# To avoid circular dependences we must not use "USE_LIBTOOL" but
# depend on the "libtool-base" package manually.
+#
LIBTOOL= ${LOCALBASE}/bin/libtool
-CONFIGURE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
-MAKE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
+CONFIGURE_ENV+= LIBTOOL="${BUILDLINK_LIBTOOL} ${LIBTOOL_FLAGS}"
+MAKE_ENV+= LIBTOOL="${BUILDLINK_LIBTOOL} ${LIBTOOL_FLAGS}"
MAKEFILE= lt.mk
post-extract:
diff --git a/devel/zlib/buildlink.mk b/devel/zlib/buildlink.mk
index 3c8a1a08588..11fb9328b50 100644
--- a/devel/zlib/buildlink.mk
+++ b/devel/zlib/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.9 2002/08/07 13:25:37 wiz Exp $
+# $NetBSD: buildlink.mk,v 1.10 2002/08/25 18:38:51 jlam Exp $
#
# This Makefile fragment is included by packages that use zlib.
#
diff --git a/devel/zlib/buildlink2.mk b/devel/zlib/buildlink2.mk
new file mode 100644
index 00000000000..1f952241cbe
--- /dev/null
+++ b/devel/zlib/buildlink2.mk
@@ -0,0 +1,59 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:52 jlam Exp $
+
+.if !defined(ZLIB_BUILDLINK2_MK)
+ZLIB_BUILDLINK2_MK= # defined
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILDLINK_DEPENDS.zlib?= zlib>=1.1.3
+BUILDLINK_PKGSRCDIR.zlib?= ../../devel/zlib
+
+.if defined(USE_ZLIB)
+_NEED_ZLIB= YES
+.else
+. if exists(/usr/include/zlib.h)
+_NEED_ZLIB= NO
+. else
+_NEED_ZLIB= YES
+. endif
+#
+# Solaris has a broken (for the purposes of pkgsrc) version of zlib.
+#
+_INCOMPAT_ZLIB= SunOS-*-*
+
+#
+# Some NetBSD versions shipped with versions lower than 1.1.3.
+#
+_INCOMPAT_ZLIB+= NetBSD-0.*-* NetBSD-1.[012]*-*
+_INCOMPAT_ZLIB+= NetBSD-1.3-* NetBSD-1.3.*-* NetBSD-1.3[A-H]-*
+
+INCOMPAT_ZLIB?= # empty
+. for _pattern_ in ${_INCOMPAT_ZLIB} ${INCOMPAT_ZLIB}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+_NEED_ZLIB= YES
+. endif
+. endfor
+.endif
+
+.if ${_NEED_ZLIB} == "YES"
+BUILDLINK_PACKAGES+= zlib
+EVAL_PREFIX+= BUILDLINK_PREFIX.zlib=zlib
+BUILDLINK_PREFIX.zlib_DEFAULT= ${LOCALBASE}
+.else
+BUILDLINK_PREFIX.zlib= /usr
+.endif
+
+BUILDLINK_FILES.zlib= include/zconf.h
+BUILDLINK_FILES.zlib+= include/zlib.h
+BUILDLINK_FILES.zlib+= lib/libz.*
+
+BUILDLINK_TARGETS+= zlib-buildlink
+
+.if ${_NEED_ZLIB} == "NO"
+LIBTOOL_ARCHIVE_UNTRANSFORM_SED+= \
+ -e "s|${LOCALBASE}/lib/libz.la|-L${BUILDLINK_PREFIX.zlib}/lib -lz|g"
+.endif
+
+zlib-buildlink: _BUILDLINK_USE
+
+.endif # ZLIB_BUILDLINK2_MK