openssl: Move libcrypto to base_libdir
authorAndrei Gherzan <andrei@gherzan.ro>
Tue, 21 Feb 2012 23:03:55 +0000 (01:03 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 23 Feb 2012 23:59:39 +0000 (23:59 +0000)
This fix is for dhclient. It needs libcrypto at runtime and if
libcrypto is in libdir, it's path can be inaccessible on systems
where /usr is on nfs for example or dhclient is needed before
/usr is mounted.

(From OE-Core rev: 01ea85f7f6c53c66c76d6f832518b28bf06ec072)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
[Fix comment to from /usr -> /lib - sgw]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/openssl/openssl.inc
meta/recipes-connectivity/openssl/openssl_1.0.0g.bb

index 771f146..089b9a4 100644 (file)
@@ -36,10 +36,11 @@ export AS = "${CC} -c"
 inherit pkgconfig siteinfo
 
 PACKAGES =+ "libcrypto libssl ${PN}-misc"
-FILES_libcrypto = "${libdir}/libcrypto.so.*"
+FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}"
 FILES_libssl = "${libdir}/libssl.so.*"
 FILES_${PN} =+ " ${libdir}/ssl/*"
 FILES_${PN}-misc = "${libdir}/ssl/misc ${libdir}/ssl/openssl.cnf"
+FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
 
 do_configure_prepend_darwin () {
        sed -i -e '/version-script=openssl\.ld/d' Configure
@@ -132,6 +133,13 @@ do_install () {
        oe_libinstall -so libcrypto ${D}${libdir}
        oe_libinstall -so libssl ${D}${libdir}
 
+       # Moving libcrypto to /lib
+       if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+               mkdir -p ${D}/${base_libdir}/
+               mv ${D}${libdir}/libcrypto* ${D}${base_libdir}/
+               sed -i s#libdir=\$\{exec_prefix\}\/lib#libdir=${base_libdir}# ${D}/${libdir}/pkgconfig/libcrypto.pc
+       fi
+
        install -d ${D}${includedir}
        cp --dereference -R include/openssl ${D}${includedir}
        sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl
index 80dfcb3..8ffe931 100644 (file)
@@ -6,7 +6,7 @@ DEPENDS += "ocf-linux"
 
 CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8"