Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Apr 2012 15:38:11 -0700
From:      Kevin Oberman <kob6558@gmail.com>
To:        Konstantin Tokarev <annulen@yandex.ru>
Cc:        "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>, Chris Inacio <nacho319@gmail.com>
Subject:   Re: port variants
Message-ID:  <CAN6yY1sEhiP51WDxAkYu7%2BbMknSeNWet7BmHNfHj2ML8ZzxtuQ@mail.gmail.com>
In-Reply-To: <866281334347264@web24.yandex.ru>
References:  <CAG_PEexDO2Shk_46RYpKyjpYakAGYp1mwPU7C=QUM7HbAdnNug@mail.gmail.com> <CAOjFWZ4womjueyvF4o6Yc_bQb2_DwoV5hMPJNx8EpqUaUCOFbw@mail.gmail.com> <0E61DE82-499B-47EF-9EEA-F9F3EB166A0A@gmail.com> <866281334347264@web24.yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
2012/4/13 Konstantin Tokarev <annulen@yandex.ru>:
>
>
> 13.04.2012, 23:55, "Chris Inacio" <nacho319@gmail.com>:
>> On Apr 13, 2012, at 3:39 PM, Freddie Cash <fjwcash@gmail.com> wrote:
>>
>>> =A0On Fri, Apr 13, 2012 at 12:04 PM, Chris Inacio <nacho319@gmail.com> =
wrote:
>>>> =A0I was recently asked to do some FreeBSD ports support work. =A0I mo=
stly use a
>>>> =A0Mac and the MacPorts system. =A0MacPorts has the concept of a varia=
nt for a
>>>> =A0port, but I can't find the analogue in the FreeBSD system.
>>>>
>>>> =A0Does the FreeBSD ports system have the concept of a variant? =A0If =
so, can
>>>> =A0someone point me in the right direction on how to create one?
>>> =A0Describing what a "variant" is, how it works in MacPorts, and what y=
ou
>>> =A0are trying to do would help a lot. =A0:)
>>>
>>> =A0The closest guess I could make would be "slave port", but I don't
>>> =A0think that works the same way.
>>
>> Sorry, you're right.
>>
>> For example, a port of say Emacs could have a variant of X11.
>>
>> So Emacs or Emacs+X11.
>>
>> The X11 variant would (somewhat obviously) include building regular Emac=
s but also the X11 toolbar etc. while Emacs wouldn't include any X11 featur=
es (& dependencies).
>>
>> On the Mac, we can build universal binaries (PowerPC, ia32, and x86_64),=
 at the cost of disk space. So we can build almost any package with the +un=
iversal variant.
>>
>> Is that a reasonable explanation?
>
> Seems like you need makefile options:
>
> http://www.freebsd.org/doc/en/books/porters-handbook/makefile-options.htm=
l

While I think makefile-options is the way to go, I should also point
out that for the specific case of emacs and X11, it is not used due to
the very large differences. Other "variants" are handled via options,
but there are separate emacs and emacs-nox11 ports.

Most obviously, all of the emacs options are X11 related and there is
no way that I know to have two sets of options with one list dependent
on the other. If there are only a coupe of cases of this, it may be
noted on the options like:
THREADS       " Build with thread support"
            On \
FOO                "Foo support (requires THREADS)"
         OFF \

The port maintainer/developer has to make a call as to which approach
is more practical, but I suspect portmgr@ will press for maximum use
of makefile-options.
--=20
R. Kevin Oberman, Network Engineer
E-mail: kob6558@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1sEhiP51WDxAkYu7%2BbMknSeNWet7BmHNfHj2ML8ZzxtuQ>