summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl_1.1.0h.bb')
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.1.0h.bb161
1 files changed, 161 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb b/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
new file mode 100644
index 0000000000..94b75eb92a
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
@@ -0,0 +1,161 @@
1SUMMARY = "Secure Socket Layer"
2DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
3HOMEPAGE = "http://www.openssl.org/"
4BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
5SECTION = "libs/network"
6
7# "openssl | SSLeay" dual license
8LICENSE = "openssl"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=d57d511030c9d66ef5f5966bee5a7eff"
10
11BBCLASSEXTEND = "native nativesdk"
12
13SRC_URI[md5sum] = "5271477e4d93f4ea032b665ef095ff24"
14SRC_URI[sha256sum] = "5835626cde9e99656585fc7aaa2302a73a7e1340bf8c14fd635a62c66802a517"
15
16SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
17 file://run-ptest \
18 file://openssl-c_rehash.sh \
19 file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
20 "
21
22S = "${WORKDIR}/openssl-${PV}"
23
24inherit lib_package multilib_header ptest
25
26do_configure () {
27 os=${HOST_OS}
28 case $os in
29 linux-uclibc |\
30 linux-uclibceabi |\
31 linux-gnueabi |\
32 linux-uclibcspe |\
33 linux-gnuspe |\
34 linux-musl*)
35 os=linux
36 ;;
37 *)
38 ;;
39 esac
40 target="$os-${HOST_ARCH}"
41 case $target in
42 linux-arm)
43 target=linux-armv4
44 ;;
45 linux-armeb)
46 target=linux-armv4
47 ;;
48 linux-aarch64*)
49 target=linux-aarch64
50 ;;
51 linux-sh3)
52 target=linux-generic32
53 ;;
54 linux-sh4)
55 target=linux-generic32
56 ;;
57 linux-i486)
58 target=linux-elf
59 ;;
60 linux-i586 | linux-viac3)
61 target=linux-elf
62 ;;
63 linux-i686)
64 target=linux-elf
65 ;;
66 linux-gnux32-x86_64)
67 target=linux-x32
68 ;;
69 linux-gnu64-x86_64)
70 target=linux-x86_64
71 ;;
72 linux-mips)
73 # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags
74 target="linux-mips32 ${TARGET_CC_ARCH}"
75 ;;
76 linux-mipsel)
77 target="linux-mips32 ${TARGET_CC_ARCH}"
78 ;;
79 linux-gnun32-mips*)
80 target=linux-mips64
81 ;;
82 linux-*-mips64 | linux-mips64)
83 target=linux64-mips64
84 ;;
85 linux-*-mips64el | linux-mips64el)
86 target=linux64-mips64
87 ;;
88 linux-microblaze*|linux-nios2*)
89 target=linux-generic32
90 ;;
91 linux-powerpc)
92 target=linux-ppc
93 ;;
94 linux-powerpc64)
95 target=linux-ppc64
96 ;;
97 linux-riscv64)
98 target=linux-generic64
99 ;;
100 linux-riscv32)
101 target=linux-generic32
102 ;;
103 linux-supersparc)
104 target=linux-sparcv9
105 ;;
106 linux-sparc)
107 target=linux-sparcv9
108 ;;
109 darwin-i386)
110 target=darwin-i386-cc
111 ;;
112 esac
113 useprefix=${prefix}
114 if [ "x$useprefix" = "x" ]; then
115 useprefix=/
116 fi
117 libdirleaf="$(echo ${libdir} | sed s:$useprefix::)"
118 perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdirleaf} $target
119}
120
121#| engines/afalg/e_afalg.c: In function 'eventfd':
122#| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first use in this function)
123#| return syscall(__NR_eventfd, n);
124#| ^~~~~~~~~~~~
125EXTRA_OECONF_aarch64 += "no-afalgeng"
126
127#| ./libcrypto.so: undefined reference to `getcontext'
128#| ./libcrypto.so: undefined reference to `setcontext'
129#| ./libcrypto.so: undefined reference to `makecontext'
130EXTRA_OECONF_libc-musl += "-DOPENSSL_NO_ASYNC"
131
132do_install () {
133 oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
134 oe_multilib_header openssl/opensslconf.h
135}
136
137do_install_append_class-native () {
138 # Install a custom version of c_rehash that can handle sysroots properly.
139 # This version is used for example when installing ca-certificates during
140 # image creation.
141 install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash
142 sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash
143}
144
145do_install_ptest() {
146 cp -r * ${D}${PTEST_PATH}
147
148 # Putting .so files in ptest package will mess up the dependencies of the main openssl package
149 # so we rename them to .so.ptest and patch the test accordingly
150 mv ${D}${PTEST_PATH}/libcrypto.so ${D}${PTEST_PATH}/libcrypto.so.ptest
151 mv ${D}${PTEST_PATH}/libssl.so ${D}${PTEST_PATH}/libssl.so.ptest
152 sed -i 's/$target{shared_extension_simple}/".so.ptest"/' ${D}${PTEST_PATH}/test/recipes/90-test_shlibload.t
153}
154
155RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python"
156
157FILES_${PN} =+ " ${libdir}/ssl-1.1/*"
158
159PACKAGES =+ "${PN}-engines"
160FILES_${PN}-engines = "${libdir}/engines-1.1"
161