From 68ed0a8b6893ba330b63ac81062976479dc7f3d3 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Mon, 30 Jan 2023 21:00:30 +0300
Subject: [PATCH] Add libtiff pthread workaround for libwebp

---
 cinelerra-5.1/thirdparty/src/tiff-4.4.0.patch2 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 cinelerra-5.1/thirdparty/src/tiff-4.4.0.patch2

diff --git a/cinelerra-5.1/thirdparty/src/tiff-4.4.0.patch2 b/cinelerra-5.1/thirdparty/src/tiff-4.4.0.patch2
new file mode 100644
index 00000000..addd2791
--- /dev/null
+++ b/cinelerra-5.1/thirdparty/src/tiff-4.4.0.patch2
@@ -0,0 +1,12 @@
+--- ./configure.ac.orig	2023-01-30 20:35:40.839847499 +0300
++++ ./configure.ac	2023-01-30 20:48:27.751778042 +0300
+@@ -838,7 +838,8 @@
+ if test "x$enable_webp" != "xno" ; then
+ 
+   if test "x$with_webp_lib_dir" != "x" ; then
+-    LDFLAGS="-L$with_webp_lib_dir $LDFLAGS"
++    LIBS="-lpthread $LIBS"
++    LDFLAGS="-L$with_webp_lib_dir $LDFLAGS "
+   fi
+   
+   AC_CHECK_LIB(webp, WebPDecode, [webp_lib=yes], [webp_lib=no],)
-- 
2.39.1

