pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/libXau Detect builtin "libXau" e.g. under Mac OS X...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/33c4103a3129
branches:  trunk
changeset: 536481:33c4103a3129
user:      tron <tron%pkgsrc.org@localhost>
date:      Sat Dec 15 15:41:36 2007 +0000

description:
Detect builtin "libXau" e.g. under Mac OS X Leopard.

diffstat:

 x11/libXau/builtin.mk |  49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 49 insertions(+), 0 deletions(-)

diffs (53 lines):

diff -r d7022a67a0d6 -r 33c4103a3129 x11/libXau/builtin.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/libXau/builtin.mk     Sat Dec 15 15:41:36 2007 +0000
@@ -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



Home | Main Index | Thread Index | Old Index