xref: /php-src/pear/Makefile.frag (revision f6382985)
1peardir=$(PEAR_INSTALLDIR)
2
3# Skip all php.ini files altogether
4PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dopen_basedir= -derror_reporting=1803 -dmemory_limit=-1 -ddetect_unicode=0
5
6WGET = `which wget 2>/dev/null`
7FETCH = `which fetch 2>/dev/null`
8PEAR_PREFIX = -dp a${program_prefix}
9PEAR_SUFFIX = -ds a$(program_suffix)
10PEAR_INSTALLER_URL = https://pear.php.net/install-pear-nozlib.phar
11
12install-pear-installer: $(SAPI_CLI_PATH)
13	@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
14
15install-pear:
16	@echo "Installing PEAR environment:      $(INSTALL_ROOT)$(peardir)/"
17	@if test ! -f $(builddir)/install-pear-nozlib.phar; then \
18		if test -f $(srcdir)/install-pear-nozlib.phar; then \
19			cp $(srcdir)/install-pear-nozlib.phar $(builddir)/install-pear-nozlib.phar; \
20		else \
21			if test ! -z "$(WGET)" && test -x "$(WGET)"; then \
22				"$(WGET)" "${PEAR_INSTALLER_URL}" -nd -P $(builddir)/; \
23			elif test ! -z "$(FETCH)" && test -x "$(FETCH)"; then \
24				"$(FETCH)" -o $(builddir)/ "${PEAR_INSTALLER_URL}"; \
25			else \
26				$(top_builddir)/sapi/cli/php -n $(srcdir)/fetch.php "${PEAR_INSTALLER_URL}" $(builddir)/install-pear-nozlib.phar; \
27			fi \
28		fi \
29	fi
30	@if test -f $(builddir)/install-pear-nozlib.phar && $(mkinstalldirs) $(INSTALL_ROOT)$(peardir); then \
31		$(MAKE) -s install-pear-installer; \
32	else \
33		cat $(srcdir)/install-pear.txt; \
34	fi
35