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 C10FC138010 for ; Thu, 6 Sep 2012 20:46:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5B4A021C06A; Thu, 6 Sep 2012 20:46:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E07A821C043 for ; Thu, 6 Sep 2012 20:44:39 +0000 (UTC) Received: from [192.168.4.5] (blfd-5d822b1b.pool.mediaWays.net [93.130.43.27]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hasufell) by smtp.gentoo.org (Postfix) with ESMTPSA id D7E1233D768 for ; Thu, 6 Sep 2012 20:44:38 +0000 (UTC) Message-ID: <50490B32.5010507@gentoo.org> Date: Thu, 06 Sep 2012 22:44:34 +0200 From: hasufell User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120801 Thunderbird/10.0.6 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 MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] python-distutils-ng.eclass: allow useflag dependencies for python X-Enigmail-Version: 1.3.5 Content-Type: multipart/mixed; boundary="------------030401090603090603030607" X-Archives-Salt: 8da3f285-1308-487a-af0a-f5112498aa63 X-Archives-Hash: 4b64955a451b76d388edf35a6f1a7ed0 This is a multi-part message in MIME format. --------------030401090603090603030607 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I am missing a replacement for PYTHON_USE_WITH. Would the attached patch help in any way? Review? Other ideas? --------------030401090603090603030607 Content-Type: text/x-patch; name="python-distutils-ng.eclass.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="python-distutils-ng.eclass.patch" --- python-distutils-ng.eclass +++ python-distutils-ng.eclass @@ -59,6 +59,25 @@ # Set to any value to disable automatic reinstallation of scripts in bin # directories. See python-distutils-ng_src_install function. +# @ECLASS-VARIABLE: PYTHON_USE +# @DEFAULT_UNSET +# @DESCRIPTION: +# comma seperated list of useflags needed for python +# this is directly substituted into dev-lang/python[${PYTHON_USE}] thus allowing +# all valid useflag dependencies +# example 1: PYTHON_USE="xml,sqlite" +# example 2: PYTHON_USE="xml?,threads?,-foo" + +# @ECLASS-VARIABLE: JYTHON_USE +# @DEFAULT_UNSET +# @DESCRIPTION: +# same as PYTHON_USE just for JYTHON + +# @ECLASS-VARIABLE: PYPY_USE +# @DEFAULT_UNSET +# @DESCRIPTION: +# same as PYTHON_USE just for PYPY + EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install case "${EAPI}" in @@ -107,16 +126,22 @@ fi unset required_use_str +# avoid empty use deps +[[ -n ${PYTHON_USE} ]] && _PYTHON_USE="[${PYTHON_USE}]" || _PYTHON_USE="" +[[ -n ${JYTHON_USE} ]] && _JYTHON_USE="[${JYTHON_USE}]" || _JYTHON_USE="" +[[ -n ${PYPY_USE} ]] && _PYPY_USE="[${PYPY_USE}]" || _PYPY_USE="" + +# set python DEPEND and RDEPEND for impl in ${PYTHON_COMPAT}; do IUSE+=" python_targets_${impl}" dep_str="${impl/_/.}" case "${dep_str}" in python?.?) - dep_str="dev-lang/python:${dep_str: -3}" ;; + dep_str="dev-lang/python:${dep_str: -3}${_PYTHON_USE}" ;; jython?.?) - dep_str="dev-java/jython:${dep_str: -3}" ;; + dep_str="dev-java/jython:${dep_str: -3}${_JYTHON_USE}" ;; pypy?.?) - dep_str="dev-python/pypy:${dep_str: -3}" ;; + dep_str="dev-python/pypy:${dep_str: -3}${_PYPY_USE}" ;; *) die "Unsupported implementation: ${impl}" ;; esac --------------030401090603090603030607--