EAPI=5
-inherit eutils autotools autotools-utils flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module libtool systemd
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
fi
# SAPI-specific handling
-
if [[ "${sapi}" == "fpm" ]] ; then
- [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
- einfo "Installing FPM CGI config file php-fpm.conf"
+ einfo "Installing FPM config file php-fpm.conf"
insinto "${PHP_INI_DIR#${EPREFIX}}"
- newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
-
- # Remove bogus /etc/php-fpm.conf.default (bug 359906)
- rm -f "${ED}/etc/php-fpm.conf.default" || die
+ doins sapi/fpm/php-fpm.conf
fi
- # Install PHP ini files into /usr/share/php
-
dodoc php.ini-development
dodoc php.ini-production
-
}
php_set_ini_dir() {
use "${one_sapi}" || continue
php_set_ini_dir "${one_sapi}"
- # The BUILD_DIR variable is used by autotools-utils to determine
- # where to output the files that autotools creates.
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
cp -r "${S}" "${BUILD_DIR}" || die
cd "${BUILD_DIR}" || die
esac
done
- # Construct the autotools-utils $myeconfargs array by
- # concatenating $our_conf (the common args) and $sapi_conf (the
- # SAPI-specific args).
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
local myeconfargs=( "${our_conf[@]}" )
myeconfargs+=( "${sapi_conf[@]}" )
- autotools-utils_src_configure
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
done
}
EAPI=5
-inherit eutils autotools autotools-utils flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module libtool systemd
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
fi
# SAPI-specific handling
-
if [[ "${sapi}" == "fpm" ]] ; then
- [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
- einfo "Installing FPM CGI config file php-fpm.conf"
+ einfo "Installing FPM config files php-fpm.conf and www.conf"
insinto "${PHP_INI_DIR#${EPREFIX}}"
- newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
-
- # Remove bogus /etc/php-fpm.conf.default (bug 359906)
- rm -f "${ED}/etc/php-fpm.conf.default" || die
+ doins sapi/fpm/php-fpm.conf
+ insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
+ doins sapi/fpm/www.conf
fi
- # Install PHP ini files into /usr/share/php
-
dodoc php.ini-development
dodoc php.ini-production
-
}
php_set_ini_dir() {
# http://bugs.php.net/bug.php?id=48795, bug #343481
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
fi
+
+ # In php-7.x, the FPM pool configuration files have been split off
+ # of the main config. By default the pool config files go in
+ # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
+ # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
+ # we'll install the pool configuration file "www.conf" there.
+ php_set_ini_dir fpm
+ sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
+ sapi/fpm/php-fpm.conf.in \
+ || die 'failed to move the include directory in php-fpm.conf'
}
src_configure() {
use "${one_sapi}" || continue
php_set_ini_dir "${one_sapi}"
- # The BUILD_DIR variable is used by autotools-utils to determine
- # where to output the files that autotools creates.
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
cp -r "${S}" "${BUILD_DIR}" || die
cd "${BUILD_DIR}" || die
esac
done
- # Construct the autotools-utils $myeconfargs array by
- # concatenating $our_conf (the common args) and $sapi_conf (the
- # SAPI-specific args).
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
local myeconfargs=( "${our_conf[@]}" )
myeconfargs+=( "${sapi_conf[@]}" )
- autotools-utils_src_configure
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
done
}