| @@ -1,69 +1,68 @@ | | | @@ -1,69 +1,68 @@ |
1 | # $NetBSD: builtin.mk,v 1.1 2021/12/03 13:05:31 nia Exp $ | | 1 | # $NetBSD: builtin.mk,v 1.2 2021/12/03 13:44:01 ryoon Exp $ |
2 | | | 2 | |
3 | BUILTIN_PKG:= modular-xorg-server | | 3 | BUILTIN_PKG:= modular-xorg-server |
4 | | | 4 | |
5 | BUILTIN_FIND_FILES_VAR:= XORG_SERVER | | 5 | BUILTIN_FIND_FILES_VAR:= XORG_SERVER |
6 | BUILTIN_FIND_FILES.XORG_SERVER= ${X11BASE}/bin/Xorg | | 6 | BUILTIN_FIND_FILES.XORG_SERVER= ${X11BASE}/bin/Xorg |
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.modular-xorg-server) | | 14 | .if !defined(IS_BUILTIN.modular-xorg-server) |
15 | . if empty(XORG_SERVER:M__nonexistent__) | | 15 | . if empty(XORG_SERVER:M__nonexistent__) |
16 | IS_BUILTIN.modular-xorg-server= yes | | 16 | IS_BUILTIN.modular-xorg-server= yes |
17 | . else | | 17 | . else |
18 | IS_BUILTIN.modular-xorg-server= no | | 18 | IS_BUILTIN.modular-xorg-server= no |
19 | . endif | | 19 | . endif |
20 | .endif | | 20 | .endif |
21 | MAKEVARS+= IS_BUILTIN.modular-xorg-server | | 21 | MAKEVARS+= IS_BUILTIN.modular-xorg-server |
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.modular-xorg-server) && \ | | 27 | .if !defined(BUILTIN_PKG.modular-xorg-server) && \ |
28 | !empty(IS_BUILTIN.modular-xorg-server:M[yY][eE][sS]) && \ | | 28 | !empty(IS_BUILTIN.modular-xorg-server:M[yY][eE][sS]) && \ |
29 | empty(XORG_SERVER:M__nonexistent__) | | 29 | empty(XORG_SERVER:M__nonexistent__) |
30 | | | 30 | |
31 | # we're more worried about existence, rather than actual version | | 31 | # we're more worried about existence, rather than actual version |
32 | BUILTIN_VERSION.modular-xorg-server= 1.20.13 | | 32 | BUILTIN_VERSION.modular-xorg-server= 1.20.13 |
33 | $ | | | |
34 | BUILTIN_PKG.modular-xorg-server= modular-xorg-server-${BUILTIN_VERSION.modular-xorg-server} | | 33 | BUILTIN_PKG.modular-xorg-server= modular-xorg-server-${BUILTIN_VERSION.modular-xorg-server} |
35 | .endif | | 34 | .endif |
36 | MAKEVARS+= BUILTIN_PKG.modular-xorg-server | | 35 | MAKEVARS+= BUILTIN_PKG.modular-xorg-server |
37 | | | 36 | |
38 | ### | | 37 | ### |
39 | ### Determine whether we should use the built-in implementation if it | | 38 | ### Determine whether we should use the built-in implementation if it |
40 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). | | 39 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). |
41 | ### | | 40 | ### |
42 | .if !defined(USE_BUILTIN.modular-xorg-server) | | 41 | .if !defined(USE_BUILTIN.modular-xorg-server) |
43 | . if ${PREFER.modular-xorg-server} == "pkgsrc" | | 42 | . if ${PREFER.modular-xorg-server} == "pkgsrc" |
44 | USE_BUILTIN.modular-xorg-server= no | | 43 | USE_BUILTIN.modular-xorg-server= no |
45 | . else | | 44 | . else |
46 | USE_BUILTIN.modular-xorg-server= ${IS_BUILTIN.modular-xorg-server} | | 45 | USE_BUILTIN.modular-xorg-server= ${IS_BUILTIN.modular-xorg-server} |
47 | . if defined(BUILTIN_PKG.modular-xorg-server) && \ | | 46 | . if defined(BUILTIN_PKG.modular-xorg-server) && \ |
48 | !empty(IS_BUILTIN.modular-xorg-server:M[yY][eE][sS]) | | 47 | !empty(IS_BUILTIN.modular-xorg-server:M[yY][eE][sS]) |
49 | USE_BUILTIN.modular-xorg-server= yes | | 48 | USE_BUILTIN.modular-xorg-server= yes |
50 | . for _dep_ in ${BUILDLINK_API_DEPENDS.modular-xorg-server} | | 49 | . for _dep_ in ${BUILDLINK_API_DEPENDS.modular-xorg-server} |
51 | . if !empty(USE_BUILTIN.modular-xorg-server:M[yY][eE][sS]) | | 50 | . if !empty(USE_BUILTIN.modular-xorg-server:M[yY][eE][sS]) |
52 | USE_BUILTIN.modular-xorg-server!= \ | | 51 | USE_BUILTIN.modular-xorg-server!= \ |
53 | if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.modular-xorg-server:Q}; then \ | | 52 | if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.modular-xorg-server:Q}; then \ |
54 | ${ECHO} yes; \ | | 53 | ${ECHO} yes; \ |
55 | else \ | | 54 | else \ |
56 | ${ECHO} no; \ | | 55 | ${ECHO} no; \ |
57 | fi | | 56 | fi |
58 | . endif | | 57 | . endif |
59 | . endfor | | 58 | . endfor |
60 | . endif | | 59 | . endif |
61 | . endif # PREFER.modular-xorg-server | | 60 | . endif # PREFER.modular-xorg-server |
62 | .endif | | 61 | .endif |
63 | | | 62 | |
64 | # Now set up the appropriate prefix for modular-xorg-server | | 63 | # Now set up the appropriate prefix for modular-xorg-server |
65 | .if !empty(USE_BUILTIN.modular-xorg-server:M[yY][eE][sS]) | | 64 | .if !empty(USE_BUILTIN.modular-xorg-server:M[yY][eE][sS]) |
66 | XORG_SERVERBASE= ${X11BASE} | | 65 | XORG_SERVERBASE= ${X11BASE} |
67 | .else | | 66 | .else |
68 | XORG_SERVERBASE= ${PREFIX} | | 67 | XORG_SERVERBASE= ${PREFIX} |
69 | .endif | | 68 | .endif |