* [PATCH] libxcb: fix rebuild when MACHINE changes
@ 2013-12-09 16:58 Ross Burton
2013-12-09 17:35 ` Martin Jansa
0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2013-12-09 16:58 UTC (permalink / raw)
To: openembedded-core
This recipe was patching the sysroot path directly into configure.ac, which
fails when the same source tree is re-used for another machine.
Instead, patch in $PKG_CONFIG_SYSROOT_DIR which is already exported for use by
pkg-config.
Also remove some commented-out lines that have no purpose.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/recipes-graphics/xorg-lib/libxcb.inc | 16 ++------------
.../xorg-lib/libxcb/xcbincludedir.patch | 23 ++++++++++++++++----
2 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/meta/recipes-graphics/xorg-lib/libxcb.inc b/meta/recipes-graphics/xorg-lib/libxcb.inc
index 91df1be..7f9b0af 100644
--- a/meta/recipes-graphics/xorg-lib/libxcb.inc
+++ b/meta/recipes-graphics/xorg-lib/libxcb.inc
@@ -12,10 +12,9 @@ LICENSE = "MIT-X"
PARALLEL_MAKE = ""
DEPENDS = "xcb-proto xproto libxau libxslt-native xcb-proto-native libpthread-stubs"
-# DEPENDS += "xsltproc-native gperf-native"
-SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2"
-# file://xcbincludedir.patch"
+SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2 \
+ file://xcbincludedir.patch"
PACKAGES =+ "libxcb-composite libxcb-damage libxcb-dpms libxcb-glx \
libxcb-randr libxcb-record libxcb-render libxcb-res \
@@ -25,7 +24,6 @@ PACKAGES =+ "libxcb-composite libxcb-damage libxcb-dpms libxcb-glx \
libxcb-dri2 libxcb-dri3 libxcb-present"
FILES_${PN} = "${libdir}/libxcb.so.*"
-#FILES_${PN}-dev = "${libdir}/libxcb.* ${libdir}/pkgconfig/*.pc ${includedir}/xcb/*.h"
FILES_libxcb-dri2 = "${libdir}/libxcb-dri2.so.*"
FILES_libxcb-dri3 = "${libdir}/libxcb-dri3.so.*"
FILES_libxcb-composite = "${libdir}/libxcb-composite.so.*"
@@ -52,13 +50,3 @@ FILES_libxcb-xvmc = "${libdir}/libxcb-xvmc.so.*"
FILES_libxcb-present = "${libdir}/libxcb-present.so.*"
inherit autotools pkgconfig pythonnative
-
-# XCBPROTO_XCBINCLUDEDIR is set based on `pkg-config --variable=xcbincludedir xcb-proto`
-# but the xcbincludedir variable doesn't point into the staging area, so it needs some
-# tweaking here:
-do_configure_prepend () {
- sed -i "s|XCBPROTO_XCBINCLUDEDIR=\`|XCBPROTO_XCBINCLUDEDIR=${STAGING_DIR_HOST}/\`|" \
- ${S}/configure.ac
- sed -i "s|XCBPROTO_XCBPYTHONDIR=\`|XCBPROTO_XCBPYTHONDIR=${STAGING_DIR_HOST}/\`|" \
- ${S}/configure.ac
-}
diff --git a/meta/recipes-graphics/xorg-lib/libxcb/xcbincludedir.patch b/meta/recipes-graphics/xorg-lib/libxcb/xcbincludedir.patch
index d858a63..46297c3 100644
--- a/meta/recipes-graphics/xorg-lib/libxcb/xcbincludedir.patch
+++ b/meta/recipes-graphics/xorg-lib/libxcb/xcbincludedir.patch
@@ -1,8 +1,14 @@
-Upstream-Status: Inappropriate [configuration]
+As pkg-config --variable doesn't respect the sysroot, add the pkg-config sysroot
+to the beginning of variables that are used later on the host.
---- libxcb-1.0.orig/configure.ac 2006-11-23 15:33:01.000000000 +0000
-+++ libxcb-1.0/configure.ac 2008-09-10 20:29:12.000000000 +0100
-@@ -50,7 +50,7 @@
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index 94da4f7..d29cd6a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -64,7 +64,7 @@ AC_SUBST(NEEDED)
# Find the xcb-proto protocol descriptions
AC_MSG_CHECKING(XCBPROTO_XCBINCLUDEDIR)
@@ -11,3 +17,12 @@ Upstream-Status: Inappropriate [configuration]
AC_MSG_RESULT($XCBPROTO_XCBINCLUDEDIR)
AC_SUBST(XCBPROTO_XCBINCLUDEDIR)
+@@ -74,7 +74,7 @@ AC_SUBST(XCBPROTO_VERSION)
+
+ # Find the xcbgen Python package
+ AC_MSG_CHECKING(XCBPROTO_XCBPYTHONDIR)
+-XCBPROTO_XCBPYTHONDIR=`$PKG_CONFIG --variable=pythondir xcb-proto`
++XCBPROTO_XCBPYTHONDIR=$PKG_CONFIG_SYSROOT_DIR/`$PKG_CONFIG --variable=pythondir xcb-proto`
+ AC_MSG_RESULT($XCBPROTO_XCBPYTHONDIR)
+ AC_SUBST(XCBPROTO_XCBPYTHONDIR)
+
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] libxcb: fix rebuild when MACHINE changes
2013-12-09 16:58 [PATCH] libxcb: fix rebuild when MACHINE changes Ross Burton
@ 2013-12-09 17:35 ` Martin Jansa
2013-12-09 19:53 ` Burton, Ross
0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2013-12-09 17:35 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 4697 bytes --]
On Mon, Dec 09, 2013 at 04:58:27PM +0000, Ross Burton wrote:
> This recipe was patching the sysroot path directly into configure.ac, which
> fails when the same source tree is re-used for another machine.
>
> Instead, patch in $PKG_CONFIG_SYSROOT_DIR which is already exported for use by
> pkg-config.
Does it make libxcb signature MACHINE-specific or is sysroot path
excluded from PKG_CONFIG_SYSROOT_DIR like with STAGING_DIR_HOST?
Maybe I fail to see how it fixes the issue with re-used configured
directory.
> Also remove some commented-out lines that have no purpose.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
> meta/recipes-graphics/xorg-lib/libxcb.inc | 16 ++------------
> .../xorg-lib/libxcb/xcbincludedir.patch | 23 ++++++++++++++++----
> 2 files changed, 21 insertions(+), 18 deletions(-)
>
> diff --git a/meta/recipes-graphics/xorg-lib/libxcb.inc b/meta/recipes-graphics/xorg-lib/libxcb.inc
> index 91df1be..7f9b0af 100644
> --- a/meta/recipes-graphics/xorg-lib/libxcb.inc
> +++ b/meta/recipes-graphics/xorg-lib/libxcb.inc
> @@ -12,10 +12,9 @@ LICENSE = "MIT-X"
>
> PARALLEL_MAKE = ""
> DEPENDS = "xcb-proto xproto libxau libxslt-native xcb-proto-native libpthread-stubs"
> -# DEPENDS += "xsltproc-native gperf-native"
>
> -SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2"
> -# file://xcbincludedir.patch"
> +SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2 \
> + file://xcbincludedir.patch"
>
> PACKAGES =+ "libxcb-composite libxcb-damage libxcb-dpms libxcb-glx \
> libxcb-randr libxcb-record libxcb-render libxcb-res \
> @@ -25,7 +24,6 @@ PACKAGES =+ "libxcb-composite libxcb-damage libxcb-dpms libxcb-glx \
> libxcb-dri2 libxcb-dri3 libxcb-present"
>
> FILES_${PN} = "${libdir}/libxcb.so.*"
> -#FILES_${PN}-dev = "${libdir}/libxcb.* ${libdir}/pkgconfig/*.pc ${includedir}/xcb/*.h"
> FILES_libxcb-dri2 = "${libdir}/libxcb-dri2.so.*"
> FILES_libxcb-dri3 = "${libdir}/libxcb-dri3.so.*"
> FILES_libxcb-composite = "${libdir}/libxcb-composite.so.*"
> @@ -52,13 +50,3 @@ FILES_libxcb-xvmc = "${libdir}/libxcb-xvmc.so.*"
> FILES_libxcb-present = "${libdir}/libxcb-present.so.*"
>
> inherit autotools pkgconfig pythonnative
> -
> -# XCBPROTO_XCBINCLUDEDIR is set based on `pkg-config --variable=xcbincludedir xcb-proto`
> -# but the xcbincludedir variable doesn't point into the staging area, so it needs some
> -# tweaking here:
> -do_configure_prepend () {
> - sed -i "s|XCBPROTO_XCBINCLUDEDIR=\`|XCBPROTO_XCBINCLUDEDIR=${STAGING_DIR_HOST}/\`|" \
> - ${S}/configure.ac
> - sed -i "s|XCBPROTO_XCBPYTHONDIR=\`|XCBPROTO_XCBPYTHONDIR=${STAGING_DIR_HOST}/\`|" \
> - ${S}/configure.ac
> -}
> diff --git a/meta/recipes-graphics/xorg-lib/libxcb/xcbincludedir.patch b/meta/recipes-graphics/xorg-lib/libxcb/xcbincludedir.patch
> index d858a63..46297c3 100644
> --- a/meta/recipes-graphics/xorg-lib/libxcb/xcbincludedir.patch
> +++ b/meta/recipes-graphics/xorg-lib/libxcb/xcbincludedir.patch
> @@ -1,8 +1,14 @@
> -Upstream-Status: Inappropriate [configuration]
> +As pkg-config --variable doesn't respect the sysroot, add the pkg-config sysroot
> +to the beginning of variables that are used later on the host.
>
> ---- libxcb-1.0.orig/configure.ac 2006-11-23 15:33:01.000000000 +0000
> -+++ libxcb-1.0/configure.ac 2008-09-10 20:29:12.000000000 +0100
> -@@ -50,7 +50,7 @@
> +Upstream-Status: Pending
> +Signed-off-by: Ross Burton <ross.burton@intel.com>
> +
> +diff --git a/configure.ac b/configure.ac
> +index 94da4f7..d29cd6a 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -64,7 +64,7 @@ AC_SUBST(NEEDED)
>
> # Find the xcb-proto protocol descriptions
> AC_MSG_CHECKING(XCBPROTO_XCBINCLUDEDIR)
> @@ -11,3 +17,12 @@ Upstream-Status: Inappropriate [configuration]
> AC_MSG_RESULT($XCBPROTO_XCBINCLUDEDIR)
> AC_SUBST(XCBPROTO_XCBINCLUDEDIR)
>
> +@@ -74,7 +74,7 @@ AC_SUBST(XCBPROTO_VERSION)
> +
> + # Find the xcbgen Python package
> + AC_MSG_CHECKING(XCBPROTO_XCBPYTHONDIR)
> +-XCBPROTO_XCBPYTHONDIR=`$PKG_CONFIG --variable=pythondir xcb-proto`
> ++XCBPROTO_XCBPYTHONDIR=$PKG_CONFIG_SYSROOT_DIR/`$PKG_CONFIG --variable=pythondir xcb-proto`
> + AC_MSG_RESULT($XCBPROTO_XCBPYTHONDIR)
> + AC_SUBST(XCBPROTO_XCBPYTHONDIR)
> +
> --
> 1.7.10.4
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] libxcb: fix rebuild when MACHINE changes
2013-12-09 17:35 ` Martin Jansa
@ 2013-12-09 19:53 ` Burton, Ross
0 siblings, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2013-12-09 19:53 UTC (permalink / raw)
To: Martin Jansa; +Cc: OE-core
On 9 December 2013 17:35, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Mon, Dec 09, 2013 at 04:58:27PM +0000, Ross Burton wrote:
>> This recipe was patching the sysroot path directly into configure.ac, which
>> fails when the same source tree is re-used for another machine.
>>
>> Instead, patch in $PKG_CONFIG_SYSROOT_DIR which is already exported for use by
>> pkg-config.
>
> Does it make libxcb signature MACHINE-specific or is sysroot path
> excluded from PKG_CONFIG_SYSROOT_DIR like with STAGING_DIR_HOST?
>
> Maybe I fail to see how it fixes the issue with re-used configured
> directory.
At configure time the current sysroot is used (variable expansion
happens by the configure execution). The signature doesn't become
machine-specific, as the logic is just replicating what pkg-config
does when reporting include paths inside the .pc files (prepending the
sysroot to them).
Ross
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-09 19:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-09 16:58 [PATCH] libxcb: fix rebuild when MACHINE changes Ross Burton
2013-12-09 17:35 ` Martin Jansa
2013-12-09 19:53 ` Burton, Ross
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.