[oe-commits] [meta-openembedded] 77/82: ledmon: upgrade to 0.93

git at git.openembedded.org git at git.openembedded.org
Sat Nov 2 00:25:07 UTC 2019


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 92de599596f7c20ead9b9a912ef3ee700b2f691b
Author: Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com>
AuthorDate: Fri Nov 1 17:34:50 2019 +0800

    ledmon: upgrade to 0.93
    
    1) inherit autotools as new version use autotools.
    
    2) Add a patch to fix compile error.
       0001-Don-t-build-with-Werror-to-fix-compile-error.patch
    
    3) Modify do_install_append() function to fix do_package error as follows:
       ledmon-git-r0 do_package: SYSTEMD_SERVICE_ledmon value ledmon.service does not exist
    
    4) Add ${S}/config in CFLAGS.
    
    Signed-off-by: Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 ...-t-build-with-Werror-to-fix-compile-error.patch | 29 ++++++++++++++++++++++
 meta-oe/recipes-bsp/ledmon/ledmon_git.bb           | 17 +++++++++----
 2 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch b/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch
new file mode 100644
index 0000000..b65f1a7
--- /dev/null
+++ b/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch
@@ -0,0 +1,29 @@
+Subject: [PATCH] Don't build with -Werror to fix compile error.
+
+|   550 |  _dump_sgpio_amd(&amd_reg->amd);
+|       |                  ^~~~~~~~~~~~~
+| amd_sgpio.c: In function '_write_amd_register':
+| amd_sgpio.c:558:18: error: taking address of packed member of 'struct amd_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
+
+Upstream-Status: Pending
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com>
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7bc20f8..7e01bd5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,7 +22,6 @@ AX_AM_CFLAGS_ADD([-Werror=format-truncation=1])
+ AX_AM_CFLAGS_ADD([-Werror=shift-negative-value])
+ AX_AM_CFLAGS_ADD([-Werror=alloca])
+ AX_AM_CFLAGS_ADD([-Werror=missing-field-initializers])
+-AX_AM_CFLAGS_ADD([-Werror])
+ AX_AM_CFLAGS_ADD([-Werror=format-signedness])
+ 
+ AC_SUBST([AM_CFLAGS])
+-- 
+2.7.4
+
diff --git a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
index 74ae56c..f9ae9aa 100644
--- a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
+++ b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
@@ -11,15 +11,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
 
 DEPENDS = "sg3-utils udev"
 
-inherit systemd
+inherit autotools systemd
 
 SYSTEMD_SERVICE_${PN} = "ledmon.service"
 
+# 0.93
 SRC_URI = "git://github.com/intel/ledmon;branch=master \
            file://0002-include-sys-select.h-and-sys-types.h.patch \
+           file://0001-Don-t-build-with-Werror-to-fix-compile-error.patch \
           "
 
-SRCREV = "ad1304ca1363d727425a1f23703c523e21feae4f"
+SRCREV = "1d72f9cb5c9163b2ecdf19709935720e65f5b90e"
 
 COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
 COMPATIBLE_HOST_libc-musl = "null"
@@ -27,8 +29,13 @@ COMPATIBLE_HOST_libc-musl = "null"
 S = "${WORKDIR}/git"
 EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
 
+# The ledmon sources include headers in ${S}/config to build but not in CFLAGS. 
+# We need to add this include path in CFLAGS.
+CFLAGS += "-I${S}/config"
+
 do_install_append() {
-	install -d ${D}/${systemd_unitdir}/system
-	oe_runmake  DESTDIR=${D}  install
-	oe_runmake  DESTDIR=${D}${systemd_unitdir}/system  install-systemd
+        if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+	        install -d ${D}${systemd_unitdir}/system
+	        install -m 0755 ${S}/systemd/ledmon.service ${D}${systemd_unitdir}/system
+        fi
 }

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


More information about the Openembedded-commits mailing list