From 7c94f4d7930b64a616d3581e498c02b1ccabc4b2 Mon Sep 17 00:00:00 2001
From: Cameron Cawley <ccawley2011@gmail.com>
Date: Sun, 13 Feb 2022 19:06:04 +0000
Subject: [PATCH 2/2] Update libwebp to 1.2.2

---
 sdk/Makefile                               |  3 ++-
 sdk/recipes/patches/libwebp/configure.ac.p |  6 +++---
 sdk/recipes/patches/libwebp/configure.p    | 11 -----------
 3 files changed, 5 insertions(+), 15 deletions(-)
 delete mode 100644 sdk/recipes/patches/libwebp/configure.p

diff --git a/sdk/Makefile b/sdk/Makefile
index 6f79bbe..6870546 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -39,7 +39,7 @@ VERSION_LIBJPEG := 8d
 # libjpeg turbo have dropped autotools support VERSION_LIBJPEG_TURBO := 2.0.2
 VERSION_LIBJPEG_TURBO := 1.5.3
 # https://developers.google.com/speed/webp/
-VERSION_LIBWEBP := 1.0.3
+VERSION_LIBWEBP := 1.2.2
 # https://c-ares.haxx.se/
 VERSION_LIBCARES := 1.15.0
 # https://curl.haxx.se/
@@ -457,6 +457,7 @@ $(BUILDSTEPS)/libwebp.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libwebp-src.d
 ifneq ($(realpath $(RECIPES)/patches/libwebp/$(TARGET)),)
 	for p in `ls $(RECIPES)/patches/libwebp/$(TARGET)/*.p` ; do $(PATCH) -d $(BUILDDIR)/libwebp/libwebp-$(VERSION_LIBWEBP) -p0 <$$p ; done
 endif
+	cd $(BUILDDIR)/libwebp/libwebp-$(VERSION_LIBWEBP) && $(env) autoreconf -fi
 	cd $(BUILDDIR)/libwebp/libwebp-$(VERSION_LIBWEBP) && $(env) $(LIBWEBP_ENV) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared $(EXTRAARGS_LIBWEBP)
 	cd $(BUILDDIR)/libwebp/libwebp-$(VERSION_LIBWEBP) && $(env) make install
 	touch $@
diff --git a/sdk/recipes/patches/libwebp/configure.ac.p b/sdk/recipes/patches/libwebp/configure.ac.p
index 30150d1..c4a88d2 100644
--- a/sdk/recipes/patches/libwebp/configure.ac.p
+++ b/sdk/recipes/patches/libwebp/configure.ac.p
@@ -1,6 +1,6 @@
---- configure.ac.orig	2019-07-04 20:32:37.000000000 +0100
-+++ configure.ac	2019-08-26 01:10:45.539132422 +0100
-@@ -485,7 +485,7 @@
+--- configure.ac.orig	2022-01-19 23:35:26.000000000 +0000
++++ configure.ac	2022-02-13 18:21:35.250849436 +0000
+@@ -527,7 +527,7 @@
                   libpng12-config])
    if test -n "$LIBPNG_CONFIG"; then
      PNG_INCLUDES=`$LIBPNG_CONFIG --cflags`
diff --git a/sdk/recipes/patches/libwebp/configure.p b/sdk/recipes/patches/libwebp/configure.p
deleted file mode 100644
index 02dc813..0000000
--- a/sdk/recipes/patches/libwebp/configure.p
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig	2019-07-04 20:43:58.000000000 +0100
-+++ configure	2019-08-26 01:11:13.365038420 +0100
-@@ -14312,7 +14312,7 @@
- 
-   if test -n "$LIBPNG_CONFIG"; then
-     PNG_INCLUDES=`$LIBPNG_CONFIG --cflags`
--    PNG_LIBS="`$LIBPNG_CONFIG --ldflags`"
-+    PNG_LIBS="`$LIBPNG_CONFIG --static --ldflags`"
-   fi
- 
- 
-- 
2.30.2

