package/x11r7/xlib_libX11: drop post patch hooks
PATCH 1/3 package/x11r7/xlib_libX11: drop post patch hooks
From: Adam Duskett <[email protected]>
X11_CFLAGS no longer exists in version 1.6.8 of libX11, making the XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS post patch hook useless.
--- package/x11r7/xlib_libX11/xlib_libX11.mk | 12 ------------ 1 file changed, 12 deletions(-)
package/x11r7/xlib_libX11/xlib_libX11.mk +0 -12
@@ -37,17 +37,5 @@ HOST_XLIB_LIBX11_CONF_OPTS = \ --disable-specs \ --without-perl -# src/util/makekeys is executed at build time to generate ks_tables.h, so -# it should get compiled for the host. The libX11 makefile unfortunately -# doesn't have X11_CFLAGS_FOR_BUILD so this doesn't work. For buildroot, -# we know the X11 includes are in $(HOST_DIR)/include, which are already -# in the CFLAGS_FOR_BUILD, so we can just remove the X11_CFLAGS -define XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS - $(SED) '/X11_CFLAGS/d' $(@D)/src/util/Makefile* -endef - -XLIB_LIBX11_POST_PATCH_HOOKS += XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS -HOST_XLIB_LIBX11_POST_PATCH_HOOKS += XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS - $(eval $(autotools-package)) $(eval $(host-autotools-package))
Signature · 1 line
2.21.0
PATCH 2/3 package/x11r7/xlib_libX11: backport patch to detach makekeys from X headers.
From: Adam Duskett <[email protected]>
From https://gitlab.freedesktop.org/xorg/lib/libx11/commit/0327c427d62f671eced067c6d9b69f4e216a8ca
With 1.6.8, there's no real reason to demand the X
headers be installed for both the build and target machines if cross- compiling.
--- ...ch-ourselves-from-X-headers-entirely.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 package/x11r7/xlib_libX11/0001-makekeys-detach-ourselves-from-X-headers-entirely.patch
package/x11r7/xlib_libX11/0001-makekeys-detach-ourselves-from-X-headers-entirely.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 0327c427d62f671eced067c6d9b69f4e216a8cac Mon Sep 17 00:00:00 2001 +From: Adam Jackson <[email protected]> +Date: Mon, 17 Jun 2019 13:36:08 -0400 +Subject: [PATCH] makekeys: Detach ourselves from X headers entirely + +Subsequent to a121b7b0c210efe10bf93453b29050282324c906 we are no longer +building makekeys with enough -I/foo/bar to find the X11 headers, so if +they're not in a system include path, things fail. Since this utility is +only needed at build time, there's no real reason to demand the X +headers be installed for both the build and target machines if cross- +compiling, we can just assume a vaguely ANSI environment instead. + +Tested-by: Niclas Zeising <[email protected]> +Reviewed-by: Keith Packard <[email protected]> +Reviewed-by: Matt Turner <[email protected]> +Signed-off-by: Adam Duskett <[email protected]> +--- + src/util/makekeys.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/util/makekeys.c b/src/util/makekeys.c +index bcb5b7d5..07563315 100644 +--- a/src/util/makekeys.c ++++ b/src/util/makekeys.c +@@ -35,8 +35,10 @@ from The Open Group. + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <stdint.h> ++#include <inttypes.h> + +-#include "../Xresinternal.h" ++typedef uint32_t Signature; + + #define KTNUM 4000 + +-- +2.21.0 +
Signature · 1 line
2.21.0
PATCH 3/3 package/x11r7/xlib_libX11: Fix reliance on a host static libc.
In reply to aduskett at gmail.comFrom: Adam Duskett <[email protected]>
As per: https://gitlab.freedesktop.org/xorg/lib/libx11/commit/4645e219133458781e3fb48eaea6a74cccb1b9aa
"For Windows targets, libtool uses a wrapper executable, not a wrapper script (see [1]), which it compiles with the host compiler. This doesn't work when cross-compiling."
Because of this change, builds fail on Linux hosts without a static libc, this patch reverts this change as we are guaranteed to build in a Linux environment.
Fixes:
http://autobuild.buildroot.net/results/ac7c777e5fe31b6eda8b8b662881b07299e57ae9
--- .../0002-remove-reliance-on-static-libc.patch | 36 +++++++++++++++++++ package/x11r7/xlib_libX11/xlib_libX11.mk | 1 + 2 files changed, 37 insertions(+) create mode 100644 package/x11r7/xlib_libX11/0002-remove-reliance-on-static-libc.patch
package/x11r7/xlib_libX11/0002-remove-reliance-on-static-libc.patch new file +36 -0
@@ -0,0 +1,36 @@ +From fc3c35853429ac7b4b7a1d91f639b7c3b946e1b6 Mon Sep 17 00:00:00 2001 +From: Adam Duskett <[email protected]> +Date: Mon, 1 Jul 2019 15:26:00 -0400 +Subject: [PATCH] remove reliance on static libc. + +As per commit: https://gitlab.freedesktop.org/xorg/lib/libx11/commit/4645e219133458781e3fb48eaea6a74cccb1b9aa + +"For Windows targets, libtool uses a wrapper executable, not a wrapper +script (see [1]), which it compiles with the host compiler. This +doesn't work when cross-compiling." + +Because of this change, builds fail on Linux hosts without a static libc, this +patch reverts this change. + + +Signed-off-by: Adam Duskett <[email protected]> +--- + src/util/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/util/Makefile.am b/src/util/Makefile.am +index 3731437..a051567 100644 +--- a/src/util/Makefile.am ++++ b/src/util/Makefile.am +@@ -10,7 +10,7 @@ AM_CPPFLAGS = \ + CC = @CC_FOR_BUILD@ + CPPFLAGS = @CPPFLAGS_FOR_BUILD@ + CFLAGS = @CFLAGS_FOR_BUILD@ +-LDFLAGS = @LDFLAGS_FOR_BUILD@ -all-static ++LDFLAGS = @LDFLAGS_FOR_BUILD@ + LIBS = + EXEEXT = @EXEEXT_FOR_BUILD@ + +-- +2.21.0 +
package/x11r7/xlib_libX11/xlib_libX11.mk +1 -0
@@ -10,6 +10,7 @@ XLIB_LIBX11_SITE = https://xorg.freedesktop.org/archive/individual/lib XLIB_LIBX11_LICENSE = MIT XLIB_LIBX11_LICENSE_FILES = COPYING XLIB_LIBX11_INSTALL_STAGING = YES +XLIB_LIBX11_AUTORECONF = YES XLIB_LIBX11_DEPENDENCIES = \ libxcb \ xutil_util-macros \
Signature · 1 line
2.21.0
PATCH 3/3 package/x11r7/xlib_libX11: Fix reliance on a host static libc.
Series applied to master, thanks.
For this one, I edited the subject line:
package/x11r7/xlib_libX11: don't require static libc on host
No capitalisation after : and no period at the end.
Quoted 10 lines · aduskett at gmail.com
From: Adam Duskett <[email protected]>
As per: https://gitlab.freedesktop.org/xorg/lib/libx11/commit/4645e219133458781e3fb48eaea6a74cccb1b9aa
"For Windows targets, libtool uses a wrapper executable, not a wrapper script (see [1]), which it compiles with the host compiler. This doesn't work when cross-compiling."
Because of this change, builds fail on Linux hosts without a static libc, this patch reverts this change as we are guaranteed to build in a Linux environment.
Also, commit message should be wrapped at 72 columns. So I fixed that as well.
I've also tried to find a better solution but couldn't find any.
Could you report this problem upstream? You can add to it that a standard
native build (not even cross-compiled) fails on Fedora 30 because of this. Well, TBH I haven't tried but I expect it fails :-)
Regards,
Arnout
Quoted 4 lines
Fixes:
http://autobuild.buildroot.net/results/ac7c777e5fe31b6eda8b8b662881b07299e57ae9Signed-off-by Adam Duskett <[email protected]>
[snip]