summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkgtools/x11-links/builtin.mk10
-rw-r--r--x11/Xrandr-mixedcase/Makefile17
-rw-r--r--x11/randrext/Makefile14
-rw-r--r--x11/randrext/buildlink3.mk4
-rw-r--r--x11/xextensions/builtin.mk46
5 files changed, 58 insertions, 33 deletions
diff --git a/pkgtools/x11-links/builtin.mk b/pkgtools/x11-links/builtin.mk
index f29696c7641..d46a19f35fc 100644
--- a/pkgtools/x11-links/builtin.mk
+++ b/pkgtools/x11-links/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.5 2004/07/24 07:00:39 grant Exp $
+# $NetBSD: builtin.mk,v 1.6 2005/03/05 18:16:21 wiz Exp $
.if !defined(XF86_VERSION)
. if exists(${X11BASE}/lib/X11/config/xorg.cf)
@@ -51,11 +51,3 @@ BUILDLINK_VARS+= XF86_VERSION
.endif
USE_BUILTIN.x11-links?= no
-
-# Xrandr won't build without the X Extension library which is only present
-# in XFree86>=4.3; ignore it when checking dependencies or buildlinking.
-#
-.if !exists(${X11BASE}/include/X11/extensions/extutil.h)
-IGNORE_PKG.Xrandr= yes
-IGNORE_PKG.randrext= yes
-.endif
diff --git a/x11/Xrandr-mixedcase/Makefile b/x11/Xrandr-mixedcase/Makefile
index 1548a61d27e..08c8efb0f77 100644
--- a/x11/Xrandr-mixedcase/Makefile
+++ b/x11/Xrandr-mixedcase/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.9 2004/10/03 00:18:28 tv Exp $
+# $NetBSD: Makefile,v 1.10 2005/03/05 18:16:21 wiz Exp $
#
DISTNAME= libXrandr-1.0.2
PKGNAME= Xrandr-1.0.2
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= x11 devel
MASTER_SITES= http://freedesktop.org/~xlibs/release/
EXTRACT_SUFX= .tar.bz2
@@ -21,17 +21,10 @@ GNU_CONFIGURE= yes
PKGCONFIG_OVERRIDE+= xrandr.pc.in
BUILDLINK_DEPENDS.Xrender+= Xrender>=0.8
+BUILDLINK_DEPENDS.randrext+= randrext>=1.0
-.include "../../mk/bsd.prefs.mk"
-
-# Xrandr won't build without the X Extension library which is only present
-# in XFree86>=4.3.
-.if !exists(${X11BASE}/include/X11/extensions/extutil.h)
-PKG_FAIL_REASON= "${PKGNAME} won't build without the X Extension"
-PKG_FAIL_REASON+= "library which is only present in XFree86>=4.3."
-.endif
-
-.include "../../x11/randrext/buildlink3.mk"
.include "../../x11/Xrender/buildlink3.mk"
+.include "../../x11/randrext/buildlink3.mk"
+.include "../../x11/xextensions/buildlink3.mk"
.include "../../devel/pkgconfig/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/x11/randrext/Makefile b/x11/randrext/Makefile
index 32b0950a6c1..c025ca32eeb 100644
--- a/x11/randrext/Makefile
+++ b/x11/randrext/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2004/05/07 01:14:51 xtraeme Exp $
+# $NetBSD: Makefile,v 1.9 2005/03/05 18:16:21 wiz Exp $
DISTNAME= randrext-1.0
+PKGREVISION= 1
CATEGORIES= x11 devel
MASTER_SITES= http://freedesktop.org/~xlibs/release/
EXTRACT_SUFX= .tar.bz2
@@ -16,14 +17,5 @@ GNU_CONFIGURE= yes
PKGCONFIG_OVERRIDE+= randr.pc.in
-.include "../../mk/bsd.prefs.mk"
-
-# Xrandr won't build without the X Extension library which is only present
-# in XFree86>=4.3. For this reason we don't need the header files.
-.if !exists(${X11BASE}/include/X11/extensions/extutil.h)
-PKG_SKIP_REASON= "Xrandr won't build without the X Extension"
-PKG_SKIP_REASON+= "library which is only present in XFree86>=4.3."
-PKG_SKIP_REASON+= "For this reason we don't need the header files."
-.endif
-
+.include "../../x11/xextensions/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/x11/randrext/buildlink3.mk b/x11/randrext/buildlink3.mk
index c5c01ef3591..21a4efa2d03 100644
--- a/x11/randrext/buildlink3.mk
+++ b/x11/randrext/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.3 2004/03/10 17:57:15 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.4 2005/03/05 18:16:21 wiz Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
RANDREXT_BUILDLINK3_MK:= ${RANDREXT_BUILDLINK3_MK}+
@@ -15,6 +15,8 @@ BUILDLINK_DEPENDS.randrext+= randrext>=1.0
BUILDLINK_PKGSRCDIR.randrext?= ../../x11/randrext
BUILDLINK_DEPMETHOD.randrext?= build
+.include "../../x11/xextensions/buildlink3.mk"
+
USE_X11= yes
.endif # RANDREXT_BUILDLINK3_MK
diff --git a/x11/xextensions/builtin.mk b/x11/xextensions/builtin.mk
new file mode 100644
index 00000000000..ab0f16cae1b
--- /dev/null
+++ b/x11/xextensions/builtin.mk
@@ -0,0 +1,46 @@
+# $NetBSD: builtin.mk,v 1.1 2005/03/05 18:16:21 wiz Exp $
+
+_X11_EXTENSIONS_EXTUTIL_H= ${X11BASE}/include/X11/extensions/extutil.h
+
+.if !defined(IS_BUILTIN.xextensions)
+IS_BUILTIN.xextensions= no
+. if exists(${_X11_EXTENSIONS_EXTUTIL_H})
+IS_BUILTIN.xextensions= yes
+# hardcode version for now, since there currently is only one, really
+BUILTIN_PKG.xextensions= xextensions-1.0.1
+BUILDLINK_VARS+= BUILTIN_PKG.xextensions
+. endif
+BUILDLINK_VARS+= IS_BUILTIN.xextensions
+.endif # IS_BUILTIN.xextensions
+
+.if !defined(USE_BUILTIN.xextensions)
+USE_BUILTIN.xextensions?= ${IS_BUILTIN.xextensions}
+
+. if defined(BUILTIN_PKG.xextensions)
+USE_BUILTIN.xextensions= yes
+. for _depend_ in ${BUILDLINK_DEPENDS.xextensions}
+. if !empty(USE_BUILTIN.xextensions:M[yY][eE][sS])
+USE_BUILTIN.xextensions!= \
+ if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.xextensions}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+. endif
+. endfor
+. endif
+.endif # USE_BUILTIN.xextensions
+
+CHECK_BUILTIN.xextensions?= no
+.if !empty(CHECK_BUILTIN.xextensions:M[nN][oO])
+
+.if !empty(USE_BUILTIN.xextensions:M[nN][oO])
+BUILDLINK_DEPENDS.xextensions+= xextensions>=1.0
+.endif
+
+.if !empty(USE_BUILTIN.xextensions:M[yY][eE][sS])
+BUILDLINK_PREFIX.xextensions= ${X11BASE}
+USE_X11= yes
+.endif
+
+.endif # CHECK_BUILTIN.xextensions