summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl-qoriq_1.1.0g.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq_1.1.0g.bb')
-rw-r--r--recipes-connectivity/openssl/openssl-qoriq_1.1.0g.bb186
1 files changed, 186 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq_1.1.0g.bb b/recipes-connectivity/openssl/openssl-qoriq_1.1.0g.bb
new file mode 100644
index 00000000..ce098096
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl-qoriq_1.1.0g.bb
@@ -0,0 +1,186 @@
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
7DISABLE_STATIC = ""
8
9# "openssl | SSLeay" dual license
10LICENSE = "openssl"
11LIC_FILES_CHKSUM = "file://LICENSE;md5=cae6da10f4ffd9703214776d2aabce32"
12
13DEPENDS += "cryptodev-linux"
14DEPENDS_append_class-target = " openssl-native"
15
16SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/openssl;nobranch=1 \
17 file://run-ptest \
18 file://openssl-c_rehash.sh \
19 file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
20 file://0001-Remove-test-that-requires-running-as-non-root.patch \
21 file://0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch \
22 "
23
24SRCREV = "c2300d1fdb30a439f555b07f228d3bce498238d5"
25
26PROVIDES = "openssl"
27
28python() {
29 pkgs = d.getVar('PACKAGES', True).split()
30 for p in pkgs:
31 if 'openssl-qoriq' in p:
32 d.appendVar("RPROVIDES_%s" % p, p.replace('openssl-qoriq', 'openssl'))
33 d.appendVar("RCONFLICTS_%s" % p, p.replace('openssl-qoriq', 'openssl'))
34 d.appendVar("RREPLACES_%s" % p, p.replace('openssl-qoriq', 'openssl'))
35}
36
37S = "${WORKDIR}/git"
38
39inherit lib_package multilib_header ptest
40
41do_configure () {
42 os=${HOST_OS}
43 case $os in
44 linux-uclibc |\
45 linux-uclibceabi |\
46 linux-gnueabi |\
47 linux-uclibcspe |\
48 linux-gnuspe |\
49 linux-musl*)
50 os=linux
51 ;;
52 *)
53 ;;
54 esac
55 target="$os-${HOST_ARCH}"
56 case $target in
57 linux-arm)
58 target=linux-armv4
59 ;;
60 linux-armeb)
61 target=linux-armv4
62 ;;
63 linux-aarch64*)
64 target=linux-aarch64
65 ;;
66 linux-sh3)
67 target=linux-generic32
68 ;;
69 linux-sh4)
70 target=linux-generic32
71 ;;
72 linux-i486)
73 target=linux-elf
74 ;;
75 linux-i586 | linux-viac3)
76 target=linux-elf
77 ;;
78 linux-i686)
79 target=linux-elf
80 ;;
81 linux-gnux32-x86_64)
82 target=linux-x32
83 ;;
84 linux-gnu64-x86_64)
85 target=linux-x86_64
86 ;;
87 linux-mips)
88 # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags
89 target="linux-mips32 ${TARGET_CC_ARCH}"
90 ;;
91 linux-mipsel)
92 target="linux-mips32 ${TARGET_CC_ARCH}"
93 ;;
94 linux-gnun32-mips*)
95 target=linux-mips64
96 ;;
97 linux-*-mips64 | linux-mips64)
98 target=linux64-mips64
99 ;;
100 linux-*-mips64el | linux-mips64el)
101 target=linux64-mips64
102 ;;
103 linux-microblaze*|linux-nios2*)
104 target=linux-generic32
105 ;;
106 linux-powerpc)
107 target=linux-ppc
108 ;;
109 linux-powerpc64)
110 target=linux-ppc64
111 ;;
112 linux-riscv64)
113 target=linux-generic64
114 ;;
115 linux-riscv32)
116 target=linux-generic32
117 ;;
118 linux-supersparc)
119 target=linux-sparcv9
120 ;;
121 linux-sparc)
122 target=linux-sparcv9
123 ;;
124 darwin-i386)
125 target=darwin-i386-cc
126 ;;
127 esac
128 useprefix=${prefix}
129 if [ "x$useprefix" = "x" ]; then
130 useprefix=/
131 fi
132 libdirleaf="$(echo ${libdir} | sed s:$useprefix::)"
133 perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdirleaf} $target
134}
135
136#| engines/afalg/e_afalg.c: In function 'eventfd':
137#| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first use in this function)
138#| return syscall(__NR_eventfd, n);
139#| ^~~~~~~~~~~~
140EXTRA_OECONF_aarch64 += "no-afalgeng"
141
142#| ./libcrypto.so: undefined reference to `getcontext'
143#| ./libcrypto.so: undefined reference to `setcontext'
144#| ./libcrypto.so: undefined reference to `makecontext'
145EXTRA_OECONF_libc-musl += "-DOPENSSL_NO_ASYNC"
146
147do_install () {
148 oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
149 oe_multilib_header openssl/opensslconf.h
150}
151
152do_install_append_class-native () {
153 # Install a custom version of c_rehash that can handle sysroots properly.
154 # This version is used for example when installing ca-certificates during
155 # image creation.
156 install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash
157 sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash
158}
159
160do_install_ptest() {
161 cp -r * ${D}${PTEST_PATH}
162
163 # Putting .so files in ptest package will mess up the dependencies of the main openssl package
164 # so we rename them to .so.ptest and patch the test accordingly
165 mv ${D}${PTEST_PATH}/libcrypto.so ${D}${PTEST_PATH}/libcrypto.so.ptest
166 mv ${D}${PTEST_PATH}/libssl.so ${D}${PTEST_PATH}/libssl.so.ptest
167 sed -i 's/$target{shared_extension_simple}/".so.ptest"/' ${D}${PTEST_PATH}/test/recipes/90-test_shlibload.t
168}
169
170RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python"
171RRECOMMENDS_libcrypto += "openssl-conf"
172RDEPENDS_${PN}-bin = "perl"
173RDEPENDS_${PN}-misc = "perl"
174
175FILES_${PN} =+ " ${libdir}/ssl-1.1/*"
176
177PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc"
178FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}"
179FILES_libssl = "${libdir}/libssl${SOLIBS}"
180FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
181FILES_${PN}-engines = "${libdir}/engines-1.1"
182FILES_${PN}-misc = "${libdir}/ssl-1.1/misc"
183
184RPROVIDES_openssl-conf = "openssl10-conf"
185RREPLACES_openssl-conf = "openssl10-conf"
186RCONFLICTS_openssl-conf = "openssl10-conf"