pkgsrc-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8989f38a84e4
branches:  trunk
changeset: 536555:8989f38a84e4
user:      tron <tron%pkgsrc.org@localhost>
date:      Sun Dec 16 23:38:12 2007 +0000

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

diffstat:

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

diffs (67 lines):

diff -r e593ff1a65cc -r 8989f38a84e4 x11/libXext/buildlink3.mk
--- a/x11/libXext/buildlink3.mk Sun Dec 16 23:08:05 2007 +0000
+++ b/x11/libXext/buildlink3.mk Sun Dec 16 23:38:12 2007 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: buildlink3.mk,v 1.4 2007/02/02 09:21:15 drochner Exp $
+# $NetBSD: buildlink3.mk,v 1.5 2007/12/16 23:38:12 tron Exp $
 
 .include "../../mk/bsd.fast.prefs.mk"
 
-.if ${X11_TYPE} != "modular"
+.if ${X11_TYPE} != "modular" && !exists(${X11BASE}/lib/pkgconfig/xext.pc)
 .include "../../mk/x11.buildlink3.mk"
 .else
 
diff -r e593ff1a65cc -r 8989f38a84e4 x11/libXext/builtin.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/libXext/builtin.mk    Sun Dec 16 23:38:12 2007 +0000
@@ -0,0 +1,49 @@
+# $NetBSD: builtin.mk,v 1.1 2007/12/16 23:38:12 tron Exp $
+
+BUILTIN_PKG:=  libXext
+
+BUILTIN_FIND_FILES_VAR:=       LIB_XEXT
+BUILTIN_FIND_FILES.LIB_XEXT=   ${X11BASE}/lib/libXext.la
+
+.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.libXext=    no
+.elif !defined(IS_BUILTIN.libXext)
+IS_BUILTIN.libXext=    no
+.  if empty(LIB_XEXT:M__nonexistent__)
+IS_BUILTIN.libXext=    yes
+.  endif
+.endif
+MAKEVARS+=     IS_BUILTIN.libXext
+
+###
+### 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.libXext)
+.  if ${PREFER.libXext} == "pkgsrc"
+USE_BUILTIN.libXext=   no
+.  else
+USE_BUILTIN.libXext=   ${IS_BUILTIN.libXext}
+.    if defined(BUILTIN_PKG.libXext) && \
+        !empty(IS_BUILTIN.libXext:M[yY][eE][sS])
+USE_BUILTIN.libXext=   yes
+.      for _dep_ in ${BUILDLINK_API_DEPENDS.libXext}
+.        if !empty(USE_BUILTIN.libXext:M[yY][eE][sS])
+USE_BUILTIN.libXext!=                                                  \
+       if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libXext:Q}; then \
+               ${ECHO} yes;                                            \
+       else                                                            \
+               ${ECHO} no;                                             \
+       fi
+.        endif
+.      endfor
+.    endif
+.  endif  # PREFER.libXext
+.endif
+MAKEVARS+=     USE_BUILTIN.libXext



Home | Main Index | Thread Index | Old Index