aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-netkit/netkit-rwho
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-03-29 17:04:03 -0700
committerKhem Raj <raj.khem@gmail.com>2020-03-29 17:32:21 -0700
commit4d01b009bb08a23f4eea64fcef329c321fbcf04e (patch)
treebeac6b4f3488cf5272142c296d4959678f385fcd /meta-networking/recipes-netkit/netkit-rwho
parent1ba4d9baa9ad621df79265022f8d60e2d72bd0c7 (diff)
downloadmeta-openembedded-contrib-4d01b009bb08a23f4eea64fcef329c321fbcf04e.tar.gz
netkit-rwho: Add logic to apply patches from tarball
This recipe fetches from debian archives, therefore we need logic to apply the patches which are part of tarball Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-netkit/netkit-rwho')
-rw-r--r--meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb34
1 files changed, 29 insertions, 5 deletions
diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
index 60a8d95b06..ad543b0fbd 100644
--- a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
+++ b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb
@@ -5,7 +5,7 @@ LICENSE = "BSD-4-Clause"
LIC_FILES_CHKSUM = "file://rwho/rwho.c;beginline=2;endline=3;md5=5a85f13c0142d72fc378e00f15da5b9e"
SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}.orig.tar.gz;name=archive \
- ${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}-13.debian.tar.gz;name=patch13 \
+ ${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}-13.debian.tar.gz;subdir=${BP};name=patch13 \
file://rwhod \
file://rwhod.default \
file://0001-Add-missing-include-path-to-I-options.patch \
@@ -20,13 +20,37 @@ inherit autotools-brokensep useradd update-rc.d update-alternatives
CFLAGS += " -D_GNU_SOURCE"
-debian_do_patch() {
- cd ${S}
- while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line; done < ${WORKDIR}/debian/patches/series
+# Unlike other Debian packages, net-tools *.diff.gz contains another series of
+# patches maintained by quilt. So manually apply them before applying other local
+# patches. Also remove all temp files before leaving, because do_patch() will pop
+# up all previously applied patches in the start
+do_patch[depends] += "quilt-native:do_populate_sysroot"
+netkit_do_patch() {
+ cd ${S}
+ # it's important that we only pop the existing patches when they've
+ # been applied, otherwise quilt will climb the directory tree
+ # and reverse out some completely different set of patches
+ if [ -d ${S}/patches ]; then
+ # whilst this is the default directory, doing it like this
+ # defeats the directory climbing that quilt will otherwise
+ # do; note the directory must exist to defeat this, hence
+ # the test inside which we operate
+ QUILT_PATCHES=${S}/patches quilt pop -a
+ fi
+ if [ -d ${S}/.pc-${BPN} ]; then
+ rm -rf ${S}/.pc
+ mv ${S}/.pc-${BPN} ${S}/.pc
+ QUILT_PATCHES=${S}/debian/patches quilt pop -a
+ rm -rf ${S}/.pc ${S}/debian
+ fi
+ QUILT_PATCHES=${S}/debian/patches quilt push -a
+ mv ${S}/.pc ${S}/.pc-${BPN}
}
+do_unpack[cleandirs] += "${S}"
+
python do_patch() {
- bb.build.exec_func('debian_do_patch', d)
+ bb.build.exec_func('netkit_do_patch', d)
bb.build.exec_func('patch_do_patch', d)
}