diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2024-03-10 21:53:15 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2024-03-11 06:24:00 -0400 |
commit | 9eecf694c25c09ddcf2b713bc0960172e5922ada (patch) | |
tree | 25f7e3d89c5806d82984c9223a2b4a62107775ee /dev-lang/php | |
parent | dev-tcltk/thread: update SRC_URI (diff) | |
download | gentoo-9eecf694c25c09ddcf2b713bc0960172e5922ada.tar.gz gentoo-9eecf694c25c09ddcf2b713bc0960172e5922ada.tar.bz2 gentoo-9eecf694c25c09ddcf2b713bc0960172e5922ada.zip |
dev-lang/php: simplify opcache installation
We don't need to specify the opcache path explicitly (or hack the ini
files) if we use the upstream "make install-modules" target that
installs opcache to the expected default path.
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'dev-lang/php')
-rw-r--r-- | dev-lang/php/php-8.3.3-r1.ebuild (renamed from dev-lang/php/php-8.3.3.ebuild) | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/dev-lang/php/php-8.3.3.ebuild b/dev-lang/php/php-8.3.3-r1.ebuild index 488c1dbec923..8fe4000652a6 100644 --- a/dev-lang/php/php-8.3.3.ebuild +++ b/dev-lang/php/php-8.3.3-r1.ebuild @@ -174,10 +174,6 @@ php_install_ini() { local phpinisrc="php.ini-production-${phpsapi}" cp php.ini-production "${phpinisrc}" || die - # Set the extension dir - sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \ - -i "${phpinisrc}" || die - # Set the include path to point to where we want to find PEAR # packages local sed_src='^;include_path = ".:/php.*' @@ -198,7 +194,7 @@ php_install_ini() { if use opcache; then elog "Adding opcache to $PHP_EXT_INI_DIR" - echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \ + echo "zend_extension = opcache.so" >> \ "${D}/${PHP_EXT_INI_DIR}"/opcache.ini dosym "../ext/opcache.ini" \ "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini" @@ -508,6 +504,10 @@ src_configure() { # in main/build-defs.h which is included in main/php.h which is # included by basically everything; so, avoiding a rebuild after # changing it is not an easy job. + # + # The upstream build system also does not support building the + # apache2 and embed SAPIs at the same time, presumably because they + # both produce a libphp.so. local one_sapi local sapi mkdir "${WORKDIR}/sapis-build" || die @@ -599,20 +599,15 @@ src_install() { fi done - # Makefile forgets to create this before trying to write to it... - dodir "${PHP_DESTDIR#${EPREFIX}}/bin" - - # Install php environment (without any sapis) + # Install SAPI-independent targets cd "${WORKDIR}/sapis-build/$first_sapi" || die emake INSTALL_ROOT="${D}" \ install-build install-headers install-programs - - local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" + use opcache && emake INSTALL_ROOT="${D}" install-modules # Create the directory where we'll put version-specific php scripts keepdir "/usr/share/php${PHP_MV}" - local file="" local sapi_list="" for sapi in ${SAPIS}; do @@ -678,12 +673,6 @@ src_install() { fi done - # Installing opcache module - if use opcache ; then - into "${PHP_DESTDIR#${EPREFIX}}" - dolib.so "modules/opcache$(get_libname)" - fi - # Install env.d files newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}" sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |