Skip to content

Commit 1f061b3

Browse files
committed
fix #39300 (make install fails if wget is not available)
add support of 'fetch'
1 parent cc89544 commit 1f061b3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ PHP NEWS
3030
an extension INI directive). (wharmby at uk dot ibm dot com, Dmitry)
3131
- Fixed bug #39320 (ZEND_HASH_APPLY_STOP causes deletion). (Marcus)
3232
- Fixed bug #39313 (spl_autoload triggers Fatal error). (Marcus)
33+
- Fixed bug #39300 (make install fails if wget is not available). (Tony)
3334
- Fixed bug #39297 (Memory corryption because of indirect modification
3435
of overloaded array). (Dmitry)
3536
- Fixed bug #39265 (Fixed path handling inside mod_files.sh).

pear/Makefile.frag

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ peardir=$(PEAR_INSTALLDIR)
44

55
# Skip all php.ini files altogether
66
PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1 -ddetect_unicode=0
7+
WGET = `which wget 2>/dev/null`
8+
FETCH = `which fetch 2>/dev/null`
79

810
install-pear-installer: $(SAPI_CLI_PATH)
911
@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) $(builddir)/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)"
@@ -14,7 +16,15 @@ install-pear:
1416
if test -f $(srcdir)/install-pear-nozlib.phar; then \
1517
cp $(srcdir)/install-pear-nozlib.phar $(builddir)/install-pear-nozlib.phar; \
1618
else \
17-
wget http://pear.php.net/install-pear-nozlib.phar -nd -P $(builddir)/; \
19+
if test ! -z "$(WGET)" && test -x "$(WGET)"; then \
20+
"$(WGET)" http://pear.php.net/install-pear-nozlib.phar -nd -P $(builddir)/; \
21+
elif test ! -z "$(FETCH)" && test -x "$(FETCH)"; then \
22+
"$(FETCH)" -o $(builddir)/ http://pear.php.net/install-pear-nozlib.phar; \
23+
else \
24+
echo ""; \
25+
echo "No download utilities found. Don't know how to download PEAR archive."; \
26+
echo ""; \
27+
fi \
1828
fi \
1929
fi
2030
@if test -f $(builddir)/install-pear-nozlib.phar && $(mkinstalldirs) $(INSTALL_ROOT)$(peardir); then \

0 commit comments

Comments
 (0)