From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D6E46138334 for ; Thu, 21 Feb 2019 12:50:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 992A0E086D; Thu, 21 Feb 2019 12:50:20 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 44D7EE082D for ; Thu, 21 Feb 2019 12:50:20 +0000 (UTC) Received: from [192.168.1.100] (c-98-218-46-55.hsd1.md.comcast.net [98.218.46.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mjo) by smtp.gentoo.org (Postfix) with ESMTPSA id 58EB1335D45 for ; Thu, 21 Feb 2019 12:50:18 +0000 (UTC) Subject: Re: [gentoo-dev] [PATCH] xorg-3.eclass: Copy from xorg-2.eclass and add EAPI 7 support To: gentoo-dev@lists.gentoo.org References: <20190221060957.775-1-mattst88@gentoo.org> From: Michael Orlitzky Message-ID: <9bfaa289-250b-9701-77e4-a187500d03c2@gentoo.org> Date: Thu, 21 Feb 2019 07:50:10 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: <20190221060957.775-1-mattst88@gentoo.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Archives-Salt: 1444e2c2-ac7e-40a6-91b4-e3c8285e1cd9 X-Archives-Hash: 0ac3c80c875e29558d22d2a8eb7e6b36 On 2/21/19 1:09 AM, Matt Turner wrote: > > 2) Suggestions welcome for solving https://bugs.gentoo.org/637898 > I have no ideas... > The eclass documentation script wants a fixed default value for variables that are optional. For XORG_MODULE, instead of a case statement, if [[ -z ${XORG_MODULE} ]]; then case ${CATEGORY} in app-doc) XORG_MODULE=doc/ ;; media-fonts) XORG_MODULE=font/ ;; ... you could make the default value "auto" (or some other magic value), and then document that "auto" will guess based on the package's category. The same thing should work for XORG_MODULE_REBUILD. First, I would ensure that DRIVER is set to either "yes" or "no" (right now it can be empty, I think). Then make the default value for XORG_MODULE_REBUILD something like "auto", and do if [[ "${XORG_MODULE_REBUILD}" == auto ]]; then XORG_MODULE_REBUILD="${DRIVER}" fi