public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Brian Evans <grknight@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH] eclass update for php-ext-source-r3
Date: Tue, 17 Sep 2019 13:52:39 -0400	[thread overview]
Message-ID: <1c5a05e8-2a5b-c286-e1e6-e98bd2e1ef03@gentoo.org> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1460 bytes --]

This diff is required to get proper support for PHP 7.4 and newer.

Upstream has discontinued acinclude.m4 and this has been breaking our
call to eautoreconf.  Instead, we are now simulating their ./buildconf
script with our own toolchain functions to ensure cross-build compatibility.

diff --git a/eclass/php-ext-source-r3.eclass
b/eclass/php-ext-source-r3.eclass
index 5ef879a2be2..385bdb9dae0 100644
--- a/eclass/php-ext-source-r3.eclass
+++ b/eclass/php-ext-source-r3.eclass
@@ -15,7 +15,8 @@ inherit autotools
 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test

 case ${EAPI:-0} in
- 	6|7) ;;
+ 	6) inherit eapi7-ver ;;
+ 	7) ;;
 	*)
		die "${ECLASS} is not compatible with EAPI=${EAPI}"
 esac
@@ -183,10 +184,18 @@ php-ext-source-r3_phpize() {
		# WANT_AUTOMAKE (see bugs #329071 and #549268).
		autotools_run_tool "${PHPIZE}"

-		# Force libtoolize to run and regenerate autotools files (bug
-		# #220519).
-		rm aclocal.m4 || die "failed to remove aclocal.m4"
-		eautoreconf
+		# PHP >=7.4 no longer works with eautoreconf
+		if ver_test $PHP_CURRENTSLOT -ge 7.4 ; then
+			rm -fr aclocal.m4 autom4te.cache config.cache \
+				configure main/php_config.h.in || die
+			eautoconf --force
+			eautoheader
+		else
+			# Force libtoolize to run and regenerate autotools files (bug
+			# #220519).
+			rm aclocal.m4 || die "failed to remove aclocal.m4"
+			eautoreconf
+		fi
 	fi
 }



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 834 bytes --]

                 reply	other threads:[~2019-09-17 17:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c5a05e8-2a5b-c286-e1e6-e98bd2e1ef03@gentoo.org \
    --to=grknight@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox