[oe-commits] [meta-openembedded] 01/04: miniupnpd: Fix cross compile on OE

git at git.openembedded.org git at git.openembedded.org
Sun Dec 23 06:39:00 UTC 2018


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit a599e3ef17f1a5235f13c35887bc167e7c70d30d
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Sat Dec 22 19:20:14 2018 -0800

    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 <raj.khem at gmail.com>
---
 .../0001-Add-OpenEmbedded-cross-compile-case.patch | 40 ++++++++++++++++++++++
 .../miniupnpd/miniupnpd_2.1.20180706.bb            |  8 ++++-
 2 files changed, 47 insertions(+), 1 deletion(-)

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 0000000..cd4291d
--- /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 <raj.khem at gmail.com>
+Date: Sat, 22 Dec 2018 18:47:45 -0800
+Subject: [PATCH] Add OpenEmbedded cross compile case
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ 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 d5d9bcf..ff40daa 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list