diff options
author | tron <tron> | 2007-12-16 23:38:12 +0000 |
---|---|---|
committer | tron <tron> | 2007-12-16 23:38:12 +0000 |
commit | bf4caf2afecfdf1f98c650b81c6320843cc0bdd5 (patch) | |
tree | 48d5bc3d7debcb02055d7c6aa1738cf6555656af /x11 | |
parent | 8a7ac857e2d6983774a4948e371bd3f12c700a50 (diff) | |
download | pkgsrc-bf4caf2afecfdf1f98c650b81c6320843cc0bdd5.tar.gz |
Detect builtin "libXext" e.g. under Mac OS X Leopard.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/libXext/buildlink3.mk | 4 | ||||
-rw-r--r-- | x11/libXext/builtin.mk | 49 |
2 files changed, 51 insertions, 2 deletions
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.<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 |