Mon Mar 10 11:56:02 2014 UTC ()
When creating fake .pc files, first check all possible pkgconfig
directories rather than just lib/pkgconfig.  Required for Red Hat
Linux support which spreads them across lib${LIBABISUFFIX} and
share directories.


(jperkin)
diff -r1.20 -r1.21 pkgsrc/x11/Xrender/builtin.mk
diff -r1.4 -r1.5 pkgsrc/x11/libXau/builtin.mk
diff -r1.4 -r1.5 pkgsrc/x11/libXdmcp/builtin.mk
diff -r1.7 -r1.8 pkgsrc/x11/xextproto/builtin.mk

cvs diff -r1.20 -r1.21 pkgsrc/x11/Xrender/Attic/builtin.mk (expand / switch to unified diff)

--- pkgsrc/x11/Xrender/Attic/builtin.mk 2012/03/19 12:34:21 1.20
+++ pkgsrc/x11/Xrender/Attic/builtin.mk 2014/03/10 11:56:02 1.21
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: builtin.mk,v 1.20 2012/03/19 12:34:21 joerg Exp $ 1# $NetBSD: builtin.mk,v 1.21 2014/03/10 11:56:02 jperkin Exp $
2 2
3BUILTIN_PKG:= Xrender 3BUILTIN_PKG:= Xrender
4 4
5BUILTIN_FIND_FILES_VAR:= H_XRENDER 5BUILTIN_FIND_FILES_VAR:= H_XRENDER
6BUILTIN_FIND_FILES.H_XRENDER= ${X11BASE}/include/X11/extensions/Xrender.h 6BUILTIN_FIND_FILES.H_XRENDER= ${X11BASE}/include/X11/extensions/Xrender.h
7 7
8.include "../../mk/buildlink3/bsd.builtin.mk" 8.include "../../mk/buildlink3/bsd.builtin.mk"
9 9
10### 10###
11### Determine if there is a built-in implementation of the package and 11### Determine if there is a built-in implementation of the package and
12### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). 12### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
13### 13###
14.if !defined(IS_BUILTIN.Xrender) 14.if !defined(IS_BUILTIN.Xrender)
@@ -108,26 +108,29 @@ BUILDLINK_API_DEPENDS.render+= Xrender>= @@ -108,26 +108,29 @@ BUILDLINK_API_DEPENDS.render+= Xrender>=
108 108
109. if !empty(USE_BUILTIN.Xrender:M[yY][eE][sS]) 109. if !empty(USE_BUILTIN.Xrender:M[yY][eE][sS])
110BUILDLINK_PREFIX.Xrender= ${X11BASE} 110BUILDLINK_PREFIX.Xrender= ${X11BASE}
111USE_BUILTIN.render= yes 111USE_BUILTIN.render= yes
112. endif 112. endif
113 113
114# If we are using the builtin version, check whether it has a xrender.pc file 114# If we are using the builtin version, check whether it has a xrender.pc file
115# or not. If the latter, generate a fake one. 115# or not. If the latter, generate a fake one.
116. if !empty(USE_BUILTIN.Xrender:M[Yy][Ee][Ss]) 116. if !empty(USE_BUILTIN.Xrender:M[Yy][Ee][Ss])
117BUILDLINK_TARGETS+= Xrender-fake-pc 117BUILDLINK_TARGETS+= Xrender-fake-pc
118 118
119Xrender-fake-pc: 119Xrender-fake-pc:
120 ${RUN} \ 120 ${RUN} \
 121 for dir in lib lib${LIBABISUFFIX} share; do \
 122 ${TEST} -f ${BUILDLINK_PREFIX.Xrender}/$${dir}/pkgconfig/xrender.pc && exit; \
 123 done; \
121 src=${BUILDLINK_PREFIX.Xrender}/lib/pkgconfig/xrender.pc; \ 124 src=${BUILDLINK_PREFIX.Xrender}/lib/pkgconfig/xrender.pc; \
122 dst=${BUILDLINK_DIR}/lib/pkgconfig/xrender.pc; \ 125 dst=${BUILDLINK_DIR}/lib/pkgconfig/xrender.pc; \
123 ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ 126 ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \
124 if ${TEST} -f $${src}; then \ 127 if ${TEST} -f $${src}; then \
125 ${LN} -sf $${src} $${dst}; \ 128 ${LN} -sf $${src} $${dst}; \
126 else \ 129 else \
127 { ${ECHO} "Name: Xrender"; \ 130 { ${ECHO} "Name: Xrender"; \
128 ${ECHO} "Description: X Render Library"; \ 131 ${ECHO} "Description: X Render Library"; \
129 ${ECHO} "Version: 0.8.4"; \ 132 ${ECHO} "Version: 0.8.4"; \
130 ${ECHO} "Cflags: -I${BUILDLINK_PREFIX.Xrender}/include"; \ 133 ${ECHO} "Cflags: -I${BUILDLINK_PREFIX.Xrender}/include"; \
131 ${ECHO} "Libs: -L${BUILDLINK_PREFIX.Xrender}/lib" \ 134 ${ECHO} "Libs: -L${BUILDLINK_PREFIX.Xrender}/lib" \
132 "${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.Xrender}/lib" \ 135 "${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.Xrender}/lib" \
133 "-lXrender"; \ 136 "-lXrender"; \

cvs diff -r1.4 -r1.5 pkgsrc/x11/libXau/builtin.mk (expand / switch to unified diff)

--- pkgsrc/x11/libXau/builtin.mk 2010/12/13 07:51:45 1.4
+++ pkgsrc/x11/libXau/builtin.mk 2014/03/10 11:56:02 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: builtin.mk,v 1.4 2010/12/13 07:51:45 obache Exp $ 1# $NetBSD: builtin.mk,v 1.5 2014/03/10 11:56:02 jperkin Exp $
2 2
3BUILTIN_PKG:= libXau 3BUILTIN_PKG:= libXau
4 4
5BUILTIN_FIND_FILES_VAR:= H_XAUTH 5BUILTIN_FIND_FILES_VAR:= H_XAUTH
6BUILTIN_FIND_FILES.H_XAUTH= ${X11BASE}/include/X11/Xauth.h 6BUILTIN_FIND_FILES.H_XAUTH= ${X11BASE}/include/X11/Xauth.h
7 7
8.include "../../mk/buildlink3/bsd.builtin.mk" 8.include "../../mk/buildlink3/bsd.builtin.mk"
9 9
10### 10###
11### Determine if there is a built-in implementation of the package and 11### Determine if there is a built-in implementation of the package and
12### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). 12### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
13### 13###
14.if ${X11BASE} == ${LOCALBASE} 14.if ${X11BASE} == ${LOCALBASE}
@@ -50,26 +50,29 @@ MAKEVARS+= USE_BUILTIN.libXau @@ -50,26 +50,29 @@ MAKEVARS+= USE_BUILTIN.libXau
50 50
51.include "../../mk/x11.builtin.mk" 51.include "../../mk/x11.builtin.mk"
52 52
53CHECK_BUILTIN.libXau?= no 53CHECK_BUILTIN.libXau?= no
54.if !empty(CHECK_BUILTIN.libXau:M[nN][oO]) 54.if !empty(CHECK_BUILTIN.libXau:M[nN][oO])
55 55
56# If we are using the builtin version, check whether it has a xau.pc 56# If we are using the builtin version, check whether it has a xau.pc
57# file or not. If the latter, generate a fake one. 57# file or not. If the latter, generate a fake one.
58. if !empty(USE_BUILTIN.libXau:M[Yy][Ee][Ss]) 58. if !empty(USE_BUILTIN.libXau:M[Yy][Ee][Ss])
59BUILDLINK_TARGETS+= xau-fake-pc 59BUILDLINK_TARGETS+= xau-fake-pc
60 60
61xau-fake-pc: 61xau-fake-pc:
62 ${RUN} \ 62 ${RUN} \
 63 for dir in lib lib${LIBABISUFFIX} share; do \
 64 ${TEST} -f ${BUILDLINK_PREFIX.libXau}/$${dir}/pkgconfig/xau.pc && exit; \
 65 done; \
63 src=${BUILDLINK_PREFIX.libXau}/lib/pkgconfig/xau.pc; \ 66 src=${BUILDLINK_PREFIX.libXau}/lib/pkgconfig/xau.pc; \
64 dst=${BUILDLINK_DIR}/lib/pkgconfig/xau.pc; \ 67 dst=${BUILDLINK_DIR}/lib/pkgconfig/xau.pc; \
65 ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ 68 ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \
66 if ${TEST} -f $${src}; then \ 69 if ${TEST} -f $${src}; then \
67 ${LN} -sf $${src} $${dst}; \ 70 ${LN} -sf $${src} $${dst}; \
68 else \ 71 else \
69 req=""; \ 72 req=""; \
70 if ${TEST} -f \ 73 if ${TEST} -f \
71 ${BUILDLINK_PREFIX.xproto}/lib/pkgconfig/xproto.pc; then \ 74 ${BUILDLINK_PREFIX.xproto}/lib/pkgconfig/xproto.pc; then \
72 req="xproto"; \ 75 req="xproto"; \
73 fi; \ 76 fi; \
74 { ${ECHO} "Name: Xau"; \ 77 { ${ECHO} "Name: Xau"; \
75 ${ECHO} "Description: X authorization file management library"; \ 78 ${ECHO} "Description: X authorization file management library"; \

cvs diff -r1.4 -r1.5 pkgsrc/x11/libXdmcp/builtin.mk (expand / switch to unified diff)

--- pkgsrc/x11/libXdmcp/builtin.mk 2010/12/13 07:51:45 1.4
+++ pkgsrc/x11/libXdmcp/builtin.mk 2014/03/10 11:56:02 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: builtin.mk,v 1.4 2010/12/13 07:51:45 obache Exp $ 1# $NetBSD: builtin.mk,v 1.5 2014/03/10 11:56:02 jperkin Exp $
2 2
3BUILTIN_PKG:= libXdmcp 3BUILTIN_PKG:= libXdmcp
4 4
5BUILTIN_FIND_FILES_VAR:= H_XDMCP 5BUILTIN_FIND_FILES_VAR:= H_XDMCP
6BUILTIN_FIND_FILES.H_XDMCP= ${X11BASE}/include/X11/Xdmcp.h 6BUILTIN_FIND_FILES.H_XDMCP= ${X11BASE}/include/X11/Xdmcp.h
7 7
8.include "../../mk/buildlink3/bsd.builtin.mk" 8.include "../../mk/buildlink3/bsd.builtin.mk"
9 9
10### 10###
11### Determine if there is a built-in implementation of the package and 11### Determine if there is a built-in implementation of the package and
12### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). 12### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
13### 13###
14.if ${X11BASE} == ${LOCALBASE} 14.if ${X11BASE} == ${LOCALBASE}
@@ -50,26 +50,29 @@ MAKEVARS+= USE_BUILTIN.libXdmcp @@ -50,26 +50,29 @@ MAKEVARS+= USE_BUILTIN.libXdmcp
50 50
51.include "../../mk/x11.builtin.mk" 51.include "../../mk/x11.builtin.mk"
52 52
53CHECK_BUILTIN.libXdmcp?= no 53CHECK_BUILTIN.libXdmcp?= no
54.if !empty(CHECK_BUILTIN.libXdmcp:M[nN][oO]) 54.if !empty(CHECK_BUILTIN.libXdmcp:M[nN][oO])
55 55
56# If we are using the builtin version, check whether it has a xdmcp.pc 56# If we are using the builtin version, check whether it has a xdmcp.pc
57# file or not. If the latter, generate a fake one. 57# file or not. If the latter, generate a fake one.
58. if !empty(USE_BUILTIN.libXdmcp:M[Yy][Ee][Ss]) 58. if !empty(USE_BUILTIN.libXdmcp:M[Yy][Ee][Ss])
59BUILDLINK_TARGETS+= xdmcp-fake-pc 59BUILDLINK_TARGETS+= xdmcp-fake-pc
60 60
61xdmcp-fake-pc: 61xdmcp-fake-pc:
62 ${RUN} \ 62 ${RUN} \
 63 for dir in lib lib${LIBABISUFFIX} share; do \
 64 ${TEST} -f ${BUILDLINK_PREFIX.libXdmcp}/$${dir}/pkgconfig/xdmcp.pc && exit; \
 65 done; \
63 src=${BUILDLINK_PREFIX.libXdmcp}/lib/pkgconfig/xdmcp.pc; \ 66 src=${BUILDLINK_PREFIX.libXdmcp}/lib/pkgconfig/xdmcp.pc; \
64 dst=${BUILDLINK_DIR}/lib/pkgconfig/xdmcp.pc; \ 67 dst=${BUILDLINK_DIR}/lib/pkgconfig/xdmcp.pc; \
65 ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ 68 ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \
66 if ${TEST} -f $${src}; then \ 69 if ${TEST} -f $${src}; then \
67 ${LN} -sf $${src} $${dst}; \ 70 ${LN} -sf $${src} $${dst}; \
68 else \ 71 else \
69 req=""; \ 72 req=""; \
70 if ${TEST} -f \ 73 if ${TEST} -f \
71 ${BUILDLINK_PREFIX.xproto}/lib/pkgconfig/xproto.pc; then \ 74 ${BUILDLINK_PREFIX.xproto}/lib/pkgconfig/xproto.pc; then \
72 req="xproto"; \ 75 req="xproto"; \
73 fi; \ 76 fi; \
74 { ${ECHO} "Name: Xdmcp"; \ 77 { ${ECHO} "Name: Xdmcp"; \
75 ${ECHO} "Description: X Display Manager Control Protocol library"; \ 78 ${ECHO} "Description: X Display Manager Control Protocol library"; \

cvs diff -r1.7 -r1.8 pkgsrc/x11/xextproto/Attic/builtin.mk (expand / switch to unified diff)

--- pkgsrc/x11/xextproto/Attic/builtin.mk 2009/05/26 21:59:58 1.7
+++ pkgsrc/x11/xextproto/Attic/builtin.mk 2014/03/10 11:56:02 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: builtin.mk,v 1.7 2009/05/26 21:59:58 rillig Exp $ 1# $NetBSD: builtin.mk,v 1.8 2014/03/10 11:56:02 jperkin Exp $
2 2
3BUILTIN_PKG:= xextproto 3BUILTIN_PKG:= xextproto
4 4
5BUILTIN_FIND_FILES_VAR:= H_XEXTPROTO 5BUILTIN_FIND_FILES_VAR:= H_XEXTPROTO
6BUILTIN_FIND_FILES.H_XEXTPROTO= \ 6BUILTIN_FIND_FILES.H_XEXTPROTO= \
7 ${X11BASE}/include/X11/extensions/extutil.h 7 ${X11BASE}/include/X11/extensions/extutil.h
8 8
9.include "../../mk/buildlink3/bsd.builtin.mk" 9.include "../../mk/buildlink3/bsd.builtin.mk"
10 10
11### 11###
12### Determine if there is a built-in implementation of the package and 12### Determine if there is a built-in implementation of the package and
13### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). 13### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
14### 14###
@@ -61,26 +61,29 @@ MAKEVARS+= USE_BUILTIN.xextproto @@ -61,26 +61,29 @@ MAKEVARS+= USE_BUILTIN.xextproto
61 61
62.include "../../mk/x11.builtin.mk" 62.include "../../mk/x11.builtin.mk"
63 63
64CHECK_BUILTIN.xextproto?= no 64CHECK_BUILTIN.xextproto?= no
65.if !empty(CHECK_BUILTIN.xextproto:M[nN][oO]) 65.if !empty(CHECK_BUILTIN.xextproto:M[nN][oO])
66 66
67# If we are using the builtin version, check whether it has a xextproto.pc 67# If we are using the builtin version, check whether it has a xextproto.pc
68# file or not. If the latter, generate a fake one. 68# file or not. If the latter, generate a fake one.
69. if !empty(USE_BUILTIN.xextproto:M[Yy][Ee][Ss]) 69. if !empty(USE_BUILTIN.xextproto:M[Yy][Ee][Ss])
70BUILDLINK_TARGETS+= xextproto-fake-pc 70BUILDLINK_TARGETS+= xextproto-fake-pc
71 71
72xextproto-fake-pc: 72xextproto-fake-pc:
73 ${RUN} \ 73 ${RUN} \
 74 for dir in lib lib${LIBABISUFFIX} share; do \
 75 ${TEST} -f ${BUILDLINK_PREFIX.xextproto}/$${dir}/pkgconfig/xextproto.pc && exit; \
 76 done; \
74 src=${BUILDLINK_PREFIX.xextproto}/lib/pkgconfig/xextproto.pc; \ 77 src=${BUILDLINK_PREFIX.xextproto}/lib/pkgconfig/xextproto.pc; \
75 dst=${BUILDLINK_DIR}/lib/pkgconfig/xextproto.pc; \ 78 dst=${BUILDLINK_DIR}/lib/pkgconfig/xextproto.pc; \
76 ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ 79 ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \
77 if ${TEST} -f $${src}; then \ 80 if ${TEST} -f $${src}; then \
78 ${LN} -sf $${src} $${dst}; \ 81 ${LN} -sf $${src} $${dst}; \
79 else \ 82 else \
80 { ${ECHO} "Name: XExtensions"; \ 83 { ${ECHO} "Name: XExtensions"; \
81 ${ECHO} "Description: Sundry X extension headers"; \ 84 ${ECHO} "Description: Sundry X extension headers"; \
82 ${ECHO} "Version: 1.0.1"; \ 85 ${ECHO} "Version: 1.0.1"; \
83 ${ECHO} "Cflags: -I${BUILDLINK_PREFIX.xextproto}/include"; \ 86 ${ECHO} "Cflags: -I${BUILDLINK_PREFIX.xextproto}/include"; \
84 } >$${dst}; \ 87 } >$${dst}; \
85 fi 88 fi
86. endif 89. endif