Remove special-case dependency-checking logic now handled by the general solution I checked in in bsd.buildlink3.mk.diff -r1.19 -r1.20 pkgsrc/fonts/Xft2/builtin.mk
(dholland)
@@ -1,21 +1,14 @@ | @@ -1,21 +1,14 @@ | |||
1 | # $NetBSD: builtin.mk,v 1.19 2013/06/05 07:15:08 tron Exp $ | 1 | # $NetBSD: builtin.mk,v 1.20 2013/06/07 17:43:40 dholland Exp $ | |
2 | ||||
3 | .if !defined(USE_BUILTIN.fontconfig) | |||
4 | .include "../../fonts/fontconfig/builtin.mk" | |||
5 | .endif | |||
6 | .if !defined(USE_BUILTIN.Xrender) | |||
7 | .include "../../x11/Xrender/builtin.mk" | |||
8 | .endif | |||
9 | 2 | |||
10 | BUILTIN_PKG:= Xft2 | 3 | BUILTIN_PKG:= Xft2 | |
11 | 4 | |||
12 | BUILTIN_FIND_FILES_VAR:= H_XFT2 | 5 | BUILTIN_FIND_FILES_VAR:= H_XFT2 | |
13 | BUILTIN_FIND_FILES.H_XFT2= ${X11BASE}/include/X11/Xft/Xft.h | 6 | BUILTIN_FIND_FILES.H_XFT2= ${X11BASE}/include/X11/Xft/Xft.h | |
14 | 7 | |||
15 | .include "../../mk/buildlink3/bsd.builtin.mk" | 8 | .include "../../mk/buildlink3/bsd.builtin.mk" | |
16 | 9 | |||
17 | ### | 10 | ### | |
18 | ### 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 | |
19 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). | 12 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). | |
20 | ### | 13 | ### | |
21 | .if !defined(IS_BUILTIN.Xft2) | 14 | .if !defined(IS_BUILTIN.Xft2) | |
@@ -43,37 +36,26 @@ BUILTIN_VERSION.Xft2!= \ | @@ -43,37 +36,26 @@ BUILTIN_VERSION.Xft2!= \ | |||
43 | /\#define[ ]*XFT_MAJOR/ { M = $$3 } \ | 36 | /\#define[ ]*XFT_MAJOR/ { M = $$3 } \ | |
44 | /\#define[ ]*XFT_MINOR/ { m = "."$$3 } \ | 37 | /\#define[ ]*XFT_MINOR/ { m = "."$$3 } \ | |
45 | /\#define[ ]*XFT_REVISION/ { r = "."$$3 } \ | 38 | /\#define[ ]*XFT_REVISION/ { r = "."$$3 } \ | |
46 | END { printf "%s%s%s\n", M, m, r }' \ | 39 | END { printf "%s%s%s\n", M, m, r }' \ | |
47 | ${H_XFT2} | 40 | ${H_XFT2} | |
48 | BUILTIN_PKG.Xft2= Xft2-${BUILTIN_VERSION.Xft2} | 41 | BUILTIN_PKG.Xft2= Xft2-${BUILTIN_VERSION.Xft2} | |
49 | .endif | 42 | .endif | |
50 | MAKEVARS+= BUILTIN_PKG.Xft2 | 43 | MAKEVARS+= BUILTIN_PKG.Xft2 | |
51 | 44 | |||
52 | ### | 45 | ### | |
53 | ### Determine whether we should use the built-in implementation if it | 46 | ### Determine whether we should use the built-in implementation if it | |
54 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). | 47 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). | |
55 | ### | 48 | ### | |
56 | # | |||
57 | # These are dependencies of Xft2. If we need to use the pkgsrc | |||
58 | # versions of any of these, then also use the pkgsrc version of | |||
59 | # Xft2. | |||
60 | # | |||
61 | .if !empty(USE_BUILTIN.Xrender:M[nN][oO]) | |||
62 | USE_BUILTIN.Xft2= no | |||
63 | .endif | |||
64 | .if !empty(USE_BUILTIN.fontconfig:M[nN][oO]) | |||
65 | USE_BUILTIN.Xft2= no | |||
66 | .endif | |||
67 | 49 | |||
68 | .if !defined(USE_BUILTIN.Xft2) | 50 | .if !defined(USE_BUILTIN.Xft2) | |
69 | . if ${PREFER.Xft2} == "pkgsrc" | 51 | . if ${PREFER.Xft2} == "pkgsrc" | |
70 | USE_BUILTIN.Xft2= no | 52 | USE_BUILTIN.Xft2= no | |
71 | . else | 53 | . else | |
72 | USE_BUILTIN.Xft2= ${IS_BUILTIN.Xft2} | 54 | USE_BUILTIN.Xft2= ${IS_BUILTIN.Xft2} | |
73 | . if defined(BUILTIN_PKG.Xft2) && \ | 55 | . if defined(BUILTIN_PKG.Xft2) && \ | |
74 | !empty(IS_BUILTIN.Xft2:M[yY][eE][sS]) | 56 | !empty(IS_BUILTIN.Xft2:M[yY][eE][sS]) | |
75 | USE_BUILTIN.Xft2= yes | 57 | USE_BUILTIN.Xft2= yes | |
76 | . for _dep_ in ${BUILDLINK_API_DEPENDS.Xft2} | 58 | . for _dep_ in ${BUILDLINK_API_DEPENDS.Xft2} | |
77 | . if !empty(USE_BUILTIN.Xft2:M[yY][eE][sS]) | 59 | . if !empty(USE_BUILTIN.Xft2:M[yY][eE][sS]) | |
78 | USE_BUILTIN.Xft2!= \ | 60 | USE_BUILTIN.Xft2!= \ | |
79 | if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.Xft2:Q}; then \ | 61 | if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.Xft2:Q}; then \ |
@@ -1,21 +1,14 @@ | @@ -1,21 +1,14 @@ | |||
1 | # $NetBSD: builtin.mk,v 1.1 2013/06/05 12:12:07 tron Exp $ | 1 | # $NetBSD: builtin.mk,v 1.2 2013/06/07 17:43:40 dholland Exp $ | |
2 | ||||
3 | .if !defined(USE_BUILTIN.fontconfig) | |||
4 | .include "../../fonts/fontconfig/builtin.mk" | |||
5 | .endif | |||
6 | .if !defined(USE_BUILTIN.Xrender) | |||
7 | .include "../../x11/Xrender/builtin.mk" | |||
8 | .endif | |||
9 | 2 | |||
10 | BUILTIN_PKG:= libXft | 3 | BUILTIN_PKG:= libXft | |
11 | 4 | |||
12 | BUILTIN_FIND_FILES_VAR:= H_XFT2 | 5 | BUILTIN_FIND_FILES_VAR:= H_XFT2 | |
13 | BUILTIN_FIND_FILES.H_XFT2= ${X11BASE}/include/X11/Xft/Xft.h | 6 | BUILTIN_FIND_FILES.H_XFT2= ${X11BASE}/include/X11/Xft/Xft.h | |
14 | 7 | |||
15 | .include "../../mk/buildlink3/bsd.builtin.mk" | 8 | .include "../../mk/buildlink3/bsd.builtin.mk" | |
16 | 9 | |||
17 | ### | 10 | ### | |
18 | ### 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 | |
19 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). | 12 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). | |
20 | ### | 13 | ### | |
21 | .if !defined(IS_BUILTIN.libXft) | 14 | .if !defined(IS_BUILTIN.libXft) | |
@@ -43,37 +36,26 @@ BUILTIN_VERSION.libXft!= \ | @@ -43,37 +36,26 @@ BUILTIN_VERSION.libXft!= \ | |||
43 | /\#define[ ]*XFT_MAJOR/ { M = $$3 } \ | 36 | /\#define[ ]*XFT_MAJOR/ { M = $$3 } \ | |
44 | /\#define[ ]*XFT_MINOR/ { m = "."$$3 } \ | 37 | /\#define[ ]*XFT_MINOR/ { m = "."$$3 } \ | |
45 | /\#define[ ]*XFT_REVISION/ { r = "."$$3 } \ | 38 | /\#define[ ]*XFT_REVISION/ { r = "."$$3 } \ | |
46 | END { printf "%s%s%s\n", M, m, r }' \ | 39 | END { printf "%s%s%s\n", M, m, r }' \ | |
47 | ${H_XFT2} | 40 | ${H_XFT2} | |
48 | BUILTIN_PKG.libXft= libXft-${BUILTIN_VERSION.libXft} | 41 | BUILTIN_PKG.libXft= libXft-${BUILTIN_VERSION.libXft} | |
49 | .endif | 42 | .endif | |
50 | MAKEVARS+= BUILTIN_PKG.libXft | 43 | MAKEVARS+= BUILTIN_PKG.libXft | |
51 | 44 | |||
52 | ### | 45 | ### | |
53 | ### Determine whether we should use the built-in implementation if it | 46 | ### Determine whether we should use the built-in implementation if it | |
54 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). | 47 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). | |
55 | ### | 48 | ### | |
56 | # | |||
57 | # These are dependencies of libXft. If we need to use the pkgsrc | |||
58 | # versions of any of these, then also use the pkgsrc version of | |||
59 | # libXft. | |||
60 | # | |||
61 | .if !empty(USE_BUILTIN.Xrender:M[nN][oO]) | |||
62 | USE_BUILTIN.libXft= no | |||
63 | .endif | |||
64 | .if !empty(USE_BUILTIN.fontconfig:M[nN][oO]) | |||
65 | USE_BUILTIN.libXft= no | |||
66 | .endif | |||
67 | 49 | |||
68 | .if !defined(USE_BUILTIN.libXft) | 50 | .if !defined(USE_BUILTIN.libXft) | |
69 | . if ${PREFER.libXft} == "pkgsrc" | 51 | . if ${PREFER.libXft} == "pkgsrc" | |
70 | USE_BUILTIN.libXft= no | 52 | USE_BUILTIN.libXft= no | |
71 | . else | 53 | . else | |
72 | USE_BUILTIN.libXft= ${IS_BUILTIN.libXft} | 54 | USE_BUILTIN.libXft= ${IS_BUILTIN.libXft} | |
73 | . if defined(BUILTIN_PKG.libXft) && \ | 55 | . if defined(BUILTIN_PKG.libXft) && \ | |
74 | !empty(IS_BUILTIN.libXft:M[yY][eE][sS]) | 56 | !empty(IS_BUILTIN.libXft:M[yY][eE][sS]) | |
75 | USE_BUILTIN.libXft= yes | 57 | USE_BUILTIN.libXft= yes | |
76 | . for _dep_ in ${BUILDLINK_API_DEPENDS.libXft} | 58 | . for _dep_ in ${BUILDLINK_API_DEPENDS.libXft} | |
77 | . if !empty(USE_BUILTIN.libXft:M[yY][eE][sS]) | 59 | . if !empty(USE_BUILTIN.libXft:M[yY][eE][sS]) | |
78 | USE_BUILTIN.libXft!= \ | 60 | USE_BUILTIN.libXft!= \ | |
79 | if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libXft:Q}; then \ | 61 | if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libXft:Q}; then \ |