From 49f78ccdf337d7b03f4e69e33ac0aa6a4a9d53f5 Mon Sep 17 00:00:00 2001
From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
Date: Thu, 13 Dec 2018 00:27:46 -0500
Subject: [PATCH] Makefile.am: Explicitly install mod +x binaries

With the default file mode for $(inst_sh) changed to 0644,
it's now necessary to explicitly install the files we want
to be executable.

This commit replaces $(inst_sh) for those files (only) with
individual calls to the default autotools $(install_sh) script.
Destination directory paths are first created, if necessary.
---
 cinelerra-5.1/Makefile.am | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/cinelerra-5.1/Makefile.am b/cinelerra-5.1/Makefile.am
index a61379c..e38ba2d 100644
--- a/cinelerra-5.1/Makefile.am
+++ b/cinelerra-5.1/Makefile.am
@@ -50,7 +50,10 @@ bin_uninstall:
 
 # with system_build
 sys_install: $(CIN_INSTALLS)
-	cd bin; $(inst_sh) "$(DESTDIR)$(bindir)" "$(WANT_CIN)" bdwrite
+	$(install_sh) -d "$(DESTDIR)$(bindir)"
+	cd bin; $(install_sh) -t "$(DESTDIR)$(bindir)" "$(WANT_CIN)";\
+			$(install_sh) -t "$(DESTDIR)$(bindir)" bdwrite
+
 	cd bin; $(inst_sh) "$(DESTDIR)$(datadir)/$(WANT_CIN)" \
 		COPYING README models Cinelerra_factory expanders.txt \
 		ffmpeg msg info tips doc
@@ -77,18 +80,26 @@ dvl_uninstall:
 
 # with-libzmpeg3
 zmp_install:
-	cd bin; $(inst_sh) "$(DESTDIR)$(bindir)" \
-		zmpeg3{cat,cc2txt,ifochk,show,toc}
-	cd bin; $(inst_sh) "$(DESTDIR)$(WANT_CINLIB_DIR)" \
-		hveg2enc mpeg2enc mplex mplexlo
+	$(install_sh) -d "$(DESTDIR)$(bindir)"
+	cd bin; for b in zmpeg3{cat,cc2txt,ifochk,show,toc}; do\
+		$(install_sh) -t "$(DESTDIR)$(bindir)" $$b;\
+	done
+
+	$(install_sh) -d "$(DESTDIR)$(WANT_CINLIB_DIR)"
+	cd bin; for b in hveg2enc mpeg2enc mplex mplexlo; do\
+		$(install_sh) -t "$(DESTDIR)$(WANT_CINLIB_DIR)" $$b;\
+	done
 
 zmp_uninstall:
 	rm -f "$(DESTDIR)$(bindir)"/zmpeg3{cat,cc2txt,ifochk,show,toc}
 
 # with-commercial
 com_install:
-	cd bin; $(inst_sh) "$(DESTDIR)$(bindir)" cin_db
-	cd bin; $(inst_sh) "$(DESTDIR)$(WANT_CINLIB_DIR)" cutads
+	$(install_sh) -d "$(DESTDIR)$(bindir)"
+	cd bin; $(install_sh) -t "$(DESTDIR)$(bindir)" cin_db
+
+	$(install_sh) -d "$(DESTDIR)$(WANT_CINLIB_DIR)"
+	cd bin; $(install_sh) -t "$(DESTDIR)$(WANT_CINLIB_DIR)" cutads
 
 com_uninstall:
 	rm -f "$(DESTDIR)$(bindir)/cin_db"
@@ -110,4 +121,3 @@ lv2_uninstall:
 
 val-%:
 	@echo $($(subst val-,,$@))
-
-- 
2.19.2

