From 141d77a0140cddb1a4308123ad51774bdf29e6c5 Mon Sep 17 00:00:00 2001 From: Nathan Porter Date: Sat, 30 May 2020 15:39:11 -0700 Subject: [PATCH 1/4] Respect --program-suffix when installing phar Currently ./configure --enable-phar --program-suffix=7.4 will result in binaries named php7.4 and phar but should instead result in php7.4 and phar7.4 --- ext/phar/Makefile.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag index 6442f3349332e..6f76ec7dfa125 100644 --- a/ext/phar/Makefile.frag +++ b/ext/phar/Makefile.frag @@ -42,9 +42,9 @@ $(builddir)/phar.phar: $(builddir)/phar.php $(builddir)/phar/phar.inc $(srcdir)/ install-pharcmd: pharcmd -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) - $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir) + $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar.phar$(program_suffix) -@rm -f $(INSTALL_ROOT)$(bindir)/phar - $(LN_S) -f phar.phar $(INSTALL_ROOT)$(bindir)/phar + $(LN_S) -f phar.phar$(program_suffix) $(INSTALL_ROOT)$(bindir)/phar$(program_suffix) @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1 @$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.1 @$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.phar.1 From 4dd9c2765ea5d26403fcdea55c89369a17259ea4 Mon Sep 17 00:00:00 2001 From: Nathan Porter Date: Sun, 31 May 2020 13:09:30 -0700 Subject: [PATCH 2/4] Preserve .phar file extension when using suffix with phar.phar --- ext/phar/Makefile.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag index 6f76ec7dfa125..b64f03bf96012 100644 --- a/ext/phar/Makefile.frag +++ b/ext/phar/Makefile.frag @@ -42,9 +42,9 @@ $(builddir)/phar.phar: $(builddir)/phar.php $(builddir)/phar/phar.inc $(srcdir)/ install-pharcmd: pharcmd -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) - $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar.phar$(program_suffix) + $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar$(program_suffix).phar -@rm -f $(INSTALL_ROOT)$(bindir)/phar - $(LN_S) -f phar.phar$(program_suffix) $(INSTALL_ROOT)$(bindir)/phar$(program_suffix) + $(LN_S) -f phar$(program_suffix).phar $(INSTALL_ROOT)$(bindir)/phar$(program_suffix) @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1 @$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.1 @$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.phar.1 From 8c92f75c75a9aab11b3903f8e510937f13abe96a Mon Sep 17 00:00:00 2001 From: Nathan Porter Date: Sun, 31 May 2020 13:12:50 -0700 Subject: [PATCH 3/4] Apply program suffix to phar man page path --- ext/phar/Makefile.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag index b64f03bf96012..40f9a34bebba1 100644 --- a/ext/phar/Makefile.frag +++ b/ext/phar/Makefile.frag @@ -46,5 +46,5 @@ install-pharcmd: pharcmd -@rm -f $(INSTALL_ROOT)$(bindir)/phar $(LN_S) -f phar$(program_suffix).phar $(INSTALL_ROOT)$(bindir)/phar$(program_suffix) @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1 - @$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.1 - @$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.phar.1 + @$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar$(program_suffix).1 + @$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar$(program_suffix).phar.1 From 20431961b3b6c337412b7a7ff6ec02edf8173931 Mon Sep 17 00:00:00 2001 From: Nathan Porter Date: Tue, 2 Jun 2020 13:35:09 -0700 Subject: [PATCH 4/4] Also respect --program-prefix just as it is for php and phpdbg binaries --- ext/phar/Makefile.frag | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag index 40f9a34bebba1..58789cae25b57 100644 --- a/ext/phar/Makefile.frag +++ b/ext/phar/Makefile.frag @@ -42,9 +42,9 @@ $(builddir)/phar.phar: $(builddir)/phar.php $(builddir)/phar/phar.inc $(srcdir)/ install-pharcmd: pharcmd -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) - $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar$(program_suffix).phar - -@rm -f $(INSTALL_ROOT)$(bindir)/phar - $(LN_S) -f phar$(program_suffix).phar $(INSTALL_ROOT)$(bindir)/phar$(program_suffix) + $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)/$(program_prefix)phar$(program_suffix).phar + -@rm -f $(INSTALL_ROOT)$(bindir)/$(program_prefix)phar$(program_suffix) + $(LN_S) -f $(program_prefix)phar$(program_suffix).phar $(INSTALL_ROOT)$(bindir)/$(program_prefix)phar$(program_suffix) @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1 - @$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar$(program_suffix).1 - @$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar$(program_suffix).phar.1 + @$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)phar$(program_suffix).1 + @$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)phar$(program_suffix).phar.1