I am trying to write a recipe and it does work well with my patch, but when I add my recipe "inherit native
" it just simple passes my patch without applying it.
Firstly, I wanted to upgrade one base recipe changing its file name to 2.8.33 ( this method generally works for other recipes ). I encountered an error on compile and after I found error, I made a patch and added it to recipe. when I delete native related lines from recipe it successfully compiled. I checked code from work directory I see that my patch applied. But for native compile, I cannot see that my patch applied to extracted code.
gsoap_2.8.33.inc:
DESCRIPTION = "The gSOAP toolkit provides a unique SOAP-to-C/C++ language binding \
for the development of SOAP Web Services and clients."
SECTION = "devel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f195e609151c013dcfce95528e2d4c63"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}2/${BPN}_${PV}.zip"
SRC_URI[md5sum] = "43dade7839252500f7671f8fe6a3739c"
SRC_URI[sha256sum] = "8534a8bb82ce97544bbb60bf4410ef66f9c328abf62879e499272894019199a4"
inherit autotools
PR = "r1"
S = "${WORKDIR}/gsoap-2.8"
FILES_${PN}-dev = "${includedir}"
RRECOMMENDS_${PN}-dev = "${PN}-staticdev"
FILES_${PN}-staticdev = "${libdir}"
EXTRA_OECONF_append =" --enable-ipv6 "
EXTRA_OEMAKE = "SOAP=${STAGING_BINDIR_NATIVE}/soapcpp2"
PARALLEL_MAKE = ""
gsoap-native_2.8.33.bb (does not work and does not patch):
inherit native
require gsoap_${PV}.inc
FILESEXTRAPATHS_append := "${THISDIR}/:"
SRC_URI += "file://conf.patch"
PARALLEL_MAKE = ""
DEPENDS = ""
EXTRA_OEMAKE = ""
do_patch_append() {
d.setVar("TEXT", "Hello World")
print d.getVar("TEXT", True)
}
do_install() {
oe_runmake DESTDIR=${D} BINDIR=${D}${bindir} install
}
gsoap_2.8.33.bb (works and does patch when gsoap-native dependency removed):
require gsoap_${PV}.inc
DEPENDS = "gsoap-native openssl zlib flex bison"
FILESEXTRAPATHS_append := "${THISDIR}/:"
SRC_URI += "file://conf.patch"
do_install_append() {
install -d ${D}${libdir}
for lib in libgsoapssl libgsoapssl++ libgsoap libgsoapck++ libgsoap++ libgsoapck
do
oe_libinstall -C gsoap $lib ${D}${libdir}
done
}
FILES_${PN} = "${bindir}/wsdl2h ${bindir}/soapcpp2"
FILES_${PN} += "${datadir}"
my patch:
diff --git a/configure b/configure
index a3fade3..8708cad 100755
--- a/configure
+++ b/configure
@@ -6196,7 +6196,7 @@ $as_echo "no" >&6; }
WSDL2H_EXTRA_FLAGS="-DWITH_OPENSSL -DWITH_GZIP"
# an ugly hack to get httpda and smdevp plugins to conditionally
# compile with wsdl2h when OPENSSL is available
- WSDL2H_EXTRA_LIBS="${WSDL2H_EXTRA_LIBS} ../plugin/httpda.c ../plugin/smdevp.c ../plugin/threads.c -lssl -lcrypto -lz"
+ #WSDL2H_EXTRA_LIBS="${WSDL2H_EXTRA_LIBS} ../plugin/httpda.c ../plugin/smdevp.c ../plugin/threads.c -lssl -lcrypto -lz"
SAMPLE_INCLUDES=
SAMPLE_SSL_LIBS="-lssl -lcrypto -lz"
WSDL2H_SOAP_CPP_LIB="libgsoapssl++.a"
How can I make my recipe 'bitbake'd for cross-compile using my patch?
You're still not explaining what exactly fails and how you've checked that... I tested your gsoap-native recipe and after removing the broken do_patch_append() function it patches fine: after
bitbake -c patch gsoap-native
I can see the patched source in the gsoap-native work directory.Some notes:
autoreconf
) -- maybe this is why you think the patching is not happening. Modify configure.ac instead.