linux_dl: Update stale comments before Mesa shipped ES3

Before Mesa shipped ES3, Waffle speculated that the library name would
remain libGLESv2.so. Speculation became reality. Update some comments
to replace that speculation with a statement of fact.

Reported-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
doxygen: Remove bitrotted Doxygen grouping directives

I had grand plans for Waffle's Doxygen. @defgroup, @ingroup,
@addtogroup, OH MY! The intent was that documentation for modules and
classes would be logically grouped in the Doxygen output. Alas, these
plans never really happened and Waffle's Doxygen grouping is a mess.

Mercy kill the Doxygen grouping directives. They can always be
resurrected if someone cares to clean it up.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
doxygen: Clean up @file directives

- Remove filename from @file directives. The filename should remain
  autodetected, otherwise the doxygen block becomes orphaned when the file
  becomes renamed.
- Don't put brief comments in @file. They go in @brief.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
debian: Fix lintian warning debhelper-but-no-misc-depends

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
debian: Set source format to 3.0 (quilt)

This helps fix a lintian warning.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
glx: Fix build in CMAKE_BUILD_TYPE=Debug

Fix this error.

glx_context.c: In function ‘glx_context_fill_attrib_list’:
glx_context.c:112:24: error: ‘dpy’ undeclared
  assert(dpy->ARB_create_context_profile);

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
debian: rename libwaffle-1 to libwaffle-1-0

The libwaffle-1 library has a soname INTERFACE version of 0. Debian's
libtian tool generates the warning package-name-doesnt-match-sonames
since the package name doesnt end with 0.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
wflinfo: Use glGetStringi(GL_EXTENSION, i) for all contexts >= 3.0

Pre-patch, wflinfo used glGetStringi only for desktop OpenGL >= 3.0.
Unlike the OpenGL Core Profile, OpenGL ES 3.0 also supports
glGetString(GL_EXTENSIONS) for backwards compatibility with OpenGL ES
2.0. However, let's use the forward-looking API when it's available.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
wflinfo: Don't allow negative version numbers

Previously, -V 4.-8 would be treated the same as -V 3.2.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
wflinfo: Don't modify struct options after initialization

parse_args() initializes global options. After that, options should be
immutable. To ensure that, constify each occurence of struct options as
a function parameter.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
wflinfo: Cleanup signature of wflinfo_try_create_context()

The function creates and returns two objects: a context and a config.
The context is the function's return value, and the config is an out
parameter.

Functions with asymmetric returns, I find awkard. Fix the signature to
return both objects as out parameters.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
wflinfo: Cleanup signature of wflinfo_create_context()

The function creates and returns two objects: a context and a config.
The context is the function's return value, and the config is an out
parameter.

Functions with asymmetric returns, I find awkard. Fix the signature to
return both objects as out parameters.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
wflinfo: Replace s/-1/WAFFLE_DONT_CARE/ when relevant

This clarifies the code's intent.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
wflinfo: Distinguish between cmdline options and func options

'struct options` is intended for cmdline options. But wflinfo repurposed
it to manage waffle_config attributes too by passing it into
wflinfo_create_context() and wflinfo_try_create_context().

Add a new type `struct wflinfo_config_attrs`.  Stop passing `struct
option` to those functions and pass wflinfo_config_attrs instead.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
core: Add helper functions for attrs versions

These functions make it easier to compare against known OpenGL and
OpenGLES versions since all known and expected future versions have a
minor version <= 9.

For example, to check that the attrs struct has a version >= 3.2, use
wcore_config_attrs_version_ge(attrs, 32)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
core: Stop using attrs->context_full_version

If the user makes a request to waffle for a minor version > 9, then
this field will not properly represent the requested version.

Although, such a request from the user would likely be invalid, we
should handle it properly.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
core: Remove attrs->context_full_version

If the user makes a request to waffle for a minor version > 9, then
this field will not properly represent the requested version.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Replace pkg_check_modules with waffle_pkg_config

Define a new macro waffle_pkg_config, which replaces each occurence of
pkg_check_modules.

Macro waffle_pkg_config is a smart wrapper around CMake's standard
pkg_check_modules macro.

waffle_pkg_config fixes a fatal flaw of pkg_check_modules.  Unlike
pkg_check_modules, waffle_pkg_config calls pkg-config and checks for the
requested package *each* time the macro is called.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
waffle: Update website url to http://waffle-gl.github.io

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
README: Update examples git location

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>