Creating port with options

Alejandro Pulver alejandro at
Tue Apr 12 12:58:28 PDT 2005

On Tue, 12 Apr 2005 11:29:23 -0500
Scot Hetzel <swhetzel at> wrote:

> On Apr 12, 2005 11:22 AM, Scot Hetzel <swhetzel at> wrote:
> > On Apr 11, 2005 6:38 PM, Alejandro Pulver <alejandro at>
> > wrote:
> > > Wich is the best way to manage conflictive options inside the
> > > OPTIONS variable?
> > >
> > That should be work, but it may store the bad option in the options
> > file.  They'll just have to do a make reconfig to correct it.
> > 
> Also don't forget to set PKGNAMESUFFIX for the ports package name
> (-server, -x11-client, -ncurses-client).
> > If you could split the port into 3 seperate ports:
> > 
> >  *-server
> >  *-x11-client
> >  *-ncurses-client
> > 
> > Then you wouldn't need to worry about using the OPTIONS variable.
> > 
> > This way you could make the *-client ports depend on the *-server
> > port.
> > 
> > Scot
> >


Thank you for your reply.

This program is only a virtual machine emulator (a virtual machine used
by Core War assembly programs to fight). There is no "server". The
SERVER option only means that the program will not have GUI and
debugger (strange, isn't it?).

I really would like to keep this port as one (not splitted) if possible.
I tried to clear the config if it is wrong (with "make()"), with the
IGNORE variable. I have problems with IGNORE (and the "make(rmconfig)"
I tried did not worked):

# ... (OPTIONS is here)

.include <>

.if !defined(WITH_SERVER)

# Check for incompatible options.
.if defined(WITH_X11) && defined(WITH_CURSES)
IGNORE=		You must choose between WITH_GRAPHX and WITH_X11


# ...


# ...

.include <>

But the IGNORE instead of cancelling the port build it only cancels the
"configure" stage (maybe this is because the inclusion of
"bsd.port.pre/" ?). It can not enter the "src" directory because
it has not been extracted.

===>  pmars-0.9.2 You must choose between WITH_SERVER, WITH_X11 and

===>  Building for pmars-0.9.2
cd: can't cd to /usr/home/ale/Projects/ports/pmars/work/pmars-0.9.2/src
*** Error code 2

Stop in /usr/home/ale/Projects/ports/pmars.
*** Error code 1

Stop in /usr/home/ale/Projects/ports/pmars.

Also is it possible to call the target "rmconfig" (after the IGNORE) to
delete the configuration file if the options are wrong?

Thanks and Best Regards,

More information about the freebsd-ports mailing list