From owner-freebsd-ports@freebsd.org Fri Jun 24 15:14:08 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4888AB804A9 for ; Fri, 24 Jun 2016 15:14:08 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 312DF10E8 for ; Fri, 24 Jun 2016 15:14:08 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: by mailman.ysv.freebsd.org (Postfix) id 2CFE1B804A7; Fri, 24 Jun 2016 15:14:08 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A660B804A4 for ; Fri, 24 Jun 2016 15:14:08 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: from vfemail.net (onethreetwo.vfemail.net [199.16.11.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D025810CD for ; Fri, 24 Jun 2016 15:14:07 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: (qmail 72797 invoked by uid 89); 24 Jun 2016 15:07:24 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 24 Jun 2016 15:07:22 -0000 Received: (qmail 44249 invoked by uid 89); 24 Jun 2016 03:59:34 -0000 Received: by simscan 1.3.1 ppid: 44245, pid: 44247, t: 0.1018s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 24 Jun 2016 03:59:34 -0000 Received: (qmail 16103 invoked by uid 89); 24 Jun 2016 03:59:34 -0000 Received: by simscan 1.4.0 ppid: 16085, pid: 16092, t: 0.9927s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by mail.vfemail.net with ESMTPA; 24 Jun 2016 03:59:33 -0000 From: Jan Beich To: Yuri Cc: "ports\@freebsd.org" Subject: Re: Any way to add USES clause depending on two options without including bsd.port.options.mk? References: <4e06c0b2-e70e-68e8-732b-97774cff8b2d@rawbw.com> Date: Fri, 24 Jun 2016 05:59:23 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2016 15:14:08 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Yuri writes: > I have two port options: GUI NLS. > > I would like to have USES=3Dgettext only when both GUI and NLS are "on". > > If it was only one option, say NLS, NLS_USES=3Dgettext would work. > > But what about the two options case? Is there any magic to do this > without .include ? Depends on the port but here're some ideas: =2D Move to a common option via _IMPLIES (e.g. GPL3 in multimedia/ffmpeg) =2D Nest or create custom option helpers e.g., OPTIONS_DEFINE=3D GUI NLS GUI_VARS=3D NLS_USES=3Dgettext =20=20=20=20 # pkg-plist %%GUI%%%%NLS%%share/locale/foo/LC_MESSAGES/bar.mo --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJXbLAbXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3bkIUIAIOBY5fJLgDJy0ThhAY93tQL M+PGJAtNeKZ0eJQBZ3NPvUZgBnOiwOIjTYx4iATUHRqSov2fA5Kmg1yvti4+1nN8 y68OA3Wp7a3VGeegYhvtA2wIo0sYNdInqDIeChVod1R4h12egOk8C/3T4OqQYUne PJLM3k+jP8t0LUrREN7fbrt84tWQRbWV4dD7IoSaTkulUYPA2+ornQdqsQXipCOi GrpkgkXoRMcEKvYghS40ggyAUZuIc5l9ZlAkcRv65ofXgCL+2UcNRzHp1HxQ1mhR d6vmGPnUFJJSPjf7xmJ5O3dmzbBVeYPXSzVhnXn8YVQFtkHrWrL9AoXNtl1ZjJc= =a9r/ -----END PGP SIGNATURE----- --=-=-=--