pkgsrc-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/pkgsrc/rev/65cc1eda2169
branches:  trunk
changeset: 536476:65cc1eda2169
user:      tron <tron%pkgsrc.org@localhost>
date:      Sat Dec 15 15:21:53 2007 +0000

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

diffstat:

 x11/libX11/buildlink3.mk |   4 +-
 x11/libX11/builtin.mk    |  49 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 2 deletions(-)

diffs (67 lines):

diff -r 9d6e4daf5bf5 -r 65cc1eda2169 x11/libX11/buildlink3.mk
--- a/x11/libX11/buildlink3.mk  Sat Dec 15 15:18:57 2007 +0000
+++ b/x11/libX11/buildlink3.mk  Sat Dec 15 15:21:53 2007 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: buildlink3.mk,v 1.4 2007/01/23 19:47:53 joerg Exp $
+# $NetBSD: buildlink3.mk,v 1.5 2007/12/15 15:21:53 tron Exp $
 
 .include "../../mk/bsd.fast.prefs.mk"
 
-.if ${X11_TYPE} != "modular"
+.if ${X11_TYPE} != "modular" && !exists(${X11BASE}/lib/pkgconfig/x11.pc)
 .include "../../mk/x11.buildlink3.mk"
 .else
 
diff -r 9d6e4daf5bf5 -r 65cc1eda2169 x11/libX11/builtin.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/libX11/builtin.mk     Sat Dec 15 15:21:53 2007 +0000
@@ -0,0 +1,49 @@
+# $NetBSD: builtin.mk,v 1.1 2007/12/15 15:21:53 tron Exp $
+
+BUILTIN_PKG:=  libX11
+
+BUILTIN_FIND_FILES_VAR:=       H_LIBX11
+BUILTIN_FIND_FILES.H_LIBX11=   ${X11BASE}/include/X11/Xlib.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.libX11=     no
+.elif !defined(IS_BUILTIN.libX11)
+IS_BUILTIN.libX11=     no
+.  if empty(H_LIBX11:M__nonexistent__)
+IS_BUILTIN.libX11=     yes
+.  endif
+.endif
+MAKEVARS+=     IS_BUILTIN.libX11
+
+###
+### 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.libX11)
+.  if ${PREFER.libX11} == "pkgsrc"
+USE_BUILTIN.libX11=    no
+.  else
+USE_BUILTIN.libX11=    ${IS_BUILTIN.libX11}
+.    if defined(BUILTIN_PKG.libX11) && \
+        !empty(IS_BUILTIN.libX11:M[yY][eE][sS])
+USE_BUILTIN.libX11=    yes
+.      for _dep_ in ${BUILDLINK_API_DEPENDS.libX11}
+.        if !empty(USE_BUILTIN.libX11:M[yY][eE][sS])
+USE_BUILTIN.libX11!=                                                   \
+       if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libX11:Q}; then \
+               ${ECHO} yes;                                            \
+       else                                                            \
+               ${ECHO} no;                                             \
+       fi
+.        endif
+.      endfor
+.    endif
+.  endif  # PREFER.libX11
+.endif
+MAKEVARS+=     USE_BUILTIN.libX11



Home | Main Index | Thread Index | Old Index