pkg/archlinux: Import waffle-1.3.0 PKGBUILD from AUR

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
pkg/archlinux: Remove PKGBUILD.template

The build system generated a real PKGBUILD from PKGBUILD.template.
Rather than do that, let's just maintain *real* PKGBUILD's from the AUR
that are known to work.
Merge branch 'cmocka'

This merge makes progress towards killing off libwaffle_test and
replacing it with cmocka.

- Add subtree 'third_party/cmocka' from tag cmocka-0.3.2.
- Convert all unit test executables to use cmocka. They no longer use
  libwaffle_test.
- The only remaining user of libwaffle_test is gl_basic_test, which
  I will also move to cmocka eventually.
cmake: Don't build unittests when waffle_build_tests=0

Return early from add_unittest() if waffle_build_tests=0, making the
function a no-op.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
android: Fix Android Kitkat build issue

Changes in Android Kitkat required one extra include file to allow
using ANativeWindow.

Signed-off-by: Juha-Pekka Heikkila <juha-pekka.heikkila@linux.intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
gitignore: Fix .gitignore for recently added tests.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Fix dependency on cmocka

This fixes an error in the Makefile-dependency of unittests, introduced
in commit ad40427a864a7436953b319fbfdb2c04ccb7bdab.

From the perspective of Waffle's CMake, libcmocka.so is an *imported*
library. In other words, it's a virtual target, represented by
a '.PHONY' target in Unix Makefiles.

To guarantee that libcmocka.so gets built, CMake must declare that the
.PHONY 'cmocka' target depends on another .PHONY target, which does the
actual building. Making 'cmocka' depend on a non-PHONY target doesn't
work.

Reported-by: Shazia Rahman <srahman@nvidia.com>
Reported-by: Paul Berry <stereotype441@gmail.com>
Tested-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
wip! rename gl_basic_error -> error_printf
wip! Rename error_waffle() -> handle_waffle_error()

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
wip! Rename error_get_gl_symbol() -> handle_gl_symbol_error()

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
wip! clear_test
wip! run-functional-tests
SAVE