From 3fdd6fdae1df3223d4d748dbcf609c27a79b8f9d Mon Sep 17 00:00:00 2001 From: Rahul Kumar Gupta Date: Wed, 3 Aug 2016 15:59:53 +0800 Subject: meta-isg: openssl-qat: fix for patch error openssl-qat is different from other packages in the way that it has a patch present in a zip file that is unpacked and applied on top of openssl. This results in patch errors when doing an incremental build using bitbake. To resolve, splitted do_patch into two - one to unpack the qat patch and apply it on openssl. And, other to apply the patches added in SRC_URI. Signed-off-by: Rahul Kumar Gupta Signed-off-by: Tom Zanussi --- .../recipes-extended/openssl-qat/openssl-qat.inc | 37 +++++++++++++++------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc b/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc index 8f6be090..1b3e0c17 100644 --- a/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc +++ b/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc @@ -44,22 +44,35 @@ export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}" S = "${WORKDIR}/git" -do_unpack2() { - cd ${WORKDIR}/openssl_qat-${PV} - cd libcrypto_shim_${PV}_* - tar -zxof libCrypto_Shim_${PV}.tar.gz - tar -zxof libcrypto-openssl-${OPENSSL_VERSION}-qat.L.${PV}.tar.gz - mv openssl-${OPENSSL_VERSION}-qat.patch ${WORKDIR} -} - -addtask unpack2 after do_unpack before do_patch_prepend +opensslqat_do_patch() { + cd ${WORKDIR}/openssl_qat-${PV} + cd libcrypto_shim_${PV}_* + tar -zxof libCrypto_Shim_${PV}.tar.gz + tar -zxof libcrypto-openssl-${OPENSSL_VERSION}-qat.L.${PV}.tar.gz + mv openssl-${OPENSSL_VERSION}-qat.patch ${WORKDIR} -do_prepatch() { cd ${S} - patch -p1 < ${WORKDIR}/openssl-${OPENSSL_VERSION}-qat.patch + if [ ! -d ${S}/debian/patches ]; then + mkdir -p ${S}/debian/patches + cp -f ${WORKDIR}/openssl-${OPENSSL_VERSION}-qat.patch ${S}/debian/patches + echo "openssl-${OPENSSL_VERSION}-qat.patch -p1" > ${S}/debian/patches/series + fi + quilt pop -a || true + if [ -d ${S}/.pc-opensslqat ]; then + rm -rf ${S}/.pc + mv ${S}/.pc-opensslqat ${S}/.pc + QUILT_PATCHES=${S}/debian/patches quilt pop -a + rm -rf ${S}/.pc + fi + QUILT_PATCHES=${S}/debian/patches quilt push -a + mv ${S}/.pc ${S}/.pc-opensslqat } -addtask prepatch after do_unpack2 before do_patch +# We invoke base do_patch at end, to incorporate any local patch +python do_patch() { + bb.build.exec_func('opensslqat_do_patch', d) + bb.build.exec_func('patch_do_patch', d) +} do_configure () { os=linux -- cgit v1.2.3-54-g00ecf