[PATCH] Install protocol XML files in $(datadir)/wayland

Quentin Glidic sardemff7+wayland at sardemff7.net
Tue Feb 19 04:31:46 PST 2013


On 19/02/2013 11:31, Pekka Paalanen wrote:
> On Mon, 18 Feb 2013 17:10:28 -0500 Kristian Høgsberg 
> <krh at bitplanet.net> wrote:
> 
>> This installs the protocol XML under $(datadir)/wayland.  The 
>> intention is that this directory is a shared location for all 
>> protocol files and as such we'll need to prefix our filenames with
>>  weston to avoid clashing.
>> 
>> https://bugs.freedesktop.org/show_bug.cgi?id=55183 ---
>> 
>> I committed the first SDK patch that installs header files and 
>> pkg-config files.  Next step could be something like this...
>> 
>> Kristian
>> 
>> protocol/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 
>> deletion(-)
>> 
>> diff --git a/protocol/Makefile.am b/protocol/Makefile.am
>> index 8c1803c..aa34f3f 100644
>> --- a/protocol/Makefile.am
>> +++ b/protocol/Makefile.am
>> @@ -1,4 +1,5 @@
>> -EXTRA_DIST =					\
>> +protocoldir = $(datadir)/wayland
>> +protocol_DATA =					\
>> 	desktop-shell.xml			\
>> 	screenshooter.xml			\
>> 	tablet-shell.xml			\

You should use the dist_ prefix so these files are still disted.


> Hi Kristian,
> 
> it's nice to start on this.
> 
> Should we standardise on always using just $(datadir)/wayland, or 
> should libwayland define the directory in its .pc file? I guess 
> libwayland cannot do that, because then you could not have system
> vs. prefix installations of the protocol files. So, every package 
> installs its protocol files to where-ever it chooses.

We may do that the other way around: having a standard name for the
protocol directory variable that all .pc files must provide.


> weston.pc does not export any information that helps to find
> weston's protocol files. I would suggest we add this to
> weston.pc.in:

These should also be put in the noarch_pkgconfigdir (in datadir), since
they are
arch-independant.


> protocoldir=@datadir@/wayland

{,wayland_}protocoldir, or {,wayland_)protocolsdir sound like reliable
names for a standard


> or something similar that exposes the protocoldir path you added to 
> Makefile.am. Then other packages can get it with: $ pkg-config 
> --variable=protocoldir weston
> 
> Libwayland would need the same treatment.

The directory name would be better defined in configure.ac, so they
could be used everywhere and directly substituted by the configure script.

-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list