summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/wayland
diff options
context:
space:
mode:
authorJoshua Lock <joshua.lock@collabora.co.uk>2015-10-20 10:33:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-16 11:39:29 +0000
commit2c5047f498bc1729571566bb04b9ea90d20213c2 (patch)
tree96675ff493e70a5cacc6cdb11b3a87739ed5275f /meta/recipes-graphics/wayland
parent65ffeb5c8fd180c336d49d714c312de4fdaf5fa0 (diff)
downloadpoky-2c5047f498bc1729571566bb04b9ea90d20213c2.tar.gz
weston: add PACKAGECONFIG to build with systemd-login support
Automatically enable this support for distributions which have systemd in DISTRO_FEATURES. We add additional patches to weston, backported from Weston git, to support the newer single libsystemd pkg-config file and to make the enabling of systemd-login support explicit. (From OE-Core rev: f51ba9a89ee8cede03b5b7834579fd63fa483267) Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/wayland')
-rw-r--r--meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch70
-rw-r--r--meta/recipes-graphics/wayland/weston/libsystemd.patch53
-rw-r--r--meta/recipes-graphics/wayland/weston_1.8.0.bb5
3 files changed, 128 insertions, 0 deletions
diff --git a/meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch b/meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch
new file mode 100644
index 0000000000..a40eaf186e
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch
@@ -0,0 +1,70 @@
1From 8e1efcd40b3bad81c83744e2e120d70c2b567ef2 Mon Sep 17 00:00:00 2001
2From: Frederico Cadete <frederico@cadete.eu>
3Date: Mon, 28 Sep 2015 00:30:10 +0200
4Subject: configure.ac: add explicit enable/disable for systemd-login support
5
6Otherwise, auto-enable depending on whether the system has the necessary
7libraries.
8
9[Updated help text as per pq suggestion -- bwh]
10
11Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
12Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
13Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
14
15Upstream-Status: Backport
16Backported from Weston git:
17http://cgit.freedesktop.org/wayland/weston/commit/?id=8e1efc
18
19Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
20
21diff --git a/configure.ac b/configure.ac
22index a9cd429..67e80d0 100644
23--- a/configure.ac
24+++ b/configure.ac
25@@ -380,18 +380,30 @@ AC_ARG_ENABLE(resize-optimization,
26 AS_IF([test "x$enable_resize_optimization" = "xyes"],
27 [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
28
29-PKG_CHECK_MODULES(SYSTEMD_LOGIN,
30- [libsystemd >= 209],
31- [have_systemd_login_209=yes;have_systemd_login=yes],
32- [have_systemd_login_209=no;have_systemd_login=no])
33-
34-# Older versions of systemd package systemd-login separately. Fall back on that
35-AS_IF([test x$have_systemd_login != xyes],[
36- PKG_CHECK_MODULES(SYSTEMD_LOGIN,
37- [libsystemd-login >= 198],
38- [have_systemd_login=yes],
39- [have_systemd_login=no])
40- ])
41+AC_ARG_ENABLE(systemd-login,
42+ AS_HELP_STRING([--enable-systemd-login],
43+ [Enable logind support]),,
44+ enable_systemd_login=auto)
45+if test x$enable_systemd_login != xno; then
46+ PKG_CHECK_MODULES(SYSTEMD_LOGIN,
47+ [libsystemd >= 209],
48+ [have_systemd_login_209=yes;have_systemd_login=yes],
49+ [have_systemd_login_209=no;have_systemd_login=no])
50+
51+ # Older versions of systemd package systemd-login separately. Fall back on that
52+ AS_IF([test x$have_systemd_login != xyes],[
53+ PKG_CHECK_MODULES(SYSTEMD_LOGIN,
54+ [libsystemd-login >= 198],
55+ [have_systemd_login=yes],
56+ [have_systemd_login=no])
57+ ])
58+else
59+ have_systemd_login=no
60+fi
61+
62+if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; then
63+ AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find libsystemd>=209 or libsystemd-login])
64+fi
65
66 AS_IF([test "x$have_systemd_login" = "xyes"],
67 [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
68--
69cgit v0.10.2
70
diff --git a/meta/recipes-graphics/wayland/weston/libsystemd.patch b/meta/recipes-graphics/wayland/weston/libsystemd.patch
new file mode 100644
index 0000000000..2d28d5689a
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/libsystemd.patch
@@ -0,0 +1,53 @@
1From 5eb025a867b42f8bc7bc73279eac8de58e51a13e Mon Sep 17 00:00:00 2001
2From: Frederico Cadete <frederico@cadete.eu>
3Date: Mon, 28 Sep 2015 00:30:09 +0200
4Subject: configure.ac: add support for new versions of systemd
5
6Starting from systemd version 209, a single libsystemd.pc is provided.
7For previous versions, fall back on libsystemd-login.pc.
8
9Signed-off-by: Frederico Cadete <frederico@cadete.eu>
10Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
11Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
12
13Upstream-Status: Backport
14Backported from Weston git:
15http://cgit.freedesktop.org/wayland/weston/commit/?id=5eb025
16
17Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
18
19diff --git a/configure.ac b/configure.ac
20index 045291c..a9cd429 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -380,14 +380,23 @@ AC_ARG_ENABLE(resize-optimization,
24 AS_IF([test "x$enable_resize_optimization" = "xyes"],
25 [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
26
27-PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login >= 198],
28- [have_systemd_login=yes], [have_systemd_login=no])
29+PKG_CHECK_MODULES(SYSTEMD_LOGIN,
30+ [libsystemd >= 209],
31+ [have_systemd_login_209=yes;have_systemd_login=yes],
32+ [have_systemd_login_209=no;have_systemd_login=no])
33+
34+# Older versions of systemd package systemd-login separately. Fall back on that
35+AS_IF([test x$have_systemd_login != xyes],[
36+ PKG_CHECK_MODULES(SYSTEMD_LOGIN,
37+ [libsystemd-login >= 198],
38+ [have_systemd_login=yes],
39+ [have_systemd_login=no])
40+ ])
41+
42 AS_IF([test "x$have_systemd_login" = "xyes"],
43 [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
44 AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
45
46-PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209],
47- [have_systemd_login_209=yes], [have_systemd_login_209=no])
48 AS_IF([test "x$have_systemd_login_209" = "xyes"],
49 [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
50
51--
52cgit v0.10.2
53
diff --git a/meta/recipes-graphics/wayland/weston_1.8.0.bb b/meta/recipes-graphics/wayland/weston_1.8.0.bb
index 95cf4956da..6234a8c6f5 100644
--- a/meta/recipes-graphics/wayland/weston_1.8.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.8.0.bb
@@ -12,6 +12,8 @@ SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
12 file://make-libwebp-explicitly-configurable.patch \ 12 file://make-libwebp-explicitly-configurable.patch \
13 file://0001-make-error-portable.patch \ 13 file://0001-make-error-portable.patch \
14 file://parallelmake.patch \ 14 file://parallelmake.patch \
15 file://libsystemd.patch \
16 file://explicit-enable-disable-systemd.patch \
15" 17"
16SRC_URI[md5sum] = "24cb8a7ed0535b4fc3642643988dab36" 18SRC_URI[md5sum] = "24cb8a7ed0535b4fc3642643988dab36"
17SRC_URI[sha256sum] = "8963e69f328e815cec42c58046c4af721476c7541bb7d9edc71740fada5ad312" 19SRC_URI[sha256sum] = "8963e69f328e815cec42c58046c4af721476c7541bb7d9edc71740fada5ad312"
@@ -41,6 +43,7 @@ EXTRA_OECONF_append_qemux86-64 = "\
41PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ 43PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
42 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ 44 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
43 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \ 45 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
46 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
44 " 47 "
45# 48#
46# Compositor choices 49# Compositor choices
@@ -69,6 +72,8 @@ PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
69PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" 72PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
70# Weston with unwinding support 73# Weston with unwinding support
71PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind" 74PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
75# Weston with systemd-login support
76PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
72 77
73do_install_append() { 78do_install_append() {
74 # Weston doesn't need the .la files to load modules, so wipe them 79 # Weston doesn't need the .la files to load modules, so wipe them