From owner-freebsd-ports@freebsd.org Mon Sep 4 22:02:15 2017 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 58047E2112F for ; Mon, 4 Sep 2017 22:02:15 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from prod2.absolight.net (mx3.absolight.net [IPv6:2a01:678:2:100::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "plouf.absolight.net", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1143763AB4 for ; Mon, 4 Sep 2017 22:02:15 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from prod2.absolight.net (localhost [127.0.0.1]) by prod2.absolight.net (Postfix) with ESMTP id 90A32BDD2D for ; Tue, 5 Sep 2017 00:02:11 +0200 (CEST) Received: from atuin.in.mat.cc (atuin.in.mat.cc [79.143.241.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by prod2.absolight.net (Postfix) with ESMTPSA id 87C63BDD1E for ; Tue, 5 Sep 2017 00:02:11 +0200 (CEST) Subject: Re: What is the right way to make OPTIONS_DEFAULT depend on To: freebsd-ports@freebsd.org References: <26464750-b401-1b14-9b3f-cd9b7b83bd4f@rawbw.com> From: Mathieu Arnold Organization: Absolight / The FreeBSD Foundation Message-ID: <4e6f084f-45b6-aafd-0a37-0c9511d82632@FreeBSD.org> Date: Tue, 5 Sep 2017 00:02:10 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tD16JVx07ViB1o3tNeqX67nBFPai7ormx" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Sep 2017 22:02:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tD16JVx07ViB1o3tNeqX67nBFPai7ormx Content-Type: multipart/mixed; boundary="r13FPVsoUIb9MEKxTwwR2N566EovvGjpf"; protected-headers="v1" From: Mathieu Arnold To: freebsd-ports@freebsd.org Message-ID: <4e6f084f-45b6-aafd-0a37-0c9511d82632@FreeBSD.org> Subject: Re: What is the right way to make OPTIONS_DEFAULT depend on References: <26464750-b401-1b14-9b3f-cd9b7b83bd4f@rawbw.com> In-Reply-To: --r13FPVsoUIb9MEKxTwwR2N566EovvGjpf Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: fr Le 03/09/2017 =C3=A0 16:51, Matthew Seaman a =C3=A9crit=C2=A0: > On 03/09/2017 05:57, Yuri wrote: >> This doesn't work: >> >>> .include >>> >>> .if ${OPSYS} =3D=3D FreeBSD && ${OSVERSION} < 1100000 >>> OPTIONS_DEFAULT+=3D MYOPT >>> .endif >> MYOPT isn't picked up >> >> >> I tried with a regular expressions, witout .include: >>> SYSVERSION=3D=C2=A0=C2=A0=C2=A0 ${OPSYS}${OSVERSION} >>> OPTIONS_DEFAULT=3DHELP >>> ${SYSVERSION:C/^FreeBSD1[1-9][0-9]{5}$/MYOPT/:MMYOPT} >> MYOPT isn't picked up again. >> > If you're referring to $OPSYS or $OSVERSION then you'll want to > put that section of code after > > .include > > and obviously change the last line in your Makefile to > > .include But you cannot define any OPTIONS_* variables after including bsd.port.options.mk (which happen about in the middle of what bsd.port.pre.mk does.) The thing that people who want to do something like this usually do is an ugly: OPTIONS_DEFAULT=3D FOO BAR ${OPTIONS_DEFAULT_${OPSYS}_${OSREL:R}} OPTIONS_DEFAULT_FreeBSD_10=3D BAZ It is usually a bad idea, why are you trying to do this ? --=20 Mathieu Arnold --r13FPVsoUIb9MEKxTwwR2N566EovvGjpf-- --tD16JVx07ViB1o3tNeqX67nBFPai7ormx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJZrc1jXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzQUI2OTc4OUQyRUQxMjEwNjQ0MEJBNUIz QTQ1MTZGMzUxODNDRTQ4AAoJEDpFFvNRg85Ics0P/0doPVwKCH/fwbDFUlmZJ+iB ctaT7oO6Nz8Y+LBcxviSauAwNh1eL6pdOpCydNfrc33fCLqcAifhRv/YjGyBc8Fo W4LQcEEuZlvejtYAOMxCA/Qw11voMGHKrkcODgPrfH8cpSdkj1uIyEiPEeUaLtbv Dobk6MNHIWnWLmzBKNOlzKl5EV3k19EjZgYqBZGEIFy4hz8snTYF81r04fgE2D3+ 9cESWyIOLTdQNQwZCc8U4UtlAm5oAJVNO3VWW0tqfEI4t459yQqDxTFuLT+/fCn8 SBoMd5MiFpaAVEVscGFrM9BWoKWb/HwtgebjG6wIm1oTzMdg7rT/+QUT5kFjZiv3 QtozSa2bCOMCaP1b502/39grVms5oC2U72XDvAyrw8/b7F+DK8fChq4PhmqqJ2xt Zd5o4O2r58oyGLh8dYzRVmAZ2p4lgXt+gvgW0PuZGSBkMivOlbl6JgLVcEtew8Yt 30Oeb2Ngt0h99+yQIBrZwC2UbGWMM8fjB/1yZ56yLYMwxAGDr/TVRHTbSGqLK3YT RTRq3ql6Ubqeffrv3E0OfyVewiwjeTXBEIIR1akvOjRmahpHn0f2wgRnQxMCkZ1R /KQDHdPiVjKSXFRt8VCbmrPElp/N3iL6ppWVprxpdMjpuhCrPNUbT9bSrQZ6sP/r xa0Tn/A6oD8AhUcHowZv =MbFO -----END PGP SIGNATURE----- --tD16JVx07ViB1o3tNeqX67nBFPai7ormx--