weston: make webp explicitly configurable

This patch fixes:
    weston/weston/latest lost dependency on  libwebp
    weston/weston-examples/latest lost dependency on  libwebp
from:
http://lists.openembedded.org/pipermail/openembedded-core/2014-June/093704.html

(From OE-Core rev: f688ab0b8c3c1842d60cc2e18ac17af1f901f7b9)

Signed-off-by: Tim Orling <TicoTimo@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Tim Orling
2014-07-04 13:06:16 -07:00
committed by Richard Purdie
parent 4956ae7879
commit d3a3f4bc2a
2 changed files with 42 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
The libwebp package is outside of openembedded-core, so make it
explicitly configurable. Make it deterministic, so that if libwebp
dependencies are missing, autoconf throws a fatal error.
Upstream-Status: Pending
Index: weston-1.5.0/configure.ac
===================================================================
--- weston-1.5.0.orig/configure.ac
+++ weston-1.5.0/configure.ac
@@ -268,9 +268,22 @@ fi
PKG_CHECK_MODULES(PIXMAN, [pixman-1])
PKG_CHECK_MODULES(PNG, [libpng])
-PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])
-AS_IF([test "x$have_webp" = "xyes"],
- [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
+AC_ARG_ENABLE(webp,
+ AS_HELP_STRING([--disable-webp],
+ [Disable libwebp support]),,
+ enable_webp=auto)
+AM_CONDITIONAL(HAVE_WEBP, [test "x$enable_webp" = xyes])
+AS_IF([test "x$enable_webp" != "xno"],
+ PKG_CHECK_MODULES(WEBP,
+ [libwebp],
+ [have_webp=yes],
+ [have_webp=no])
+ AS_IF([test "x$have_webp" = "xno" -a "x$enable_webp" = "xyes"],
+ AC_MSG_ERROR([libwebp support explicitly request, but lipwebp could not be found]))
+ AS_IF([test "x$have_webp" = "xyes"],
+ [enable_webp=yes]
+ [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
+)
AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],,
enable_vaapi_recorder=auto)

View File

@@ -9,7 +9,9 @@ SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://weston.png \
file://weston.desktop \
file://disable-wayland-scanner-pkg-check.patch \
file://make-lcms-explicitly-configurable.patch"
file://make-lcms-explicitly-configurable.patch \
file://make-libwebp-explicitly-configurable.patch \
"
SRC_URI[md5sum] = "8eb40d230efc2411f083c20656534780"
SRC_URI[sha256sum] = "06388ba04ac79aa72d685cc1a8e646ddb2b8cfe11fcc742294f9addac48b7684"
@@ -56,6 +58,8 @@ PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --d
PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
# Weston with lcms support
PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
# Weston with webp support
PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
do_install_append() {
# Weston doesn't need the .la files to load modules, so wipe them