From owner-freebsd-ports@FreeBSD.ORG Mon Apr 11 23:38:06 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD6F216A4CE for ; Mon, 11 Apr 2005 23:38:05 +0000 (GMT) Received: from relay.pair.com (relay00.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 39E2843D39 for ; Mon, 11 Apr 2005 23:38:05 +0000 (GMT) (envelope-from alejandro@varnet.biz) Received: (qmail 9284 invoked from network); 11 Apr 2005 23:38:03 -0000 Received: from unknown (HELO ale.varnet.bsd) (unknown) by unknown with SMTP; 11 Apr 2005 23:38:03 -0000 X-pair-Authenticated: 200.115.214.28 Date: Mon, 11 Apr 2005 20:38:59 -0300 From: Alejandro Pulver To: Florent Thoumie Message-ID: <20050411203859.33d6c45f@ale.varnet.bsd> In-Reply-To: <1113260537.89967.48.camel@cream.xbsd.org> References: <20050411175526.54ffd260@ale.varnet.bsd> <20050411211923.GA9149@xor.obsecurity.org> <20050411184818.494ac35e@ale.varnet.bsd> <20050412005541.58ea5f0c@it.buh.cameradicommercio.ro> <1113260537.89967.48.camel@cream.xbsd.org> X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable cc: Ion-Mihai Tetcu cc: freebsd-ports@freebsd.org cc: Kris Kennaway Subject: Re: Creating port with options X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 23:38:06 -0000 On Tue, 12 Apr 2005 01:02:17 +0200 Florent Thoumie wrote: > Le Tuesday 12 April 2005 =E0 00:55 +0300, Ion-Mihai Tetcu a =E9crit : > > On Mon, 11 Apr 2005 18:48:18 -0300 > > Alejandro Pulver wrote: > >=20 > > > P.S.: the Porter's Handbook does not say anything about the > > > "OPTIONS" variable (at least I did not found it with grep > > > "OPTIONS" * in the document directory). > >=20 > >=20 > > Update your docs. >=20 > That's not (yet) in the PH. >=20 > Here [1] is the submission Edwin sent some weeks ago, and here=20 > [2] is a summarizeed-wiki'ed version of the draft. >=20 > [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=3Ddocs/76472 > [2] http://www.xbsd.org/moin/FreeBSD/PortsGlossary/Options >=20 > --=20 > Florent Thoumie > flz@xbsd.org >=20 Hello, Thanks to all for the replies. Wich is the best way to manage conflictive options inside the OPTIONS variable? For example, I have three options: SERVER, X11 and CURSES. SERVER means the program will not be built with a user interface. X11 and CURSES (the ncurses library) are the two possible user interfaces. So each conflicts with the other two. Is the following adequate to handle it? Will the port store the bad configuration in /var/db/ports//options? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D OPTIONS=3D SERVER "Server mode (no GUI)" off \ X11 "X11 user interface" on \ CURSES "console user interface" off \ # This port has a BSD Makefile (no configure) and the options are # enabled/disabled with -D in CFLAGS (I tried to put it in CPPFLAGS but # the Makefile defines its own rules; it does not use the predefined # ones that include ${CPPFLAGS}). # The variable "LIB" is used inside the final linking rule (inside the # Makefile). .include .if defined(WITH_SERVER) && (defined(WITH_X11) || defined(WITH_CURSES)) IGNORE=3D Conflicting options: WITH_SERVER + WITH_X11/WITH_CURSES .endif .if defined(WITH_SERVER) MAKE_ARGS+=3D CFLAGS+=3D"-DSERVER" .endif .if !defined(WITH_SERVER) .if defined(WITH_X11) && defined(WITH_CURSES) IGNORE=3D Conflicting options WITH_X11 + WITH_CURSES .endif .if defined(WITH_X11) USE_XLIB=3D yes MAKE_ARGS+=3D CFLAGS+=3D"-DXWINGRAPHX -I${X11BASE}/include" MAKE_ARGS+=3D LIB+=3D"-L${X11BASE}/lib -lX11" .endif .if defined(WITH_CURSES) MAKE_ARGS+=3D CFLAGS+=3D"-DGRAPHX" MAKE_ARGS+=3D LIB+=3D"-lcurses" .endif .endif .include =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Thanks and Best Regards, Ale