Skip to contentSkip to conversation

Fix a libx11 compose data dependency issue

PATCH New [email protected] 1 participant 3 messages Jul 26, 2019

lore
Share & tools
lore
#0 lore raw

v3 cover Fix a libx11 compose data dependency issue

From: Ming Liu <[email protected]>

Changes in V3:
- As suggested by Ross Burton, introduce a new recipe libx11-compose-data, it would be depended by libxkbcommon in the case when x11 is not in DISTRO_FEATURES.

Ming Liu (2):
libx11-compose-data: add recipe
libxkbcommon: RDEPENDS on libx11 compose data

 .../0001-Drop-x11-dependencies.patch               | 86 ++++++++++++++++++++++
 .../xorg-lib/libx11-compose-data_1.6.7.bb          | 35 +++++++++
 .../xorg-lib/libxkbcommon_0.8.4.bb                 |  4 +
 3 files changed, 125 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-lib/libx11-compose-data/0001-Drop-x11-dependencies.patch
 create mode 100644 meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.7.bb
Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 1/2 libx11-compose-data: add recipe

From: Ming Liu <[email protected]>

So far libx11 compose data is being required by some non-X11 recipes, like weston -> libxkbcommon -> libx11-locale. But the libx11-locale could not build without x11 distro feature enabled. This is not reasonable.

To fix it, we introduce this new recipe, it uses the same source with libx11 but dropped X11 dependencies, this makes it to be able to build without x11 distro feature. It would be skipped if x11 distro feature is enabled, in which case the libx11-locale would provide the libx11 compose data.

---
 .../0001-Drop-x11-dependencies.patch               | 86 ++++++++++++++++++++++
 .../xorg-lib/libx11-compose-data_1.6.7.bb          | 35 +++++++++
 2 files changed, 121 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-lib/libx11-compose-data/0001-Drop-x11-dependencies.patch
 create mode 100644 meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.7.bb
meta/recipes-graphics/xorg-lib/libx11-compose-data/0001-Drop-x11-dependencies.patch new file +86 -0
new file mode 100644
index 0000000..fbd9684
@@ -0,0 +1,86 @@
+From a60f5058136aeadceebfccadf606d8210f8d3ca6 Mon Sep 17 00:00:00 2001
+From: Ming Liu <[email protected]>
+Date: Sun, 5 May 2019 11:55:14 +0200
+Subject: [PATCH] Drop x11 dependencies
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Ming Liu <[email protected]>
+---
+ configure.ac | 44 --------------------------------------------
+ 1 file changed, 44 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3090845..d14063f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -66,27 +66,8 @@ fi
+ AC_SUBST(LDFLAGS_FOR_BUILD)
+ 
+ # Checks for pkg-config packages
+-
+-# Always required
+-X11_REQUIRES='xproto >= 7.0.17 xextproto xtrans xcb >= 1.11.1'
+-X11_EXTRA_DEPS="xcb >= 1.11.1"
+-
+ PKG_PROG_PKG_CONFIG()
+ 
+-AC_SUBST(X11_EXTRA_DEPS)
+-
+-# Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro
+-# was not expanded, since libX11 with no transport types is rather useless.
+-#
+-# If you're seeing an error here, be sure you installed the lib/xtrans module
+-# first and if it's not in the default location, that you set the ACLOCAL
+-# environment variable to find it, such as:
+-#	ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
+-m4_pattern_forbid([^XTRANS_CONNECTION_FLAGS$])
+-
+-# Transport selection macro from xtrans.m4
+-XTRANS_CONNECTION_FLAGS
+-
+ # Check for dlopen
+ AC_MSG_CHECKING([if run-time linking is supported])
+ AC_SEARCH_LIBS(dlopen,[dl svld])
+@@ -226,30 +207,6 @@ AC_SUBST(XTHREAD_CFLAGS)
+ 
+ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
+ 
+-#
+-# Find keysymdef.h
+-#
+-AC_MSG_CHECKING([keysym definitions])
+-AC_ARG_WITH([keysymdefdir],
+-        [AC_HELP_STRING([--with-keysymdefdir=DIR], [The location of keysymdef.h (defaults to xproto include dir)])],
+-        [KEYSYMDEFDIR=$withval],
+-        [KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11])
+-
+-if test ! -d "$KEYSYMDEFDIR"; then
+-	AC_MSG_ERROR([$KEYSYMDEFDIR doesn't exist or isn't a directory])
+-fi
+-
+-FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h"
+-for i in $FILES; do
+-    if test -f "$KEYSYMDEFDIR/$i"; then
+-            KEYSYMDEFS="$KEYSYMDEFS $KEYSYMDEFDIR/$i"
+-    elif test "x$i" = "xkeysymdef.h"; then
+-	    AC_MSG_ERROR([Cannot find keysymdef.h])
+-    fi
+-done
+-AC_MSG_RESULT([$KEYSYMDEFS])
+-AC_SUBST(KEYSYMDEFS)
+-
+ AC_ARG_ENABLE(xcms,
+               AS_HELP_STRING([--disable-xcms],
+                 [Disable Xlib support for CMS *EXPERIMENTAL*]),
+@@ -329,7 +286,6 @@ X11_LIBDIR="${libdir}/X11"
+ AX_DEFINE_DIR(X11_LIBDIR, X11_LIBDIR, [Location of libX11 library data])
+ AC_SUBST(X11_LIBDIR)
+ 
+-PKG_CHECK_MODULES(X11, [$X11_REQUIRES])
+ X11_CFLAGS="$X11_CFLAGS $XTHREAD_CFLAGS"
+ 
+ #
+-- 
+2.7.4
+
meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.7.bb new file +35 -0
new file mode 100644
index 0000000..9dace70
@@ -0,0 +1,35 @@
+SUMMARY = "Xlib: Compose data files for libx11"
+DESCRIPTION = "This package provides the compose data files for libx11."
+
+python () {
+    if bb.utils.contains('DISTRO_FEATURES', 'x11', True, False, d):
+        raise bb.parse.SkipRecipe("libx11-compose-data is incompatible with x11 distro feature, use libx11 instead.")
+}
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT & MIT-style & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=172255dee66bb0151435b2d5d709fcf7"
+
+SRC_URI[md5sum] = "034fdd6cc5393974d88aec6f5bc96162"
+SRC_URI[sha256sum] = "910e9e30efba4ad3672ca277741c2728aebffa7bc526f04dcfa74df2e52a1348"
+
+SRC_URI += "file://0001-Drop-x11-dependencies.patch"
+
+XORG_PN = "libX11"
+
+EXTRA_OECONF += "--disable-xkb"
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${datadir}/X11/locale ${libdir}/X11/locale"
+
+do_compile() {
+    oe_runmake -C nls
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D} -C nls install
+}
+
+REQUIRED_DISTRO_FEATURES = ""
Signature · 1 line
2.7.4
#2 lore raw

PATCH v3 2/2 libxkbcommon: RDEPENDS on libx11 compose data

In reply to [email protected]

From: Ming Liu <[email protected]>

This fixes a following runtime error:
| xkbcommon: ERROR: couldn't find a Compose file for locale "C"

---
 meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.4.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.4.bb +4 -0
index 8fcae12..0608fd5 100644
@@ -20,3 +20,7 @@ EXTRA_OECONF = "--disable-docs"
 
 PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
 PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb xkeyboard-config,"
+
+# Fix a following runtime error:
+# xkbcommon: ERROR: couldn't find a Compose file for locale "C"
+RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libx11-locale', 'libx11-compose-data', d)}"
Signature · 1 line
2.7.4