From bf4caf2afecfdf1f98c650b81c6320843cc0bdd5 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 16 Dec 2007 23:38:12 +0000 Subject: Detect builtin "libXext" e.g. under Mac OS X Leopard. --- x11/libXext/buildlink3.mk | 4 ++-- x11/libXext/builtin.mk | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 x11/libXext/builtin.mk (limited to 'x11') diff --git a/x11/libXext/buildlink3.mk b/x11/libXext/buildlink3.mk index c28594247d4..1537467a023 100644 --- a/x11/libXext/buildlink3.mk +++ b/x11/libXext/buildlink3.mk @@ -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 --git a/x11/libXext/builtin.mk b/x11/libXext/builtin.mk new file mode 100644 index 00000000000..0104553773b --- /dev/null +++ b/x11/libXext/builtin.mk @@ -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. 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. 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 -- cgit v1.2.3