diff options
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl_1.1.0h.bb')
-rw-r--r-- | meta/recipes-connectivity/openssl/openssl_1.1.0h.bb | 155 |
1 files changed, 155 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..6937cc4649 --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb | |||
@@ -0,0 +1,155 @@ | |||
1 | SUMMARY = "Secure Socket Layer" | ||
2 | DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." | ||
3 | HOMEPAGE = "http://www.openssl.org/" | ||
4 | BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" | ||
5 | SECTION = "libs/network" | ||
6 | |||
7 | # "openssl | SSLeay" dual license | ||
8 | LICENSE = "openssl" | ||
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d57d511030c9d66ef5f5966bee5a7eff" | ||
10 | |||
11 | BBCLASSEXTEND = "native nativesdk" | ||
12 | |||
13 | SRC_URI[md5sum] = "5271477e4d93f4ea032b665ef095ff24" | ||
14 | SRC_URI[sha256sum] = "5835626cde9e99656585fc7aaa2302a73a7e1340bf8c14fd635a62c66802a517" | ||
15 | |||
16 | SRC_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 | |||
22 | S = "${WORKDIR}/openssl-${PV}" | ||
23 | |||
24 | inherit lib_package multilib_header ptest | ||
25 | |||
26 | do_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-supersparc) | ||
98 | target=linux-sparcv9 | ||
99 | ;; | ||
100 | linux-sparc) | ||
101 | target=linux-sparcv9 | ||
102 | ;; | ||
103 | darwin-i386) | ||
104 | target=darwin-i386-cc | ||
105 | ;; | ||
106 | esac | ||
107 | useprefix=${prefix} | ||
108 | if [ "x$useprefix" = "x" ]; then | ||
109 | useprefix=/ | ||
110 | fi | ||
111 | libdirleaf="$(echo ${libdir} | sed s:$useprefix::)" | ||
112 | perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdirleaf} $target | ||
113 | } | ||
114 | |||
115 | #| engines/afalg/e_afalg.c: In function 'eventfd': | ||
116 | #| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first use in this function) | ||
117 | #| return syscall(__NR_eventfd, n); | ||
118 | #| ^~~~~~~~~~~~ | ||
119 | EXTRA_OECONF_aarch64 += "no-afalgeng" | ||
120 | |||
121 | #| ./libcrypto.so: undefined reference to `getcontext' | ||
122 | #| ./libcrypto.so: undefined reference to `setcontext' | ||
123 | #| ./libcrypto.so: undefined reference to `makecontext' | ||
124 | EXTRA_OECONF_libc-musl += "-DOPENSSL_NO_ASYNC" | ||
125 | |||
126 | do_install () { | ||
127 | oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install | ||
128 | oe_multilib_header openssl/opensslconf.h | ||
129 | } | ||
130 | |||
131 | do_install_append_class-native () { | ||
132 | # Install a custom version of c_rehash that can handle sysroots properly. | ||
133 | # This version is used for example when installing ca-certificates during | ||
134 | # image creation. | ||
135 | install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash | ||
136 | sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash | ||
137 | } | ||
138 | |||
139 | do_install_ptest() { | ||
140 | cp -r * ${D}${PTEST_PATH} | ||
141 | |||
142 | # Putting .so files in ptest package will mess up the dependencies of the main openssl package | ||
143 | # so we rename them to .so.ptest and patch the test accordingly | ||
144 | mv ${D}${PTEST_PATH}/libcrypto.so ${D}${PTEST_PATH}/libcrypto.so.ptest | ||
145 | mv ${D}${PTEST_PATH}/libssl.so ${D}${PTEST_PATH}/libssl.so.ptest | ||
146 | sed -i 's/$target{shared_extension_simple}/".so.ptest"/' ${D}${PTEST_PATH}/test/recipes/90-test_shlibload.t | ||
147 | } | ||
148 | |||
149 | RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python" | ||
150 | |||
151 | FILES_${PN} =+ " ${libdir}/ssl-1.1/*" | ||
152 | |||
153 | PACKAGES =+ "${PN}-engines" | ||
154 | FILES_${PN}-engines = "${libdir}/engines-1.1" | ||
155 | |||