Wed Oct 26 10:38:21 2022 UTC ()
expat: pkglint cleanup


(wiz)
diff -r1.20 -r1.21 pkgsrc/textproc/expat/builtin.mk

cvs diff -r1.20 -r1.21 pkgsrc/textproc/expat/builtin.mk (expand / switch to unified diff)

--- pkgsrc/textproc/expat/builtin.mk 2019/11/04 21:43:35 1.20
+++ pkgsrc/textproc/expat/builtin.mk 2022/10/26 10:38:21 1.21
@@ -1,103 +1,103 @@ @@ -1,103 +1,103 @@
1# $NetBSD: builtin.mk,v 1.20 2019/11/04 21:43:35 rillig Exp $ 1# $NetBSD: builtin.mk,v 1.21 2022/10/26 10:38:21 wiz Exp $
2 2
3BUILTIN_PKG:= expat 3BUILTIN_PKG:= expat
4 4
5BUILTIN_FIND_HEADERS_VAR:= H_EXPAT 5BUILTIN_FIND_HEADERS_VAR:= H_EXPAT
6BUILTIN_FIND_HEADERS.H_EXPAT= expat.h 6BUILTIN_FIND_HEADERS.H_EXPAT= expat.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.expat) 14.if !defined(IS_BUILTIN.expat)
15. if empty(H_EXPAT:M__nonexistent__) 15. if empty(H_EXPAT:M__nonexistent__)
16IS_BUILTIN.expat= yes 16IS_BUILTIN.expat= yes
17. else 17. else
18IS_BUILTIN.expat= no 18IS_BUILTIN.expat= no
19. endif 19. endif
20.endif 20.endif
21MAKEVARS+= IS_BUILTIN.expat 21MAKEVARS+= IS_BUILTIN.expat
22 22
23### 23###
24### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to 24### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
25### a package name to represent the built-in package. 25### a package name to represent the built-in package.
26### 26###
27.if !defined(BUILTIN_PKG.expat) && \ 27.if !defined(BUILTIN_PKG.expat) && \
28 !empty(IS_BUILTIN.expat:M[yY][eE][sS]) && \ 28 ${IS_BUILTIN.expat:M[yY][eE][sS]} && \
29 empty(H_EXPAT:M__nonexistent__) 29 empty(H_EXPAT:M__nonexistent__)
30BUILTIN_VERSION.expat!= \ 30BUILTIN_VERSION.expat!= \
31 ${AWK} '/\#define[ ]*XML_MAJOR_VERSION/ { M = $$3 } \ 31 ${AWK} '/\#define[ ]*XML_MAJOR_VERSION/ { M = $$3 } \
32 /\#define[ ]*XML_MINOR_VERSION/ { m = "."$$3 } \ 32 /\#define[ ]*XML_MINOR_VERSION/ { m = "."$$3 } \
33 /\#define[ ]*XML_MICRO_VERSION/ { u = "."$$3 } \ 33 /\#define[ ]*XML_MICRO_VERSION/ { u = "."$$3 } \
34 END { printf "%s%s%s\n", M, m, u }' \ 34 END { printf "%s%s%s\n", M, m, u }' \
35 ${H_EXPAT} 35 ${H_EXPAT}
36BUILTIN_PKG.expat= expat-${BUILTIN_VERSION.expat} 36BUILTIN_PKG.expat= expat-${BUILTIN_VERSION.expat}
37.endif 37.endif
38MAKEVARS+= BUILTIN_PKG.expat 38MAKEVARS+= BUILTIN_PKG.expat
39 39
40### 40###
41### Determine whether we should use the built-in implementation if it 41### Determine whether we should use the built-in implementation if it
42### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). 42### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
43### 43###
44.if !defined(USE_BUILTIN.expat) 44.if !defined(USE_BUILTIN.expat)
45. if ${PREFER.expat} == "pkgsrc" 45. if ${PREFER.expat} == "pkgsrc"
46USE_BUILTIN.expat= no 46USE_BUILTIN.expat= no
47. else 47. else
48USE_BUILTIN.expat= ${IS_BUILTIN.expat} 48USE_BUILTIN.expat= ${IS_BUILTIN.expat}
49. if defined(BUILTIN_PKG.expat) && \ 49. if defined(BUILTIN_PKG.expat) && \
50 !empty(IS_BUILTIN.expat:M[yY][eE][sS]) 50 ${IS_BUILTIN.expat:M[yY][eE][sS]}
51USE_BUILTIN.expat= yes 51USE_BUILTIN.expat= yes
52. for _dep_ in ${BUILDLINK_API_DEPENDS.expat} 52. for _dep_ in ${BUILDLINK_API_DEPENDS.expat}
53. if !empty(USE_BUILTIN.expat:M[yY][eE][sS]) 53. if ${USE_BUILTIN.expat:M[yY][eE][sS]}
54USE_BUILTIN.expat!= \ 54USE_BUILTIN.expat!= \
55 if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.expat:Q}; then \ 55 if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.expat:Q}; then \
56 ${ECHO} yes; \ 56 ${ECHO} yes; \
57 else \ 57 else \
58 ${ECHO} no; \ 58 ${ECHO} no; \
59 fi 59 fi
60. endif 60. endif
61. endfor 61. endfor
62. endif 62. endif
63. endif # PREFER.expat 63. endif # PREFER.expat
64.endif 64.endif
65MAKEVARS+= USE_BUILTIN.expat 65MAKEVARS+= USE_BUILTIN.expat
66 66
67### 67###
68### The section below only applies if we are not including this file 68### The section below only applies if we are not including this file
69### solely to determine whether a built-in implementation exists. 69### solely to determine whether a built-in implementation exists.
70### 70###
71CHECK_BUILTIN.expat?= no 71CHECK_BUILTIN.expat?= no
72.if !empty(CHECK_BUILTIN.expat:M[nN][oO]) 72.if ${CHECK_BUILTIN.expat:M[nN][oO]}
73 73
74. if !empty(USE_BUILTIN.expat:M[nN][oO]) 74. if ${USE_BUILTIN.expat:M[nN][oO]}
75BUILDLINK_API_DEPENDS.expat+= expat>=1.95.4 75BUILDLINK_API_DEPENDS.expat+= expat>=1.95.4
76. else 76. else
77. if !empty(H_EXPAT:M${X11BASE}/*) 77. if !empty(H_EXPAT:M${X11BASE}/*)
78. include "../../mk/x11.builtin.mk" 78. include "../../mk/x11.builtin.mk"
79. elif !empty(H_EXPAT:M/usr/*) 79. elif !empty(H_EXPAT:M/usr/*)
80BUILDLINK_PREFIX.expat= /usr 80BUILDLINK_PREFIX.expat= /usr
81. elif !empty(H_EXPAT:M/boot/common/*) 81. elif !empty(H_EXPAT:M/boot/common/*)
82BUILDLINK_PREFIX.expat= /boot/common 82BUILDLINK_PREFIX.expat= /boot/common
83. endif 83. endif
84. endif 84. endif
85 85
86.endif # CHECK_BUILTIN.expat 86.endif # CHECK_BUILTIN.expat
87 87
88# Fake pkg-config for builtin expat on NetBSD 88# Fake pkg-config for builtin expat on NetBSD
89 89
90.if !empty(USE_BUILTIN.expat:M[yY][eE][sS]) 90.if ${USE_BUILTIN.expat:M[yY][eE][sS]}
91. if !empty(USE_TOOLS:C/:.*//:Mpkg-config) 91. if !empty(USE_TOOLS:C/:.*//:Mpkg-config)
92do-configure-pre-hook: override-expat-pkgconfig 92do-configure-pre-hook: override-expat-pkgconfig
93 93
94BLKDIR_PKGCFG= ${BUILDLINK_DIR}/lib/pkgconfig 94BLKDIR_PKGCFG= ${BUILDLINK_DIR}/lib/pkgconfig
95EXPAT_PKGCFGF= expat.pc 95EXPAT_PKGCFGF= expat.pc
96 96
97override-expat-pkgconfig: override-message-expat-pkgconfig 97override-expat-pkgconfig: override-message-expat-pkgconfig
98override-message-expat-pkgconfig: 98override-message-expat-pkgconfig:
99 @${STEP_MSG} "Generating pkg-config file for builtin expat package." 99 @${STEP_MSG} "Generating pkg-config file for builtin expat package."
100 100
101override-expat-pkgconfig: 101override-expat-pkgconfig:
102 ${RUN} \ 102 ${RUN} \
103 ${MKDIR} ${BLKDIR_PKGCFG}; \ 103 ${MKDIR} ${BLKDIR_PKGCFG}; \