summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl.inc
diff options
context:
space:
mode:
authorTing Liu <b28495@freescale.com>2014-07-03 02:32:04 -0500
committerZhenhua Luo <zhenhua.luo@freescale.com>2014-07-11 13:35:09 +0800
commit464f6fb62479df3ef46f6b70c165bd2743d5e667 (patch)
treefb5a41b1f07c1c830cdd297a482ef9bba967f180 /recipes-connectivity/openssl/openssl.inc
parent10d4573d3e9988b68bc4f3dd45a4748d10dbcc27 (diff)
downloadmeta-fsl-ppc-464f6fb62479df3ef46f6b70c165bd2743d5e667.tar.gz
openssl: downgrade to 1.0.1g
openssl released in fsl sdk v1.6 was based on 1.0.1g, so downgrade for fsl boards. the imported recipes were based on daisy-11.0.0 which FSL SDK based on. Signed-off-by: Ting Liu <b28495@freescale.com>
Diffstat (limited to 'recipes-connectivity/openssl/openssl.inc')
-rw-r--r--recipes-connectivity/openssl/openssl.inc173
1 files changed, 173 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl.inc b/recipes-connectivity/openssl/openssl.inc
new file mode 100644
index 0000000..ee02fb7
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl.inc
@@ -0,0 +1,173 @@
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=f9a8f968107345e0b75aa8c2ecaa7ec8"
10
11DEPENDS = "perl-native-runtime"
12
13SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
14 "
15S = "${WORKDIR}/openssl-${PV}"
16
17PACKAGECONFIG[perl] = ",,,"
18
19AR_append = " r"
20# Avoid binaries being marked as requiring an executable stack since it
21# doesn't(which causes and this causes issues with SELinux
22CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
23 -DTERMIO ${CFLAGS} -Wall -Wa,--noexecstack"
24
25# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom
26CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}"
27CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}"
28
29export DIRS = "crypto ssl apps"
30export EX_LIBS = "-lgcc -ldl"
31export AS = "${CC} -c"
32
33inherit pkgconfig siteinfo multilib_header
34
35PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"
36FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}"
37FILES_libssl = "${libdir}/libssl.so.*"
38FILES_${PN} =+ " ${libdir}/ssl/*"
39FILES_${PN}-misc = "${libdir}/ssl/misc ${bindir}/c_rehash"
40RDEPENDS_${PN}-misc = "${@base_contains('PACKAGECONFIG', 'perl', 'perl', '', d)}"
41FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
42
43# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto
44# package RRECOMMENDS on this package. This will enable the configuration
45# file to be installed for both the base openssl package and the libcrypto
46# package since the base openssl package depends on the libcrypto package.
47FILES_openssl-conf = "${libdir}/ssl/openssl.cnf"
48CONFFILES_openssl-conf = "${libdir}/ssl/openssl.cnf"
49RRECOMMENDS_libcrypto += "openssl-conf"
50
51do_configure_prepend_darwin () {
52 sed -i -e '/version-script=openssl\.ld/d' Configure
53}
54
55do_configure () {
56 cd util
57 perl perlpath.pl ${STAGING_BINDIR_NATIVE}
58 cd ..
59 ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
60
61 os=${HOST_OS}
62 if [ "x$os" = "xlinux-uclibc" ]; then
63 os=linux
64 elif [ "x$os" = "xlinux-uclibceabi" ]; then
65 os=linux
66 elif [ "x$os" = "xlinux-uclibcspe" ]; then
67 os=linux
68 elif [ "x$os" = "xlinux-gnuspe" ]; then
69 os=linux
70 elif [ "x$os" = "xlinux-gnueabi" ]; then
71 os=linux
72 fi
73 target="$os-${HOST_ARCH}"
74 case $target in
75 linux-arm)
76 target=linux-armv4
77 ;;
78 linux-armeb)
79 target=linux-elf-armeb
80 ;;
81 linux-aarch64*)
82 target=linux-generic64
83 ;;
84 linux-sh3)
85 target=debian-sh3
86 ;;
87 linux-sh4)
88 target=debian-sh4
89 ;;
90 linux-i486)
91 target=debian-i386-i486
92 ;;
93 linux-i586 | linux-viac3)
94 target=debian-i386-i586
95 ;;
96 linux-i686)
97 target=debian-i386-i686/cmov
98 ;;
99 linux-gnux32-x86_64)
100 target=linux-x32
101 ;;
102 linux-gnu64-x86_64)
103 target=linux-x86_64
104 ;;
105 linux-mips)
106 target=debian-mips
107 ;;
108 linux-mipsel)
109 target=debian-mipsel
110 ;;
111 linux-*-mips64)
112 target=linux-mips
113 ;;
114 linux-powerpc)
115 target=linux-ppc
116 ;;
117 linux-powerpc64)
118 target=linux-ppc64
119 ;;
120 linux-supersparc)
121 target=linux-sparcv8
122 ;;
123 linux-sparc)
124 target=linux-sparcv8
125 ;;
126 darwin-i386)
127 target=darwin-i386-cc
128 ;;
129 esac
130 # inject machine-specific flags
131 sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure
132 useprefix=${prefix}
133 if [ "x$useprefix" = "x" ]; then
134 useprefix=/
135 fi
136 perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target
137}
138
139do_compile () {
140 oe_runmake
141}
142
143do_install () {
144 oe_runmake INSTALL_PREFIX="${D}" MANDIR="${mandir}" install
145
146 oe_libinstall -so libcrypto ${D}${libdir}
147 oe_libinstall -so libssl ${D}${libdir}
148
149 # Moving libcrypto to /lib
150 if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
151 mkdir -p ${D}/${base_libdir}/
152 mv ${D}${libdir}/libcrypto* ${D}${base_libdir}/
153 sed -i s#libdir=\$\{exec_prefix\}\/lib#libdir=${base_libdir}# ${D}/${libdir}/pkgconfig/libcrypto.pc
154 fi
155
156 install -d ${D}${includedir}
157 cp --dereference -R include/openssl ${D}${includedir}
158
159 oe_multilib_header openssl/opensslconf.h
160 if [ "${@base_contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" = "perl" ]; then
161 install -m 0755 ${S}/tools/c_rehash ${D}${bindir}
162 sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${bindir}/c_rehash
163 sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl
164 sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/tsget
165 # The c_rehash utility isn't installed by the normal installation process.
166 else
167 rm -f ${D}${bindir}/c_rehash
168 rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget
169 fi
170}
171
172BBCLASSEXTEND = "native nativesdk"
173