From a1d2df52e1fcb40cbfc4b3b18407240202c57fd4 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Fri, 26 Nov 2021 10:18:37 +0300
Subject: [PATCH 3/7] Add libavc1394 termux patch, mod thirdparty/Makefile for
 regen libavc1394 buildsys and disable oss in liba52

---
 cinelerra-5.1/thirdparty/Makefile                    | 6 +++---
 cinelerra-5.1/thirdparty/src/libavc1394-0.5.4.patch1 | 8 ++++++++
 2 files changed, 11 insertions(+), 3 deletions(-)
 create mode 100644 cinelerra-5.1/thirdparty/src/libavc1394-0.5.4.patch1

diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile
index 63adb5be..330ac2cb 100644
--- a/cinelerra-5.1/thirdparty/Makefile
+++ b/cinelerra-5.1/thirdparty/Makefile
@@ -186,7 +186,7 @@ cmake_config=echo 'cmake "$$$$@" "$(1)"' > ./configure; chmod +x ./configure;
 libbthread.cfg_vars?= echo "exec true" > ./configure; chmod +x ./configure;
 a52dec.mak_params?= ; cd $(call bld_path,a52dec,include); ln -sf . a52dec
 a52dec.cfg_vars?= CFLAGS+=" -U__FreeBSD__ $(call inc_path,djbfft)" LIBS+=" $(call ld_path,djbfft)"
-a52dec.cfg_params?=--enable-djbfft
+a52dec.cfg_params?=--enable-djbfft --disable-oss
 djbfft.cfg_vars?=echo "$(call bld_path,djbfft)" > conf-home; \
  (CFLAGS="$(CFLAGS)"; $(CFG_VARS)$(if $(CFG_VARS),; )echo "$(CC) $$$$CFLAGS") > conf-cc; \
  echo > ./configure; chmod +x ./configure;
@@ -214,10 +214,10 @@ mjpegtools.cfg_params?= --enable-shared=no --without-libquicktime --without-libd
 mjpegtools.mak_params?= all
 ladspa.cfg_vars?= CFLAGS+=' -Dinline="" '
 ladspa.mak_params?=; $(MAKE) -C ladspa* install DESTDIR=$(call bld_path,ladspa)
-libavc1394.cfg_vars?=PKG_CONFIG_PATH=$(call bld_path,libraw1394)
+libavc1394.cfg_vars?= PKG_CONFIG_PATH="$(call bld_path,libraw1394)";autoreconf -ifv -I m4 && automake -caf;
 libavc1394.cflags?="$(call inc_path,libraw1394)"
 libavc1394.ldflags?="$(call ld_path,libraw1394,src/.libs)"
-libavc1394.cfg_params?= --enable-shared=no
+libavc1394.cfg_params?= PKG_CONFIG_PATH="$(call bld_path,libraw1394)" --enable-shared=no
 libavc1394.mak_params?=; cd $(call bld_path,libavc1394); ln -sf ../librom1394/rom1394.h libavc1394/.
 libdv.cfg_params?= --disable-gtk --enable-shared=no
 libiec61883.cfg_vars?=PKG_CONFIG_PATH=$(call bld_path,libraw1394)
diff --git a/cinelerra-5.1/thirdparty/src/libavc1394-0.5.4.patch1 b/cinelerra-5.1/thirdparty/src/libavc1394-0.5.4.patch1
new file mode 100644
index 00000000..33dfab4f
--- /dev/null
+++ b/cinelerra-5.1/thirdparty/src/libavc1394-0.5.4.patch1
@@ -0,0 +1,8 @@
+--- ./Makefile.am.orig	2021-11-26 08:50:04.775736222 +0300
++++ ./Makefile.am	2021-11-26 08:50:18.707736223 +0300
+@@ -1,4 +1,4 @@
+-SUBDIRS = common libavc1394 librom1394 test
++SUBDIRS = common libavc1394 librom1394 
+ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config.h.in \
+ 	stamp-h.in
+ EXTRA_DIST = libavc1394.pc libavc1394.spec
-- 
2.34.0

