| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: builtin.mk,v 1.9 2018/05/14 13:55:56 jperkin Exp $ | | 1 | # $NetBSD: builtin.mk,v 1.10 2018/11/06 09:38:54 markd Exp $ |
2 | | | 2 | |
3 | BUILTIN_PKG:= libuuid | | 3 | BUILTIN_PKG:= libuuid |
4 | | | 4 | |
5 | BUILTIN_FIND_FILES_VAR= UUID_PC | | 5 | BUILTIN_FIND_FILES_VAR= UUID_PC |
6 | BUILTIN_FIND_FILES.UUID_PC= /usr/lib/pkgconfig/uuid.pc | | 6 | BUILTIN_FIND_FILES.UUID_PC= /usr/lib/pkgconfig/uuid.pc |
7 | BUILTIN_FIND_HEADERS_VAR= H_UUID | | 7 | BUILTIN_FIND_HEADERS_VAR= H_UUID |
8 | BUILTIN_FIND_HEADERS.H_UUID= uuid/uuid.h | | 8 | BUILTIN_FIND_HEADERS.H_UUID= uuid/uuid.h |
9 | BUILTIN_FIND_GREP.H_UUID= uuid_generate | | 9 | BUILTIN_FIND_GREP.H_UUID= uuid_generate |
10 | BUILTIN_FIND_LIBS:= uuid | | 10 | BUILTIN_FIND_LIBS:= uuid |
11 | | | 11 | |
12 | .include "../../mk/buildlink3/bsd.builtin.mk" | | 12 | .include "../../mk/buildlink3/bsd.builtin.mk" |
13 | | | 13 | |
14 | ## | | 14 | ## |
| @@ -21,27 +21,28 @@ IS_BUILTIN.libuuid= no | | | @@ -21,27 +21,28 @@ IS_BUILTIN.libuuid= no |
21 | && empty(H_UUID:M__nonexistent__) | | 21 | && empty(H_UUID:M__nonexistent__) |
22 | IS_BUILTIN.libuuid= yes | | 22 | IS_BUILTIN.libuuid= yes |
23 | . endif | | 23 | . endif |
24 | .endif | | 24 | .endif |
25 | MAKEVARS+= IS_BUILTIN.libuuid | | 25 | MAKEVARS+= IS_BUILTIN.libuuid |
26 | | | 26 | |
27 | ### | | 27 | ### |
28 | ### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to | | 28 | ### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to |
29 | ### a package name to represent the built-in package. | | 29 | ### a package name to represent the built-in package. |
30 | ### | | 30 | ### |
31 | .if !defined(BUILTIN_PKG.libuuid) && \ | | 31 | .if !defined(BUILTIN_PKG.libuuid) && \ |
32 | !empty(IS_BUILTIN.libuuid:M[yY][eE][sS]) | | 32 | !empty(IS_BUILTIN.libuuid:M[yY][eE][sS]) |
33 | . if empty(UUID_PC:M__nonexistent__) | | 33 | . if empty(UUID_PC:M__nonexistent__) |
34 | BUILTIN_PKG.libuuid!= ${SED} -n -e 's/Version: //p' ${UUID_PC} | | 34 | BUILTIN_VERSION.libuuid!= ${SED} -n -e 's/Version: //p' ${UUID_PC} |
| | | 35 | BUILTIN_PKG.libuuid= libuuid-${BUILTIN_VERSION.libuuid} |
35 | . else | | 36 | . else |
36 | BUILTIN_PKG.libuuid= libuuid-2.18 # whatever, as long as it is big enough | | 37 | BUILTIN_PKG.libuuid= libuuid-2.18 # whatever, as long as it is big enough |
37 | . endif | | 38 | . endif |
38 | .endif | | 39 | .endif |
39 | | | 40 | |
40 | ### | | 41 | ### |
41 | ### Determine whether we should use the built-in implementation if it | | 42 | ### Determine whether we should use the built-in implementation if it |
42 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). | | 43 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). |
43 | ### | | 44 | ### |
44 | .if !defined(USE_BUILTIN.libuuid) | | 45 | .if !defined(USE_BUILTIN.libuuid) |
45 | . if ${PREFER.libuuid} == "pkgsrc" | | 46 | . if ${PREFER.libuuid} == "pkgsrc" |
46 | USE_BUILTIN.libuuid= no | | 47 | USE_BUILTIN.libuuid= no |
47 | . else | | 48 | . else |