From owner-freebsd-ports@FreeBSD.ORG Fri Apr 13 22:38:13 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 925331065676 for ; Fri, 13 Apr 2012 22:38:13 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1ADA88FC20 for ; Fri, 13 Apr 2012 22:38:12 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so6213576wgb.1 for ; Fri, 13 Apr 2012 15:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=eJzxcfk96hoQCWO6+NwCcNSaenXoU8xCzrYLZ/50oEo=; b=WecWGXD/s4NmzmgPbQs/4/4ymPSvqxlqFqZHLO8Hj3z5pxx1c2H7obwpNYcdKTmC7B yZ8SCD1CQf4PdXL8vNIPiTetdwMap4tquWHW9t+OCHn96GQ2vGr36KhwFZ9bbdrkpA+w s7hIH+XQh4P1/1Ohcjox7ZTuicIAN0hH782M/Drpe+xhSwB8GuZE8T2qhWdYze6NPDn5 dGITrdVgiCJ+1Sws0Z/KdQpDPcOKnQEUMaT1T+Jc6v83sNsHGnd8gajwb1fo/rGTkfHY AnWUSYT7qYWn0EsISKREzrZQLhSYfwzRTihWeCdTebOLlbOvhz79Jy+omUALIC8hvB/5 Ocjg== MIME-Version: 1.0 Received: by 10.216.135.223 with SMTP id u73mr1872474wei.117.1334356691772; Fri, 13 Apr 2012 15:38:11 -0700 (PDT) Received: by 10.223.54.207 with HTTP; Fri, 13 Apr 2012 15:38:11 -0700 (PDT) In-Reply-To: <866281334347264@web24.yandex.ru> References: <0E61DE82-499B-47EF-9EEA-F9F3EB166A0A@gmail.com> <866281334347264@web24.yandex.ru> Date: Fri, 13 Apr 2012 15:38:11 -0700 Message-ID: From: Kevin Oberman To: Konstantin Tokarev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-ports@freebsd.org" , Chris Inacio Subject: Re: port variants X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Apr 2012 22:38:13 -0000 2012/4/13 Konstantin Tokarev : > > > 13.04.2012, 23:55, "Chris Inacio" : >> On Apr 13, 2012, at 3:39 PM, Freddie Cash wrote: >> >>> =A0On Fri, Apr 13, 2012 at 12:04 PM, Chris Inacio = 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