Sun Jan 30 17:26:32 2011 UTC ()
Fix xorg recognition. Inspired by PR 44471 by Robert Elz.
Bump version to 0.64 and depend on it.


(wiz)
diff -r1.125 -r1.126 pkgsrc/pkgtools/x11-links/Makefile
diff -r1.37 -r1.38 pkgsrc/pkgtools/x11-links/buildlink3.mk
diff -r1.4 -r1.5 pkgsrc/pkgtools/x11-links/version.mk
diff -r0 -r1.1 pkgsrc/pkgtools/x11-links/xorg-version.mk

cvs diff -r1.125 -r1.126 pkgsrc/pkgtools/x11-links/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/x11-links/Makefile 2011/01/19 16:33:51 1.125
+++ pkgsrc/pkgtools/x11-links/Makefile 2011/01/30 17:26:32 1.126
@@ -1,20 +1,20 @@ @@ -1,20 +1,20 @@
1# $NetBSD: Makefile,v 1.125 2011/01/19 16:33:51 jmcneill Exp $ 1# $NetBSD: Makefile,v 1.126 2011/01/30 17:26:32 wiz Exp $
2# 2#
3# NOTE: If you update this package, then you'll likely need to also update 3# NOTE: If you update this package, then you'll likely need to also update
4# the x11-links dependency in buildlink3.mk to the correct version, 4# the x11-links dependency in buildlink3.mk to the correct version,
5# usually the most recent. 5# usually the most recent.
6 6
7DISTNAME= x11-links-0.63 7DISTNAME= x11-links-0.64
8CATEGORIES= pkgtools x11 8CATEGORIES= pkgtools x11
9MASTER_SITES= # empty 9MASTER_SITES= # empty
10DISTFILES= # empty 10DISTFILES= # empty
11 11
12MAINTAINER= pkgsrc-users@NetBSD.org 12MAINTAINER= pkgsrc-users@NetBSD.org
13HOMEPAGE= http://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html 13HOMEPAGE= http://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html
14COMMENT= Shadow tree of links to native X11 headers and libraries 14COMMENT= Shadow tree of links to native X11 headers and libraries
15LICENSE= original-bsd 15LICENSE= original-bsd
16 16
17PKG_DESTDIR_SUPPORT= user-destdir 17PKG_DESTDIR_SUPPORT= user-destdir
18PKG_INSTALLATION_TYPES= overwrite pkgviews 18PKG_INSTALLATION_TYPES= overwrite pkgviews
19 19
20WRKSRC= ${WRKDIR} 20WRKSRC= ${WRKDIR}
@@ -38,26 +38,28 @@ PKG_FAIL_REASON+= " *) install X headers @@ -38,26 +38,28 @@ PKG_FAIL_REASON+= " *) install X headers
38PKG_FAIL_REASON+= " *) set X11_TYPE=modular in mk.conf to use X11 from pkgsrc" 38PKG_FAIL_REASON+= " *) set X11_TYPE=modular in mk.conf to use X11 from pkgsrc"
39PKG_FAIL_REASON+= "" 39PKG_FAIL_REASON+= ""
40PKG_FAIL_REASON+= "Please note that changing the value of X11_TYPE in existing" 40PKG_FAIL_REASON+= "Please note that changing the value of X11_TYPE in existing"
41PKG_FAIL_REASON+= "pkgsrc installations is not supported!" 41PKG_FAIL_REASON+= "pkgsrc installations is not supported!"
42.endif 42.endif
43 43
44.if ${OPSYS} == "IRIX" 44.if ${OPSYS} == "IRIX"
45. include "xsgi.mk" 45. include "xsgi.mk"
46.elif ${OPSYS} == "OSF1" 46.elif ${OPSYS} == "OSF1"
47. include "xdec.mk" 47. include "xdec.mk"
48.elif !empty(X11BASE:M*openwin) 48.elif !empty(X11BASE:M*openwin)
49. include "openwin.mk" 49. include "openwin.mk"
50.elif exists(${X11BASE}/lib/X11/config/xorgversion.def) || \ 50.elif exists(${X11BASE}/lib/X11/config/xorgversion.def) || \
 51 (exists(${X11BASE}/lib/X11/config/xorg.cf) && \
 52 exists(${X11BASE}/lib/X11/config/version.def)) || \
51 exists(${X11BASE}/lib/pkgconfig/xorg-server.pc) 53 exists(${X11BASE}/lib/pkgconfig/xorg-server.pc)
52. include "xorg.mk" 54. include "xorg.mk"
53.else 55.else
54. include "xfree.mk" 56. include "xfree.mk"
55.endif 57.endif
56 58
57X11_LINKS_SUBDIR= share/x11-links 59X11_LINKS_SUBDIR= share/x11-links
58X11_LINKS_BUILD_DIR= ${WRKSRC}/${X11_LINKS_SUBDIR} 60X11_LINKS_BUILD_DIR= ${WRKSRC}/${X11_LINKS_SUBDIR}
59X11_LINKS_DIR= ${PREFIX}/${X11_LINKS_SUBDIR} 61X11_LINKS_DIR= ${PREFIX}/${X11_LINKS_SUBDIR}
60 62
61FILES_LIST_CMD= ${SED} -e "s/@ABI@/${ABI}/" ${FILES_LIST} | ${GREP} -v "^\#" 63FILES_LIST_CMD= ${SED} -e "s/@ABI@/${ABI}/" ${FILES_LIST} | ${GREP} -v "^\#"
62 64
63CREATE_X11LINK?= ${LN} -fs $$src $$dest 65CREATE_X11LINK?= ${LN} -fs $$src $$dest

cvs diff -r1.37 -r1.38 pkgsrc/pkgtools/x11-links/buildlink3.mk (expand / switch to unified diff)

--- pkgsrc/pkgtools/x11-links/buildlink3.mk 2011/01/19 16:33:51 1.37
+++ pkgsrc/pkgtools/x11-links/buildlink3.mk 2011/01/30 17:26:32 1.38
@@ -1,28 +1,28 @@ @@ -1,28 +1,28 @@
1# $NetBSD: buildlink3.mk,v 1.37 2011/01/19 16:33:51 jmcneill Exp $ 1# $NetBSD: buildlink3.mk,v 1.38 2011/01/30 17:26:32 wiz Exp $
2# 2#
3# Don't include this file manually! It will be included as necessary 3# Don't include this file manually! It will be included as necessary
4# by bsd.buildlink3.mk. 4# by bsd.buildlink3.mk.
5 5
6# x11-links is sorted first in mk/buildlink3/bsd.buildlink3.mk, 6# x11-links is sorted first in mk/buildlink3/bsd.buildlink3.mk,
7# so that symlinks created from it can be overriden by other packages. 7# so that symlinks created from it can be overriden by other packages.
8# 8#
9 9
10BUILDLINK_TREE+= x11-links 10BUILDLINK_TREE+= x11-links
11 11
12.if !defined(X11_LINKS_BUILDLINK3_MK) 12.if !defined(X11_LINKS_BUILDLINK3_MK)
13X11_LINKS_BUILDLINK3_MK:= 13X11_LINKS_BUILDLINK3_MK:=
14 14
15BUILDLINK_API_DEPENDS.x11-links+= x11-links>=0.63 15BUILDLINK_API_DEPENDS.x11-links+= x11-links>=0.64
16BUILDLINK_PKGSRCDIR.x11-links?= ../../pkgtools/x11-links 16BUILDLINK_PKGSRCDIR.x11-links?= ../../pkgtools/x11-links
17BUILDLINK_DEPMETHOD.x11-links?= build 17BUILDLINK_DEPMETHOD.x11-links?= build
18 18
19# Force all of the headers and libraries to be symlinked into 19# Force all of the headers and libraries to be symlinked into
20# ${BUILDLINK_X11_DIR}, even in the "pkgviews" case. 20# ${BUILDLINK_X11_DIR}, even in the "pkgviews" case.
21# 21#
22BUILDLINK_CONTENTS_FILTER.x11-links= \ 22BUILDLINK_CONTENTS_FILTER.x11-links= \
23 ${EGREP} '(include.*/|\.h$$|\.pc$$|/lib[^/]*$$)' 23 ${EGREP} '(include.*/|\.h$$|\.pc$$|/lib[^/]*$$)'
24 24
25# Rename the symlinks so that they appear in ${BUILDLINK_X11_DIR}/include 25# Rename the symlinks so that they appear in ${BUILDLINK_X11_DIR}/include
26# and ${BUILDLINK_X11_DIR}/lib. 26# and ${BUILDLINK_X11_DIR}/lib.
27# 27#
28BUILDLINK_FNAME_TRANSFORM.x11-links+= -e "s|/share/x11-links/|/|" 28BUILDLINK_FNAME_TRANSFORM.x11-links+= -e "s|/share/x11-links/|/|"

cvs diff -r1.4 -r1.5 pkgsrc/pkgtools/x11-links/version.mk (expand / switch to unified diff)

--- pkgsrc/pkgtools/x11-links/version.mk 2011/01/08 21:46:56 1.4
+++ pkgsrc/pkgtools/x11-links/version.mk 2011/01/30 17:26:32 1.5
@@ -1,28 +1,29 @@ @@ -1,28 +1,29 @@
1# $NetBSD: version.mk,v 1.4 2011/01/08 21:46:56 dholland Exp $ 1# $NetBSD: version.mk,v 1.5 2011/01/30 17:26:32 wiz Exp $
2# 2#
3# This Makefile fragment is included by Makefiles that need to access 3# This Makefile fragment is included by Makefiles that need to access
4# the X11_TYPE and version number of a native X11 distribution. 4# the X11_TYPE and version number of a native X11 distribution.
5# 5#
6# The following variables are provided by this file: 6# The following variables are provided by this file:
7# 7#
8# BUILTIN_X11_TYPE.native is the X11_TYPE of the native X11 8# BUILTIN_X11_TYPE.native is the X11_TYPE of the native X11
9# distribution detected on the system. 9# distribution detected on the system.
10# 10#
11# BUILTIN_X11_VERSION.native is the version number, where applicable, 11# BUILTIN_X11_VERSION.native is the version number, where applicable,
12# of the native X11 distribution detected on the system. 12# of the native X11 distribution detected on the system.
13# 13#
14 14
15.if !defined(BUILTIN_X11_VERSION.native) 15.if !defined(BUILTIN_X11_VERSION.native)
 16. include "xorg-version.mk"
16. include "xfree-version.mk" 17. include "xfree-version.mk"
17 18
18. if defined(BUILTIN_X11_VERSION.xorg) 19. if defined(BUILTIN_X11_VERSION.xorg)
19BUILTIN_X11_TYPE.native= ${BUILTIN_X11_TYPE.xorg} 20BUILTIN_X11_TYPE.native= ${BUILTIN_X11_TYPE.xorg}
20BUILTIN_X11_VERSION.native= ${BUILTIN_X11_VERSION.xorg} 21BUILTIN_X11_VERSION.native= ${BUILTIN_X11_VERSION.xorg}
21. elif defined(BUILTIN_X11_VERSION.XFree86) 22. elif defined(BUILTIN_X11_VERSION.XFree86)
22BUILTIN_X11_TYPE.native= ${BUILTIN_X11_TYPE.XFree86} 23BUILTIN_X11_TYPE.native= ${BUILTIN_X11_TYPE.XFree86}
23BUILTIN_X11_VERSION.native= ${BUILTIN_X11_VERSION.XFree86} 24BUILTIN_X11_VERSION.native= ${BUILTIN_X11_VERSION.XFree86}
24. elif !empty(X11BASE:M*openwin) 25. elif !empty(X11BASE:M*openwin)
25BUILTIN_X11_TYPE.native= openwin 26BUILTIN_X11_TYPE.native= openwin
26. elif ${OPSYS} == "IRIX" 27. elif ${OPSYS} == "IRIX"
27BUILTIN_X11_TYPE.native= xsgi 28BUILTIN_X11_TYPE.native= xsgi
28. elif ${OPSYS} == "OSF1" 29. elif ${OPSYS} == "OSF1"

File Added: pkgsrc/pkgtools/x11-links/xorg-version.mk
# $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