summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/x11.buildlink3.mk21
1 files changed, 17 insertions, 4 deletions
diff --git a/mk/x11.buildlink3.mk b/mk/x11.buildlink3.mk
index 66b3d67d3e5..fce714be1cc 100644
--- a/mk/x11.buildlink3.mk
+++ b/mk/x11.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: x11.buildlink3.mk,v 1.5 2006/10/26 17:08:08 rillig Exp $
+# $NetBSD: x11.buildlink3.mk,v 1.6 2006/11/17 09:50:54 rillig Exp $
#
# This Makefile fragment is meant to be included by packages that
# require an X11 distribution. x11.buildlink3.mk will include the
@@ -7,11 +7,22 @@
X11_BUILDLINK3_MK:= ${X11_BUILDLINK3_MK}+
-.include "../../mk/bsd.prefs.mk"
-
-.if !empty(X11_BUILDLINK3_MK:M+)
+.if ${X11_BUILDLINK3_MK} == "+"
USE_X11= yes
+. include "../../mk/bsd.prefs.mk"
+
+#
+# Sanity checks.
+#
+
+. if ${X11_TYPE} != "native" && ${X11_TYPE} != "xorg"
+_WRONG_X11_TYPE:= ${X11_TYPE}
+PKG_FAIL_REASON+= "[x11.version.mk] X11_TYPE must either be \"xorg\" or \"native\", but not \"${_WRONG_X11_TYPE:Q}\"."
+X11_TYPE:= native
+X11BASE:= /usr
+. endif
+
. include "../../mk/x11.version.mk"
. if defined(GNU_CONFIGURE)
@@ -24,3 +35,5 @@ X11_LDFLAGS+= -L${X11BASE}/lib${LIBABISUFFIX}
.endif # X11_BUILDLINK3_MK
.include "${X11_PKGSRCDIR.${X11_TYPE}}/buildlink3.mk"
+
+X11_BUILDLINK3_MK:= ${X11_BUILDLINK3_MK:S/+$//}