summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl-qoriq.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq.inc')
-rw-r--r--recipes-connectivity/openssl/openssl-qoriq.inc72
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
29PACKAGECONFIG[perl] = ",,," 29PACKAGECONFIG[perl] = ",,,"
30 30
31AR_append = " r"
32TERMIO_libc-musl = "-DTERMIOS" 31TERMIO_libc-musl = "-DTERMIOS"
33TERMIO ?= "-DTERMIO" 32TERMIO ?= "-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
39export DIRS = "crypto ssl apps" 38export DIRS = "crypto ssl apps"
40export EX_LIBS = "-lgcc -ldl" 39export EX_LIBS = "-lgcc -ldl"
41export AS = "${CC} -c" 40export AS = "${CC} -c"
42EXTRA_OEMAKE = "-e MAKEFLAGS="
43 41
44inherit pkgconfig siteinfo multilib_header ptest 42inherit pkgconfig siteinfo multilib_header ptest relative_symlinks
45 43
46PACKAGES =+ "libcrypto libssl ${PN}-misc ${PN}-conf" 44PACKAGES =+ "libcrypto libssl ${PN}-misc ${PN}-conf"
47FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" 45FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}"
48FILES_libssl = "${libdir}/libssl${SOLIBS}" 46FILES_libssl = "${libdir}/libssl${SOLIBS}"
49FILES_${PN} =+ " ${libdir}/ssl/*" 47FILES_${PN} =+ " ${libdir}/ssl/*"
50FILES_${PN}-misc = "${libdir}/ssl/misc ${bindir}/c_rehash" 48FILES_${PN}-misc = "${libdir}/ssl/misc"
51RDEPENDS_${PN}-misc = "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" 49RDEPENDS_${PN}-misc = "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}"
52FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}" 50
51PROVIDES += "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
218do_install_ptest () { 218do_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
237do_install_append_class-native() { 255do_install_append_class-native() {