diff options
author | Fabio Berton <fabio.berton@ossystems.com.br> | 2017-06-07 11:10:17 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2017-06-17 10:17:32 -0300 |
commit | 046a6c9877bf4b7aea01f0bfffb81c86a6c59501 (patch) | |
tree | 4588b62896d76d3e12880f0adab4718903d45f98 /recipes-connectivity/openssl/openssl-qoriq.inc | |
parent | 6f7ab0b43b3d9f8b4b48c7ff61ebcf97f0c1b08a (diff) | |
download | meta-freescale-046a6c9877bf4b7aea01f0bfffb81c86a6c59501.tar.gz |
openssl-qoriq: Sync with oe-core recipe
Sync with oe-core recipe to make maintenance easier, copy all patches
and let both openssl recipe more similar.
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq.inc')
-rw-r--r-- | recipes-connectivity/openssl/openssl-qoriq.inc | 72 |
1 files changed, 45 insertions, 27 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq.inc b/recipes-connectivity/openssl/openssl-qoriq.inc index 965291c5..612ec096 100644 --- a/recipes-connectivity/openssl/openssl-qoriq.inc +++ b/recipes-connectivity/openssl/openssl-qoriq.inc | |||
@@ -28,7 +28,6 @@ S = "${WORKDIR}/openssl-${PV}" | |||
28 | 28 | ||
29 | PACKAGECONFIG[perl] = ",,," | 29 | PACKAGECONFIG[perl] = ",,," |
30 | 30 | ||
31 | AR_append = " r" | ||
32 | TERMIO_libc-musl = "-DTERMIOS" | 31 | TERMIO_libc-musl = "-DTERMIOS" |
33 | TERMIO ?= "-DTERMIO" | 32 | TERMIO ?= "-DTERMIO" |
34 | # Avoid binaries being marked as requiring an executable stack since it | 33 | # Avoid binaries being marked as requiring an executable stack since it |
@@ -39,17 +38,17 @@ CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_END | |||
39 | export DIRS = "crypto ssl apps" | 38 | export DIRS = "crypto ssl apps" |
40 | export EX_LIBS = "-lgcc -ldl" | 39 | export EX_LIBS = "-lgcc -ldl" |
41 | export AS = "${CC} -c" | 40 | export AS = "${CC} -c" |
42 | EXTRA_OEMAKE = "-e MAKEFLAGS=" | ||
43 | 41 | ||
44 | inherit pkgconfig siteinfo multilib_header ptest | 42 | inherit pkgconfig siteinfo multilib_header ptest relative_symlinks |
45 | 43 | ||
46 | PACKAGES =+ "libcrypto libssl ${PN}-misc ${PN}-conf" | 44 | PACKAGES =+ "libcrypto libssl ${PN}-misc ${PN}-conf" |
47 | FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" | 45 | FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" |
48 | FILES_libssl = "${libdir}/libssl${SOLIBS}" | 46 | FILES_libssl = "${libdir}/libssl${SOLIBS}" |
49 | FILES_${PN} =+ " ${libdir}/ssl/*" | 47 | FILES_${PN} =+ " ${libdir}/ssl/*" |
50 | FILES_${PN}-misc = "${libdir}/ssl/misc ${bindir}/c_rehash" | 48 | FILES_${PN}-misc = "${libdir}/ssl/misc" |
51 | RDEPENDS_${PN}-misc = "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" | 49 | RDEPENDS_${PN}-misc = "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}" |
52 | FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}" | 50 | |
51 | PROVIDES += "openssl10" | ||
53 | 52 | ||
54 | # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto | 53 | # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto |
55 | # package RRECOMMENDS on this package. This will enable the configuration | 54 | # package RRECOMMENDS on this package. This will enable the configuration |
@@ -119,15 +118,24 @@ do_configure () { | |||
119 | linux-gnu64-x86_64) | 118 | linux-gnu64-x86_64) |
120 | target=linux-x86_64 | 119 | target=linux-x86_64 |
121 | ;; | 120 | ;; |
122 | linux-mips) | 121 | linux-gnun32-mips*el) |
123 | target=debian-mips | 122 | target=debian-mipsn32el |
123 | ;; | ||
124 | linux-gnun32-mips*) | ||
125 | target=debian-mipsn32 | ||
124 | ;; | 126 | ;; |
125 | linux-mipsel) | 127 | linux-mips*64*el) |
128 | target=debian-mips64el | ||
129 | ;; | ||
130 | linux-mips*64*) | ||
131 | target=debian-mips64 | ||
132 | ;; | ||
133 | linux-mips*el) | ||
126 | target=debian-mipsel | 134 | target=debian-mipsel |
127 | ;; | 135 | ;; |
128 | linux-*-mips64 | linux-mips64) | 136 | linux-mips*) |
129 | target=linux-mips | 137 | target=debian-mips |
130 | ;; | 138 | ;; |
131 | linux-microblaze*|linux-nios2*) | 139 | linux-microblaze*|linux-nios2*) |
132 | target=linux-generic32 | 140 | target=linux-generic32 |
133 | ;; | 141 | ;; |
@@ -181,26 +189,18 @@ do_install () { | |||
181 | oe_libinstall -so libcrypto ${D}${libdir} | 189 | oe_libinstall -so libcrypto ${D}${libdir} |
182 | oe_libinstall -so libssl ${D}${libdir} | 190 | oe_libinstall -so libssl ${D}${libdir} |
183 | 191 | ||
184 | # Moving libcrypto to /lib | ||
185 | if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then | ||
186 | mkdir -p ${D}/${base_libdir}/ | ||
187 | mv ${D}${libdir}/libcrypto* ${D}${base_libdir}/ | ||
188 | sed -i s#libdir=\$\{exec_prefix\}\/lib#libdir=${base_libdir}# ${D}/${libdir}/pkgconfig/libcrypto.pc | ||
189 | fi | ||
190 | |||
191 | install -d ${D}${includedir} | 192 | install -d ${D}${includedir} |
192 | cp --dereference -R include/openssl ${D}${includedir} | 193 | cp --dereference -R include/openssl ${D}${includedir} |
193 | 194 | ||
195 | install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash | ||
196 | sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash | ||
197 | |||
194 | oe_multilib_header openssl/opensslconf.h | 198 | oe_multilib_header openssl/opensslconf.h |
195 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" = "perl" ]; then | 199 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}" ]; then |
196 | install -m 0755 ${S}/tools/c_rehash ${D}${bindir} | ||
197 | sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${bindir}/c_rehash | ||
198 | sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl | 200 | sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl |
199 | sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/tsget | 201 | sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/tsget |
200 | # The c_rehash utility isn't installed by the normal installation process. | 202 | else |
201 | else | 203 | rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget |
202 | rm -f ${D}${bindir}/c_rehash | ||
203 | rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget | ||
204 | fi | 204 | fi |
205 | 205 | ||
206 | # Create SSL structure | 206 | # Create SSL structure |
@@ -217,9 +217,13 @@ do_install () { | |||
217 | 217 | ||
218 | do_install_ptest () { | 218 | do_install_ptest () { |
219 | cp -r -L Makefile.org Makefile test ${D}${PTEST_PATH} | 219 | cp -r -L Makefile.org Makefile test ${D}${PTEST_PATH} |
220 | |||
221 | # Replace the path to native perl with the path to target perl | ||
222 | sed -i 's,^PERL=.*,PERL=${bindir}/perl,' ${D}${PTEST_PATH}/Makefile | ||
223 | |||
220 | cp Configure config e_os.h ${D}${PTEST_PATH} | 224 | cp Configure config e_os.h ${D}${PTEST_PATH} |
221 | cp -r -L include ${D}${PTEST_PATH} | 225 | cp -r -L include ${D}${PTEST_PATH} |
222 | ln -sf ${base_libdir}/libcrypto.a ${D}${PTEST_PATH} | 226 | ln -sf ${libdir}/libcrypto.a ${D}${PTEST_PATH} |
223 | ln -sf ${libdir}/libssl.a ${D}${PTEST_PATH} | 227 | ln -sf ${libdir}/libssl.a ${D}${PTEST_PATH} |
224 | mkdir -p ${D}${PTEST_PATH}/crypto | 228 | mkdir -p ${D}${PTEST_PATH}/crypto |
225 | cp crypto/constant_time_locl.h ${D}${PTEST_PATH}/crypto | 229 | cp crypto/constant_time_locl.h ${D}${PTEST_PATH}/crypto |
@@ -228,10 +232,24 @@ do_install_ptest () { | |||
228 | ln -sf ${libdir}/ssl/misc/CA.sh ${D}${PTEST_PATH}/apps | 232 | ln -sf ${libdir}/ssl/misc/CA.sh ${D}${PTEST_PATH}/apps |
229 | ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${PTEST_PATH}/apps | 233 | ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${PTEST_PATH}/apps |
230 | ln -sf ${bindir}/openssl ${D}${PTEST_PATH}/apps | 234 | ln -sf ${bindir}/openssl ${D}${PTEST_PATH}/apps |
235 | cp apps/server.pem ${D}${PTEST_PATH}/apps | ||
231 | cp apps/server2.pem ${D}${PTEST_PATH}/apps | 236 | cp apps/server2.pem ${D}${PTEST_PATH}/apps |
232 | mkdir -p ${D}${PTEST_PATH}/util | 237 | mkdir -p ${D}${PTEST_PATH}/util |
233 | install util/opensslwrap.sh ${D}${PTEST_PATH}/util | 238 | install util/opensslwrap.sh ${D}${PTEST_PATH}/util |
234 | install util/shlib_wrap.sh ${D}${PTEST_PATH}/util | 239 | install util/shlib_wrap.sh ${D}${PTEST_PATH}/util |
240 | # Time stamps are relevant for "make alltests", otherwise | ||
241 | # make may try to recompile binaries. Not only must the | ||
242 | # binary files be newer than the sources, they also must | ||
243 | # be more recent than the header files in /usr/include. | ||
244 | # | ||
245 | # Using "cp -a" is not sufficient, because do_install | ||
246 | # does not preserve the original time stamps. | ||
247 | # | ||
248 | # So instead of using the original file stamps, we set | ||
249 | # the current time for all files. Binaries will get | ||
250 | # modified again later when stripping them, but that's okay. | ||
251 | touch ${D}${PTEST_PATH} | ||
252 | find ${D}${PTEST_PATH} -type f -print0 | xargs --verbose -0 touch -r ${D}${PTEST_PATH} | ||
235 | } | 253 | } |
236 | 254 | ||
237 | do_install_append_class-native() { | 255 | do_install_append_class-native() { |