From 55f2541bf6279a3aa14eb1597e3a4bf844c7b00f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 22 Dec 2018 19:20:14 -0800 Subject: miniupnpd: Fix cross compile on OE genconfig script can be specified OS specs if its not then it pokes at the build system via uname, we add code for OE support to ensure we pass DISTRO_VERSION as OS_VERSION Signed-off-by: Khem Raj --- .../0001-Add-OpenEmbedded-cross-compile-case.patch | 40 ++++++++++++++++++++++ .../miniupnpd/miniupnpd_2.1.20180706.bb | 8 ++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch diff --git a/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch b/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch new file mode 100644 index 0000000000..cd4291d91b --- /dev/null +++ b/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch @@ -0,0 +1,40 @@ +From 54698856e5602bbd9d61e855814c854a013b4840 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 22 Dec 2018 18:47:45 -0800 +Subject: [PATCH] Add OpenEmbedded cross compile case + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + genconfig.sh | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/genconfig.sh b/genconfig.sh +index dc42462..59922e9 100755 +--- a/genconfig.sh ++++ b/genconfig.sh +@@ -98,6 +98,12 @@ if [ -f ../shared/tomato_version ]; then + OS_VERSION="Tomato $TOMATO_VER" + fi + ++# OpenEmbedded special case ++if [ -f ./os.openembedded ]; then ++ OS_NAME=OpenEmbedded ++ OS_VERSION=$(cat ./os.openembedded) ++fi ++ + ${RM} ${CONFIGFILE} + + echo "/* MiniUPnP Project" >> ${CONFIGFILE} +@@ -318,6 +324,11 @@ case $OS_NAME in + echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE} + FW=netfilter + ;; ++ OpenEmbedded) ++ OS_URL=http://www.openembedded.org/ ++ echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE} ++ FW=netfilter ++ ;; + AstLinux) + OS_URL=http://www.astlinux.org/ + echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE} diff --git a/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20180706.bb b/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20180706.bb index d5d9bcf64a..ff40daaac9 100644 --- a/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20180706.bb +++ b/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20180706.bb @@ -12,12 +12,18 @@ inherit autotools gettext pkgconfig systemd DEPENDS += "iptables net-tools util-linux libmnl libnetfilter-conntrack" SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${P}.tar.gz;downloadfilename=${P}.tar.gz \ - file://miniupnpd.service" + file://miniupnpd.service \ + file://0001-Add-OpenEmbedded-cross-compile-case.patch \ + " SRC_URI[md5sum] = "a84b3647c871802abeccfc2771e8db21" SRC_URI[sha256sum] = "fc2d2fd044d8c3f8d02b63d70489bb35ece836a4fc1b6386865ac8fbe8d8b006" IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}" +do_configure_prepend() { + echo "${@d.getVar('DISTRO_VERSION')}" > ${S}/os.openembedded +} + do_compile() { cd ${S} CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux -- cgit 1.2.3-korg