Fix xorg recognition. Inspired by PR 44471 by Robert Elz.

Bump version to 0.64 and depend on it.
This commit is contained in:
wiz 2011-01-30 17:26:32 +00:00
parent 25be3a5206
commit f5f849fcc6
4 changed files with 53 additions and 5 deletions

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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