Patchwork [CONSOLIDATED,PULL,12/32] libxkbcommon: new

login
register
mail settings
Submitter Saul Wold
Date Aug. 18, 2011, 8:55 p.m.
Message ID <883d56eb74a8f3b1913e7334c9ea70f2f1e562e9.1313700595.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/10219/
State New, archived
Headers show

Comments

Saul Wold - Aug. 18, 2011, 8:55 p.m.
From: Phil Blundell <philb@gnu.org>

This is needed by Clutter's egl backend.

Signed-off-by: Phil Blundell <philb@gnu.org>
---
 .../xorg-lib/libxkbcommon/cross.patch              |   43 ++++++++++++++++++++
 meta/recipes-graphics/xorg-lib/libxkbcommon_git.bb |   22 ++++++++++
 2 files changed, 65 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-graphics/xorg-lib/libxkbcommon/cross.patch
 create mode 100644 meta/recipes-graphics/xorg-lib/libxkbcommon_git.bb
Richard Purdie - Aug. 19, 2011, 2:27 p.m.
On Thu, 2011-08-18 at 13:55 -0700, Saul Wold wrote:
> From: Phil Blundell <philb@gnu.org>
> 
> This is needed by Clutter's egl backend.
> 
> Signed-off-by: Phil Blundell <philb@gnu.org>
> ---
>  .../xorg-lib/libxkbcommon/cross.patch              |   43 ++++++++++++++++++++
>  meta/recipes-graphics/xorg-lib/libxkbcommon_git.bb |   22 ++++++++++
>  2 files changed, 65 insertions(+), 0 deletions(-)
>  create mode 100644 meta/recipes-graphics/xorg-lib/libxkbcommon/cross.patch
>  create mode 100644 meta/recipes-graphics/xorg-lib/libxkbcommon_git.bb
> 
> diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon/cross.patch b/meta/recipes-graphics/xorg-lib/libxkbcommon/cross.patch
> new file mode 100644
> index 0000000..7fd35be
> --- /dev/null
> +++ b/meta/recipes-graphics/xorg-lib/libxkbcommon/cross.patch
> @@ -0,0 +1,43 @@
> +Upstream-Status: Inappropriate
> +Signed-off-by: Phil Blundell <philb@gnu.org>
> +
> +Use makekeys from -native package rather than trying to compile it here, and fix up
> +configure logic to find keysymdef.h in the sysroot.
> +
> +diff --git a/Makefile.am b/Makefile.am
> +index 2a4d448..214271f 100644
> +--- a/Makefile.am
> ++++ b/Makefile.am
> +@@ -1,5 +1,5 @@
> + # Order: makekeys before src
> +-SUBDIRS = include makekeys src test
> ++SUBDIRS = include src test
> + 
> + pkgconfigdir = $(libdir)/pkgconfig
> + pkgconfig_DATA = xkbcommon.pc
> +diff --git a/configure.ac b/configure.ac
> +index e6a8f15..7f2c387 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -74,7 +74,8 @@ PKG_CHECK_MODULES([X11], [xproto kbproto >= 1.0.4])
> + 
> + # Obtain the path to the X Window System Core Protocol
> + AC_MSG_CHECKING([for X11 includedir])
> +-includex11dir="`$PKG_CONFIG --variable=includex11dir xproto`"
> ++m4_pattern_allow([PKG_CONFIG_SYSROOT_DIR])
> ++includex11dir="$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=includex11dir xproto`"
> + AC_MSG_RESULT([$includex11dir])
> + 
> + # Obtain full path for keysymdef header file
> +diff --git a/src/Makefile.am b/src/Makefile.am
> +index b9a12b9..c625b4c 100644
> +--- a/src/Makefile.am
> ++++ b/src/Makefile.am
> +@@ -26,5 +26,5 @@ libxkbcommon_la_SOURCES = \
> + BUILT_SOURCES = ks_tables.h
> + CLEANFILES = $(BUILT_SOURCES)
> + 
> +-ks_tables.h: $(top_builddir)/makekeys/makekeys$(EXEEXT) $(KEYSYMDEF_H) $(XF86KEYSYM_H)
> +-	$(AM_V_GEN)cat $(KEYSYMDEF_H) $(XF86KEYSYM_H) | $(top_builddir)/makekeys/makekeys$(EXEEXT) > $@
> ++ks_tables.h: $(KEYSYMDEF_H) $(XF86KEYSYM_H)
> ++	$(AM_V_GEN)cat $(KEYSYMDEF_H) $(XF86KEYSYM_H) | libxkbcommon-makekeys$(EXEEXT) > $@
> diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon_git.bb b/meta/recipes-graphics/xorg-lib/libxkbcommon_git.bb
> new file mode 100644
> index 0000000..1b63b0e
> --- /dev/null
> +++ b/meta/recipes-graphics/xorg-lib/libxkbcommon_git.bb
> @@ -0,0 +1,22 @@
> +require xorg-lib-common.inc
> +
> +SUMMARY = "library interface to the XKB compiler"
> +
> +LIC_FILES_CHKSUM = "file://COPYING;md5=469a86f811ec5d6bba592811c3005a2a"
> +PR = "r0"
> +DEPENDS = "xproto kbproto ${@['', '${PN}-native'][oe.utils.inherits(d, 'virtclass-native')]}"
> +
> +S = "${WORKDIR}/git"
> +
> +patches = "file://cross.patch"
> +patches_virtclass-native = ""
> +
> +SRC_URI = "git://anongit.freedesktop.org/xorg/lib/libxkbcommon \
> +	${patches}"
> +SRCREV = "f91afe4f3ebcac3fb65a402c6c85cf1df5e2b52a"
> +
> +BBCLASSEXTEND = "native"
> +
> +do_install_append_virtclass-native() {
> +	install -m 755 "makekeys/makekeys" "${STAGING_BINDIR}/libxkbcommon-makekeys"
> +}

What isthe version getting set to for this recipe?

Cheers,

Richard
Phil Blundell - Aug. 19, 2011, 2:33 p.m.
On Fri, 2011-08-19 at 09:27 -0500, Richard Purdie wrote:
> What isthe version getting set to for this recipe?

Just "git" at the moment, which I suppose is a bit suboptimal.  What's
the recommended string for packages that don't have any upstream
release?

p.
Martin Jansa - Aug. 19, 2011, 2:40 p.m.
On Fri, Aug 19, 2011 at 03:33:38PM +0100, Phil Blundell wrote:
> On Fri, 2011-08-19 at 09:27 -0500, Richard Purdie wrote:
> > What isthe version getting set to for this recipe?
> 
> Just "git" at the moment, which I suppose is a bit suboptimal.  What's
> the recommended string for packages that don't have any upstream
> release?

http://cgit.freedesktop.org/xorg/lib/libxkbcommon/tree/configure.ac
says:
AC_INIT([libxkbcommon], [0.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])

In such cases I'm using
PV = "0.1.0+gitr${SRCPV}"

even when there isn't any 0.1.0 tarball yet

problem is when content of such repo is realease as 0.1.0 tarball
later..
Richard Purdie - Aug. 19, 2011, 4:08 p.m.
On Fri, 2011-08-19 at 16:40 +0200, Martin Jansa wrote:
> On Fri, Aug 19, 2011 at 03:33:38PM +0100, Phil Blundell wrote:
> > On Fri, 2011-08-19 at 09:27 -0500, Richard Purdie wrote:
> > > What isthe version getting set to for this recipe?
> > 
> > Just "git" at the moment, which I suppose is a bit suboptimal.  What's
> > the recommended string for packages that don't have any upstream
> > release?
> 
> http://cgit.freedesktop.org/xorg/lib/libxkbcommon/tree/configure.ac
> says:
> AC_INIT([libxkbcommon], [0.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
> 
> In such cases I'm using
> PV = "0.1.0+gitr${SRCPV}"
> 
> even when there isn't any 0.1.0 tarball yet
> 
> problem is when content of such repo is realease as 0.1.0 tarball
> later..

I'd just go for "0.0.0+gitr${SRCPV}" which would only then break is
upstream releases a 0.0.0.1 which is hopefully unlikely :)

Cheers,

Richard

Patch

diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon/cross.patch b/meta/recipes-graphics/xorg-lib/libxkbcommon/cross.patch
new file mode 100644
index 0000000..7fd35be
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxkbcommon/cross.patch
@@ -0,0 +1,43 @@ 
+Upstream-Status: Inappropriate
+Signed-off-by: Phil Blundell <philb@gnu.org>
+
+Use makekeys from -native package rather than trying to compile it here, and fix up
+configure logic to find keysymdef.h in the sysroot.
+
+diff --git a/Makefile.am b/Makefile.am
+index 2a4d448..214271f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,5 @@
+ # Order: makekeys before src
+-SUBDIRS = include makekeys src test
++SUBDIRS = include src test
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = xkbcommon.pc
+diff --git a/configure.ac b/configure.ac
+index e6a8f15..7f2c387 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -74,7 +74,8 @@ PKG_CHECK_MODULES([X11], [xproto kbproto >= 1.0.4])
+ 
+ # Obtain the path to the X Window System Core Protocol
+ AC_MSG_CHECKING([for X11 includedir])
+-includex11dir="`$PKG_CONFIG --variable=includex11dir xproto`"
++m4_pattern_allow([PKG_CONFIG_SYSROOT_DIR])
++includex11dir="$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=includex11dir xproto`"
+ AC_MSG_RESULT([$includex11dir])
+ 
+ # Obtain full path for keysymdef header file
+diff --git a/src/Makefile.am b/src/Makefile.am
+index b9a12b9..c625b4c 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -26,5 +26,5 @@ libxkbcommon_la_SOURCES = \
+ BUILT_SOURCES = ks_tables.h
+ CLEANFILES = $(BUILT_SOURCES)
+ 
+-ks_tables.h: $(top_builddir)/makekeys/makekeys$(EXEEXT) $(KEYSYMDEF_H) $(XF86KEYSYM_H)
+-	$(AM_V_GEN)cat $(KEYSYMDEF_H) $(XF86KEYSYM_H) | $(top_builddir)/makekeys/makekeys$(EXEEXT) > $@
++ks_tables.h: $(KEYSYMDEF_H) $(XF86KEYSYM_H)
++	$(AM_V_GEN)cat $(KEYSYMDEF_H) $(XF86KEYSYM_H) | libxkbcommon-makekeys$(EXEEXT) > $@
diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon_git.bb b/meta/recipes-graphics/xorg-lib/libxkbcommon_git.bb
new file mode 100644
index 0000000..1b63b0e
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxkbcommon_git.bb
@@ -0,0 +1,22 @@ 
+require xorg-lib-common.inc
+
+SUMMARY = "library interface to the XKB compiler"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=469a86f811ec5d6bba592811c3005a2a"
+PR = "r0"
+DEPENDS = "xproto kbproto ${@['', '${PN}-native'][oe.utils.inherits(d, 'virtclass-native')]}"
+
+S = "${WORKDIR}/git"
+
+patches = "file://cross.patch"
+patches_virtclass-native = ""
+
+SRC_URI = "git://anongit.freedesktop.org/xorg/lib/libxkbcommon \
+	${patches}"
+SRCREV = "f91afe4f3ebcac3fb65a402c6c85cf1df5e2b52a"
+
+BBCLASSEXTEND = "native"
+
+do_install_append_virtclass-native() {
+	install -m 755 "makekeys/makekeys" "${STAGING_BINDIR}/libxkbcommon-makekeys"
+}