[oe-commits] Jackie Huang : libinput: add configure arg and PACKAGECONFIG for libunwind

git at git.openembedded.org git at git.openembedded.org
Mon Aug 10 19:41:18 UTC 2015


Module: openembedded-core.git
Branch: master
Commit: 3ffbceb4394a54c4b02fa66525b2a00832d4e7f1
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3ffbceb4394a54c4b02fa66525b2a00832d4e7f1

Author: Jackie Huang <jackie.huang at windriver.com>
Date:   Wed Aug  5 12:19:00 2015 +0800

libinput: add configure arg and PACKAGECONFIG for libunwind

libinput uses pkg-config to check and decide whether to build
with libunwind, which causes undeterministic builds or error:

| tmp/work/core2-64-wrs-linux/libinput/0.18.0-r0/libinput-0.18.0/test/litest.c:77:23:
| fatal error: libunwind.h: No such file or directory

So add configure arg and PACKAGECONFIG for libunwind to make
deterministic build, but libunwind is disabled by default.

Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 ...input-configure.ac-add-arg-with-libunwind.patch | 50 ++++++++++++++++++++++
 meta/recipes-graphics/wayland/libinput_0.18.0.bb   |  7 ++-
 2 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/libinput/libinput-configure.ac-add-arg-with-libunwind.patch b/meta/recipes-graphics/wayland/libinput/libinput-configure.ac-add-arg-with-libunwind.patch
new file mode 100644
index 0000000..df5ebcc
--- /dev/null
+++ b/meta/recipes-graphics/wayland/libinput/libinput-configure.ac-add-arg-with-libunwind.patch
@@ -0,0 +1,50 @@
+From cc6fce587f2628c8b342764e06fb0fc27c1e8274 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang at windriver.com>
+Date: Mon, 3 Aug 2015 20:33:44 -0700
+Subject: [PATCH] configure.ac: add arg --with-libunwind
+
+Add arg --with-libunwind for configure so it's optional to check
+libunwind, which is helpfull to make deterministic builds.
+
+Upstream-Status: Submitted [wayland-devel]
+
+Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
+---
+ configure.ac | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 314b0d4..242d251 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -60,13 +60,22 @@ PKG_PROG_PKG_CONFIG()
+ PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0])
+ PKG_CHECK_MODULES(LIBUDEV, [libudev])
+ PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
+-PKG_CHECK_MODULES(LIBUNWIND,
++
++AC_ARG_WITH(libunwind,
++            AS_HELP_STRING([--without-libunwind],[Do not use libunwind]))
++
++AS_IF([test "x$with_libunwind" != "xno"],
++	[PKG_CHECK_MODULES(LIBUNWIND,
+ 		  [libunwind],
+ 		  [HAVE_LIBUNWIND=yes],
+-		  [HAVE_LIBUNWIND=no])
+-if test "x$HAVE_LIBUNWIND" = "xyes"; then
+-	AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
+-fi
++		  [HAVE_LIBUNWIND=no])],
++	[HAVE_LIBUNWIND=no])
++
++AS_IF([test "x$HAVE_LIBUNWIND" = "xyes"],
++	[AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])],
++	[AS_IF([test "x$with_libunwind" = "xyes"],
++		[AC_MSG_ERROR([libunwind requested but not found])])])
++
+ AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$HAVE_LIBUNWIND" = xyes])
+ AC_PATH_PROG(ADDR2LINE, [addr2line])
+ if test "x$ADDR2LINE" != "x"; then
+-- 
+2.3.5
+
diff --git a/meta/recipes-graphics/wayland/libinput_0.18.0.bb b/meta/recipes-graphics/wayland/libinput_0.18.0.bb
index 0fe1c6c..8e8e6a7 100644
--- a/meta/recipes-graphics/wayland/libinput_0.18.0.bb
+++ b/meta/recipes-graphics/wayland/libinput_0.18.0.bb
@@ -7,11 +7,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
 
 DEPENDS = "libevdev udev mtdev"
 
-SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz"
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
+           file://libinput-configure.ac-add-arg-with-libunwind.patch \
+"
 SRC_URI[md5sum] = "0ddbb0d53d58dec0a86de6791560011a"
 SRC_URI[sha256sum] = "64a70f96bab17a22eaf2fd7af17cf83def3388374096c7623be9448f62808cda"
 
 inherit autotools pkgconfig
 
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
+
 FILES_${PN} += "${libdir}/udev/"
 FILES_${PN}-dbg += "${libdir}/udev/.debug"



More information about the Openembedded-commits mailing list