summaryrefslogtreecommitdiff
path: root/mk/x11.builtin.mk
diff options
context:
space:
mode:
authorcube <cube>2008-10-05 21:36:32 +0000
committercube <cube>2008-10-05 21:36:32 +0000
commit2c8f273533926f8b1e1655584dcb2080f2e79048 (patch)
tree7e3acb4e1cfd62c69446a0e9e96faf8cfb567d76 /mk/x11.builtin.mk
parent65393655c330983dfd10414dd9fbf359b7d9ebd8 (diff)
downloadpkgsrc-2c8f273533926f8b1e1655584dcb2080f2e79048.tar.gz
Merge cube-native-xorg, so that pkgsrc-current can be used with the native
X.Org found in NetBSD-current. Thanks a lot to all who helped, especially Matthias Scheler who did repeated tests on Mac OS X and older versions of NetBSD to make sure the support for those platforms wouldn't be broken (or at least, not fatally, as I would still expect a few hiccups here and there, because there is only so much one can test in such limited time). On the infrastructure side, this branch brings pkgconfig-builtin.mk, in order to write very easily new builtin.mk files. It can actually handle more than just pkgconfig files, but it will provide a version if it finds such a file. x11.builtin.mk has also been made more useful and now all existing (and future!) native-X11-related builtin.mk files should include it.
Diffstat (limited to 'mk/x11.builtin.mk')
-rw-r--r--mk/x11.builtin.mk23
1 files changed, 20 insertions, 3 deletions
diff --git a/mk/x11.builtin.mk b/mk/x11.builtin.mk
index 22ae6398214..1337eb0a21c 100644
--- a/mk/x11.builtin.mk
+++ b/mk/x11.builtin.mk
@@ -1,8 +1,25 @@
-# $NetBSD: x11.builtin.mk,v 1.2 2006/10/26 17:08:08 rillig Exp $
+# $NetBSD: x11.builtin.mk,v 1.3 2008/10/05 21:36:35 cube Exp $
#
# x11.builtin.mk will include the builtin.mk file from the appropriate
# X11 distribution.
#
+# BUILTIN_PKG and USE_BUILTIN.<BUILTIN_PKG> must be defined by the caller
-.include "../../mk/x11.version.mk"
-.include "${X11_PKGSRCDIR.${X11_TYPE}}/builtin.mk"
+# XXX make(1) idiosyncrasy
+# 'CHECK_BUILTIN.${BUILTIN_PKG}?= no' will overwrite the value on older
+# version of make (in NetBSD's base system, prior to 20080331).
+.if !defined(CHECK_BUILTIN.${BUILTIN_PKG})
+CHECK_BUILTIN.${BUILTIN_PKG}= no
+.endif
+
+.if !empty(CHECK_BUILTIN.${BUILTIN_PKG}:M[Nn][Oo])
+. if !empty(USE_BUILTIN.${BUILTIN_PKG}:M[Yy][Ee][Ss])
+
+BUILDLINK_PREFIX.${BUILTIN_PKG}= ${X11BASE}
+
+. include "../../mk/x11.buildlink3.mk"
+. include "../../mk/x11.version.mk"
+. include "${X11_PKGSRCDIR.${X11_TYPE}}/builtin.mk"
+
+. endif
+.endif