summaryrefslogtreecommitdiff
path: root/x11/compositeproto/builtin.mk
diff options
context:
space:
mode:
authorreed <reed>2006-04-18 17:17:50 +0000
committerreed <reed>2006-04-18 17:17:50 +0000
commit58978febc76828b826c0993ab5287c9e984ac918 (patch)
tree316601595288f2d2605093de68bedd45ed1307a7 /x11/compositeproto/builtin.mk
parentaf4875b78362adad022546a7240e74412a108712 (diff)
downloadpkgsrc-58978febc76828b826c0993ab5287c9e984ac918.tar.gz
Import compositeproto from pkgsrc-wip.
This package provides Composite extension headers from the modular X.org X11 project. This will replace the compositeext package.
Diffstat (limited to 'x11/compositeproto/builtin.mk')
-rw-r--r--x11/compositeproto/builtin.mk67
1 files changed, 67 insertions, 0 deletions
diff --git a/x11/compositeproto/builtin.mk b/x11/compositeproto/builtin.mk
new file mode 100644
index 00000000000..ca638d80db0
--- /dev/null
+++ b/x11/compositeproto/builtin.mk
@@ -0,0 +1,67 @@
+# $NetBSD: builtin.mk,v 1.1.1.1 2006/04/18 17:17:50 reed Exp $
+
+BUILTIN_PKG:= compositeproto
+
+BUILTIN_FIND_FILES_VAR:= H_COMPOSITE H_COMPOSITEPROTO
+BUILTIN_FIND_FILES.H_COMPOSITE= \
+ ${X11BASE}/include/X11/extensions/composite.h
+BUILTIN_FIND_FILES.H_COMPOSITEPROTO= \
+ ${X11BASE}/include/X11/extensions/compositeproto.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.compositeproto)
+IS_BUILTIN.compositeproto= no
+#
+# Here, we skip checking whether the files are under ${LOCALBASE} since
+# we'll consider this X11 package to be built-in even if it's a part
+# of one of the pkgsrc-installed X11 distributions.
+#
+. if empty(H_COMPOSITE:M__nonexistent__) && \
+ empty(H_COMPOSITEPROTO:M__nonexistent__)
+IS_BUILTIN.compositeproto= yes
+. endif
+.endif
+MAKEVARS+= IS_BUILTIN.compositeproto
+
+###
+### 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.compositeproto)
+. if ${PREFER.compositeproto} == "pkgsrc"
+USE_BUILTIN.compositeproto= no
+. else
+USE_BUILTIN.compositeproto= ${IS_BUILTIN.compositeproto}
+. if defined(BUILTIN_PKG.compositeproto) && \
+ !empty(IS_BUILTIN.compositeproto:M[yY][eE][sS])
+USE_BUILTIN.compositeproto= yes
+. for _dep_ in ${BUILDLINK_API_DEPENDS.compositeproto}
+. if !empty(USE_BUILTIN.compositeproto:M[yY][eE][sS])
+USE_BUILTIN.compositeproto!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.compositeproto:Q}; then \
+ ${ECHO} yes; \
+ else \
+ ${ECHO} no; \
+ fi
+. endif
+. endfor
+. endif
+. endif # PREFER.compositeproto
+.endif
+MAKEVARS+= USE_BUILTIN.compositeproto
+
+# following so old pkg-config name compositeext.pc will be available
+BUILDLINK_TARGETS+= compositeext-symlink-pc
+
+compositeext-symlink-pc:
+ src=${BUILDLINK_PREFIX.compositeproto}/lib/pkgconfig/compositeproto.pc \
+ dst=${BUILDLINK_DIR}/lib/pkgconfig/compositeext.pc; \
+ ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \
+ if ${TEST} -f $${src}; then \
+ ${LN} -sf $${src} $${dst}; \
+ fi