Commit Graph

135 Commits

Author SHA1 Message Date
Peter Hutterer
f66e2d53dd Validate the protocol xml during scanning
Embed the wayland.dtd protocol data into the scanner binary so we can validate
external protocol files without requiring makefile changes. Hat-tip to Pekka
Paalanen for the embedding trick.
The embedding trick doesn't work well if the to-be-embedded file is in a
different location than the source file, so copy/link it during configure and
then build it in from the local directory.

The current expat parser is not a validating parser, moving scanner.c to
another parser has the risk of breaking compatibility. This patch adds libxml2
as extra (optional) dependency, but that also requires parsing the input
twice.

If the protocol fails validation a warning is printed but no error is returned
otherwise.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-17 14:36:21 +02:00
Bryce Harrington
b31225f91b configure.ac: bump to version 1.9.90 for open development
Master is open for new feature development again.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2015-09-22 13:39:44 -07:00
Bryce Harrington
b05668f0ad configure.ac: bump to version 1.9.0 for the official release 2015-09-21 16:52:11 -07:00
Bryce Harrington
8fd494995d configure.ac: bump to version 1.8.93 for the RC1 release 2015-09-15 20:16:37 -07:00
Bryce Harrington
b16c0a5dfa configure.ac: bump to version 1.8.92 for the beta release 2015-09-01 16:51:30 -07:00
Bryce Harrington
c0636ddcac configure.ac: bump to version 1.8.91 for the alpha release 2015-08-16 13:54:50 -07:00
Ross Burton
21f80b8982 build: always build wayland-scanner
The previous idiom for building a cross-compiled Wayland is to build once for
the build host (with --enable-scanner --disable-libraries) to get a
wayland-scanner binary that can then be used in a cross-compile (with
--disable-scanner).  The problem with this is that the cross wayland is missing
a wayland-scanner binary, which means you then can't do any Wayland development
on the target.

Instead, always build wayland-scanner for the target and change
--enable/disable-scanner to --with/without-host-scanner.  Normal builds use the
default of --without-host-scanner and run the wayland-scanner it just built, and
cross-compiled builds pass --with-host-scanner to use a previously built host
scanner but still get a wayland-scanner to install.

(a theoretically neater solution would be to build two scanners if required (one
to run and one to install), but automake makes this overly complicated)

[daniels: Bikeshedded naming with Ross's OK.]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-07-17 12:19:08 +01:00
Derek Foreman
bc3b66d5c1 build: Don't depend on libffi unless we're building libraries
When building just the scanner or docs it's not required.

This can reduce requirements for a host cross compiling wayland,
since only the scanner needs to be built natively.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18 14:06:32 +03:00
Derek Foreman
5cfdbef3d2 build: Allow disabling building of wayland libraries
When cross-compiling it may be useful to build only the wayland-scanner
natively.  This patch makes it possible to disable build of the libraries.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18 14:06:16 +03:00
Bryce Harrington
baed4b0a2f configure.ac: bump version to 1.8.90
Master is open for new features again

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2015-06-03 00:12:49 -07:00
Bryce Harrington
60024af597 configure.ac: bump to version 1.8.0 for the official release 2015-06-02 16:06:02 -07:00
Bryce Harrington
6ffd998a98 configure.ac: bump to version 1.7.93 for the RC2 release 2015-05-26 19:10:15 -07:00
Bryce Harrington
12cab2c4df configure.ac: bump to version 1.7.92 for the RC1 release 2015-05-15 17:53:29 -07:00
Bryce Harrington
8877a349e7 configure.ac: bump to version 1.7.91 for the alpha release 2015-05-06 18:59:59 -07:00
Bill Spitzak
313b26f415 config: use simpler regexp syntax to get dot version
I wasted a lot of time before I figured out that I needed to add those
square brackets to get this to work. Sigh...
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-04-07 15:48:25 -07:00
Bryce Harrington
f3a5ca999e configure.ac: bump version to 1.7.90
Master is open for new features again

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2015-02-17 18:34:33 -08:00
Bryce Harrington
8e9d5a1084 configure.ac: bump to version 1.7.0 for release 2015-02-13 19:17:56 -08:00
Bryce Harrington
52d971c924 configure.ac: bump to version 1.6.93 for rc2 release 2015-02-06 17:56:44 -08:00
Bill Spitzak
371a9e0aef configure.ac: Fallback to older detection code if pkg-config can't find expat
This paritally reverts commit a4afd90f9f.

On older expat versions (ie the one on Ubuntu 12.04) there is no pkg-config
file, so fall back to a test for the header and library. In addition the
source for expat does not seem to be in a git repository but in cvs instead
and it seems preferrable to not require cvs to build wayland.

The restored test has been updated to use AC_SEARCH_LIBS. This version
uses empty square brackets for the unused branches, similar to many other
if statements in configure.ac.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Andrew Oakley <aoakley@espial.com>
2015-02-06 15:52:50 -08:00
Bryce Harrington
48bf640d16 configure.ac: re-bump version to 1.6.92 for rc1 release 2015-01-30 19:08:22 -08:00
Bryce Harrington
768724495e configure.ac: bump version to 1.6.92 for rc1 release 2015-01-30 14:57:53 -08:00
Andrew Oakley
a4afd90f9f configure.ac: use pkg-config to find expat
This is now done in the same way as the libffi dependency and still
allows the library to be installed in a non-standard location (with
PKG_CONFIG_PATH).
2015-01-28 21:29:10 -08:00
Jon Cruz
b5fca036cc doc: Switch from static image files to generated diagrams.
Switches diagrams from using static PNG images to instead generate them via
simple graphviz DOT markup files.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-01-28 17:43:16 -08:00
Mariusz Ceier
e3dc9a7af6 tests: C++ compilation test
This test includes one of wayland headers, which produced
error with C++ compiler. C compiler can't be used for this test,
because it issues only a warning[1] and only when wayland headers
are not installed in system headers path (/usr/include).

[1] wayland-server-protocol.h:201:2: warning: implicit declaration of function ‘wl_resource_post_event’

[daniels: Merged in Marek's follow-up to check for a C++ compiler.]

Signed-off-by: Mariusz Ceier <mceier+wayland@gmail.com>
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-01-27 11:17:42 +00:00
Bryce Harrington
b7f9925abc configure.ac: bump version to 1.6.91 for the alpha release 2015-01-17 03:39:05 -08:00
Jon A. Cruz
480b437cd8 doc: Add config check for doxygen 1.6.0+.
Add a config time check for a new enough (1.6.0+) version of doxygen.

v2. require 1.6.0+ instead of 1.8.0+

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-08 10:07:35 +02:00
Peter Hutterer
f3e7eedf1c doc: replace publican with xmlto
Publican isn't packaged for some distros, xmlto is a lot more common. Most of
what publican provides for us is the stylesheet anyway, so we can just use
xmlto and the publican stylesheet to get roughly the same look.

PDF and XML generation has been dropped, this needs a bit more more effort
than a mere switchover to xmlto.

The top-level directory structure imposed by publican is kept for now
(specifically the Wayland/en-US/html tree). This makes it easier to transition over
for packagers. Note that the list of files inside has changed.

CSS files are taken from publican to keep a uniform look compared to previous
documentations. Stylesheets are licensed under CC0 1.0 Universal license, see
publican/LICENSE:

1.  Files in the datadir/Common_Content directory and its subdirectories are
    licensed under the CC0 1.0 Universal license.

    To the extent possible under law, the developers of Publican waive all
    copyright and related or neighboring rights to the files contained
    in the datadir/Common_Content directory and its subdirectories.

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-22 10:30:41 +03:00
Pekka Paalanen
472f0c48e6 configure.ac: bump version to 1.6.90
Master is open for new features again.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-22 09:51:20 +03:00
Pekka Paalanen
339e83aa57 configure.ac: bump version to 1.6.0
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-19 12:36:04 +03:00
Pekka Paalanen
edf4e7abea configure.ac: bump version to 1.5.93 for rc2
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-12 12:26:50 +03:00
Pekka Paalanen
44bf13ba0f configure.ac: bump version to 1.5.92 for rc1
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-05 14:57:03 +03:00
Pekka Paalanen
6d0f298665 configure.ac: Bump version to 1.5.91 for the alpha release
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-22 18:01:35 +03:00
Peter Hutterer
567977815a configure: fix publican version detection
Publican now adds a spurious "v" to the version output.
2014-07-06 12:39:16 +03:00
Kristian Høgsberg
3de6a1de3f configure.ac: Bump configure.ac version to 1.5.90 on master 2014-05-28 10:11:55 -07:00
Kristian Høgsberg
3ac62cd6b6 configure.ac: Bump version to 1.5.0 2014-05-19 16:24:00 -07:00
Kristian Høgsberg
bad885170f configure.ac: Bump version 1.4.93
This is the last RC before 1.5.
2014-05-12 12:54:13 -07:00
Kristian Høgsberg
4a4523fa92 configure.ac: Bump version to 1.4.92 2014-05-01 13:44:09 -07:00
Kristian Høgsberg
5e2cfd2a0a configure.ac: Bump version to 1.4.91 2014-04-07 16:08:42 -07:00
Kristian Høgsberg
7ecb102409 build: Move tests/Makefile.am into toplevel Makefile.am 2014-03-07 12:00:06 -08:00
Kristian Høgsberg
4c163b9b00 build: Move src/Makefile.am into toplevel Makefile.am 2014-03-07 11:50:59 -08:00
Kristian Høgsberg
267b28887d build: Move cursor Makefile.am into toplevel Makefile.am 2014-03-06 23:15:02 -08:00
Kristian Høgsberg
bb5344ee6d build: Move protocol/ Makefile.am into toplevel Makefile.am
A small step towards non-recursive build system for wayland too.
2014-02-18 14:55:09 -08:00
Kristian Høgsberg
6292fe2af6 build: Stop using xmllint to validate protocol files
Same reason as commit cd31275f28b0a04d2ec5426dc81e875197b47e52 from weston:

    The scanner needs to be good enough.  If it crashes or fails to report
    invalid input, that needs to get fixed.
2014-02-18 14:52:02 -08:00
Kristian Høgsberg
4b4cd00621 configure.ac: Bump version to 1.4 2014-01-23 20:50:27 -08:00
Kristian Høgsberg
45087064bc configure.ac: Bump version to 1.3.93
This is the release candidate.
2014-01-19 21:58:27 -08:00
Kristian Høgsberg
01bde6319f configure.ac: Bump version to 1.3.91 for the alpha release 2013-12-16 23:51:12 -08:00
Pekka Paalanen
011b695403 os: use posix_fallocate in creating sharable buffers
If posix_fallocate is available, use it instead of ftruncate. Unlike
ftruncate, when posix_fallocate succeeds, it guarantees that you cannot
run out of disk space, when later writing to the mmap()'ed file.

With posix_fallocate, if os_create_anonymous_file() succeeds, the
program cannot get a SIGBUS later from accessing this file via mmap. If
there is insufficient disk space, the function fails and errno is set to
ENOSPC.

This is useful on systems, that limit the available buffer space by
having XDG_RUNTIME_DIR on a small tmpfs.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-12-02 16:18:59 -08:00
Peter Hutterer
05f95c85c8 protocol: validate the protocol against a dtd
The scanner is not very forgiving if the protocol doesn't match it's
expectations and crashes without much of a notice. Thus, validate the protocol
against a DTD.

Move the protocol subdir forward so we validate first before trying anything
else, and install the DTD so we can validate weston's protocols as well.
2013-10-25 10:58:06 -07:00
Kristian Høgsberg
16b2dab4e4 configure.ac: Bump version to 1.3.90 for the master branch 2013-10-23 09:25:08 -07:00
Kristian Høgsberg
2c3dbb8903 configure.ac: Bump version to 1.3 2013-10-09 16:20:54 -07:00