Creating port with options

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


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

> On Apr 12, 2005 11:22 AM, Scot Hetzel <swhetzel at gmail.com> wrote:
> > On Apr 11, 2005 6:38 PM, Alejandro Pulver <alejandro at varnet.biz>
> > 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
> >

Hello,

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 <bsd.port.pre.mk>

.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

.endif

# ...

.endif

# ...

.include <bsd.port.post.mk>

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/post.mk" ?). 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
WITH_CURSES.

===>  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,
Ale


More information about the freebsd-ports mailing list