summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-01-03 23:06:43 +0000
committerjlam <jlam@pkgsrc.org>2004-01-03 23:06:43 +0000
commit978d1b1f63e52f44789818d9ee110342d88579a3 (patch)
tree7815453a8a5d5cc91288c15c8c52893726b1e2bc /devel
parent3018d0705370c673d17797f0844b1c9941458717 (diff)
downloadpkgsrc-978d1b1f63e52f44789818d9ee110342d88579a3.tar.gz
Initial sprinkling of work-in-progress buildlink3.mk files for using the
buildlink3 framework.
Diffstat (limited to 'devel')
-rw-r--r--devel/SDL/buildlink3.mk29
-rw-r--r--devel/binutils/buildlink3.mk74
-rw-r--r--devel/boehm-gc/buildlink3.mk19
-rw-r--r--devel/dlcompat/buildlink3.mk19
-rw-r--r--devel/gettext-lib/buildlink3.mk129
-rw-r--r--devel/glib/buildlink3.mk23
-rw-r--r--devel/libgetopt/buildlink3.mk54
-rw-r--r--devel/libmm/buildlink3.mk19
-rw-r--r--devel/libslang/buildlink3.mk26
-rw-r--r--devel/ncurses/buildlink3.mk116
-rw-r--r--devel/pcre/buildlink3.mk19
-rw-r--r--devel/pkgconfig/buildlink3.mk24
-rw-r--r--devel/popt/buildlink3.mk21
-rw-r--r--devel/pth/buildlink3.mk19
-rw-r--r--devel/readline/buildlink3.mk88
-rw-r--r--devel/smpeg/buildlink3.mk22
-rw-r--r--devel/zlib/buildlink3.mk72
17 files changed, 773 insertions, 0 deletions
diff --git a/devel/SDL/buildlink3.mk b/devel/SDL/buildlink3.mk
new file mode 100644
index 00000000000..ed859ccd975
--- /dev/null
+++ b/devel/SDL/buildlink3.mk
@@ -0,0 +1,29 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+SDL_BUILDLINK3_MK:= ${SDL_BUILDLINK3_MK}+
+
+.if !empty(SDL_BUILDLINK3_MK:M\+)
+. include "../../mk/bsd.prefs.mk"
+
+BUILDLINK_DEPENDS.SDL?= SDL>=1.2.5nb5
+BUILDLINK_PKGSRCDIR.SDL?= ../../devel/SDL
+.endif # SDL_BUILDLINK3_MK
+
+.if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= SDL
+.endif
+
+.if !empty(SDL_BUILDLINK3_MK:M\+)
+BUILDLINK_PACKAGES+= SDL
+
+USE_X11= YES
+PTHREAD_OPTS+= require
+
+. include "../../graphics/MesaLib/buildlink3.mk"
+. include "../../graphics/glut/buildlink3.mk"
+. include "../../graphics/aalib-x11/buildlink3.mk"
+. include "../../mk/pthread.buildlink3.mk"
+.endif # SDL_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/binutils/buildlink3.mk b/devel/binutils/buildlink3.mk
new file mode 100644
index 00000000000..020c265a1e6
--- /dev/null
+++ b/devel/binutils/buildlink3.mk
@@ -0,0 +1,74 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+BINUTILS_BUILDLINK3_MK:= ${BINUTILS_BUILDLINK3_MK}+
+
+.if !defined(BINUTILS_BUILDLINK3_MK)
+BINUTILS_BUILDLINK3_MK= # defined
+
+.if !empty(BINUTILS_BUILDLINK3_MK:M\+)
+. include "../../mk/bsd.prefs.mk"
+
+BUILDLINK_DEPENDS.binutils?= binutils>=2.14.0
+BUILDLINK_PKGSRCDIR.binutils?= ../../devel/binutils
+BUILDLINK_DEPMETHOD.binutils?= build
+.endif # BINUTILS_BUILDLINK3_MK
+
+BUILDLINK_CHECK_BUILTIN.binutils?= NO
+
+.if !defined(BUILDLINK_IS_BUILTIN.binutils)
+BUILDLINK_IS_BUILTIN.binutils= YES
+.endif
+
+.if defined(USE_BINUTILS)
+_NEED_BINUTILS= YES
+.endif
+
+.if !empty(BUILDLINK_CHECK_BUILTIN.binutils:M[yY][eE][sS])
+_NEED_BINUTILS= NO
+.endif
+
+.if !defined(_NEED_BINUTILS)
+. if !empty(BUILDLINK_IS_BUILTIN.binutils:M[nN][oO])
+_NEED_BINUTILS= YES
+. else
+_NEED_BINUTILS= NO
+#
+# These versions of NetBSD didn't have a toolchain that was capable of
+# replacing binutils.
+#
+_INCOMPAT_BINUTILS= NetBSD-0.*-* NetBSD-1.[01234]*-*
+_INCOMPAT_BINUTILS+= NetBSD-1.5.*-* NetBSD-1.5[A-X]-*
+#
+# XXX: _INCOMPAT_BINUTILS settings for other operating systems possibly
+# XXX: needed here
+#
+INCOMPAT_BINUTILS?= # empty
+. for _pattern_ in ${_INCOMPAT_BINUTILS} ${INCOMPAT_BINUTILS}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+_NEED_BINUTILS= YES
+. endif
+. endfor
+. endif
+MAKEFLAGS+= _NEED_BINUTILS="${_NEED_BINUTILS}"
+.endif
+
+.if ${_NEED_BINUTILS} == "YES"
+. if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= binutils
+. endif
+.endif
+
+.if !empty(BINUTILS_BUILDLINK3_MK:M\+)
+. if ${_NEED_BINUTILS} == "YES"
+BUILDLINK_PACKAGES+= binutils
+
+AR= ${BUILDLINK_PREFIX.binutils}/bin/ar
+AS= ${BUILDLINK_PREFIX.binutils}/bin/as
+LD= ${BUILDLINK_PREFIX.binutils}/bin/ld
+NM= ${BUILDLINK_PREFIX.binutils}/bin/nm
+RANLIB= ${BUILDLINK_PREFIX.binutils}/bin/ranlib
+. endif
+.endif # BINUTILS_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/boehm-gc/buildlink3.mk b/devel/boehm-gc/buildlink3.mk
new file mode 100644
index 00000000000..8c77f114c5c
--- /dev/null
+++ b/devel/boehm-gc/buildlink3.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+BOEHM_GC_BUILDLINK3_MK:= ${BOEHM_GC_BUILDLINK3_MK}+
+
+.if !empty(BOEHM_GC_BUILDLINK3_MK:M\+)
+BUILDLINK_DEPENDS.boehm-gc?= boehm-gc>=6.2nb1
+BUILDLINK_PKGSRCDIR.boehm-gc?= ../../devel/boehm-gc
+.endif # BOEHM_GC_BUILDLINK3_MK
+
+.if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= boehm-gc
+.endif
+
+.if !empty(BOEHM_GC_BUILDLINK3_MK:M\+)
+BUILDLINK_PACKAGES+= boehm-gc
+.endif # BOEHM_GC_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/dlcompat/buildlink3.mk b/devel/dlcompat/buildlink3.mk
new file mode 100644
index 00000000000..704334f42bb
--- /dev/null
+++ b/devel/dlcompat/buildlink3.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+DLCOMPAT_BUILDLINK3_MK:= ${DLCOMPAT_BUILDLINK3_MK}+
+
+.if !empty(DLCOMPAT_BUILDLINK3_MK:M\+)
+BUILDLINK_DEPENDS.dlcompat?= dlcompat>=20020606
+BUILDLINK_PKGSRCDIR.dlcompat?= ../../devel/dlcompat
+.endif # DLCOMPAT_BUILDLINK3_MK
+
+.if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= dlcompat
+.endif
+
+.if !empty(DLCOMPAT_BUILDLINK3_MK:M\+)
+BUILDLINK_PACKAGES+= dlcompat
+.endif # DLCOMPAT_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/gettext-lib/buildlink3.mk b/devel/gettext-lib/buildlink3.mk
new file mode 100644
index 00000000000..b720068110c
--- /dev/null
+++ b/devel/gettext-lib/buildlink3.mk
@@ -0,0 +1,129 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+GETTEXT_BUILDLINK3_MK:= ${GETTEXT_BUILDLINK3_MK}+
+
+.if !empty(GETTEXT_BUILDLINK3_MK:M\+)
+. include "../../mk/bsd.prefs.mk"
+
+BUILDLINK_DEPENDS.gettext?= gettext-lib>=0.10.35nb1
+BUILDLINK_PKGSRCDIR.gettext?= ../../devel/gettext-lib
+.endif # GETTEXT_BUILDLINK3_MK
+
+BUILDLINK_CHECK_BUILTIN.gettext?= NO
+
+.if !defined(BUILDLINK_IS_BUILTIN.gettext)
+BUILDLINK_IS_BUILTIN.gettext= NO
+. if exists(/usr/include/libintl.h)
+BUILDLINK_IS_BUILTIN.gettext= YES
+. endif
+.endif
+
+.if !empty(BUILDLINK_CHECK_BUILTIN.gettext:M[yY][eE][sS])
+_NEED_GNU_GETTEXT= NO
+.endif
+
+.if !defined(_NEED_GNU_GETTEXT)
+. if !empty(BUILDLINK_IS_BUILTIN.gettext:M[nN][oO])
+_NEED_GNU_GETTEXT= YES
+. else
+#
+# Consider the base system libintl to be gettext-lib-0.10.35nb1.
+#
+_GETTEXT_PKG= gettext-lib-0.10.35nb1
+_GETTEXT_DEPENDS= ${BUILDLINK_DEPENDS.gettext}
+_NEED_GNU_GETTEXT!= \
+ if ${PKG_ADMIN} pmatch '${_GETTEXT_DEPENDS}' ${_GETTEXT_PKG}; then \
+ ${ECHO} "NO"; \
+ else \
+ ${ECHO} "YES"; \
+ fi
+#
+# The listed platforms have a broken (for the purposes of pkgsrc) version
+# of gettext-lib.
+#
+_INCOMPAT_GETTEXT= SunOS-*-*
+INCOMPAT_GETTEXT?= # empty
+. for _pattern_ in ${_INCOMPAT_GETTEXT} ${INCOMPAT_GETTEXT}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+_NEED_GNU_GETTEXT= YES
+. endif
+. endfor
+. endif
+MAKEFLAGS+= _NEED_GNU_GETTEXT=${_NEED_GNU_GETTEXT}
+.endif
+
+.if !defined(_BLNK_LIBINTL_FOUND)
+_BLNK_LIBINTL_FOUND!= \
+ if [ "`${ECHO} /usr/lib/libintl.*`" = "/usr/lib/libintl.*" ]; then \
+ ${ECHO} NO; \
+ else \
+ ${ECHO} YES; \
+ fi
+MAKEFLAGS+= _BLNK_LIBINTL_FOUND=${_BLNK_LIBINTL_FOUND}
+.endif
+
+.if ${_NEED_GNU_GETTEXT} == "YES"
+. if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= gettext
+. endif
+.endif
+
+.if !empty(GETTEXT_BUILDLINK3_MK:M\+)
+. if ${_NEED_GNU_GETTEXT} == "YES"
+BUILDLINK_PACKAGES+= gettext
+_BLNK_LIBINTL= -lintl
+_GETTEXT_ICONV_DEPENDS= gettext-lib>=0.11.5nb1
+. if !defined(_GETTEXT_NEEDS_ICONV)
+_GETTEXT_NEEDS_ICONV!= \
+ if ${PKG_INFO} -qe "${BUILDLINK_DEPENDS.gettext}"; then \
+ pkg=`cd ${_PKG_DBDIR}; ${PKG_ADMIN} -s "" lsbest '${BUILDLINK_DEPENDS.gettext}'`; \
+ if ${PKG_INFO} -qN "$$pkg" | ${GREP} -q "libiconv-[0-9]"; then \
+ ${ECHO} YES; \
+ else \
+ ${ECHO} NO; \
+ fi; \
+ else \
+ ${ECHO} YES; \
+ fi
+MAKEFLAGS+= _GETTEXT_NEEDS_ICONV=${_GETTEXT_NEEDS_ICONV}
+. endif
+. if ${_GETTEXT_NEEDS_ICONV} == "YES"
+. include "../../converters/libiconv/buildlink3.mk"
+BUILDLINK_DEPENDS.gettext= ${_GETTEXT_ICONV_DEPENDS}
+_BLNK_LIBINTL+= ${BUILDLINK_LDADD.iconv}
+. endif
+. else
+BUILDLINK_PREFIX.gettext= /usr
+. if ${_BLNK_LIBINTL_FOUND} == "YES"
+_BLNK_LIBINTL= -lintl
+. else
+_BLNK_LIBINTL= # empty
+BUILDLINK_TRANSFORM+= S:-lintl:
+. endif
+. endif
+
+BUILDLINK_LDADD.gettext?= ${_BLNK_LIBINTL}
+
+# Add -lintl to LIBS in CONFIGURE_ENV to work around broken gettext.m4:
+# older gettext.m4 does not add -lintl where it should, and the resulting
+# configure script fails to detect if libintl.a is the genuine GNU gettext
+# or not.
+#
+. if defined(GNU_CONFIGURE)
+LIBS+= ${BUILDLINK_LDADD.gettext}
+CONFIGURE_ENV+= INTLLIBS="${BUILDLINK_LDADD.gettext}"
+. if ${_NEED_GNU_GETTEXT} == "NO"
+. if ${_BLNK_LIBINTL_FOUND} == "YES"
+CONFIGURE_ENV+= gt_cv_func_gnugettext1_libintl="yes"
+. endif
+. endif
+. if ${_NEED_GNU_GETTEXT} == "YES"
+CONFIGURE_ARGS+= --with-libintl-prefix=${BUILDLINK_PREFIX.gettext}
+. else
+CONFIGURE_ARGS+= --without-libintl-prefix
+. endif
+. endif
+.endif # GETTEXT_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/glib/buildlink3.mk b/devel/glib/buildlink3.mk
new file mode 100644
index 00000000000..5f0043674a7
--- /dev/null
+++ b/devel/glib/buildlink3.mk
@@ -0,0 +1,23 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+GLIB_BUILDLINK3_MK:= ${GLIB_BUILDLINK3_MK}+
+
+.if !empty(GLIB_BUILDLINK3_MK:M\+)
+BUILDLINK_DEPENDS.glib?= glib>=1.2.10nb5
+BUILDLINK_PKGSRCDIR.glib?= ../../devel/glib
+.endif # GLIB_BUILDLINK3_MK
+
+.if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= glib
+.endif
+
+.if !empty(GLIB_BUILDLINK3_MK:M\+)
+BUILDLINK_PACKAGES+= glib
+
+PTHREAD_OPTS+= require
+
+. include "../../mk/pthread.buildlink3.mk"
+.endif # GLIB_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/libgetopt/buildlink3.mk b/devel/libgetopt/buildlink3.mk
new file mode 100644
index 00000000000..3c4780d687c
--- /dev/null
+++ b/devel/libgetopt/buildlink3.mk
@@ -0,0 +1,54 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+GETOPT_BUILDLINK3_MK:= ${GETOPT_BUILDLINK3_MK}+
+
+.if !empty(GETOPT_BUILDLINK3_MK:M\+)
+BUILDLINK_DEPENDS.getopt?= libgetopt>=1.3
+BUILDLINK_PKGSRCDIR.getopt?= ../../devel/libgetopt
+.endif # GETOPT_BUILDLINK3_MK
+
+BUILDLINK_CHECK_BUILTIN.getopt?= NO
+
+.if !defined(BUILDLINK_IS_BUILTIN.getopt)
+BUILDLINK_IS_BUILTIN.getopt= NO
+. if exists(/usr/include/getopt.h)
+BUILDLINK_IS_BUILTIN.getopt= YES
+. endif
+.endif
+
+.if !empty(BUILDLINK_CHECK_BUILTIN.getopt:M[yY][eE][sS])
+_NEED_GETOPT= NO
+.endif
+
+.if !defined(_NEED_GETOPT)
+. if !empty(BUILDLINK_IS_BUILTIN.getopt:M[nN][oO])
+_NEED_GETOPT= YES
+. else
+_NEED_GETOPT= NO
+. endif
+MAKEFLAGS+= _NEED_GETOPT="${_NEED_GETOPT}"
+.endif
+
+.if ${_NEED_GETOPT} == "YES"
+. if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= getopt
+. endif
+.endif
+
+.if !empty(GETOPT_BUILDLINK3_MK:M\+)
+. if ${_NEED_GETOPT} == "YES"
+BUILDLINK_PACKAGES+= getopt
+LIBGETOPT= -lgetopt
+. else
+BUILDLINK_PREFIX.getopt= /usr
+LIBGETOPT= # empty
+. endif
+
+BUILDLINK_LDADD.getopt?= ${LIBGETOPT}
+
+CONFIGURE_ENV+= LIBGETOPT="${LIBGETOPT}"
+MAKE_ENV+= LIBGETOPT="${LIBGETOPT}"
+.endif # GETOPT_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/libmm/buildlink3.mk b/devel/libmm/buildlink3.mk
new file mode 100644
index 00000000000..8eb94f0c2f8
--- /dev/null
+++ b/devel/libmm/buildlink3.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+LIBMM_BUILDLINK3_MK:= ${LIBMM_BUILDLINK3_MK}+
+
+.if !empty(LIBMM_BUILDLINK3_MK:M\+)
+BUILDLINK_DEPENDS.libmm?= libmm>=1.2.1
+BUILDLINK_PKGSRCDIR.libmm?= ../../devel/libmm
+.endif # LIBMM_BUILDLINK3_MK
+
+.if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= libmm
+.endif
+
+.if !empty(LIBMM_BUILDLINK3_MK:M\+)
+BUILDLINK_PACKAGES+= libmm
+.endif # LIBMM_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/libslang/buildlink3.mk b/devel/libslang/buildlink3.mk
new file mode 100644
index 00000000000..7fe19fc17a4
--- /dev/null
+++ b/devel/libslang/buildlink3.mk
@@ -0,0 +1,26 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+LIBSLANG_BUILDLINK3_MK:= ${LIBSLANG_BUILDLINK3_MK}+
+
+.include "../../mk/bsd.prefs.mk"
+
+.if !empty(LIBSLANG_BUILDLINK3_MK:M\+)
+BUILDLINK_DEPENDS.libslang?= libslang>=1.4.9nb1
+BUILDLINK_PKGSRCDIR.libslang?= ../../devel/libslang
+.endif # LIBSLANG_BUILDLINK3_MK
+
+.if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= libslang
+.endif
+
+.if !empty(LIBSLANG_BUILDLINK3_MK:M\+)
+BUILDLINK_PACKAGES+= libslang
+
+# Debian adds a dependency on ncurses.
+. if ${OPSYS} == "Linux" && ${LOWER_VENDOR} == "debian"
+. include "../../devel/ncurses/buildlink3.mk"
+. endif
+.endif # LIBSLANG_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/ncurses/buildlink3.mk b/devel/ncurses/buildlink3.mk
new file mode 100644
index 00000000000..5c4634971d5
--- /dev/null
+++ b/devel/ncurses/buildlink3.mk
@@ -0,0 +1,116 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+#
+# Optionally define:
+#
+# USE_NCURSES force use of ncurses
+# INCOMPAT_CURSES specify MACHINE_PLATFORM versions that are missing
+# some needed functions.
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+NCURSES_BUILDLINK3_MK:= ${NCURSES_BUILDLINK3_MK}+
+
+.if !empty(NCURSES_BUILDLINK3_MK:M\+)
+. include "../../mk/bsd.prefs.mk"
+
+BUILDLINK_DEPENDS.ncurses?= ncurses>=5.3nb1
+BUILDLINK_PKGSRCDIR.ncurses?= ../../devel/ncurses
+.endif # NCURSES_BUILDLINK3_MK
+
+BUILDLINK_CHECK_BUILTIN.ncurses?= NO
+
+.if !defined(BUILDLINK_IS_BUILTIN.ncurses)
+BUILDLINK_IS_BUILTIN.ncurses= NO
+.endif
+
+.if !defined(_BLNK_LIBNCURSES_FOUND)
+_BLNK_LIBNCURSES_FOUND!= \
+ if [ "`${ECHO} /usr/lib/libncurses.*`" = "/usr/lib/libncurses.*" ]; then \
+ ${ECHO} NO; \
+ else \
+ ${ECHO} YES; \
+ fi
+MAKEFLAGS+= _BLNK_LIBNCURSES_FOUND=${_BLNK_LIBNCURSES_FOUND}
+.endif
+
+.if ${_BLNK_LIBNCURSES_FOUND} == "YES"
+BUILDLINK_IS_BUILTIN.ncurses= YES
+.endif
+
+.if !empty(BUILDLINK_CHECK_BUILTIN.ncurses:M[yY][eE][sS])
+_NEED_NCURSES= NO
+.endif
+
+.if !defined(_NEED_NCURSES)
+. if !empty(BUILDLINK_IS_BUILTIN.ncurses:M[nN][oO])
+_NEED_NCURSES= NO
+. else
+#
+# 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]-*
+#
+# These catch-alls are 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+= IRIX-*-*
+_INCOMPAT_CURSES+= Darwin-*-*
+
+INCOMPAT_CURSES?= # empty
+. for _pattern_ in ${_INCOMPAT_CURSES} ${INCOMPAT_CURSES}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+_NEED_NCURSES= YES
+. endif
+. endfor
+. endif
+MAKEFLAGS+= _NEED_NCURSES="${_NEED_NCURSES}"
+.endif
+
+.if ${_NEED_NCURSES} == "YES"
+. if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= ncurses
+. endif
+.endif
+
+.if !empty(NCURSES_BUILDLINK3_MK:M\+)
+. if ${_NEED_NCURSES} == "YES"
+BUILDLINK_PACKAGES+= ncurses
+. else
+BUILDLINK_PREFIX.ncurses= /usr
+. if ${_BLNK_LIBNCURSES_FOUND} == "NO"
+BUILDLINK_TRANSFORM.ncurses+= -e "s|/curses.h|/ncurses.h|g"
+BUILDLINK_TRANSFORM+= l:ncurses:curses
+. endif
+. endif
+
+BUILDLINK_FILES.ncurses= include/curses.h
+BUILDLINK_FILES.ncurses+= include/term.h
+
+BUILDLINK_TARGETS+= buildlink-ncurses-curses-h
+BUILDLINK_TARGETS+= buildlink-ncurses-extra-includes
+
+.PHONY: buildlink-ncurses-extra-includes
+buildlink-ncurses-extra-includes:
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ extra_includes=" \
+ include/term.h \
+ "; \
+ for f in $${extra_includes}; do \
+ if [ ! -f ${BUILDLINK_DIR}/$${f} ]; then \
+ ${ECHO_BUILDLINK_MSG} "Touching extra ncurses header ($${f}) in ${BUILDLINK_DIR}."; \
+ ${TOUCH} ${TOUCH_FLAGS} ${BUILDLINK_DIR}/$${f}; \
+ fi; \
+ done
+
+.PHONY: buildlink-ncurses-curses-h
+buildlink-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 ncurses.h ${BUILDLINK_DIR}/include/curses.h; \
+ fi
+.endif # NCURSES_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/pcre/buildlink3.mk b/devel/pcre/buildlink3.mk
new file mode 100644
index 00000000000..07180cac848
--- /dev/null
+++ b/devel/pcre/buildlink3.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+PCRE_BUILDLINK3_MK:= ${PCRE_BUILDLINK3_MK}+
+
+.if !empty(PCRE_BUILDLINK3_MK:M\+)
+BUILDLINK_DEPENDS.pcre?= pcre>=3.4nb1
+BUILDLINK_PKGSRCDIR.pcre?= ../../devel/pcre
+.endif # PCRE_BUILDLINK3_MK
+
+.if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= pcre
+.endif
+
+.if !empty(PCRE_BUILDLINK3_MK:M\+)
+BUILDLINK_PACKAGES+= pcre
+.endif # PCRE_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/pkgconfig/buildlink3.mk b/devel/pkgconfig/buildlink3.mk
new file mode 100644
index 00000000000..838ae571330
--- /dev/null
+++ b/devel/pkgconfig/buildlink3.mk
@@ -0,0 +1,24 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+PKGCONFIG_BUILDLINK3_MK:= ${PKGCONFIG_BUILDLINK3_MK}+
+
+.if !empty(PKGCONFIG_BUILDLINK3_MK:M\+)
+BUILDLINK_DEPENDS.pkgconfig?= pkgconfig>=0.15.0
+BUILDLINK_PKGSRCDIR.pkgconfig?= ../../devel/pkgconfig
+BUILDLINK_DEPMETHOD.pkgconfig?= build
+.endif # PKGCONFIG_BUILDLINK3_MK
+
+.if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= pkgconfig
+.endif
+
+.if !empty(PKGCONFIG_BUILDLINK3_MK:M\+)
+BUILDLINK_PACKAGES+= pkgconfig
+
+PKG_CONFIG_PATH?= ${LOCALBASE}/lib/pkgconfig:${X11BASE}/lib/pkgconfig
+CONFIGURE_ENV+= PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
+MAKE_ENV+= PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
+.endif # PKGCONFIG_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/popt/buildlink3.mk b/devel/popt/buildlink3.mk
new file mode 100644
index 00000000000..117a591eb34
--- /dev/null
+++ b/devel/popt/buildlink3.mk
@@ -0,0 +1,21 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:43 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+POPT_BUILDLINK3_MK:= ${POPT_BUILDLINK3_MK}+
+
+.if !empty(POPT_BUILDLINK3_MK:M\+)
+BUILDLINK_DEPENDS.popt?= popt>=1.7nb3
+BUILDLINK_PKGSRCDIR.popt?= ../../devel/popt
+.endif # POPT_BUILDLINK3_MK
+
+.if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= popt
+.endif
+
+.if !empty(POPT_BUILDLINK3_MK:M\+)
+BUILDLINK_PACKAGES+= popt
+
+. include "../../devel/gettext-lib/buildlink3.mk"
+.endif # POPT_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/pth/buildlink3.mk b/devel/pth/buildlink3.mk
new file mode 100644
index 00000000000..8ac152f2645
--- /dev/null
+++ b/devel/pth/buildlink3.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:44 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+PTH_BUILDLINK3_MK:= ${PTH_BUILDLINK3_MK}+
+
+.if !empty(PTH_BUILDLINK3_MK:M\+)
+BUILDLINK_DEPENDS.pth?= pth>=2.0.0
+BUILDLINK_PKGSRCDIR.pth?= ../../devel/pth
+.endif # PTH_BUILDLINK3_MK
+
+.if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= pth
+.endif
+
+.if !empty(PTH_BUILDLINK3_MK:M\+)
+BUILDLINK_PACKAGES+= pth
+.endif # PTH_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/readline/buildlink3.mk b/devel/readline/buildlink3.mk
new file mode 100644
index 00000000000..9a8b28c10bd
--- /dev/null
+++ b/devel/readline/buildlink3.mk
@@ -0,0 +1,88 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:44 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.
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+READLINE_BUILDLINK3_MK:= ${READLINE_BUILDLINK3_MK}+
+
+.if !empty(READLINE_BUILDLINK3_MK:M\+)
+. include "../../mk/bsd.prefs.mk"
+BUILDLINK_PACKAGES+= readline
+BUILDLINK_DEPENDS.readline?= readline>=2.2
+BUILDLINK_PKGSRCDIR.readline?= ../../devel/readline
+.endif # READLINE_BUILDLINK3_MK
+
+BUILDLINK_CHECK_BUILTIN.readline?= NO
+
+.if !defined(BUILDLINK_IS_BUILTIN.readline)
+BUILDLINK_IS_BUILTIN.readline= NO
+. if exists(/usr/include/readline.h) || \
+ exists(/usr/include/readline/readline.h)
+BUILDLINK_IS_BUILTIN.readline= YES
+. endif
+.endif
+
+.if defined(USE_GNU_READLINE)
+BUILDLINK_USE_BUILTIN.readline= NO
+.endif
+
+.if !empty(BUILDLINK_CHECK_BUILTIN.readline:M[yY][eE][sS])
+BUILDLINK_USE_BUILTIN.readline= YES
+.endif
+
+.if !defined(BUILDLINK_USE_BUILTIN.readline)
+. if !empty(BUILDLINK_IS_BUILTIN.readline:M[nN][oO])
+BUILDLINK_USE_BUILTIN.readline= NO
+. else
+BUILDLINK_USE_BUILTIN.readline= YES
+#
+# These catch-alls are 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_})
+BUILDLINK_USE_BUILTIN.readline= NO
+. endif
+. endfor
+. endif
+MAKEFLAGS+= \
+ BUILDLINK_USE_BUILTIN.readline="${BUILDLINK_USE_BUILTIN.readline}"
+.endif
+
+.if ${BUILDLINK_USE_BUILTIN.readline} == "NO"
+. if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= readline
+. endif
+.endif
+
+.if !empty(READLINE_BUILDLINK3_MK:M\+)
+. if ${BUILDLINK_USE_BUILTIN.readline} == "YES"
+BUILDLINK_PREFIX.readline= /usr
+. if !defined(_BLNK_LIBEDIT_FOUND)
+_BLNK_LIBEDIT_FOUND!= \
+ if [ "`${ECHO} /usr/lib/libedit.*`" = "/usr/lib/libedit.*" ]; then \
+ ${ECHO} NO; \
+ else \
+ ${ECHO} YES; \
+ fi
+MAKEFLAGS+= _BLNK_LIBEDIT_FOUND=${_BLNK_LIBEDIT_FOUND}
+. endif
+. if ${_BLNK_LIBEDIT_FOUND} == "YES"
+BUILDLINK_TRANSFORM+= l:history:edit
+BUILDLINK_TRANSFORM+= l:readline:edit:termcap
+. endif
+. endif
+
+BUILDLINK_FILES.readline= include/history.h
+BUILDLINK_FILES.readline+= include/readline.h
+BUILDLINK_TRANSFORM.readline= \
+ -e "s|include/history.h|include/readline/history.h|g" \
+ -e "s|include/readline.h|include/readline/readline.h|g"
+.endif # READLINE_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/smpeg/buildlink3.mk b/devel/smpeg/buildlink3.mk
new file mode 100644
index 00000000000..2a567fa91a5
--- /dev/null
+++ b/devel/smpeg/buildlink3.mk
@@ -0,0 +1,22 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:44 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+SPMEG_BUILDLINK3_MK:= ${SPMEG_BUILDLINK3_MK}+
+
+.if !empty(SPMEG_BUILDLINK3_MK:M\+)
+BUILDLINK_DEPENDS.smpeg?= smpeg>=0.4.4nb3
+BUILDLINK_PKGSRCDIR.smpeg?= ../../devel/smpeg
+.endif # SMPEG_BUILDLINK3_MK
+
+.if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= smpeg
+.endif
+
+.if !empty(SPMEG_BUILDLINK3_MK:M\+)
+BUILDLINK_PACKAGES+= smpeg
+
+. include "../../devel/SDL/buildlink3.mk"
+. include "../../devel/gettext-lib/buildlink3.mk"
+.endif # SMPEG_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}
diff --git a/devel/zlib/buildlink3.mk b/devel/zlib/buildlink3.mk
new file mode 100644
index 00000000000..195bdfb1687
--- /dev/null
+++ b/devel/zlib/buildlink3.mk
@@ -0,0 +1,72 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:44 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+ZLIB_BUILDLINK3_MK:= ${ZLIB_BUILDLINK3_MK}+
+
+.if !empty(ZLIB_BUILDLINK3_MK:M\+)
+. include "../../mk/bsd.prefs.mk"
+
+BUILDLINK_DEPENDS.zlib?= zlib>=1.1.4nb1
+BUILDLINK_PKGSRCDIR.zlib?= ../../devel/zlib
+.endif # ZLIB_BUILDLINK3_MK
+
+BUILDLINK_CHECK_BUILTIN.zlib?= NO
+
+.if !defined(BUILDLINK_IS_BUILTIN.zlib)
+BUILDLINK_IS_BUILTIN.zlib= NO
+. if exists(/usr/include/zlib.h)
+BUILDLINK_IS_BUILTIN.zlib= YES
+. endif
+.endif
+
+.if !empty(BUILDLINK_CHECK_BUILTIN.zlib:M[yY][eE][sS])
+_NEED_ZLIB= NO
+.endif
+
+.if !defined(_NEED_ZLIB)
+. if !empty(BUILDLINK_IS_BUILTIN.zlib:M[nN][oO])
+_NEED_ZLIB= YES
+. else
+_NEED_ZLIB= NO
+#
+# The listed platforms have a broken (for the purposes of pkgsrc) version
+# of this package.
+#
+_INCOMPAT_ZLIB= SunOS-*-*
+_INCOMPAT_ZLIB+= IRIX-*-*
+_INCOMPAT_ZLIB+= Darwin-*-*
+_INCOMPAT_ZLIB+= Linux-*-*
+#
+# Some NetBSD versions shipped with zlib 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 defined(USE_ZLIB)
+_NEED_ZLIB= YES
+. endif
+MAKEFLAGS+= _NEED_ZLIB="${_NEED_ZLIB}"
+.endif
+
+.if ${_NEED_ZLIB} == "YES"
+. if !empty(BUILDLINK_DEPTH:M\+)
+BUILDLINK_DEPENDS+= zlib
+. endif
+.endif
+
+.if !empty(ZLIB_BUILDLINK3_MK:M\+)
+. if ${_NEED_ZLIB} == "YES"
+BUILDLINK_PACKAGES+= zlib
+. else
+BUILDLINK_PREFIX.zlib= /usr
+. endif
+.endif # ZLIB_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//}