DBE patch for libxcb

Submitted by Lars Segerlund on Sept. 2, 2016, 8:43 a.m.

Details

Message ID CAF-VNaqNr9rMkqKQttWyXhPu3DbhB6p8LcEemwHOx-Z0F-Ad5Q@mail.gmail.com
State New
Headers show
Series "DBE patch for libxcb" ( rev: 1 ) in XCB

Not browsing as part of any series.

Commit Message

Lars Segerlund Sept. 2, 2016, 8:43 a.m.
Finally got it compiling, had to do a dummy install.

 Also had to fix padding in dbe.xml to build

 I am posting here to get some feedback if it looks right ? I am doing
testing right now.

 Should I pus a test program in xcb-demo ro xcb-examples ?

 / regards, Lars Segerlund

Patch hide | download patch | download mbox

From 638c562971b608e2ddaef75ee34c0e9d66927502 Mon Sep 17 00:00:00 2001
From: Lars Segerlund <lars.segerlund@gmail.com>
Date: Fri, 2 Sep 2016 10:35:27 +0200
Subject: [PATCH] Initial xcb dbe build

---
 Makefile.am     |  3 +++
 configure.ac    |  3 +++
 src/Makefile.am |  8 ++++++++
 xcb-dbe.pc.in   | 11 +++++++++++
 4 files changed, 25 insertions(+)
 create mode 100644 xcb-dbe.pc.in

diff --git a/Makefile.am b/Makefile.am
index 2475b6e..b4bf4c4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,6 +12,9 @@  endif
 if BUILD_DAMAGE
 pkgconfig_DATA += xcb-damage.pc
 endif
+if BUILD_DBE
+pkgconfig_DATA += xcb-dbe.pc
+endif
 if BUILD_DPMS
 pkgconfig_DATA += xcb-dpms.pc
 endif
diff --git a/configure.ac b/configure.ac
index ec31542..5855ce5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -217,6 +217,7 @@  esac
 
 XCB_EXTENSION(Composite, yes)
 XCB_EXTENSION(Damage, yes)
+XCB_EXTENSION(Dbe, yes)
 XCB_EXTENSION(DPMS, yes)
 XCB_EXTENSION(DRI2, yes)
 XCB_EXTENSION(DRI3, $have_sendmsg)
@@ -268,6 +269,7 @@  AC_CONFIG_FILES([
 xcb.pc
 xcb-composite.pc
 xcb-damage.pc
+xcb-dbe.pc
 xcb-dpms.pc
 xcb-dri2.pc
 xcb-dri3.pc
@@ -315,6 +317,7 @@  echo ""
 echo "  X11 extensions"
 echo "    Composite...........: ${BUILD_COMPOSITE}"
 echo "    Damage..............: ${BUILD_DAMAGE}"
+echo "    Dbe.................: ${BUILD_DBE}"
 echo "    Dpms................: ${BUILD_DPMS}"
 echo "    Dri2................: ${BUILD_DRI2}"
 echo "    Dri3................: ${BUILD_DRI3}"
diff --git a/src/Makefile.am b/src/Makefile.am
index e06e70b..bafb527 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -40,6 +40,14 @@  libxcb_damage_la_LIBADD = $(XCB_LIBS)
 nodist_libxcb_damage_la_SOURCES = damage.c damage.h
 endif
 
+EXTSOURCES += dbe.c
+if BUILD_DAMAGE
+lib_LTLIBRARIES += libxcb-dbe.la
+libxcb_dbe_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_dbe_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_dbe_la_SOURCES = dbe.c dbe.h
+endif
+
 EXTSOURCES += dpms.c
 if BUILD_DPMS
 lib_LTLIBRARIES += libxcb-dpms.la
diff --git a/xcb-dbe.pc.in b/xcb-dbe.pc.in
new file mode 100644
index 0000000..968b25b
--- /dev/null
+++ b/xcb-dbe.pc.in
@@ -0,0 +1,11 @@ 
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: XCB DBE
+Description: XCB DBE Extension
+Version: @PACKAGE_VERSION@
+Requires: xcb
+Libs: -L${libdir} -lxcb-dbe
+Cflags: -I${includedir}
-- 
2.9.3


Comments

On 2016-09-02 4:43 AM, Lars Segerlund wrote:
> 
> Finally got it compiling, had to do a dummy install.
> 
>  Also had to fix padding in dbe.xml to build
> 
>  I am posting here to get some feedback if it looks right ?

There are a number of errors in the first dbe.xml you posted, but you
haven't posed your fixed version yet.

Peter Harris
I really would like a comment on this, since I only did the fix to
compile, I haven't checked out the generated code, and since I did a fix
for padding I suspect I have a lot more errors, like you say.

 Any hints for the right manual/place to read up ?

 ( I was just happy to get it through the build with latest, on 1.11.1 it
worked better, so I do know I need to fix it up, and help is so appreciated
just point me in the right direction please, sorry for taking up time but I
am new to this xcb xml thing ... )

 / regards, Lars Segerlund.


2016-09-06 17:05 GMT+02:00 Peter Harris <pharris@opentext.com>:

> On 2016-09-02 4:43 AM, Lars Segerlund wrote:
> >
> > Finally got it compiling, had to do a dummy install.
> >
> >  Also had to fix padding in dbe.xml to build
> >
> >  I am posting here to get some feedback if it looks right ?
>
> There are a number of errors in the first dbe.xml you posted, but you
> haven't posed your fixed version yet.
>
> Peter Harris
> --
>                Open Text Connectivity Solutions Group
> Peter Harris                    http://connectivity.opentext.com/
> Research and Development        Phone: +1 905 762 6001
> pharris@opentext.com            Toll Free: 1 877 359 4866
>
On 2016-09-06 11:14 AM, Lars Segerlund wrote:
> 
>  I really would like a comment on this, since I only did the fix to
> compile, I haven't checked out the generated code, and since I did a fix
> for padding I suspect I have a lot more errors, like you say.

Since you haven't posted your current version, I cannot review it. I
don't want to wast your time with comments on things you have already fixed.

>  Any hints for the right manual/place to read up ?

"make check" in xcb/proto is a good start. It doesn't catch mismatched
type errors (eg. you used an "enum" as the field type in a few
locations, which isn't valid. Enums can only be used in enum=, mask=,
altenum=, and altmask=), but it does catch basic syntax errors in the XML.

Peter Harris