Wed Nov 16 11:56:15 2022 UTC ()
libXft: pkglint cleanup


(wiz)
diff -r1.4 -r1.5 pkgsrc/x11/libXft/builtin.mk

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

--- pkgsrc/x11/libXft/builtin.mk 2021/08/02 10:47:05 1.4
+++ pkgsrc/x11/libXft/builtin.mk 2022/11/16 11:56:15 1.5
@@ -1,41 +1,41 @@ @@ -1,41 +1,41 @@
1# $NetBSD: builtin.mk,v 1.4 2021/08/02 10:47:05 wiz Exp $ 1# $NetBSD: builtin.mk,v 1.5 2022/11/16 11:56:15 wiz Exp $
2 2
3BUILTIN_PKG:= libXft 3BUILTIN_PKG:= libXft
4 4
5BUILTIN_FIND_FILES_VAR:= H_XFT2 5BUILTIN_FIND_FILES_VAR:= H_XFT2
6BUILTIN_FIND_FILES.H_XFT2= ${X11BASE}/include/X11/Xft/Xft.h 6BUILTIN_FIND_FILES.H_XFT2= ${X11BASE}/include/X11/Xft/Xft.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.libXft) 14.if !defined(IS_BUILTIN.libXft)
15. if empty(H_XFT2:M__nonexistent__) 15. if empty(H_XFT2:M__nonexistent__)
16IS_BUILTIN.libXft= yes 16IS_BUILTIN.libXft= yes
17. else 17. else
18IS_BUILTIN.libXft= no 18IS_BUILTIN.libXft= no
19. endif 19. endif
20.endif 20.endif
21MAKEVARS+= IS_BUILTIN.libXft 21MAKEVARS+= IS_BUILTIN.libXft
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.libXft) && \ 27.if !defined(BUILTIN_PKG.libXft) && \
28 !empty(IS_BUILTIN.libXft:M[yY][eE][sS]) && \ 28 ${IS_BUILTIN.libXft:M[yY][eE][sS]} && \
29 empty(H_XFT2:M__nonexistent__) 29 empty(H_XFT2:M__nonexistent__)
30# 30#
31# Extract the version number from the header file, but if it's not 31# Extract the version number from the header file, but if it's not
32# there, then pretend it's from version 2.0. 32# there, then pretend it's from version 2.0.
33# 33#
34BUILTIN_VERSION.libXft!= \ 34BUILTIN_VERSION.libXft!= \
35 ${AWK} 'BEGIN { M = 2; m = ".0"; r = "" } \ 35 ${AWK} 'BEGIN { M = 2; m = ".0"; r = "" } \
36 /\#define[ ]*XFT_MAJOR/ { M = $$3 } \ 36 /\#define[ ]*XFT_MAJOR/ { M = $$3 } \
37 /\#define[ ]*XFT_MINOR/ { m = "."$$3 } \ 37 /\#define[ ]*XFT_MINOR/ { m = "."$$3 } \
38 /\#define[ ]*XFT_REVISION/ { r = "."$$3 } \ 38 /\#define[ ]*XFT_REVISION/ { r = "."$$3 } \
39 END { printf "%s%s%s\n", M, m, r }' \ 39 END { printf "%s%s%s\n", M, m, r }' \
40 ${H_XFT2} 40 ${H_XFT2}
41BUILTIN_PKG.libXft= libXft-${BUILTIN_VERSION.libXft} 41BUILTIN_PKG.libXft= libXft-${BUILTIN_VERSION.libXft}
@@ -43,45 +43,45 @@ BUILTIN_PKG.libXft= libXft-${BUILTIN_VER @@ -43,45 +43,45 @@ BUILTIN_PKG.libXft= libXft-${BUILTIN_VER
43MAKEVARS+= BUILTIN_PKG.libXft 43MAKEVARS+= BUILTIN_PKG.libXft
44 44
45### 45###
46### Determine whether we should use the built-in implementation if it 46### Determine whether we should use the built-in implementation if it
47### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). 47### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
48### 48###
49 49
50.if !defined(USE_BUILTIN.libXft) 50.if !defined(USE_BUILTIN.libXft)
51. if ${PREFER.libXft} == "pkgsrc" 51. if ${PREFER.libXft} == "pkgsrc"
52USE_BUILTIN.libXft= no 52USE_BUILTIN.libXft= no
53. else 53. else
54USE_BUILTIN.libXft= ${IS_BUILTIN.libXft} 54USE_BUILTIN.libXft= ${IS_BUILTIN.libXft}
55. if defined(BUILTIN_PKG.libXft) && \ 55. if defined(BUILTIN_PKG.libXft) && \
56 !empty(IS_BUILTIN.libXft:M[yY][eE][sS]) 56 ${IS_BUILTIN.libXft:M[yY][eE][sS]}
57USE_BUILTIN.libXft= yes 57USE_BUILTIN.libXft= yes
58. for _dep_ in ${BUILDLINK_API_DEPENDS.libXft} 58. for _dep_ in ${BUILDLINK_API_DEPENDS.libXft}
59. if !empty(USE_BUILTIN.libXft:M[yY][eE][sS]) 59. if ${USE_BUILTIN.libXft:M[yY][eE][sS]}
60USE_BUILTIN.libXft!= \ 60USE_BUILTIN.libXft!= \
61 if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libXft:Q}; then \ 61 if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libXft:Q}; then \
62 ${ECHO} yes; \ 62 ${ECHO} yes; \
63 else \ 63 else \
64 ${ECHO} no; \ 64 ${ECHO} no; \
65 fi 65 fi
66. endif 66. endif
67. endfor 67. endfor
68. endif 68. endif
69. endif # PREFER.libXft 69. endif # PREFER.libXft
70.endif 70.endif
71MAKEVARS+= USE_BUILTIN.libXft 71MAKEVARS+= USE_BUILTIN.libXft
72 72
73### 73###
74### The section below only applies if we are not including this file 74### The section below only applies if we are not including this file
75### solely to determine whether a built-in implementation exists. 75### solely to determine whether a built-in implementation exists.
76### 76###
77 77
78.include "../../mk/x11.builtin.mk" 78.include "../../mk/x11.builtin.mk"
79 79
80CHECK_BUILTIN.libXft?= no 80CHECK_BUILTIN.libXft?= no
81.if !empty(CHECK_BUILTIN.libXft:M[nN][oO]) 81.if ${CHECK_BUILTIN.libXft:M[nN][oO]}
82 82
83. if !empty(USE_BUILTIN.libXft:M[nN][oO]) 83. if ${USE_BUILTIN.libXft:M[nN][oO]}
84BUILDLINK_API_DEPENDS.libXft+= libXft>=2.1.10 84BUILDLINK_API_DEPENDS.libXft+= libXft>=2.1.10
85. endif 85. endif
86 86
87.endif # CHECK_BUILTIN.libXft 87.endif # CHECK_BUILTIN.libXft