summaryrefslogtreecommitdiff
path: root/x11/libXau/builtin.mk
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2007-12-15 15:41:36 +0000
committertron <tron@pkgsrc.org>2007-12-15 15:41:36 +0000
commit04999d1c3fc20de933958e0529fb3e7e1ed8628b (patch)
tree3ebb498c5662dbf8879e10bdbad25465440c5bb7 /x11/libXau/builtin.mk
parent8ff25438bc90ea84f02d6af7e5eb66be82847cf1 (diff)
downloadpkgsrc-04999d1c3fc20de933958e0529fb3e7e1ed8628b.tar.gz
Detect builtin "libXau" e.g. under Mac OS X Leopard.
Diffstat (limited to 'x11/libXau/builtin.mk')
-rw-r--r--x11/libXau/builtin.mk49
1 files changed, 49 insertions, 0 deletions
diff --git a/x11/libXau/builtin.mk b/x11/libXau/builtin.mk
new file mode 100644
index 00000000000..cef415ac8b4
--- /dev/null
+++ b/x11/libXau/builtin.mk
@@ -0,0 +1,49 @@
+# $NetBSD: builtin.mk,v 1.1 2007/12/15 15:41:36 tron Exp $
+
+BUILTIN_PKG:= libXau
+
+BUILTIN_FIND_FILES_VAR:= H_XAUTH
+BUILTIN_FIND_FILES.H_XAUTH= ${X11BASE}/include/X11/Xauth.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 ${X11BASE} == ${LOCALBASE}
+IS_BUILTIN.libXau= no
+.elif !defined(IS_BUILTIN.libXau)
+IS_BUILTIN.libXau= no
+. if empty(H_XAUTH:M__nonexistent__)
+IS_BUILTIN.libXau= yes
+. endif
+.endif
+MAKEVARS+= IS_BUILTIN.libXau
+
+###
+### 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.libXau)
+. if ${PREFER.libXau} == "pkgsrc"
+USE_BUILTIN.libXau= no
+. else
+USE_BUILTIN.libXau= ${IS_BUILTIN.libXau}
+. if defined(BUILTIN_PKG.libXau) && \
+ !empty(IS_BUILTIN.libXau:M[yY][eE][sS])
+USE_BUILTIN.libXau= yes
+. for _dep_ in ${BUILDLINK_API_DEPENDS.libXau}
+. if !empty(USE_BUILTIN.libXau:M[yY][eE][sS])
+USE_BUILTIN.libXau!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libXau:Q}; then \
+ ${ECHO} yes; \
+ else \
+ ${ECHO} no; \
+ fi
+. endif
+. endfor
+. endif
+. endif # PREFER.libXau
+.endif
+MAKEVARS+= USE_BUILTIN.libXau