Fix xorg recognition. Inspired by PR 44471 by Robert Elz. Bump version to 0.64 and depend on it.diff -r1.125 -r1.126 pkgsrc/pkgtools/x11-links/Makefile
(wiz)
@@ -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 | |||
7 | DISTNAME= x11-links-0.63 | 7 | DISTNAME= x11-links-0.64 | |
8 | CATEGORIES= pkgtools x11 | 8 | CATEGORIES= pkgtools x11 | |
9 | MASTER_SITES= # empty | 9 | MASTER_SITES= # empty | |
10 | DISTFILES= # empty | 10 | DISTFILES= # empty | |
11 | 11 | |||
12 | MAINTAINER= pkgsrc-users@NetBSD.org | 12 | MAINTAINER= pkgsrc-users@NetBSD.org | |
13 | HOMEPAGE= http://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html | 13 | HOMEPAGE= http://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html | |
14 | COMMENT= Shadow tree of links to native X11 headers and libraries | 14 | COMMENT= Shadow tree of links to native X11 headers and libraries | |
15 | LICENSE= original-bsd | 15 | LICENSE= original-bsd | |
16 | 16 | |||
17 | PKG_DESTDIR_SUPPORT= user-destdir | 17 | PKG_DESTDIR_SUPPORT= user-destdir | |
18 | PKG_INSTALLATION_TYPES= overwrite pkgviews | 18 | PKG_INSTALLATION_TYPES= overwrite pkgviews | |
19 | 19 | |||
20 | WRKSRC= ${WRKDIR} | 20 | WRKSRC= ${WRKDIR} | |
@@ -38,26 +38,28 @@ PKG_FAIL_REASON+= " *) install X headers | @@ -38,26 +38,28 @@ PKG_FAIL_REASON+= " *) install X headers | |||
38 | PKG_FAIL_REASON+= " *) set X11_TYPE=modular in mk.conf to use X11 from pkgsrc" | 38 | PKG_FAIL_REASON+= " *) set X11_TYPE=modular in mk.conf to use X11 from pkgsrc" | |
39 | PKG_FAIL_REASON+= "" | 39 | PKG_FAIL_REASON+= "" | |
40 | PKG_FAIL_REASON+= "Please note that changing the value of X11_TYPE in existing" | 40 | PKG_FAIL_REASON+= "Please note that changing the value of X11_TYPE in existing" | |
41 | PKG_FAIL_REASON+= "pkgsrc installations is not supported!" | 41 | PKG_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 | |||
57 | X11_LINKS_SUBDIR= share/x11-links | 59 | X11_LINKS_SUBDIR= share/x11-links | |
58 | X11_LINKS_BUILD_DIR= ${WRKSRC}/${X11_LINKS_SUBDIR} | 60 | X11_LINKS_BUILD_DIR= ${WRKSRC}/${X11_LINKS_SUBDIR} | |
59 | X11_LINKS_DIR= ${PREFIX}/${X11_LINKS_SUBDIR} | 61 | X11_LINKS_DIR= ${PREFIX}/${X11_LINKS_SUBDIR} | |
60 | 62 | |||
61 | FILES_LIST_CMD= ${SED} -e "s/@ABI@/${ABI}/" ${FILES_LIST} | ${GREP} -v "^\#" | 63 | FILES_LIST_CMD= ${SED} -e "s/@ABI@/${ABI}/" ${FILES_LIST} | ${GREP} -v "^\#" | |
62 | 64 | |||
63 | CREATE_X11LINK?= ${LN} -fs $$src $$dest | 65 | CREATE_X11LINK?= ${LN} -fs $$src $$dest |
@@ -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 | |||
10 | BUILDLINK_TREE+= x11-links | 10 | BUILDLINK_TREE+= x11-links | |
11 | 11 | |||
12 | .if !defined(X11_LINKS_BUILDLINK3_MK) | 12 | .if !defined(X11_LINKS_BUILDLINK3_MK) | |
13 | X11_LINKS_BUILDLINK3_MK:= | 13 | X11_LINKS_BUILDLINK3_MK:= | |
14 | 14 | |||
15 | BUILDLINK_API_DEPENDS.x11-links+= x11-links>=0.63 | 15 | BUILDLINK_API_DEPENDS.x11-links+= x11-links>=0.64 | |
16 | BUILDLINK_PKGSRCDIR.x11-links?= ../../pkgtools/x11-links | 16 | BUILDLINK_PKGSRCDIR.x11-links?= ../../pkgtools/x11-links | |
17 | BUILDLINK_DEPMETHOD.x11-links?= build | 17 | BUILDLINK_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 | # | |
22 | BUILDLINK_CONTENTS_FILTER.x11-links= \ | 22 | BUILDLINK_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 | # | |
28 | BUILDLINK_FNAME_TRANSFORM.x11-links+= -e "s|/share/x11-links/|/|" | 28 | BUILDLINK_FNAME_TRANSFORM.x11-links+= -e "s|/share/x11-links/|/|" |
@@ -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) | |
19 | BUILTIN_X11_TYPE.native= ${BUILTIN_X11_TYPE.xorg} | 20 | BUILTIN_X11_TYPE.native= ${BUILTIN_X11_TYPE.xorg} | |
20 | BUILTIN_X11_VERSION.native= ${BUILTIN_X11_VERSION.xorg} | 21 | BUILTIN_X11_VERSION.native= ${BUILTIN_X11_VERSION.xorg} | |
21 | . elif defined(BUILTIN_X11_VERSION.XFree86) | 22 | . elif defined(BUILTIN_X11_VERSION.XFree86) | |
22 | BUILTIN_X11_TYPE.native= ${BUILTIN_X11_TYPE.XFree86} | 23 | BUILTIN_X11_TYPE.native= ${BUILTIN_X11_TYPE.XFree86} | |
23 | BUILTIN_X11_VERSION.native= ${BUILTIN_X11_VERSION.XFree86} | 24 | BUILTIN_X11_VERSION.native= ${BUILTIN_X11_VERSION.XFree86} | |
24 | . elif !empty(X11BASE:M*openwin) | 25 | . elif !empty(X11BASE:M*openwin) | |
25 | BUILTIN_X11_TYPE.native= openwin | 26 | BUILTIN_X11_TYPE.native= openwin | |
26 | . elif ${OPSYS} == "IRIX" | 27 | . elif ${OPSYS} == "IRIX" | |
27 | BUILTIN_X11_TYPE.native= xsgi | 28 | BUILTIN_X11_TYPE.native= xsgi | |
28 | . elif ${OPSYS} == "OSF1" | 29 | . elif ${OPSYS} == "OSF1" |
# $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