From 5359edb3be3ed8e92710b391810200da5adc7dde Mon Sep 17 00:00:00 2001 From: tron Date: Tue, 16 Sep 2008 11:41:33 +0000 Subject: Detect builtin "pixman" e.g. under Mac OS X Leopard. --- x11/pixman/builtin.mk | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 x11/pixman/builtin.mk (limited to 'x11/pixman') diff --git a/x11/pixman/builtin.mk b/x11/pixman/builtin.mk new file mode 100644 index 00000000000..c6ec20c5305 --- /dev/null +++ b/x11/pixman/builtin.mk @@ -0,0 +1,54 @@ +# $NetBSD: builtin.mk,v 1.2 2008/09/16 11:41:33 tron Exp $ + +BUILTIN_PKG:= pixman + +BUILTIN_FIND_FILES_VAR:= H_PIXMAN +BUILTIN_FIND_FILES.H_PIXMAN= ${X11BASE}/include/pixman-1/pixman.h + +.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.pixman= no +.elif !defined(IS_BUILTIN.pixman) +IS_BUILTIN.pixman= no +. if empty(H_PIXMAN:M__nonexistent__) +IS_BUILTIN.pixman= yes +. endif +.endif +MAKEVARS+= IS_BUILTIN.pixman + +### +### Determine whether we should use the built-in implementation if it +### exists, and set USE_BUILTIN. appropriate ("yes" or "no"). +### +.if !defined(USE_BUILTIN.pixman) +. if ${PREFER.pixman} == "pkgsrc" +USE_BUILTIN.pixman= no +. else +USE_BUILTIN.pixman= ${IS_BUILTIN.pixman} +. if defined(BUILTIN_PKG.pixman) && \ + !empty(IS_BUILTIN.pixman:M[yY][eE][sS]) +USE_BUILTIN.pixman= yes +. for _dep_ in ${BUILDLINK_API_DEPENDS.pixman} +. if !empty(USE_BUILTIN.pixman:M[yY][eE][sS]) +USE_BUILTIN.pixman!= \ + if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.pixman:Q}; then \ + ${ECHO} yes; \ + else \ + ${ECHO} no; \ + fi +. endif +. endfor +. endif +. endif # PREFER.pixman +.endif +MAKEVARS+= USE_BUILTIN.pixman + +.if !empty(USE_BUILTIN.pixman:M[yY][eE][sS]) +BUILDLINK_PREFIX.pixman= ${X11BASE} +BUILDLINK_PASSTHRU_DIRS+= ${X11BASE}/include ${X11BASE}/lib +.endif -- cgit v1.2.3