| @@ -1,249 +1,249 @@ | | | @@ -1,249 +1,249 @@ |
1 | # $NetBSD: builtin.mk,v 1.50 2023/01/12 11:01:41 markd Exp $ | | 1 | # $NetBSD: builtin.mk,v 1.51 2023/02/07 16:34:42 jperkin Exp $ |
2 | | | 2 | |
3 | BUILTIN_PKG:= openssl | | 3 | BUILTIN_PKG:= openssl |
4 | | | 4 | |
5 | BUILTIN_FIND_LIBS:= crypto ssl | | 5 | BUILTIN_FIND_LIBS:= crypto ssl |
6 | BUILTIN_FIND_HEADERS_VAR:= H_OPENSSLCONF H_OPENSSLV | | 6 | BUILTIN_FIND_HEADERS_VAR:= H_OPENSSLCONF H_OPENSSLV |
7 | BUILTIN_FIND_HEADERS.H_OPENSSLCONF= openssl/opensslconf.h | | 7 | BUILTIN_FIND_HEADERS.H_OPENSSLCONF= openssl/opensslconf.h |
8 | BUILTIN_FIND_HEADERS.H_OPENSSLV= openssl/opensslv.h | | 8 | BUILTIN_FIND_HEADERS.H_OPENSSLV= openssl/opensslv.h |
9 | | | 9 | |
10 | .include "../../mk/buildlink3/bsd.builtin.mk" | | 10 | .include "../../mk/buildlink3/bsd.builtin.mk" |
11 | | | 11 | |
12 | ### | | 12 | ### |
13 | ### Determine if there is a built-in implementation of the package and | | 13 | ### Determine if there is a built-in implementation of the package and |
14 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). | | 14 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). |
15 | ### | | 15 | ### |
16 | .if !defined(IS_BUILTIN.openssl) | | 16 | .if !defined(IS_BUILTIN.openssl) |
17 | IS_BUILTIN.openssl= no | | 17 | IS_BUILTIN.openssl= no |
18 | . if empty(H_OPENSSLV:M__nonexistent__) && empty(H_OPENSSLV:M${LOCALBASE}/*) | | 18 | . if empty(H_OPENSSLV:M__nonexistent__) && empty(H_OPENSSLV:M${LOCALBASE}/*) |
19 | IS_BUILTIN.openssl= yes | | 19 | IS_BUILTIN.openssl= yes |
20 | . endif | | 20 | . endif |
21 | .endif | | 21 | .endif |
22 | MAKEVARS+= IS_BUILTIN.openssl | | 22 | MAKEVARS+= IS_BUILTIN.openssl |
23 | | | 23 | |
24 | ### | | 24 | ### |
25 | ### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to | | 25 | ### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to |
26 | ### a package name to represent the built-in package. | | 26 | ### a package name to represent the built-in package. |
27 | ### | | 27 | ### |
28 | .if !defined(BUILTIN_PKG.openssl) && \ | | 28 | .if !defined(BUILTIN_PKG.openssl) && \ |
29 | ${IS_BUILTIN.openssl:M[yY][eE][sS]} && \ | | 29 | ${IS_BUILTIN.openssl:tl} == yes && \ |
30 | empty(H_OPENSSLV:M__nonexistent__) | | 30 | empty(H_OPENSSLV:M__nonexistent__) |
31 | BUILTIN_VERSION.openssl!= \ | | 31 | BUILTIN_VERSION.openssl!= \ |
32 | ${AWK} 'BEGIN { hex="0123456789abcdef"; \ | | 32 | ${AWK} 'BEGIN { hex="0123456789abcdef"; \ |
33 | alpha="abcdefghijklmnopqrstuvwxyz"; \ | | 33 | alpha="abcdefghijklmnopqrstuvwxyz"; \ |
34 | } \ | | 34 | } \ |
35 | /\#[ ]+define/ { sub("\#[ \\t]+define", "\#define", $$0); } \ | | 35 | /\#[ ]+define/ { sub("\#[ \\t]+define", "\#define", $$0); } \ |
36 | /\#define[ ]*OPENSSL_VERSION_STR/ { \ | | 36 | /\#define[ ]*OPENSSL_VERSION_STR/ { \ |
37 | printf "%s\n",substr($$3,2,length($$3)-2); \ | | 37 | printf "%s\n",substr($$3,2,length($$3)-2); \ |
38 | exit 0; \ | | 38 | exit 0; \ |
39 | } \ | | 39 | } \ |
40 | /\#define[ ]*OPENSSL_VERSION_NUMBER/ { \ | | 40 | /\#define[ ]*OPENSSL_VERSION_NUMBER/ { \ |
41 | major = index(hex, substr($$3, 3, 1)) - 1; \ | | 41 | major = index(hex, substr($$3, 3, 1)) - 1; \ |
42 | i = 16 * (index(hex, substr($$3, 4, 1)) - 1); \ | | 42 | i = 16 * (index(hex, substr($$3, 4, 1)) - 1); \ |
43 | i += index(hex, substr($$3, 5, 1)) - 1; \ | | 43 | i += index(hex, substr($$3, 5, 1)) - 1; \ |
44 | minor = "."i; \ | | 44 | minor = "."i; \ |
45 | i = 16 * (index(hex, substr($$3, 6, 1)) - 1); \ | | 45 | i = 16 * (index(hex, substr($$3, 6, 1)) - 1); \ |
46 | i += index(hex, substr($$3, 7, 1)) - 1; \ | | 46 | i += index(hex, substr($$3, 7, 1)) - 1; \ |
47 | teeny = "."i; \ | | 47 | teeny = "."i; \ |
48 | i = 16 * (index(hex, substr($$3, 8, 1)) - 1); \ | | 48 | i = 16 * (index(hex, substr($$3, 8, 1)) - 1); \ |
49 | i += index(hex, substr($$3, 9, 1)) - 1; \ | | 49 | i += index(hex, substr($$3, 9, 1)) - 1; \ |
50 | if (i == 0) { \ | | 50 | if (i == 0) { \ |
51 | patchlevel = ""; \ | | 51 | patchlevel = ""; \ |
52 | } else if (i > 26) { \ | | 52 | } else if (i > 26) { \ |
53 | patchlevel = "a"; \ | | 53 | patchlevel = "a"; \ |
54 | } else { \ | | 54 | } else { \ |
55 | patchlevel = substr(alpha,i,1); \ | | 55 | patchlevel = substr(alpha,i,1); \ |
56 | } \ | | 56 | } \ |
57 | printf "%s%s%s%s\n", \ | | 57 | printf "%s%s%s%s\n", \ |
58 | major, minor, teeny, patchlevel; \ | | 58 | major, minor, teeny, patchlevel; \ |
59 | exit 0; \ | | 59 | exit 0; \ |
60 | } \ | | 60 | } \ |
61 | ' ${H_OPENSSLV} | | 61 | ' ${H_OPENSSLV} |
62 | BUILTIN_PKG.openssl= openssl-${BUILTIN_VERSION.openssl} | | 62 | BUILTIN_PKG.openssl= openssl-${BUILTIN_VERSION.openssl} |
63 | .endif | | 63 | .endif |
64 | MAKEVARS+= BUILTIN_PKG.openssl | | 64 | MAKEVARS+= BUILTIN_PKG.openssl |
65 | MAKEVARS+= BUILTIN_VERSION.openssl | | 65 | MAKEVARS+= BUILTIN_VERSION.openssl |
66 | | | 66 | |
67 | .if !defined(BUILTIN_OPENSSL_HAS_THREADS) && \ | | 67 | .if !defined(BUILTIN_OPENSSL_HAS_THREADS) && \ |
68 | ${IS_BUILTIN.openssl:M[yY][eE][sS]} && \ | | 68 | ${IS_BUILTIN.openssl:tl} == yes && \ |
69 | empty(H_OPENSSLCONF:M__nonexistent__) | | 69 | empty(H_OPENSSLCONF:M__nonexistent__) |
70 | BUILTIN_OPENSSL_HAS_THREADS!= \ | | 70 | BUILTIN_OPENSSL_HAS_THREADS!= \ |
71 | ${AWK} 'BEGIN { ans = "no" } \ | | 71 | ${AWK} 'BEGIN { ans = "no" } \ |
72 | /\#[ ]*define[ ]*OPENSSL_THREADS/ { ans= "yes" } \ | | 72 | /\#[ ]*define[ ]*OPENSSL_THREADS/ { ans= "yes" } \ |
73 | /\#[ ]*define[ ]*THREADS/ { ans = "yes" } \ | | 73 | /\#[ ]*define[ ]*THREADS/ { ans = "yes" } \ |
74 | END { print ans; exit 0 } \ | | 74 | END { print ans; exit 0 } \ |
75 | ' ${H_OPENSSLCONF:Q} | | 75 | ' ${H_OPENSSLCONF:Q} |
76 | .endif | | 76 | .endif |
77 | MAKEVARS+= BUILTIN_OPENSSL_HAS_THREADS | | 77 | MAKEVARS+= BUILTIN_OPENSSL_HAS_THREADS |
78 | | | 78 | |
79 | ### | | 79 | ### |
80 | ### Determine whether we should use the built-in implementation if it | | 80 | ### Determine whether we should use the built-in implementation if it |
81 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). | | 81 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). |
82 | ### | | 82 | ### |
83 | .if !defined(USE_BUILTIN.openssl) | | 83 | .if !defined(USE_BUILTIN.openssl) |
84 | . if ${PREFER.openssl} == "pkgsrc" | | 84 | . if ${PREFER.openssl} == "pkgsrc" |
85 | USE_BUILTIN.openssl= no | | 85 | USE_BUILTIN.openssl= no |
86 | . else | | 86 | . else |
87 | USE_BUILTIN.openssl= ${IS_BUILTIN.openssl} | | 87 | USE_BUILTIN.openssl= ${IS_BUILTIN.openssl} |
88 | . if defined(BUILTIN_PKG.openssl) && \ | | 88 | . if defined(BUILTIN_PKG.openssl) && \ |
89 | ${IS_BUILTIN.openssl:M[yY][eE][sS]} | | 89 | ${IS_BUILTIN.openssl:tl} == yes |
90 | USE_BUILTIN.openssl= yes | | 90 | USE_BUILTIN.openssl= yes |
91 | ### take care builtin check case, BUILDLINK_API_DEPENDS may not be defined yet. | | 91 | ### take care builtin check case, BUILDLINK_API_DEPENDS may not be defined yet. |
92 | CHECK_BUILTIN.openssl?= no | | 92 | CHECK_BUILTIN.openssl?= no |
93 | . if ${CHECK_BUILTIN.openssl:M[yY][eE][sS]} | | 93 | . if ${CHECK_BUILTIN.openssl:tl} == yes |
94 | BUILDLINK_API_DEPENDS.openssl?= openssl>=1.1.1 | | 94 | BUILDLINK_API_DEPENDS.openssl?= openssl>=1.1.1 |
95 | . endif | | 95 | . endif |
96 | . for dep_ in ${BUILDLINK_API_DEPENDS.openssl} | | 96 | . for dep_ in ${BUILDLINK_API_DEPENDS.openssl} |
97 | . if ${USE_BUILTIN.openssl:M[yY][eE][sS]} | | 97 | . if ${USE_BUILTIN.openssl:tl} == yes |
98 | USE_BUILTIN.openssl!= \ | | 98 | USE_BUILTIN.openssl!= \ |
99 | if ${PKG_ADMIN} pmatch ${dep_:Q} ${BUILTIN_PKG.openssl:Q}; then \ | | 99 | if ${PKG_ADMIN} pmatch ${dep_:Q} ${BUILTIN_PKG.openssl:Q}; then \ |
100 | ${ECHO} yes; \ | | 100 | ${ECHO} yes; \ |
101 | else \ | | 101 | else \ |
102 | ${ECHO} no; \ | | 102 | ${ECHO} no; \ |
103 | fi | | 103 | fi |
104 | . endif | | 104 | . endif |
105 | . endfor | | 105 | . endfor |
106 | . endif | | 106 | . endif |
107 | . if ${IS_BUILTIN.openssl:M[yY][eE][sS]} && \ | | 107 | . if ${IS_BUILTIN.openssl:tl} == yes && \ |
108 | defined(USE_FEATURES.openssl) | | 108 | defined(USE_FEATURES.openssl) |
109 | . if !empty(USE_FEATURES.openssl:Mthreads) && \ | | 109 | . if !empty(USE_FEATURES.openssl:Mthreads) && \ |
110 | !empty(BUILTIN_OPENSSL_HAS_THREADS:M[nN][oO]) | | 110 | !empty(BUILTIN_OPENSSL_HAS_THREADS:M[nN][oO]) |
111 | USE_BUILTIN.openssl= no | | 111 | USE_BUILTIN.openssl= no |
112 | . endif | | 112 | . endif |
113 | . endif | | 113 | . endif |
114 | . endif # PREFER.openssl | | 114 | . endif # PREFER.openssl |
115 | .endif | | 115 | .endif |
116 | MAKEVARS+= USE_BUILTIN.openssl | | 116 | MAKEVARS+= USE_BUILTIN.openssl |
117 | | | 117 | |
118 | ### | | 118 | ### |
119 | ### The section below only applies if we are not including this file | | 119 | ### The section below only applies if we are not including this file |
120 | ### solely to determine whether a built-in implementation exists. | | 120 | ### solely to determine whether a built-in implementation exists. |
121 | ### | | 121 | ### |
122 | CHECK_BUILTIN.openssl?= no | | 122 | CHECK_BUILTIN.openssl?= no |
123 | .if ${CHECK_BUILTIN.openssl:M[nN][oO]} | | 123 | .if ${CHECK_BUILTIN.openssl:tl} == no |
124 | | | 124 | |
125 | . if ${USE_BUILTIN.openssl:M[yY][eE][sS]} | | 125 | . if ${USE_BUILTIN.openssl:tl} == yes |
126 | . if empty(H_OPENSSLV:M__nonexistent__) | | 126 | . if empty(H_OPENSSLV:M__nonexistent__) |
127 | . if !empty(H_OPENSSLV:M/usr/sfw/*) | | 127 | . if !empty(H_OPENSSLV:M/usr/sfw/*) |
128 | BUILDLINK_PREFIX.openssl= /usr/sfw | | 128 | BUILDLINK_PREFIX.openssl= /usr/sfw |
129 | BUILDLINK_PASSTHRU_DIRS+= /usr/sfw | | 129 | BUILDLINK_PASSTHRU_DIRS+= /usr/sfw |
130 | . elif !empty(H_OPENSSLV:M/usr/*) | | 130 | . elif !empty(H_OPENSSLV:M/usr/*) |
131 | BUILDLINK_PREFIX.openssl= /usr | | 131 | BUILDLINK_PREFIX.openssl= /usr |
132 | . elif !empty(H_OPENSSLV:M/boot/system/develop/*) | | 132 | . elif !empty(H_OPENSSLV:M/boot/system/develop/*) |
133 | BUILDLINK_PREFIX.openssl= /boot/system/develop | | 133 | BUILDLINK_PREFIX.openssl= /boot/system/develop |
134 | . elif !empty(H_OPENSSLV:M/boot/common/*) | | 134 | . elif !empty(H_OPENSSLV:M/boot/common/*) |
135 | BUILDLINK_PREFIX.openssl= /boot/common | | 135 | BUILDLINK_PREFIX.openssl= /boot/common |
136 | . endif | | 136 | . endif |
137 | . endif | | 137 | . endif |
138 | . endif | | 138 | . endif |
139 | | | 139 | |
140 | . if defined(PKG_SYSCONFDIR.openssl) | | 140 | . if defined(PKG_SYSCONFDIR.openssl) |
141 | SSLDIR= ${PKG_SYSCONFDIR.openssl} | | 141 | SSLDIR= ${PKG_SYSCONFDIR.openssl} |
142 | . elif ${USE_BUILTIN.openssl:M[yY][eE][sS]} | | 142 | . elif ${USE_BUILTIN.openssl:tl} == yes |
143 | . if ${OPSYS} == "NetBSD" | | 143 | . if ${OPSYS} == "NetBSD" |
144 | SSLDIR= /etc/openssl | | 144 | SSLDIR= /etc/openssl |
145 | . elif ${OPSYS} == "Linux" | | 145 | . elif ${OPSYS} == "Linux" |
146 | . if exists(/etc/pki/tls) | | 146 | . if exists(/etc/pki/tls) |
147 | # Some distributions have moved to /etc/pki/tls, with incomplete | | 147 | # Some distributions have moved to /etc/pki/tls, with incomplete |
148 | # symlinks from /etc/ssl. Prefer the new location if it exists | | 148 | # symlinks from /etc/ssl. Prefer the new location if it exists |
149 | SSLDIR= /etc/pki/tls | | 149 | SSLDIR= /etc/pki/tls |
150 | . else | | 150 | . else |
151 | SSLDIR= /etc/ssl # standard location | | 151 | SSLDIR= /etc/ssl # standard location |
152 | . endif | | 152 | . endif |
153 | . elif ${OPSYS} == "Haiku" | | 153 | . elif ${OPSYS} == "Haiku" |
154 | . if exists(/boot/system/data/ssl) | | 154 | . if exists(/boot/system/data/ssl) |
155 | SSLDIR= /boot/system/data/ssl | | 155 | SSLDIR= /boot/system/data/ssl |
156 | . else | | 156 | . else |
157 | SSLDIR= /boot/common/data/ssl | | 157 | SSLDIR= /boot/common/data/ssl |
158 | . endif | | 158 | . endif |
159 | . else | | 159 | . else |
160 | SSLDIR= /etc/ssl # most likely place | | 160 | SSLDIR= /etc/ssl # most likely place |
161 | . endif | | 161 | . endif |
162 | . else | | 162 | . else |
163 | SSLDIR= ${PKG_SYSCONFBASEDIR}/openssl | | 163 | SSLDIR= ${PKG_SYSCONFBASEDIR}/openssl |
164 | . endif | | 164 | . endif |
165 | | | 165 | |
166 | SSLCERTS= ${SSLDIR}/certs | | 166 | SSLCERTS= ${SSLDIR}/certs |
167 | # Some systems use CA bundles instead of files and hashed symlinks. | | 167 | # Some systems use CA bundles instead of files and hashed symlinks. |
168 | # Continue to define SSLCERTS because it's unclear if that's the | | 168 | # Continue to define SSLCERTS because it's unclear if that's the |
169 | # directory that has one file per cert, or the directory that contains | | 169 | # directory that has one file per cert, or the directory that contains |
170 | # trust anchor config in some fortm. | | 170 | # trust anchor config in some fortm. |
171 | . if exists(${SSLDIR}/certs/ca-bundle.crt) | | 171 | . if exists(${SSLDIR}/certs/ca-bundle.crt) |
172 | SSLCERTBUNDLE= ${SSLDIR}/certs/ca-bundle.crt | | 172 | SSLCERTBUNDLE= ${SSLDIR}/certs/ca-bundle.crt |
173 | . endif | | 173 | . endif |
174 | SSLKEYS= ${SSLDIR}/private | | 174 | SSLKEYS= ${SSLDIR}/private |
175 | | | 175 | |
176 | BUILD_DEFS+= SSLDIR SSLCERTS SSLCERTBUNDLE SSLKEYS | | 176 | BUILD_DEFS+= SSLDIR SSLCERTS SSLCERTBUNDLE SSLKEYS |
177 | | | 177 | |
178 | # create pc files for builtin version; other versions assumed to contain them | | 178 | # create pc files for builtin version; other versions assumed to contain them |
179 | # If we are using the builtin version, check whether it has a *.pc | | 179 | # If we are using the builtin version, check whether it has a *.pc |
180 | # files or not. If the latter, generate fake ones. | | 180 | # files or not. If the latter, generate fake ones. |
181 | . if ${USE_BUILTIN.openssl:M[Yy][Ee][Ss]} | | 181 | . if ${USE_BUILTIN.openssl:tl} == yes |
182 | BUILDLINK_TARGETS+= openssl-fake-pc | | 182 | BUILDLINK_TARGETS+= openssl-fake-pc |
183 | | | 183 | |
184 | . if !defined(HAS_OPENSSL_FAKE_PC) | | 184 | . if !defined(HAS_OPENSSL_FAKE_PC) |
185 | HAS_OPENSSL_FAKE_PC= | | 185 | HAS_OPENSSL_FAKE_PC= |
186 | | | 186 | |
187 | .PHONY: openssl-fake-pc | | 187 | .PHONY: openssl-fake-pc |
188 | openssl-fake-pc: | | 188 | openssl-fake-pc: |
189 | ${RUN} \ | | 189 | ${RUN} \ |
190 | src=${BUILDLINK_PREFIX.openssl}/lib${LIBABISUFFIX}/pkgconfig/libcrypto.pc; \ | | 190 | src=${BUILDLINK_PREFIX.openssl}/lib${LIBABISUFFIX}/pkgconfig/libcrypto.pc; \ |
191 | dst=${BUILDLINK_DIR}/lib/pkgconfig/libcrypto.pc; \ | | 191 | dst=${BUILDLINK_DIR}/lib/pkgconfig/libcrypto.pc; \ |
192 | ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ | | 192 | ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ |
193 | if ${TEST} -f $${src}; then \ | | 193 | if ${TEST} -f $${src}; then \ |
194 | ${LN} -sf $${src} $${dst}; \ | | 194 | ${LN} -sf $${src} $${dst}; \ |
195 | else \ | | 195 | else \ |
196 | { ${ECHO} 'prefix=${BUILDLINK_PREFIX.openssl}'; \ | | 196 | { ${ECHO} 'prefix=${BUILDLINK_PREFIX.openssl}'; \ |
197 | ${ECHO} 'exec_prefix=$${prefix}'; \ | | 197 | ${ECHO} 'exec_prefix=$${prefix}'; \ |
198 | ${ECHO} 'libdir=$${exec_prefix}/lib${LIBABISUFFIX}'; \ | | 198 | ${ECHO} 'libdir=$${exec_prefix}/lib${LIBABISUFFIX}'; \ |
199 | ${ECHO} 'includedir=$${prefix}/include'; \ | | 199 | ${ECHO} 'includedir=$${prefix}/include'; \ |
200 | ${ECHO}; \ | | 200 | ${ECHO}; \ |
201 | ${ECHO} 'Name: OpenSSL-libcrypto'; \ | | 201 | ${ECHO} 'Name: OpenSSL-libcrypto'; \ |
202 | ${ECHO} 'Description: OpenSSL cryptography library'; \ | | 202 | ${ECHO} 'Description: OpenSSL cryptography library'; \ |
203 | ${ECHO} 'Version: ${BUILTIN_VERSION.openssl}'; \ | | 203 | ${ECHO} 'Version: ${BUILTIN_VERSION.openssl}'; \ |
204 | ${ECHO} 'Libs: -L$${libdir} -lcrypto'; \ | | 204 | ${ECHO} 'Libs: -L$${libdir} -lcrypto'; \ |
205 | ${ECHO} 'Cflags: -I$${includedir}'; \ | | 205 | ${ECHO} 'Cflags: -I$${includedir}'; \ |
206 | } >$${dst}; \ | | 206 | } >$${dst}; \ |
207 | fi | | 207 | fi |
208 | ${RUN} \ | | 208 | ${RUN} \ |
209 | src=${BUILDLINK_PREFIX.openssl}/lib${LIBABISUFFIX}/pkgconfig/libssl.pc; \ | | 209 | src=${BUILDLINK_PREFIX.openssl}/lib${LIBABISUFFIX}/pkgconfig/libssl.pc; \ |
210 | dst=${BUILDLINK_DIR}/lib/pkgconfig/libssl.pc; \ | | 210 | dst=${BUILDLINK_DIR}/lib/pkgconfig/libssl.pc; \ |
211 | ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ | | 211 | ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ |
212 | if ${TEST} -f $${src}; then \ | | 212 | if ${TEST} -f $${src}; then \ |
213 | ${LN} -sf $${src} $${dst}; \ | | 213 | ${LN} -sf $${src} $${dst}; \ |
214 | else \ | | 214 | else \ |
215 | { ${ECHO} 'prefix=${BUILDLINK_PREFIX.openssl}'; \ | | 215 | { ${ECHO} 'prefix=${BUILDLINK_PREFIX.openssl}'; \ |
216 | ${ECHO} 'exec_prefix=$${prefix}'; \ | | 216 | ${ECHO} 'exec_prefix=$${prefix}'; \ |
217 | ${ECHO} 'libdir=$${exec_prefix}/lib${LIBABISUFFIX}'; \ | | 217 | ${ECHO} 'libdir=$${exec_prefix}/lib${LIBABISUFFIX}'; \ |
218 | ${ECHO} 'includedir=$${prefix}/include'; \ | | 218 | ${ECHO} 'includedir=$${prefix}/include'; \ |
219 | ${ECHO}; \ | | 219 | ${ECHO}; \ |
220 | ${ECHO} 'Name: OpenSSL'; \ | | 220 | ${ECHO} 'Name: OpenSSL'; \ |
221 | ${ECHO} 'Description: Secure Sockets Layer and cryptography libraries'; \ | | 221 | ${ECHO} 'Description: Secure Sockets Layer and cryptography libraries'; \ |
222 | ${ECHO} 'Version: ${BUILTIN_VERSION.openssl}'; \ | | 222 | ${ECHO} 'Version: ${BUILTIN_VERSION.openssl}'; \ |
223 | ${ECHO} 'Libs: -L$${libdir} -lssl -lcrypto'; \ | | 223 | ${ECHO} 'Libs: -L$${libdir} -lssl -lcrypto'; \ |
224 | ${ECHO} 'Cflags: -I$${includedir}'; \ | | 224 | ${ECHO} 'Cflags: -I$${includedir}'; \ |
225 | } >$${dst}; \ | | 225 | } >$${dst}; \ |
226 | fi | | 226 | fi |
227 | ${RUN} \ | | 227 | ${RUN} \ |
228 | src=${BUILDLINK_PREFIX.openssl}/lib${LIBABISUFFIX}/pkgconfig/openssl.pc; \ | | 228 | src=${BUILDLINK_PREFIX.openssl}/lib${LIBABISUFFIX}/pkgconfig/openssl.pc; \ |
229 | dst=${BUILDLINK_DIR}/lib/pkgconfig/openssl.pc; \ | | 229 | dst=${BUILDLINK_DIR}/lib/pkgconfig/openssl.pc; \ |
230 | ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ | | 230 | ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ |
231 | if ${TEST} -f $${src}; then \ | | 231 | if ${TEST} -f $${src}; then \ |
232 | ${LN} -sf $${src} $${dst}; \ | | 232 | ${LN} -sf $${src} $${dst}; \ |
233 | else \ | | 233 | else \ |
234 | { ${ECHO} 'prefix=${BUILDLINK_PREFIX.openssl}'; \ | | 234 | { ${ECHO} 'prefix=${BUILDLINK_PREFIX.openssl}'; \ |
235 | ${ECHO} 'exec_prefix=$${prefix}'; \ | | 235 | ${ECHO} 'exec_prefix=$${prefix}'; \ |
236 | ${ECHO} 'libdir=$${exec_prefix}/lib${LIBABISUFFIX}'; \ | | 236 | ${ECHO} 'libdir=$${exec_prefix}/lib${LIBABISUFFIX}'; \ |
237 | ${ECHO} 'includedir=$${prefix}/include'; \ | | 237 | ${ECHO} 'includedir=$${prefix}/include'; \ |
238 | ${ECHO}; \ | | 238 | ${ECHO}; \ |
239 | ${ECHO} 'Name: OpenSSL'; \ | | 239 | ${ECHO} 'Name: OpenSSL'; \ |
240 | ${ECHO} 'Description: Secure Sockets Layer and cryptography libraries and tools'; \ | | 240 | ${ECHO} 'Description: Secure Sockets Layer and cryptography libraries and tools'; \ |
241 | ${ECHO} 'Version: ${BUILTIN_VERSION.openssl}'; \ | | 241 | ${ECHO} 'Version: ${BUILTIN_VERSION.openssl}'; \ |
242 | ${ECHO} 'Libs: -L$${libdir} -lssl -lcrypto'; \ | | 242 | ${ECHO} 'Libs: -L$${libdir} -lssl -lcrypto'; \ |
243 | ${ECHO} 'Cflags: -I$${includedir}'; \ | | 243 | ${ECHO} 'Cflags: -I$${includedir}'; \ |
244 | } >$${dst}; \ | | 244 | } >$${dst}; \ |
245 | fi | | 245 | fi |
246 | . endif | | 246 | . endif |
247 | . endif | | 247 | . endif |
248 | | | 248 | |
249 | .endif # CHECK_BUILTIN.openssl | | 249 | .endif # CHECK_BUILTIN.openssl |