From owner-freebsd-ports@freebsd.org Wed Feb 12 00:26:15 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1BFA92483BA for ; Wed, 12 Feb 2020 00:26:15 +0000 (UTC) (envelope-from portmaster@BSDforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48HL6G0l26z4s9p; Wed, 12 Feb 2020 00:26:13 +0000 (UTC) (envelope-from portmaster@BSDforge.com) Received: from udns.ultimatedns.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by udns.ultimatedns.net (8.15.2/8.15.2) with ESMTPS id 01C0Q1d4089989 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 11 Feb 2020 16:26:07 -0800 (PST) (envelope-from portmaster@BSDforge.com) X-Mailer: Cypht MIME-Version: 1.0 Cc: In-Reply-To: <20200211084553.6zpansexamvw5tl4@atuin.in.mat.cc> From: Chris Reply-To: portmaster@BSDforge.com To: Mathieu Arnold Subject: Re: What is the actual syntax used to FLAVOR ports? Date: Tue, 11 Feb 2020 16:26:07 -0800 Message-Id: <5a0968af782c942447ae33762a10cdc2@udns.ultimatedns.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48HL6G0l26z4s9p X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of portmaster@BSDforge.com has no SPF policy when checking 24.113.41.81) smtp.mailfrom=portmaster@BSDforge.com X-Spamd-Result: default: False [-0.17 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[portmaster@BSDforge.com]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.71)[-0.707,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[BSDforge.com]; REPLYTO_ADDR_EQ_FROM(0.00)[]; AUTH_NA(1.00)[]; IP_SCORE(-0.42)[ip: (-0.81), ipnet: 24.113.0.0/16(-0.41), asn: 11404(-0.81), country: US(-0.05)]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-0.96)[-0.961,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 00:26:15 -0000 On Tue, 11 Feb 2020 09:45:53 +0100 Mathieu Arnold mat@FreeBSD=2Eorg said > On Mon, Feb 10, 2020 at 09:02:34PM -0500, Ernie Luzar wrote: > > Kevin Oberman wrote: > > > On Sat, Feb 8, 2020 at 1:27 PM Chris wrote: > > >=20 > > > > OK I know FLAVOR is an evolving concept=2E But I can not find > > > > the FLAVOR documentation=2E Only references in the porters > > > > handbook=2E What I think needs to be available is an entire > > > > list of flavor tags for all (port) categories=2E > > > > For example; > > > > make FLAVOR=3Dpython27 returns the error use py27=2E > > > > OK now I know how to flavor, and build python flavors=2E > > > > But what of Perl? > > > > make FLAVOR=3Dperl2=2E8=2E Nope=2E How about make FLAVOR=3Dp5-28, > > > > and so it goes=2E=2E=2E > > > > Does there exist a definitive list of flavors? It'd > > > > also be valuable for defining defaults in make=2Econf(5) > > > >=20 > > > > Thanks! > > > >=20 > > > > --Chris > > >=20 > > >=20 > > > The problem is not having a clear understanding of what a FLAVOR is a= nd > > > when it is used=2E > > >=20 > > > FLAVORS are generally a way to deal with the problem of incompatible > > > versions and Python is the poster child=2E Python2 and Python3 are two > > > version of a VERY popular language that have significant syntax > > > incompatibilities=2E While a program written for gcc-4=2E2 should work fi= ne > > > when compiled with gcc-7, it is VERY unlikely that a program written = for > > > Python2 will work with Python3=2E While the changes needed are often fa= irly > > > straight forward, they have to be made=2E The result is a requirement o= f > > > having both interpreters installed and two packages of of most Python > > > libraries built from a single source=2E > > >=20 > > > Adding FLAVORS for a port is an expensive operation and is never ligh= tly > > > approved by the ports management team as it adds a great deal of > > complexity > > > and both human and machine overhead=2E Requests to FLAVOR a port are > > > carefully reviewed and will only be approved with adequate justificat= ion=2E > > >=20 > > > In the case of Perl, no attempt to flavor it has been needed=2E Most Pe= rl > > > packages (p5-*) will work with any of the three available ports=2E In m= ost > > > cases they may be installed and continue to work across versions with= no > > > changes=2E Python (py-) ports MUST be reinstalled to move from Python2 = to > > > Python3=2E Some have not had required changes to work with Python3 made= and, > > > initially, almost none did=2E Some have now been written with no suppor= t for > > > Python2=2E All of this has to be properly handled by the package buildi= ng > > > system and it is not at all trivial=2E > > >=20 > > > As of today, I believe the only FLAVORed ports are those using emacs, > > > lazarus, php, and, of course, python=2E By "using", I mean that the por= t > > > Makefile includes "USE_PYTHON" or similar USE_ definitions of the oth= er > > > languages=2E (Yes, emacs is not a language, but elisp, the core of emac= s, is > > > and lazarus is an IDE for Pascal=2E) > > >=20 > > > I'm sorry of this is not entirely clear, but I hope it helps and I ho= pe it > > > is all correct=2E I may have worded some of it poorly=2E > > > -- > > > Kevin Oberman, Part time kid herder and retired Network Engineer > > > E-mail: rkoberman@gmail=2Ecom > > > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 > >=20 > > wow the above reply is not how I remember how things were envisioned wh= en > > this flavor function was first talked about=2E Having to get permission f= irst > > and being limited to languages was never talked about and not at all a > > requirement=2E >=20 Thank you *very* much for the link and reply, Mathieu! I must admit to being fairly embarrassed for having missed it=2E > Having to get permissions was never envisioned, and we will stop having > it as a requirement when people stop trying to forcefully do very silly > things, it will probably be relaxed when we have subpackages=2E > It is not at all limited to languages, I have no idea where that came > from=2E You only have to grep for '^FLAVORS=3D' to see that=2E Good tip! I think it's simply *easiest* to think of it in terms of language= s, akin to DEFAULT_VERSIONS=2E >=20 > > It was envisioned as a way to per can a set of different > > defaults so a package with pre canned defaults would be auto built in t= he > > ports system that is different from the basic defaults=2E ON the subject= of > > documentation about how to set up flavors for a port is totally lacking= at > > this point=2E You know the old saying, developers are good programmers bu= t are > > terrible at documenting their work if they do it at all=2E So with that i= n > > mind do your own thing following what you see for flavored languages as= a > > loosely followed guide=2E >=20 > Flavors have been documented from day one=2E >=20 > https://www=2Efreebsd=2Eorg/doc/en/books/porters-handbook/flavors=2Ehtml >=20 > (I kinda know because I wrote (most of) the flavors code, and I also > write (most of) the documentation=2E) Given some of the replies to this topic=2E It might be wise for someone(tm) to write an introductory to FLAVORS in the Handbook, with perhaps a link to the FLAVORS section of the porters-handbook=2E Thanks again! --Chris >=20 > --=20 > Mathieu Arnold