From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7353513829C for ; Wed, 1 Jun 2016 16:55:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16C5F23405D; Wed, 1 Jun 2016 16:53:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DB73A234055 for ; Wed, 1 Jun 2016 16:53:46 +0000 (UTC) Received: from localhost.localdomain (c-98-218-46-55.hsd1.md.comcast.net [98.218.46.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mjo@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id D6349340CD6 for ; Wed, 1 Jun 2016 16:53:45 +0000 (UTC) From: Michael Orlitzky To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] [PATCH 2/2] php-ext-pecl-r3.eclass: new revision supporting EAPI=6. Date: Wed, 1 Jun 2016 12:53:38 -0400 Message-Id: <1464800018-25873-3-git-send-email-mjo@gentoo.org> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1464800018-25873-1-git-send-email-mjo@gentoo.org> References: <1464800018-25873-1-git-send-email-mjo@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 5b368bb0-144f-4c4d-810d-4424cba853b4 X-Archives-Hash: 6d15f439a92acc1cffe236f6c9661a3b The php-ext-pecl eclasses are based mainly on the php-ext-source eclasses. Now that we have a new revision php-ext-source-r3.eclass, this new revision of php-ext-pecl inherits that. As a result, all of the changes affecting that revision also affect this one. A migration guide for users can be found on the wiki: https://wiki.gentoo.org/wiki/Project:PHP/Php-ext-source-r3_migration_guide Gentoo-Bug: 512184 --- eclass/php-ext-pecl-r3.eclass | 93 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 eclass/php-ext-pecl-r3.eclass diff --git a/eclass/php-ext-pecl-r3.eclass b/eclass/php-ext-pecl-r3.eclass new file mode 100644 index 0000000..bd9c622 --- /dev/null +++ b/eclass/php-ext-pecl-r3.eclass @@ -0,0 +1,93 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# @ECLASS: php-ext-pecl-r3.eclass +# @MAINTAINER: +# Gentoo PHP team +# @BLURB: A uniform way to install PECL extensions +# @DESCRIPTION: +# This eclass should be used by all dev-php/pecl-* ebuilds as a uniform +# way of installing PECL extensions. For more information about PECL, +# see http://pecl.php.net/ + +# @ECLASS-VARIABLE: PHP_EXT_PECL_PKG +# @DESCRIPTION: +# Set in ebuild before inheriting this eclass if the tarball name +# differs from ${PN/pecl-/} so that SRC_URI and HOMEPAGE get set +# correctly by the eclass. +# +# Setting this variable manually also affects PHP_EXT_NAME and ${S} +# unless you override those in ebuild. If that is not desired, please +# use PHP_EXT_PECL_FILENAME instead. +[[ -z "${PHP_EXT_PECL_PKG}" ]] && PHP_EXT_PECL_PKG="${PN/pecl-/}" + +# @ECLASS-VARIABLE: PHP_EXT_PECL_FILENAME +# @DEFAULT_UNSET +# @DESCRIPTION: +# Set in ebuild before inheriting this eclass if the tarball name +# differs from ${PN/pecl-/} so that SRC_URI gets set correctly by +# the eclass. +# +# Unlike PHP_EXT_PECL_PKG, setting this variable does not affect +# HOMEPAGE, PHP_EXT_NAME or ${S}. + + +[[ -z ${MY_PV} ]] && MY_PV=${PV} +PECL_PKG="${PHP_EXT_PECL_PKG}" +MY_PV="${MY_PV/_/}" +PECL_PKG_V="${PECL_PKG}-${MY_PV}" + +# Set PHP_EXT_NAME for php-ext-source-r3.eclass. +[[ -z "${PHP_EXT_NAME}" ]] && PHP_EXT_NAME="${PECL_PKG}" + +S="${WORKDIR}/${PECL_PKG_V}" + +inherit php-ext-source-r3 + +EXPORT_FUNCTIONS src_compile src_install src_test + +FILENAME="${PECL_PKG_V}.tgz" +if [[ -n "${PHP_EXT_PECL_FILENAME}" ]] ; then + FILENAME="${PHP_EXT_PECL_FILENAME}-${MY_PV}.tgz" +fi + +SRC_URI="http://pecl.php.net/get/${FILENAME}" +HOMEPAGE="http://pecl.php.net/${PECL_PKG}" + + +# @FUNCTION: php-ext-pecl-r3_src_compile +# @DESCRIPTION: +# Compile a standard PECL package. The process is the same as for any +# standalone PHP extension, so we delegate to php-ext-source-r3.eclass. +php-ext-pecl-r3_src_compile() { + php-ext-source-r3_src_compile +} + + +# @FUNCTION: php-ext-pecl-r3_src_install +# @DESCRIPTION: +# Install a standard PECL package. First we delegate to +# php-ext-source-r3.eclass, and then we attempt to install examples +# found in a standard location. +php-ext-pecl-r3_src_install() { + php-ext-source-r3_src_install + + if has examples ${IUSE} && use examples ; then + dodoc -r examples + fi +} + + +# @FUNCTION: php-ext-pecl-r3_src_test +# @DESCRIPTION: +# Run tests delivered with the PECL package. Phpize will have generated +# a run-tests.php file to be executed by `make test`. We only need to +# force the test suite to run in non-interactive mode. +php-ext-pecl-r3_src_test() { + for slot in $(php_get_slots); do + php_init_slot_env "${slot}" + NO_INTERACTION="yes" emake test || \ + die "emake test failed for slot ${slot}" + done +} -- 2.7.3