[PATCH weston v4 1/9] protocol: add weston-debug.xml

Quentin Glidic sardemff7+wayland at sardemff7.net
Mon Oct 23 08:04:16 UTC 2017


On 10/23/17 8:55 AM, Pekka Paalanen wrote:
> Hi,
> 
> I'm CC'ing Quentin for the automake comments below.
> 
> 
> On Thu, 12 Oct 2017 13:13:41 +0200
> Emre Ucan <eucan at de.adit-jv.com> wrote:
> 
>> From: Pekka Paalanen <pq at iki.fi>
>>
>> This is a new debugging extension for non-production environments. The
>> aim is to replace all build-time choosable debug prints in the
>> compositor with runtime subscribable debug streams.
>>
>> Signed-off-by: Pekka Paalanen <pq at iki.fi>
>>
>> Added new libweston-$MAJOR-protocols.pc file and install that
>> for external projects to find the XML files installed by libweston.
>>
>> Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss at in.bosch.com>
>> ---
>>   Makefile.am                         |   8 +++
>>   configure.ac                        |   1 +
>>   libweston/libweston-protocols.pc.in |   7 ++
>>   protocol/weston-debug.xml           | 128 ++++++++++++++++++++++++++++++++++++
>>   4 files changed, 144 insertions(+)
>>   create mode 100644 libweston/libweston-protocols.pc.in
>>   create mode 100644 protocol/weston-debug.xml
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 1d3eedb..026cc58 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -116,6 +116,10 @@ libweston_ at LIBWESTON_MAJOR@_la_SOURCES =			\
>>   	shared/platform.h				\
>>   	shared/weston-egl-ext.h
>>   
>> +libweston_ at LIBWESTON_MAJOR@_datadir = $(datadir)/weston/protocols
>> +dist_libweston_ at LIBWESTON_MAJOR@_data_DATA =	\
>> +	protocol/weston-debug.xml
>> +
> 
> wayland-protocols uses nobase_dist_pkgdata_DATA for this, is there a
> difference? What is the exact correct form?

nobase_ would put the file in $(datadir)/weston/protocols/protocol, 
wayland-protocols repo is mirroring the installation tree, here, nobase_ 
would be wrong.


>>   lib_LTLIBRARIES += libweston-desktop- at LIBWESTON_MAJOR@.la
>>   libweston_desktop_ at LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
>>   libweston_desktop_ at LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
>> @@ -166,6 +170,8 @@ endif
>>   nodist_libweston_ at LIBWESTON_MAJOR@_la_SOURCES =				\
>>   	protocol/weston-screenshooter-protocol.c			\
>>   	protocol/weston-screenshooter-server-protocol.h			\
>> +	protocol/weston-debug-protocol.c				\
>> +	protocol/weston-debug-server-protocol.h				\
>>   	protocol/text-cursor-position-protocol.c	\
>>   	protocol/text-cursor-position-server-protocol.h	\
>>   	protocol/text-input-unstable-v1-protocol.c			\
>> @@ -283,6 +289,7 @@ endif # BUILD_WESTON_LAUNCH
>>   pkgconfigdir = $(libdir)/pkgconfig
>>   pkgconfig_DATA = \
>>   	libweston/libweston-${LIBWESTON_MAJOR}.pc \
>> +	libweston/libweston-${LIBWESTON_MAJOR}-protocols.pc \
> 
> Should the protocol.pc not go into noarch?
> wayland-protocols does noarch_pkgconfig_DATA = wayland-protocols.pc.

Oh, yes it should. Using PKG_NOARCH_INSTALLDIR would be nice too (but we 
don’t use PKG_INSTALLDIR, and Meson doesn’t have equivalents so may not 
be worth it).


>>   	libweston-desktop/libweston-desktop-${LIBWESTON_MAJOR}.pc \
>>   	compositor/weston.pc
>>   
>> @@ -1528,6 +1535,7 @@ BUILT_SOURCES +=				\
>>   	protocol/text-input-unstable-v1-client-protocol.h
>>   
>>   EXTRA_DIST +=					\
>> +	protocol/weston-debug.xml		\
>>   	protocol/weston-desktop-shell.xml	\
>>   	protocol/weston-screenshooter.xml	\
>>   	protocol/text-cursor-position.xml	\
>> diff --git a/configure.ac b/configure.ac
>> index 21e3a41..e514944 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -687,6 +687,7 @@ AC_CONFIG_FILES([Makefile libweston/version.h compositor/weston.pc])
>>   # AC_CONFIG_FILES needs the full name when running autoconf, so we need to use
>>   # libweston_abi_version here, and outside [] because of m4 quoting rules
>>   AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[.pc:libweston/libweston.pc.in])
>> +AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[-protocols.pc:libweston/libweston-protocols.pc.in])
>>   AC_CONFIG_FILES([libweston-desktop/libweston-desktop-]libweston_major_version[.pc:libweston-desktop/libweston-desktop.pc.in])
>>   
>>   AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
>> diff --git a/libweston/libweston-protocols.pc.in b/libweston/libweston-protocols.pc.in
>> new file mode 100644
>> index 0000000..46fd586
>> --- /dev/null
>> +++ b/libweston/libweston-protocols.pc.in
>> @@ -0,0 +1,7 @@
>> +prefix=@prefix@
>> +datarootdir=@datarootdir@
>> +pkgdatadir=@datadir@/@PACKAGE@/protocols
> 
> In wayland-protocols we have
> 
> 	pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@
> 
> so I think this here should be
> 
> 	pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@/protocols

I still think we should just drop it in prefix, as pkg-config will strip 
it when necessary, but hey. :-)


>> +
>> +Name: libWeston Protocols
>> +Description: libWeston protocol files
>> +Version: @WESTON_VERSION@
>> diff --git a/protocol/weston-debug.xml b/protocol/weston-debug.xml
>> new file mode 100644
> 
> All good otherwise in this patch. If someone tells me the answers to my
> questions above, I can do the fixups when I land this patch.
> 
> 
> Thanks,
> pq


Thanks,


-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list