summaryrefslogtreecommitdiff
path: root/pkgtools/x11-links
diff options
context:
space:
mode:
Diffstat (limited to 'pkgtools/x11-links')
-rw-r--r--pkgtools/x11-links/Makefile6
-rw-r--r--pkgtools/x11-links/buildlink3.mk4
-rw-r--r--pkgtools/x11-links/version.mk3
-rw-r--r--pkgtools/x11-links/xorg-version.mk45
4 files changed, 53 insertions, 5 deletions
diff --git a/pkgtools/x11-links/Makefile b/pkgtools/x11-links/Makefile
index 7e2f1da8a49..e14d3fa9d22 100644
--- a/pkgtools/x11-links/Makefile
+++ b/pkgtools/x11-links/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.125 2011/01/19 16:33:51 jmcneill Exp $
+# $NetBSD: Makefile,v 1.126 2011/01/30 17:26:32 wiz Exp $
#
# NOTE: If you update this package, then you'll likely need to also update
# the x11-links dependency in buildlink3.mk to the correct version,
# usually the most recent.
-DISTNAME= x11-links-0.63
+DISTNAME= x11-links-0.64
CATEGORIES= pkgtools x11
MASTER_SITES= # empty
DISTFILES= # empty
@@ -48,6 +48,8 @@ PKG_FAIL_REASON+= "pkgsrc installations is not supported!"
.elif !empty(X11BASE:M*openwin)
. include "openwin.mk"
.elif exists(${X11BASE}/lib/X11/config/xorgversion.def) || \
+ (exists(${X11BASE}/lib/X11/config/xorg.cf) && \
+ exists(${X11BASE}/lib/X11/config/version.def)) || \
exists(${X11BASE}/lib/pkgconfig/xorg-server.pc)
. include "xorg.mk"
.else
diff --git a/pkgtools/x11-links/buildlink3.mk b/pkgtools/x11-links/buildlink3.mk
index 5861a662c95..48f66a50930 100644
--- a/pkgtools/x11-links/buildlink3.mk
+++ b/pkgtools/x11-links/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.37 2011/01/19 16:33:51 jmcneill Exp $
+# $NetBSD: buildlink3.mk,v 1.38 2011/01/30 17:26:32 wiz Exp $
#
# Don't include this file manually! It will be included as necessary
# by bsd.buildlink3.mk.
@@ -12,7 +12,7 @@ BUILDLINK_TREE+= x11-links
.if !defined(X11_LINKS_BUILDLINK3_MK)
X11_LINKS_BUILDLINK3_MK:=
-BUILDLINK_API_DEPENDS.x11-links+= x11-links>=0.63
+BUILDLINK_API_DEPENDS.x11-links+= x11-links>=0.64
BUILDLINK_PKGSRCDIR.x11-links?= ../../pkgtools/x11-links
BUILDLINK_DEPMETHOD.x11-links?= build
diff --git a/pkgtools/x11-links/version.mk b/pkgtools/x11-links/version.mk
index f7835055bf1..2bd134140ed 100644
--- a/pkgtools/x11-links/version.mk
+++ b/pkgtools/x11-links/version.mk
@@ -1,4 +1,4 @@
-# $NetBSD: version.mk,v 1.4 2011/01/08 21:46:56 dholland Exp $
+# $NetBSD: version.mk,v 1.5 2011/01/30 17:26:32 wiz Exp $
#
# This Makefile fragment is included by Makefiles that need to access
# the X11_TYPE and version number of a native X11 distribution.
@@ -13,6 +13,7 @@
#
.if !defined(BUILTIN_X11_VERSION.native)
+. include "xorg-version.mk"
. include "xfree-version.mk"
. if defined(BUILTIN_X11_VERSION.xorg)
diff --git a/pkgtools/x11-links/xorg-version.mk b/pkgtools/x11-links/xorg-version.mk
new file mode 100644
index 00000000000..252468a3f95
--- /dev/null
+++ b/pkgtools/x11-links/xorg-version.mk
@@ -0,0 +1,45 @@
+# $NetBSD: xorg-version.mk,v 1.1 2011/01/30 17:26:32 wiz Exp $
+#
+# This Makefile fragment is included by Makefiles that need to access
+# the X11_TYPE and version number of an X.org distribution.
+#
+# The following variables are provided by this file:
+#
+# BUILTIN_X11_TYPE.xorg is the X11_TYPE of the X.org distribution
+# and is simply "xorg".
+#
+# BUILTIN_X11_VERSION.xorg is the version number of the X.org
+# distribution detected on the system.
+#
+
+BUILTIN_X11_TYPE.xorg= xorg
+
+BUILTIN_FIND_FILES_VAR:= CF_XORG CF_XORG_VERSION CF_VERSION_OLD
+BUILTIN_FIND_FILES.CF_XORG= ${X11BASE}/lib/X11/config/xorg.cf
+BUILTIN_FIND_FILES.CF_XORG_VERSION= ${X11BASE}/lib/X11/config/xorgversion.def
+BUILTIN_FIND_FILES.CF_VERSION_OLD= ${X11BASE}/lib/X11/config/version.def
+.include "../../mk/buildlink3/find-files.mk"
+
+.if !defined(BUILTIN_XORG_VERSION_FILE)
+BUILTIN_XORG_VERSION_FILE= __nonexistent__
+. if exists(${CF_XORG_VERSION})
+BUILTIN_XORG_VERSION_FILE= ${CF_XORG_VERSION}
+. elif exists(${CF_VERSION_OLD})
+BUILTIN_XORG_VERSION_FILE= ${CF_VERSION_OLD}
+. endif
+.endif
+MAKEVARS+= BUILTIN_XORG_VERSION_FILE
+
+.if !defined(BUILTIN_X11_VERSION.xorg) && \
+ exists(${BUILTIN_XORG_VERSION_FILE})
+BUILTIN_X11_VERSION.xorg!= \
+ ${AWK} '/\#define[ ]*XORG_VERSION_MAJOR/ { M = $$3 } \
+ /\#define[ ]*XORG_VERSION_MINOR/ { m = "."$$3 } \
+ /\#define[ ]*XORG_VERSION_PATCH/ { p = "."$$3 } \
+ /\#define[ ]*XORG_VERSION_SNAP/ { s = "."$$3 } \
+ END { if (s == ".0") s = ""; \
+ if (p == ".0" && s == "") p = ""; \
+ printf "%s%s%s%s\n", M, m, p, s }' \
+ ${BUILTIN_XORG_VERSION_FILE}
+.endif
+MAKEVARS+= BUILTIN_X11_VERSION.xorg