[oe] [meta-networking][PATCH] netcat-openbsd: fixup patching

Dan McGregor danismostlikely at gmail.com
Mon May 12 16:30:46 UTC 2014


From: Dan McGregor <dan.mcgregor at usask.ca>

Do the patching in the do_patch phase instead of the compile
phase. That way if the compile phase needs to be rerun
patching isn't attempted a second time.

Signed-off-by: Dan McGregor <dan.mcgregor at usask.ca>
---
 .../recipes-support/netcat/netcat-openbsd_1.105.bb            | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
index 4474e1d..4489656 100644
--- a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
+++ b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
@@ -15,11 +15,20 @@ SRC_URI[netcat-patch.sha256sum] =
"eee759327ffea293e81d0dde67921b7fcfcad279ffd7a

 S = "${WORKDIR}/${BPN}-${PV}"

+netcat_do_patch() {
+    cd ${S}
+    while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line;
done < ${WORKDIR}/debian/patches/series
+}
+
+python do_patch() {
+    bb.build.exec_func('netcat_do_patch', d)
+    bb.build.exec_func('patch_do_patch', d)
+}
+
 do_configure[noexec] = "1"

 do_compile() {
     cd ${S}
-    while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line;
done < ${WORKDIR}/debian/patches/series
     pkgrel=4
     oe_runmake CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgrel}\\\"\""
 }
-- 
1.9.0



More information about the Openembedded-devel mailing list