diff options
Diffstat (limited to 'x11/Xcomposite')
-rw-r--r-- | x11/Xcomposite/Makefile | 3 | ||||
-rw-r--r-- | x11/Xcomposite/builtin-imake.mk | 12 | ||||
-rw-r--r-- | x11/Xcomposite/builtin.mk | 59 |
3 files changed, 64 insertions, 10 deletions
diff --git a/x11/Xcomposite/Makefile b/x11/Xcomposite/Makefile index 293aa7c009d..6db7d599c90 100644 --- a/x11/Xcomposite/Makefile +++ b/x11/Xcomposite/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2005/04/11 21:48:04 tv Exp $ +# $NetBSD: Makefile,v 1.4 2005/06/01 18:03:27 jlam Exp $ # DISTNAME= libXcomposite-1.0.1 @@ -13,7 +13,6 @@ HOMEPAGE= http://freedesktop.org/ COMMENT= Xcomposite extension (library) USE_LIBTOOL= yes -USE_X11= yes GNU_CONFIGURE= yes PKGCONFIG_OVERRIDE+= xcomposite.pc.in diff --git a/x11/Xcomposite/builtin-imake.mk b/x11/Xcomposite/builtin-imake.mk new file mode 100644 index 00000000000..30158e304ca --- /dev/null +++ b/x11/Xcomposite/builtin-imake.mk @@ -0,0 +1,12 @@ +XCOMM $NetBSD: builtin-imake.mk,v 1.1 2005/06/01 18:03:27 jlam Exp $ + +/* + * Check the value of BuildCompositeLibrary for the presence of + * Xcomposite in the X11 distribution. + */ +builtin-test: +#if BuildCompositeLibrary + @echo yes +#else + @echo no +#endif diff --git a/x11/Xcomposite/builtin.mk b/x11/Xcomposite/builtin.mk index 2d1441d3330..790ae502112 100644 --- a/x11/Xcomposite/builtin.mk +++ b/x11/Xcomposite/builtin.mk @@ -1,13 +1,56 @@ -# $NetBSD: builtin.mk,v 1.4 2004/10/09 06:40:48 xtraeme Exp $ +# $NetBSD: builtin.mk,v 1.5 2005/06/01 18:03:27 jlam Exp $ -_XCOMPOSITE_H= ${X11BASE}/include/X11/extensions/xcomposite.h -_XCOMPOSITE_PC= ${X11BASE}/lib/pkgconfig/xcomposite.pc +BUILTIN_PKG:= Xcomposite +BUILTIN_FIND_FILES_VAR:= H_XCOMPOSITE +BUILTIN_FIND_FILES.H_XCOMPOSITE= \ + ${X11BASE}/include/X11/extensions/xcomposite.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 !defined(IS_BUILTIN.Xcomposite) -IS_BUILTIN.Xcomposite= no -. if exists(${_XCOMPOSITE_H}) && exists(${_XCOMPOSITE_PC}) -IS_BUILTIN.Xcomposite= yes +IS_BUILTIN.Xcomposite= no +. if exists(${H_XCOMPOSITE}) +PKGSRC_USE_TOOLS+= imake # XXX +IMAKE?= ${X11BASE}/bin/imake # XXX +. if defined(IMAKE) && exists(${IMAKE}) +IS_BUILTIN.Xcomposite!= \ + ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config \ + -f ${BUILDLINK_PKGSRCDIR.Xcomposite}/builtin-imake.mk \ + -s - | \ + ${MAKE} -f - builtin-test +. endif . endif -.endif # IS_BUILTIN.Xcomposite +.endif +MAKEVARS+= IS_BUILTIN.Xcomposite -USE_BUILTIN.Xcomposite?= ${IS_BUILTIN.Xcomposite} +### +### 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.Xcomposite) +. if ${PREFER.Xcomposite} == "pkgsrc" +USE_BUILTIN.Xcomposite= no +. else +USE_BUILTIN.Xcomposite= ${IS_BUILTIN.Xcomposite} +. if defined(BUILTIN_PKG.Xcomposite) && \ + !empty(IS_BUILTIN.Xcomposite:M[yY][eE][sS]) +USE_BUILTIN.Xcomposite= yes +. for _dep_ in ${BUILDLINK_DEPENDS.Xcomposite} +. if !empty(USE_BUILTIN.Xcomposite:M[yY][eE][sS]) +USE_BUILTIN.Xcomposite!= \ + if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.Xcomposite:Q}; then \ + ${ECHO} yes; \ + else \ + ${ECHO} no; \ + fi +. endif +. endfor +. endif +. endif # PREFER.Xcomposite +.endif +MAKEVARS+= USE_BUILTIN.Xcomposite |