Fri Feb 21 17:45:08 2014 UTC ()
x11-links-0.83: Assume Xorg if x11.pc exists.

This fixes detection on RHEL-based distributions which have the X11 libraries
and development files installed but not the X server.


(jperkin)
diff -r1.149 -r1.150 pkgsrc/pkgtools/x11-links/Makefile
diff -r1.51 -r1.52 pkgsrc/pkgtools/x11-links/buildlink3.mk

cvs diff -r1.149 -r1.150 pkgsrc/pkgtools/x11-links/Makefile (switch to unified diff)

--- pkgsrc/pkgtools/x11-links/Makefile 2014/02/08 17:08:33 1.149
+++ pkgsrc/pkgtools/x11-links/Makefile 2014/02/21 17:45:08 1.150
@@ -1,123 +1,124 @@ @@ -1,123 +1,124 @@
1# $NetBSD: Makefile,v 1.149 2014/02/08 17:08:33 jperkin Exp $ 1# $NetBSD: Makefile,v 1.150 2014/02/21 17:45:08 jperkin 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.82 7DISTNAME= x11-links-0.83
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
17.include "../../mk/bsd.prefs.mk" 17.include "../../mk/bsd.prefs.mk"
18.if ${OPSYS} == "OpenBSD" 18.if ${OPSYS} == "OpenBSD"
19CHECK_SHLIBS_SUPPORTED= no 19CHECK_SHLIBS_SUPPORTED= no
20.endif 20.endif
21 21
22PKG_INSTALLATION_TYPES= overwrite pkgviews 22PKG_INSTALLATION_TYPES= overwrite pkgviews
23 23
24NOT_FOR_PLATFORM= DragonFly-*-* 24NOT_FOR_PLATFORM= DragonFly-*-*
25 25
26WRKSRC= ${WRKDIR} 26WRKSRC= ${WRKDIR}
27USE_LANGUAGES= # empty 27USE_LANGUAGES= # empty
28USE_TOOLS+= pax 28USE_TOOLS+= pax
29 29
30PLIST_SRC.files= ${WRKDIR}/.PLIST_SRC.files 30PLIST_SRC.files= ${WRKDIR}/.PLIST_SRC.files
31PLIST_SRC= ${PLIST_SRC_DFLT} ${PLIST_SRC.files} 31PLIST_SRC= ${PLIST_SRC_DFLT} ${PLIST_SRC.files}
32 32
33OSVERSION_SPECIFIC= yes 33OSVERSION_SPECIFIC= yes
34 34
35.include "../../mk/bsd.prefs.mk" 35.include "../../mk/bsd.prefs.mk"
36 36
37.if ${X11_TYPE} == "modular" 37.if ${X11_TYPE} == "modular"
38PKG_FAIL_REASON+= "${PKGNAME} should only be used with X11_TYPE=native." 38PKG_FAIL_REASON+= "${PKGNAME} should only be used with X11_TYPE=native."
39.elif !exists(${X11BASE}/include/X11/X.h) 39.elif !exists(${X11BASE}/include/X11/X.h)
40PKG_FAIL_REASON+= "pkgsrc has been configured to use a system provided X11 installation" 40PKG_FAIL_REASON+= "pkgsrc has been configured to use a system provided X11 installation"
41PKG_FAIL_REASON+= "but one could not be found. Possible solutions:" 41PKG_FAIL_REASON+= "but one could not be found. Possible solutions:"
42PKG_FAIL_REASON+= "" 42PKG_FAIL_REASON+= ""
43PKG_FAIL_REASON+= " *) install X headers and libraries in X11BASE (currently ${X11BASE})" 43PKG_FAIL_REASON+= " *) install X headers and libraries in X11BASE (currently ${X11BASE})"
44PKG_FAIL_REASON+= " *) set X11_TYPE=modular in mk.conf to use X11 from pkgsrc" 44PKG_FAIL_REASON+= " *) set X11_TYPE=modular in mk.conf to use X11 from pkgsrc"
45PKG_FAIL_REASON+= "" 45PKG_FAIL_REASON+= ""
46PKG_FAIL_REASON+= "Please note that changing the value of X11_TYPE in existing" 46PKG_FAIL_REASON+= "Please note that changing the value of X11_TYPE in existing"
47PKG_FAIL_REASON+= "pkgsrc installations is not supported!" 47PKG_FAIL_REASON+= "pkgsrc installations is not supported!"
48.endif 48.endif
49 49
50.if ${OPSYS} == "IRIX" 50.if ${OPSYS} == "IRIX"
51. include "xsgi.mk" 51. include "xsgi.mk"
52.elif ${OPSYS} == "OSF1" 52.elif ${OPSYS} == "OSF1"
53. include "xdec.mk" 53. include "xdec.mk"
54.elif !empty(X11BASE:M*openwin) 54.elif !empty(X11BASE:M*openwin)
55. include "openwin.mk" 55. include "openwin.mk"
56.elif exists(${X11BASE}/lib/X11/config/xorgversion.def) || \ 56.elif exists(${X11BASE}/lib/X11/config/xorgversion.def) || \
57 (exists(${X11BASE}/lib/X11/config/xorg.cf) && \ 57 (exists(${X11BASE}/lib/X11/config/xorg.cf) && \
58 exists(${X11BASE}/lib/X11/config/version.def)) || \ 58 exists(${X11BASE}/lib/X11/config/version.def)) || \
59 exists(${X11BASE}/lib/pkgconfig/xorg-server.pc) || \ 59 exists(${X11BASE}/lib/pkgconfig/xorg-server.pc) || \
 60 exists(${X11BASE}/lib/pkgconfig/x11.pc) || \
60 exists(${X11BASE}/bin/Xquartz) 61 exists(${X11BASE}/bin/Xquartz)
61. include "xorg.mk" 62. include "xorg.mk"
62.else 63.else
63. include "xfree.mk" 64. include "xfree.mk"
64.endif 65.endif
65 66
66X11_LINKS_SUBDIR= share/x11-links 67X11_LINKS_SUBDIR= share/x11-links
67X11_LINKS_BUILD_DIR= ${WRKSRC}/${X11_LINKS_SUBDIR} 68X11_LINKS_BUILD_DIR= ${WRKSRC}/${X11_LINKS_SUBDIR}
68X11_LINKS_DIR= ${PREFIX}/${X11_LINKS_SUBDIR} 69X11_LINKS_DIR= ${PREFIX}/${X11_LINKS_SUBDIR}
69 70
70FILES_LIST_CMD= ${SED} -e "s/@ABI@/${ABI}/" ${FILES_LIST} | ${GREP} -v "^\#" 71FILES_LIST_CMD= ${SED} -e "s/@ABI@/${ABI}/" ${FILES_LIST} | ${GREP} -v "^\#"
71 72
72CREATE_X11LINK?= ${LN} -fs $$src $$dest 73CREATE_X11LINK?= ${LN} -fs $$src $$dest
73 74
74.include "../../mk/x11.buildlink3.mk" 75.include "../../mk/x11.buildlink3.mk"
75 76
76do-build: 77do-build:
77 ${MKDIR} ${X11_LINKS_BUILD_DIR} 78 ${MKDIR} ${X11_LINKS_BUILD_DIR}
78 ${CHMOD} ${PKGDIRMODE} ${X11_LINKS_BUILD_DIR} 79 ${CHMOD} ${PKGDIRMODE} ${X11_LINKS_BUILD_DIR}
79 ${FILES_LIST_CMD} | ${SED} -e "s,/[^/]*$$,," | ${SORT} -u | \ 80 ${FILES_LIST_CMD} | ${SED} -e "s,/[^/]*$$,," | ${SORT} -u | \
80 while read dir; do \ 81 while read dir; do \
81 if [ -d ${X11BASE}/$$dir ]; then \ 82 if [ -d ${X11BASE}/$$dir ]; then \
82 ${MKDIR} ${X11_LINKS_BUILD_DIR}/$$dir; \ 83 ${MKDIR} ${X11_LINKS_BUILD_DIR}/$$dir; \
83 ${CHMOD} ${PKGDIRMODE} ${X11_LINKS_BUILD_DIR}/$$dir; \ 84 ${CHMOD} ${PKGDIRMODE} ${X11_LINKS_BUILD_DIR}/$$dir; \
84 elif [ -d /usr/$$dir ]; then \ 85 elif [ -d /usr/$$dir ]; then \
85 ${MKDIR} ${X11_LINKS_BUILD_DIR}/$$dir; \ 86 ${MKDIR} ${X11_LINKS_BUILD_DIR}/$$dir; \
86 ${CHMOD} ${PKGDIRMODE} ${X11_LINKS_BUILD_DIR}/$$dir; \ 87 ${CHMOD} ${PKGDIRMODE} ${X11_LINKS_BUILD_DIR}/$$dir; \
87 fi; \ 88 fi; \
88 done 89 done
89 ${RM} -f ${PLIST_SRC.files} 90 ${RM} -f ${PLIST_SRC.files}
90 ${FILES_LIST_CMD} | ${SORT} -u | \ 91 ${FILES_LIST_CMD} | ${SORT} -u | \
91 while read file; do \ 92 while read file; do \
92 srcdir=""; \ 93 srcdir=""; \
93 if ${TEST} -r ${X11BASE}/$$file; then \ 94 if ${TEST} -r ${X11BASE}/$$file; then \
94 srcdir="${X11BASE}"; \ 95 srcdir="${X11BASE}"; \
95 elif ${TEST} -r /usr/$$file; then \ 96 elif ${TEST} -r /usr/$$file; then \
96 srcdir="/usr"; \ 97 srcdir="/usr"; \
97 fi; \ 98 fi; \
98 if ${TEST} ! -z "$$srcdir"; then \ 99 if ${TEST} ! -z "$$srcdir"; then \
99 src="$$srcdir/$$file"; \ 100 src="$$srcdir/$$file"; \
100 dest="${X11_LINKS_BUILD_DIR}/$$file"; \ 101 dest="${X11_LINKS_BUILD_DIR}/$$file"; \
101 ${CREATE_X11LINK}; \ 102 ${CREATE_X11LINK}; \
102 ${ECHO} "${X11_LINKS_SUBDIR}/$$file" \ 103 ${ECHO} "${X11_LINKS_SUBDIR}/$$file" \
103 >> ${PLIST_SRC.files}; \ 104 >> ${PLIST_SRC.files}; \
104 if (${ECHO} $$file | ${GREP} -q '\.la$$'); then \ 105 if (${ECHO} $$file | ${GREP} -q '\.la$$'); then \
105 cd $${srcdir} && \ 106 cd $${srcdir} && \
106 ${_LIBTOOL_EXPAND} $${file} | \ 107 ${_LIBTOOL_EXPAND} $${file} | \
107 while read lib; do \ 108 while read lib; do \
108 src="$$srcdir/$$lib"; \ 109 src="$$srcdir/$$lib"; \
109 dest="${X11_LINKS_BUILD_DIR}/$$lib"; \ 110 dest="${X11_LINKS_BUILD_DIR}/$$lib"; \
110 ${CREATE_X11LINK}; \ 111 ${CREATE_X11LINK}; \
111 ${ECHO} "${X11_LINKS_SUBDIR}/$$lib" \ 112 ${ECHO} "${X11_LINKS_SUBDIR}/$$lib" \
112 >> ${PLIST_SRC.files}; \ 113 >> ${PLIST_SRC.files}; \
113 done; \ 114 done; \
114 fi; \ 115 fi; \
115 fi; \ 116 fi; \
116 done 117 done
117 118
118do-install: 119do-install:
119 ${INSTALL_DATA_DIR} ${DESTDIR:Q}${X11_LINKS_DIR:Q} 120 ${INSTALL_DATA_DIR} ${DESTDIR:Q}${X11_LINKS_DIR:Q}
120 cd ${X11_LINKS_BUILD_DIR} && \ 121 cd ${X11_LINKS_BUILD_DIR} && \
121 pax -rw . ${DESTDIR:Q}${X11_LINKS_DIR:Q} 122 pax -rw . ${DESTDIR:Q}${X11_LINKS_DIR:Q}
122 123
123.include "../../mk/bsd.pkg.mk" 124.include "../../mk/bsd.pkg.mk"

cvs diff -r1.51 -r1.52 pkgsrc/pkgtools/x11-links/buildlink3.mk (switch to unified diff)

--- pkgsrc/pkgtools/x11-links/buildlink3.mk 2014/02/08 17:08:33 1.51
+++ pkgsrc/pkgtools/x11-links/buildlink3.mk 2014/02/21 17:45:08 1.52
@@ -1,31 +1,31 @@ @@ -1,31 +1,31 @@
1# $NetBSD: buildlink3.mk,v 1.51 2014/02/08 17:08:33 jperkin Exp $ 1# $NetBSD: buildlink3.mk,v 1.52 2014/02/21 17:45:08 jperkin 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.82 15BUILDLINK_API_DEPENDS.x11-links+= x11-links>=0.83
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 helper programs, headers and libraries to be symlinked 19# Force all of the helper programs, headers and libraries to be symlinked
20# into ${BUILDLINK_X11_DIR}, even in the "pkgviews" case. 20# into ${BUILDLINK_X11_DIR}, even in the "pkgviews" case.
21# 21#
22BUILDLINK_CONTENTS_FILTER.x11-links= \ 22BUILDLINK_CONTENTS_FILTER.x11-links= \
23 ${EGREP} '(bin/.*|include.*/|\.h$$|\.pc$$|/lib[^/]*$$)' 23 ${EGREP} '(bin/.*|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/|/|"
29.endif # X11_LINKS_BUILDLINK3_MK 29.endif # X11_LINKS_BUILDLINK3_MK
30 30
31BUILDLINK_TREE+= -x11-links 31BUILDLINK_TREE+= -x11-links