summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-06-01 18:02:37 +0000
committerjlam <jlam@pkgsrc.org>2005-06-01 18:02:37 +0000
commit95fd1f6ec9ce583a46e4351179d93b744a17d1ad (patch)
tree614ebca62dbe176d9c75cab1cfeef7c554a336c9 /net
parent6469e231c2dabc4fdb3edae536776b2c90cf5616 (diff)
downloadpkgsrc-95fd1f6ec9ce583a46e4351179d93b744a17d1ad.tar.gz
Massive cleanup of buildlink3.mk and builtin.mk files in pkgsrc.
Several changes are involved since they are all interrelated. These changes affect about 1000 files. The first major change is rewriting bsd.builtin.mk as well as all of the builtin.mk files to follow the new example in bsd.builtin.mk. The loop to include all of the builtin.mk files needed by the package is moved from bsd.builtin.mk and into bsd.buildlink3.mk. bsd.builtin.mk is now included by each of the individual builtin.mk files and provides some common logic for all of the builtin.mk files. Currently, this includes the computation for whether the native or pkgsrc version of the package is preferred. This causes USE_BUILTIN.* to be correctly set when one builtin.mk file includes another. The second major change is teach the builtin.mk files to consider files under ${LOCALBASE} to be from pkgsrc-controlled packages. Most of the builtin.mk files test for the presence of built-in software by checking for the existence of certain files, e.g. <pthread.h>, and we now assume that if that file is under ${LOCALBASE}, then it must be from pkgsrc. This modification is a nod toward LOCALBASE=/usr. The exceptions to this new check are the X11 distribution packages, which are handled specially as noted below. The third major change is providing builtin.mk and version.mk files for each of the X11 distribution packages in pkgsrc. The builtin.mk file can detect whether the native X11 distribution is the same as the one provided by pkgsrc, and the version.mk file computes the version of the X11 distribution package, whether it's built-in or not. The fourth major change is that the buildlink3.mk files for X11 packages that install parts which are part of X11 distribution packages, e.g. Xpm, Xcursor, etc., now use imake to query the X11 distribution for whether the software is already provided by the X11 distribution. This is more accurate than grepping for a symbol name in the imake config files. Using imake required sprinkling various builtin-imake.mk helper files into pkgsrc directories. These files are used as input to imake since imake can't use stdin for that purpose. The fifth major change is in how packages note that they use X11. Instead of setting USE_X11, package Makefiles should now include x11.buildlink3.mk instead. This causes the X11 package buildlink3 and builtin logic to be executed at the correct place for buildlink3.mk and builtin.mk files that previously set USE_X11, and fixes packages that relied on buildlink3.mk files to implicitly note that X11 is needed. Package buildlink3.mk should also include x11.buildlink3.mk when linking against the package libraries requires also linking against the X11 libraries. Where it was obvious, redundant inclusions of x11.buildlink3.mk have been removed.
Diffstat (limited to 'net')
-rw-r--r--net/IglooFTP/Makefile3
-rw-r--r--net/amule/Makefile3
-rw-r--r--net/arla/Makefile5
-rw-r--r--net/bind9/builtin.mk92
-rw-r--r--net/bug-buddy/Makefile3
-rw-r--r--net/ed2k-gtk-gui/Makefile3
-rw-r--r--net/etherape/Makefile3
-rw-r--r--net/ethereal/Makefile3
-rw-r--r--net/gtk-gnutella/Makefile3
-rw-r--r--net/gtk_wicontrol/Makefile3
-rw-r--r--net/icsi-finger/Makefile5
-rw-r--r--net/libpcap/builtin.mk121
-rw-r--r--net/mldonkey-gui/Makefile3
-rw-r--r--net/mtr-gtk/Makefile3
-rw-r--r--net/nam/Makefile3
-rw-r--r--net/netbsd-tap/builtin.mk51
-rw-r--r--net/netsaint-base/Makefile.common5
-rw-r--r--net/ns/Makefile3
-rw-r--r--net/pload/Makefile3
-rw-r--r--net/rdesktop/Makefile4
-rw-r--r--net/skype/Makefile4
-rw-r--r--net/tsclient/Makefile3
-rw-r--r--net/ttt/Makefile3
-rw-r--r--net/vino/Makefile3
-rw-r--r--net/wistumbler/Makefile3
-rw-r--r--net/x2vnc/Makefile4
-rw-r--r--net/xipdump/Makefile3
-rw-r--r--net/xtraceroute/Makefile3
-rw-r--r--net/ytalk-x11/Makefile4
29 files changed, 225 insertions, 127 deletions
diff --git a/net/IglooFTP/Makefile b/net/IglooFTP/Makefile
index 882b81ac4bb..e198237f1f7 100644
--- a/net/IglooFTP/Makefile
+++ b/net/IglooFTP/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2005/04/11 21:46:44 tv Exp $
+# $NetBSD: Makefile,v 1.11 2005/06/01 18:03:07 jlam Exp $
DISTNAME= IglooFTP-0.6.1
PKGREVISION= 4
@@ -12,7 +12,6 @@ HOMEPAGE= http://www.littleigloo.org/iglooftp.php3
COMMENT= Easy to use FTP client for X Window System
WRKSRC= ${WRKDIR}/${DISTNAME}/src
-USE_X11= yes
post-extract:
${RM} ${WRKSRC}/../share/docs/LICENSE~
diff --git a/net/amule/Makefile b/net/amule/Makefile
index 2ad8cc019af..7d78a593ad0 100644
--- a/net/amule/Makefile
+++ b/net/amule/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2005/05/22 20:08:23 jlam Exp $
+# $NetBSD: Makefile,v 1.23 2005/06/01 18:03:07 jlam Exp $
#
DISTNAME= aMule-1.2.8
@@ -20,7 +20,6 @@ USE_DIRS+= xdg-1.1
USE_TOOLS+= gmake
USE_LANGUAGES= c c++
USE_PKGLOCALEDIR= yes
-USE_X11= yes
GNU_CONFIGURE= yes
LIBS+= -lm
diff --git a/net/arla/Makefile b/net/arla/Makefile
index 467543fad38..e2e96444027 100644
--- a/net/arla/Makefile
+++ b/net/arla/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2005/04/11 21:46:44 tv Exp $
+# $NetBSD: Makefile,v 1.45 2005/06/01 18:03:07 jlam Exp $
DISTNAME= arla-0.38
PKGREVISION= 2
@@ -15,7 +15,6 @@ CONFLICTS+= rx-[0-9]*
OSVERSION_SPECIFIC= yes
INFO_FILES= arla.info send-pr.info
-USE_X11= yes
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
USE_PKGINSTALL= yes
@@ -57,6 +56,8 @@ OWN_DIRS_PERMS= ${ARLA_CACHE} ${ROOT_USER} ${ROOT_GROUP} 0700
INSTALL_EXTRA_TMPL= ${.CURDIR}/INSTALL
DEINSTALL_EXTRA_TMPL= ${.CURDIR}/DEINSTALL
+.include "../../mk/x11.buildlink3.mk"
+
post-install:
${RM} -f ${EGDIR}/*.default
${SED} ${FILES_SUBST_SED} \
diff --git a/net/bind9/builtin.mk b/net/bind9/builtin.mk
index 94c76c2e585..d313b6508c3 100644
--- a/net/bind9/builtin.mk
+++ b/net/bind9/builtin.mk
@@ -1,34 +1,82 @@
-# $NetBSD: builtin.mk,v 1.6 2004/09/30 15:07:46 tron Exp $
+# $NetBSD: builtin.mk,v 1.7 2005/06/01 18:03:07 jlam Exp $
-.if !defined(IS_BUILTIN.bind)
-IS_BUILTIN.bind= no
+BUILTIN_PKG:= bind
+
+BUILTIN_FIND_LIBS:= bind
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+.if !defined(BUILTIN_VERSION.bind)
. if exists(/usr/sbin/named)
-_BIND_VERSION!=${ECHO} 'vers ' && /usr/sbin/named -v | ${SED} -n 's/^BIND //p'
+BUILTIN_VERSION.bind!= \
+ ${ECHO} 'vers ' && /usr/sbin/named -v | ${SED} -n 's/^BIND //p'
. endif
-. if defined(_BIND_VERSION) && !empty(_BIND_VERSION:Nvers)
+.endif
+MAKEVARS+= BUILTIN_VERSION.bind
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
+.if !defined(IS_BUILTIN.bind)
+IS_BUILTIN.bind= no
+. if !empty(BUILTIN_VERSION.bind:Nvers) && \
+ !empty(BUILTIN_LIB_FOUND.bind:M[yY][eE][sS])
IS_BUILTIN.bind= yes
-BUILTIN_PKG.bind= bind-${_BIND_VERSION:Nvers}
-BUILDLINK_VARS+= BUILTIN_PKG.bind
. endif
-.endif # IS_BUILTIN.bind
-BUILDLINK_VARS+= IS_BUILTIN.bind
+.endif
+MAKEVARS+= IS_BUILTIN.bind
+
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.bind) && \
+ !empty(IS_BUILTIN.bind:M[yY][eE][sS])
+BUILTIN_PKG.bind= bind-${BUILTIN_VERSION.bind:Nvers}
+.endif
+MAKEVARS+= BUILTIN_PKG.bind
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
.if !defined(USE_BUILTIN.bind)
-USE_BUILTIN.bind?= ${IS_BUILTIN.bind}
-. if defined(BUILTIN_PKG.bind)
-. for _depend_ in ${BUILDLINK_DEPENDS.bind}
-. if !empty(USE_BUILTIN.bind:M[yY][eE][sS])
+. if ${PREFER.bind} == "pkgsrc"
+USE_BUILTIN.bind= no
+. else
+USE_BUILTIN.bind= ${IS_BUILTIN.bind}
+. if defined(BUILTIN_PKG.bind) && \
+ !empty(IS_BUILTIN.bind:M[yY][eE][sS])
+USE_BUILTIN.bind= yes
+. for _dep_ in ${BUILDLINK_DEPENDS.bind}
+. if !empty(USE_BUILTIN.bind:M[yY][eE][sS])
USE_BUILTIN.bind!= \
- if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.bind}; then \
- ${ECHO} "yes"; \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.bind:Q}; then \
+ ${ECHO} yes; \
else \
- ${ECHO} "no"; \
+ ${ECHO} no; \
fi
-. endif
-. endfor
+. endif
+. endfor
+. endif
+. endif # PREFER.bind
+.endif
+MAKEVARS+= USE_BUILTIN.bind
+
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
+CHECK_BUILTIN.bind?= no
+.if !empty(CHECK_BUILTIN.bind:M[nN][oO])
+
+. if !empty(USE_BUILTIN.bind:M[yY][eE][sS])
+. if !empty(BUILTIN_LIB_FOUND.bind:M[yY][eE][sS])
+BUILDLINK_LDADD.bind?= -lbind
+. endif
+. elif !empty(USE_BUILTIN.bind:M[nN][oO])
+BUILDLINK_LDADD.bind?= -lbind
. endif
-.endif # USE_BUILTIN.bind
-.if !empty(USE_BUILTIN.bind:M[nN][oO])
-BUILDLINK_LDADD.bind?= -lbind
-.endif
+.endif # CHECK_BUILTIN.bind
diff --git a/net/bug-buddy/Makefile b/net/bug-buddy/Makefile
index a2f73bceafd..062775bfb9f 100644
--- a/net/bug-buddy/Makefile
+++ b/net/bug-buddy/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2005/05/22 20:08:23 jlam Exp $
+# $NetBSD: Makefile,v 1.33 2005/06/01 18:03:07 jlam Exp $
#
DISTNAME= bug-buddy-2.10.0
@@ -16,7 +16,6 @@ GNU_CONFIGURE= YES
USE_DIRS+= gnome2-1.5
USE_PKGLOCALEDIR= YES
USE_TOOLS+= gmake
-USE_X11= YES
USE_LIBTOOL= YES
GCONF2_SCHEMAS= bug-buddy.schemas
diff --git a/net/ed2k-gtk-gui/Makefile b/net/ed2k-gtk-gui/Makefile
index dc97d97dd72..c8c19f277f5 100644
--- a/net/ed2k-gtk-gui/Makefile
+++ b/net/ed2k-gtk-gui/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2005/04/11 21:46:46 tv Exp $
+# $NetBSD: Makefile,v 1.12 2005/06/01 18:03:07 jlam Exp $
DISTNAME= ed2k-gtk-gui-0.6.3
PKGREVISION= 1
@@ -10,7 +10,6 @@ HOMEPAGE= http://ed2k-gtk-gui.sourceforge.net/
COMMENT= GUI for the eDonkey2000 and Overnet
USE_DIRS+= xdg-1.1
-USE_X11= yes
USE_PKGLOCALEDIR= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV+= CONFIGURE_LDFLAGS=${LDFLAGS:Q}
diff --git a/net/etherape/Makefile b/net/etherape/Makefile
index f618d6634e1..0f2f67dfa23 100644
--- a/net/etherape/Makefile
+++ b/net/etherape/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2005/05/22 20:08:23 jlam Exp $
+# $NetBSD: Makefile,v 1.26 2005/06/01 18:03:07 jlam Exp $
DISTNAME= etherape-0.9.1
PKGREVISION= 1
@@ -13,7 +13,6 @@ USE_TOOLS+= gmake
USE_DIRS+= xdg-1.1
USE_PKGINSTALL= YES
USE_PKGLOCALEDIR= YES
-USE_X11= YES
GNU_CONFIGURE= YES
PKG_SYSCONFSUBDIR= etherape
diff --git a/net/ethereal/Makefile b/net/ethereal/Makefile
index 9119a802102..eba1294f917 100644
--- a/net/ethereal/Makefile
+++ b/net/ethereal/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.108 2005/05/06 13:54:48 tron Exp $
+# $NetBSD: Makefile,v 1.109 2005/06/01 18:03:07 jlam Exp $
DISTNAME= ethereal-0.10.11
CATEGORIES= net
@@ -21,7 +21,6 @@ MAINTAINER= frueauf@NetBSD.org
HOMEPAGE= http://www.ethereal.com/
COMMENT= Network protocol analyzer
-USE_X11= YES
USE_PERL5= build
USE_LIBTOOL= YES
diff --git a/net/gtk-gnutella/Makefile b/net/gtk-gnutella/Makefile
index 4d7fc2dd484..cd6c9f3a38b 100644
--- a/net/gtk-gnutella/Makefile
+++ b/net/gtk-gnutella/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2005/05/23 07:58:09 adam Exp $
+# $NetBSD: Makefile,v 1.43 2005/06/01 18:03:07 jlam Exp $
DISTNAME= gtk-gnutella-0.95.3
CATEGORIES= net
@@ -11,7 +11,6 @@ COMMENT= GTK-based gnutella client
USE_PKGLOCALEDIR= yes
USE_TOOLS+= gmake
-USE_X11= yes
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= ./Configure
CONFIGURE_ARGS+= -d -e -r -s \
diff --git a/net/gtk_wicontrol/Makefile b/net/gtk_wicontrol/Makefile
index 939c0e5a6b6..4694d893e32 100644
--- a/net/gtk_wicontrol/Makefile
+++ b/net/gtk_wicontrol/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2005/05/22 20:08:24 jlam Exp $
+# $NetBSD: Makefile,v 1.17 2005/06/01 18:03:07 jlam Exp $
DISTNAME= gtk_wicontrol-0.17
PKGREVISION= 3
@@ -12,7 +12,6 @@ COMMENT= GTK+-based Wavelan status meter
ONLY_FOR_PLATFORM= *BSD-*-*
USE_PKGLOCALEDIR= yes
-USE_X11= yes
GNU_CONFIGURE= yes
USE_TOOLS+= gmake
diff --git a/net/icsi-finger/Makefile b/net/icsi-finger/Makefile
index a0be9d07591..c831d73c6d9 100644
--- a/net/icsi-finger/Makefile
+++ b/net/icsi-finger/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2004/01/20 12:22:19 agc Exp $
+# $NetBSD: Makefile,v 1.8 2005/06/01 18:03:07 jlam Exp $
#
DISTNAME= icsi-finger-1.0.27
@@ -10,11 +10,12 @@ MAINTAINER= is@NetBSD.org
COMMENT= Distributed finger service
WRKSRC= ${WRKDIR}/finger
-USE_X11= yes
XMPLD= ${PREFIX}/share/examples/icsi-finger
XMPLDT= ${XMPLD}/targets
+.include "../../mk/x11.buildlink3.mk"
+
pre-configure:
${RM} -f ${WRKSRC}/config.h
${SED} -e s@/usr/local@${PREFIX}@ \
diff --git a/net/libpcap/builtin.mk b/net/libpcap/builtin.mk
index d77c3eb4373..a3aae31647e 100644
--- a/net/libpcap/builtin.mk
+++ b/net/libpcap/builtin.mk
@@ -1,67 +1,92 @@
-# $NetBSD: builtin.mk,v 1.9 2005/01/11 21:19:24 xtraeme Exp $
+# $NetBSD: builtin.mk,v 1.10 2005/06/01 18:03:07 jlam Exp $
-_LIBPCAP_PKGSRC_PKGNAME= libpcap-0.8.3
-_LIBPCAP_PCAP_H= /usr/include/pcap.h
+BUILTIN_PKG:= libpcap
+BUILTIN_FIND_FILES_VAR:= H_LIBPCAP
+BUILTIN_FIND_FILES.H_LIBPCAP= /usr/include/pcap.h
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
.if !defined(IS_BUILTIN.libpcap)
IS_BUILTIN.libpcap= no
-. if exists(${_LIBPCAP_PCAP_H})
+. if empty(H_LIBPCAP:M${LOCALBASE}/*) && exists(${H_LIBPCAP})
IS_BUILTIN.libpcap= yes
+. endif
+.endif
+MAKEVARS+= IS_BUILTIN.libpcap
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.libpcap) && \
+ !empty(IS_BUILTIN.libpcap:M[yY][eE][sS]) && \
+ exists(${H_LIBPCAP})
# libpcap>=0.8.3: MODE_MON added
-_PCAP_083!= \
- ${GREP} -c MODE_MON ${_LIBPCAP_PCAP_H} || ${TRUE}
+_BLTN_PCAP_083!= \
+ ${GREP} -c MODE_MON ${H_LIBPCAP} || ${TRUE}
# libpcap>=0.8.1: pcap_get_selectable_fd added
-_PCAP_081!= \
- ${GREP} -c pcap_get_selectable_fd ${_LIBPCAP_PCAP_H} || ${TRUE}
+_BLTN_PCAP_081!= \
+ ${GREP} -c pcap_get_selectable_fd ${H_LIBPCAP} || ${TRUE}
# libpcap>=0.8.0: pcap_datalink_val_to_description added
-_PCAP_080!= \
- ${GREP} -c pcap_datalink_val_to_description \
- ${_LIBPCAP_PCAP_H} || ${TRUE}
+_BLTN_PCAP_080!= \
+ ${GREP} -c pcap_datalink_val_to_description ${H_LIBPCAP} || ${TRUE}
# libpcap>=0.7.0: pcap_setnonblock added
-_PCAP_070!= \
- ${GREP} -c pcap_setnonblock ${_LIBPCAP_PCAP_H} || ${TRUE}
+_BLTN_PCAP_070!= \
+ ${GREP} -c pcap_setnonblock ${H_LIBPCAP} || ${TRUE}
# libpcap>=0.6.0: prototype change for pcap_freecode
-_PCAP_060!= \
- ${GREP} -c pcap_freecode.struct.bpf_program \
- ${_LIBPCAP_PCAP_H} || ${TRUE}
+_BLTN_PCAP_060!= \
+ ${GREP} -c pcap_freecode.struct.bpf_program ${H_LIBPCAP} || ${TRUE}
# libpcap>=0.5.0: pcap_compile_nopcap added
-_PCAP_050!= \
- ${GREP} -c pcap_compile_nopcap ${_LIBPCAP_PCAP_H} || ${TRUE}
+_BLTN_PCAP_050!= \
+ ${GREP} -c pcap_compile_nopcap ${H_LIBPCAP} || ${TRUE}
-.if ${_PCAP_083} == "1"
-BUILTIN_PKG.libpcap= libpcap-0.8.3
-.elif ${_PCAP_081} == "1"
-BUILTIN_PKG.libpcap= libpcap-0.8.1
-.elif ${_PCAP_080} == "1"
-BUILTIN_PKG.libpcap= libpcap-0.8.0
-.elif ${_PCAP_070} == "1"
-BUILTIN_PKG.libpcap= libpcap-0.7.0
-.elif ${_PCAP_060} == "1"
-BUILTIN_PKG.libpcap= libpcap-0.6.0
-.elif ${_PCAP_050} == "1"
-BUILTIN_PKG.libpcap= libpcap-0.5.0
-.else
-BUILTIN_PKG.libpcap= libpcap-0.4.0
+. if ${_BLTN_PCAP_083} == "1"
+BUILTIN_VERSION.libpcap= 0.8.3
+. elif ${_BLTN_PCAP_081} == "1"
+BUILTIN_VERSION.libpcap= 0.8.1
+. elif ${_BLTN_PCAP_080} == "1"
+BUILTIN_VERSION.libpcap= 0.8.0
+. elif ${_BLTN_PCAP_070} == "1"
+BUILTIN_VERSION.libpcap= 0.7.0
+. elif ${_BLTN_PCAP_060} == "1"
+BUILTIN_VERSION.libpcap= 0.6.0
+. elif ${_BLTN_PCAP_050} == "1"
+BUILTIN_VERSION.libpcap= 0.5.0
+. else
+BUILTIN_VERSION.libpcap= 0.4.0
+. endif
+BUILTIN_PKG.libpcap= libpcap-${BUILTIN_VERSION.libpcap}
.endif
+MAKEVARS+= BUILTIN_PKG.libpcap
-.endif # exists({_LIBPCAP_PCAP_H})
-
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
.if !defined(USE_BUILTIN.libpcap)
-USE_BUILTIN.libpcap?= ${IS_BUILTIN.libpcap}
-
-. if defined(BUILTIN_PKG.libpcap)
+. if ${PREFER.libpcap} == "pkgsrc"
+USE_BUILTIN.libpcap= no
+. else
+USE_BUILTIN.libpcap= ${IS_BUILTIN.libpcap}
+. if defined(BUILTIN_PKG.libpcap) && \
+ !empty(IS_BUILTIN.libpcap:M[yY][eE][sS])
USE_BUILTIN.libpcap= yes
-. for _depend_ in ${BUILDLINK_DEPENDS.libpcap}
-. if !empty(USE_BUILTIN.libpcap:M[yY][eE][sS])
-USE_BUILTIN.libpcap!= \
- if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.libpcap}; then \
- ${ECHO} "yes"; \
+. for _dep_ in ${BUILDLINK_DEPENDS.libpcap}
+. if !empty(USE_BUILTIN.libpcap:M[yY][eE][sS])
+USE_BUILTIN.libpcap!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libpcap:Q}; then \
+ ${ECHO} yes; \
else \
- ${ECHO} "no"; \
+ ${ECHO} no; \
fi
-. endif
-. endfor
-. endif
-.endif # USE_BUILTIN.libpcap
-.endif # IS_BUILTIN.libpcap
+. endif
+. endfor
+. endif
+. endif # PREFER.libpcap
+.endif
+MAKEVARS+= USE_BUILTIN.libpcap
diff --git a/net/mldonkey-gui/Makefile b/net/mldonkey-gui/Makefile
index 2d801813ea5..20603975ef1 100644
--- a/net/mldonkey-gui/Makefile
+++ b/net/mldonkey-gui/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2005/03/24 16:20:20 tron Exp $
+# $NetBSD: Makefile,v 1.4 2005/06/01 18:03:07 jlam Exp $
#
.include "../../net/mldonkey/Makefile.common"
@@ -6,7 +6,6 @@
PKGNAME= ${DISTNAME:S/mldonkey/mldonkey-gui/}
COMMENT+= (GTK interface)
-USE_X11= YES
PRINT_PLIST_AWK+= /^@dirrm libexec\/mldonkey$$/ \
{ print "@comment in mldonkey: " $$0; next }
diff --git a/net/mtr-gtk/Makefile b/net/mtr-gtk/Makefile
index 3e05cab2694..4f83bb1deda 100644
--- a/net/mtr-gtk/Makefile
+++ b/net/mtr-gtk/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2005/05/22 20:08:25 jlam Exp $
+# $NetBSD: Makefile,v 1.26 2005/06/01 18:03:07 jlam Exp $
#
DISTNAME= mtr-0.69
@@ -14,7 +14,6 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
GNU_CONFIGURE= yes
USE_TOOLS+= gmake
-USE_X11= yes
INSTALLATION_DIRS= man/man8 sbin
diff --git a/net/nam/Makefile b/net/nam/Makefile
index a8b369ccb05..49eff040cc0 100644
--- a/net/nam/Makefile
+++ b/net/nam/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2005/04/11 21:46:50 tv Exp $
+# $NetBSD: Makefile,v 1.18 2005/06/01 18:03:07 jlam Exp $
DISTNAME= nam-src-1.11
PKGNAME= ${DISTNAME:S/-src//}
@@ -14,7 +14,6 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//}
USE_LANGUAGES= c c++
GNU_CONFIGURE= yes
-USE_X11= yes
BUILD_TARGET=
CONFIGURE_ARGS+= --with-tcl=${BUILDLINK_PREFIX.tcl}
diff --git a/net/netbsd-tap/builtin.mk b/net/netbsd-tap/builtin.mk
index bce8f902880..bc8d19347c2 100644
--- a/net/netbsd-tap/builtin.mk
+++ b/net/netbsd-tap/builtin.mk
@@ -1,10 +1,47 @@
-# $NetBSD: builtin.mk,v 1.1.1.1 2005/01/20 18:02:39 cube Exp $
+# $NetBSD: builtin.mk,v 1.2 2005/06/01 18:03:08 jlam Exp $
+BUILTIN_PKG:= netbsd-tap
+
+BUILTIN_FIND_FILES_VAR:= H_NETBSD_TAP
+BUILTIN_FIND_FILES.H_NETBSD_TAP= /usr/include/net/if_tap.h
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
.if !defined(IS_BUILTIN.netbsd-tap)
-. if exists(/usr/include/net/if_tap.h)
-IS_BUILTIN.netbsd-tap= YES
-. else
-IS_BUILTIN.netbsd-tap= NO
-.endif # IS_BUILTIN.netbsd-tap
+IS_BUILTIN.netbsd-tap= no
+. if empty(H_NETBSD_TAP:M${LOCALBASE}/*) && exists(${H_NETBSD_TAP})
+IS_BUILTIN.netbsd-tap= yes
+. endif
+.endif
+MAKEVARS+= IS_BUILTIN.netbsd-tap
-USE_BUILTIN.netbsd-tap?= ${IS_BUILTIN.netbsd-tap}
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
+.if !defined(USE_BUILTIN.netbsd-tap)
+. if ${PREFER.netbsd-tap} == "pkgsrc"
+USE_BUILTIN.netbsd-tap= no
+. else
+USE_BUILTIN.netbsd-tap= ${IS_BUILTIN.netbsd-tap}
+. if defined(BUILTIN_PKG.netbsd-tap) && \
+ !empty(IS_BUILTIN.netbsd-tap:M[yY][eE][sS])
+USE_BUILTIN.netbsd-tap= yes
+. for _dep_ in ${BUILDLINK_DEPENDS.netbsd-tap}
+. if !empty(USE_BUILTIN.netbsd-tap:M[yY][eE][sS])
+USE_BUILTIN.netbsd-tap!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.netbsd-tap:Q}; then \
+ ${ECHO} yes; \
+ else \
+ ${ECHO} no; \
+ fi
+. endif
+. endfor
+. endif
+. endif # PREFER.netbsd-tap
+.endif
+MAKEVARS+= USE_BUILTIN.netbsd-tap
diff --git a/net/netsaint-base/Makefile.common b/net/netsaint-base/Makefile.common
index 7028666c4cb..b30e9621e3b 100644
--- a/net/netsaint-base/Makefile.common
+++ b/net/netsaint-base/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.7 2005/05/22 20:08:25 jlam Exp $
+# $NetBSD: Makefile.common,v 1.8 2005/06/01 18:03:08 jlam Exp $
#
CATEGORIES= net sysutils
@@ -15,7 +15,6 @@ PKG_GROUPS+= ${NETSTADM_GROUP}
PKG_USERS+= ${NETSAINT_USER}:${NETSAINT_GROUP}::NetSaint\\ Runtime\\ User
PKG_USERS+= ${NETSTADM_USER}:${NETSTADM_GROUP}::NetSaint\\ Administrator:${PREFIX}/etc/netsaint:${SH}
-USE_X11= YES
GNU_CONFIGURE= YES
USE_TOOLS+= gmake
@@ -31,3 +30,5 @@ CONFIGURE_ARGS+= --with-lockfile=var/run/netsaint/netsaint.lock
CONFIGURE_ARGS+= --with-netsaint-user=${NETSAINT_USER}
CONFIGURE_ARGS+= --with-netsaint-grp=${NETSAINT_GROUP}
CONFIGURE_ARGS+= --with-init-dir=${PREFIX}/etc/rc.d
+
+.include "../../mk/x11.buildlink3.mk"
diff --git a/net/ns/Makefile b/net/ns/Makefile
index 097ee923dc0..fc2451cd24f 100644
--- a/net/ns/Makefile
+++ b/net/ns/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2005/04/11 21:46:52 tv Exp $
+# $NetBSD: Makefile,v 1.18 2005/06/01 18:03:08 jlam Exp $
DISTNAME= ns-src-2.27
PKGNAME= ${DISTNAME:S/-src//}
@@ -15,7 +15,6 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//}
USE_LANGUAGES= c c++
GNU_CONFIGURE= yes
-USE_X11= yes
PTHREAD_OPTS+= require
# Perl is only needed if you want to run the validation tests.
#USE_PERL5= build
diff --git a/net/pload/Makefile b/net/pload/Makefile
index e914c16c50b..34174312d69 100644
--- a/net/pload/Makefile
+++ b/net/pload/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2005/04/11 21:46:57 tv Exp $
+# $NetBSD: Makefile,v 1.14 2005/06/01 18:03:08 jlam Exp $
#
DISTNAME= pload-0.9.4
@@ -16,4 +16,5 @@ HAS_CONFIGURE= YES
USE_X11BASE= YES
INSTALL_TARGET= install install.man
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/rdesktop/Makefile b/net/rdesktop/Makefile
index def28d90132..ff074f6f35c 100644
--- a/net/rdesktop/Makefile
+++ b/net/rdesktop/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2005/05/18 01:11:44 xtraeme Exp $
+# $NetBSD: Makefile,v 1.24 2005/06/01 18:03:08 jlam Exp $
#
DISTNAME= rdesktop-1.4.1
@@ -9,7 +9,6 @@ MAINTAINER= grant@NetBSD.org
HOMEPAGE= http://www.rdesktop.org/
COMMENT= Open-source Remote Desktop Protocol client
-USE_X11= YES
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --with-x=${X11BASE}
CONFIGURE_ARGS+= --with-openssl=${SSLBASE}
@@ -24,4 +23,5 @@ SUBST_MESSAGE.audio= "Fixing hardcoded audio device."
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/ossaudio.buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/skype/Makefile b/net/skype/Makefile
index e11774bd620..83b8996fa2b 100644
--- a/net/skype/Makefile
+++ b/net/skype/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2005/04/09 19:53:09 jmmv Exp $
+# $NetBSD: Makefile,v 1.8 2005/06/01 18:03:08 jlam Exp $
#
DISTNAME= skype_staticQT-1.0.0.20
@@ -20,7 +20,7 @@ DEPENDS+= suse_freetype2>=9.1:../../emulators/suse91_freetype2
DEPENDS+= suse_x11>=9.1:../../emulators/suse91_x11
.include "../../emulators/suse_linux/Makefile.application"
.else
-USE_X11= yes
+.include "../../mk/x11.buildlink3.mk"
.endif
ONLY_FOR_PLATFORM= *-*-i386
diff --git a/net/tsclient/Makefile b/net/tsclient/Makefile
index 7d49b2fb24a..9e8160c22a2 100644
--- a/net/tsclient/Makefile
+++ b/net/tsclient/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2005/05/22 20:08:26 jlam Exp $
+# $NetBSD: Makefile,v 1.22 2005/06/01 18:03:08 jlam Exp $
#
DISTNAME= tsclient-0.132
@@ -18,7 +18,6 @@ USE_DIRS+= gnome2-1.5
USE_TOOLS+= gmake
USE_PKGLOCALEDIR= yes
USE_PERL5= run
-USE_X11= yes
GNU_CONFIGURE= yes
.include "../../devel/gettext-lib/buildlink3.mk"
diff --git a/net/ttt/Makefile b/net/ttt/Makefile
index 707fe9e43da..cafd6d41f14 100644
--- a/net/ttt/Makefile
+++ b/net/ttt/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2005/04/11 21:47:01 tv Exp $
+# $NetBSD: Makefile,v 1.11 2005/06/01 18:03:08 jlam Exp $
#
DISTNAME= ttt-1.8
@@ -9,7 +9,6 @@ MAINTAINER= sakamoto@NetBSD.org
HOMEPAGE= http://www.csl.sony.co.jp/person/kjc/software.html
COMMENT= Tele Traffic Tapper
-USE_X11= yes
GNU_CONFIGURE= yes
INSTALL_TARGET= install install-man
diff --git a/net/vino/Makefile b/net/vino/Makefile
index 3e07d170b55..158c85fc363 100644
--- a/net/vino/Makefile
+++ b/net/vino/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2005/05/22 20:08:26 jlam Exp $
+# $NetBSD: Makefile,v 1.5 2005/06/01 18:03:08 jlam Exp $
#
DISTNAME= vino-2.10.0
@@ -16,7 +16,6 @@ USE_TOOLS+= gmake
USE_PKGLOCALEDIR= yes
USE_LIBTOOL= yes
USE_PERL5= build
-USE_X11= yes
GCONF2_SCHEMAS= vino-server.schemas
diff --git a/net/wistumbler/Makefile b/net/wistumbler/Makefile
index a18fa44eb75..d2509dcd7c7 100644
--- a/net/wistumbler/Makefile
+++ b/net/wistumbler/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2005/04/11 21:47:02 tv Exp $
+# $NetBSD: Makefile,v 1.18 2005/06/01 18:03:08 jlam Exp $
DISTNAME= wistumbler-20020816
PKGNAME= wistumbler-20020816.0
@@ -11,7 +11,6 @@ HOMEPAGE= http://gongon.com/persons/iseki/wistumbler/
COMMENT= Network stumbler for WaveLAN/IEEE wireless networking
WRKSRC= ${WRKDIR}/wistumbler
-USE_X11= YES
NOT_FOR_PLATFORM= NetBSD-0.*-* NetBSD-1.[01234]*-* NetBSD-1.5-*
NOT_FOR_PLATFORM+= NetBSD-1.5.*-* NetBSD-1.5[A-V]-*
diff --git a/net/x2vnc/Makefile b/net/x2vnc/Makefile
index 319d797b36e..ad1a45fd27b 100644
--- a/net/x2vnc/Makefile
+++ b/net/x2vnc/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2005/04/11 21:47:02 tv Exp $
+# $NetBSD: Makefile,v 1.10 2005/06/01 18:03:08 jlam Exp $
#
DISTNAME= x2vnc-1.5.1
@@ -11,6 +11,6 @@ HOMEPAGE= http://fredrik.hubbe.net/x2vnc.html
COMMENT= Multi-console display using X and VNC
GNU_CONFIGURE= yes
-USE_X11= yes
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/xipdump/Makefile b/net/xipdump/Makefile
index cc252009a68..9b1fc3f3bb3 100644
--- a/net/xipdump/Makefile
+++ b/net/xipdump/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2005/04/11 21:47:02 tv Exp $
+# $NetBSD: Makefile,v 1.19 2005/06/01 18:03:08 jlam Exp $
#
DISTNAME= xipdump-1.5.4
@@ -31,4 +31,5 @@ post-build:
@${ECHO} "@dirrm share/xipdump" >> ${PLIST_SRC}
.include "../../devel/libnet/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/xtraceroute/Makefile b/net/xtraceroute/Makefile
index f90c668df4a..4991b0a73dd 100644
--- a/net/xtraceroute/Makefile
+++ b/net/xtraceroute/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2005/04/11 21:47:03 tv Exp $
+# $NetBSD: Makefile,v 1.41 2005/06/01 18:03:08 jlam Exp $
#
DISTNAME= xtraceroute-0.8.14
@@ -14,7 +14,6 @@ COMMENT= Graphical version of traceroute, which traces the route IP packets go
BUILD_USES_MSGFMT= yes
-USE_X11= yes
GNU_CONFIGURE= yes
USE_PKGLOCALEDIR= yes
diff --git a/net/ytalk-x11/Makefile b/net/ytalk-x11/Makefile
index a5a87d3cfc4..a0deae19937 100644
--- a/net/ytalk-x11/Makefile
+++ b/net/ytalk-x11/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2004/03/06 12:05:20 grant Exp $
+# $NetBSD: Makefile,v 1.2 2005/06/01 18:03:08 jlam Exp $
.include "../../net/ytalk/Makefile.common"
@@ -7,7 +7,6 @@ CATEGORIES+= x11
COMMENT= Multi-user replacement for UNIX talk (includes X11 support)
CONFIGURE_ARGS+=--with-x
-USE_X11= yes
CONFLICTS+= ytalk-[0-9]*
@@ -16,4 +15,5 @@ DISTINFO_FILE= ${.CURDIR}/../../net/ytalk/distinfo
PATCHDIR= ${.CURDIR}/../../net/ytalk/patches
PLIST_SRC= ${.CURDIR}/../../net/ytalk/PLIST
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"