Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Mar 2004 05:42:40 +0300 (MSK)
From:      "."@babolo.ru
To:        Rodion Novoselov <rodion@rndex.ru>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Global ports customization
Message-ID:  <1078627360.457284.16241.nullmailer@cicuta.babolo.ru>
In-Reply-To: <20040224002438.GD53330@mossy.its.rndex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 2004-02-23 at 17:33, Brandon D. Valentine wrote:
> > On Tue, Feb 24, 2004 at 12:18:17AM +0300, Rodion Novoselov wrote:
> > > 
> > > I'm used to putting down customization things for ports into
> > > /etc/make.conf file. However, I consider it to be a pretty wrong place
> > > because /etc/make.conf is included implicitly every time make runs no
> > > matter whether I build a port or something else.
> > 
> > I think you fail to understand and appreciate that you are using UNIX.
> > TMTOWTDI.  ;-)
> 
> > 1) Wrap your make.conf entries in a conditional:
> > 
> > .if defined(PORTSDIR)
> > WITH_MY_OPTIONS=YES
> > .endif
> It doesn't work due to redefining PORTSDIR in make.conf as I mentioned
> before.
> 
> > 2 ) Use portupgrade and put your customizations in
> > ${PREFIX}/etc/pkgtools.conf in the MAKE_ARGS section.
> Portupgrade is considered to be UNIX-way, isn't it? Well, well :-)
>  
> > 3) Submit updates to all of your favorite ports to add support for the
> > new config target and OPTIONS magic.
> 
> I didn't mean to customize a _certain_ port. I've already customized
> all ports I need. I'd like to define something globaly the same way I
> do it in make.conf, but being sure not to influence any makefiles
> outside the port collection.

# PORT_DBDIR            - Where port configuration options are recorded
#                               (default: /var/db/ports)

may be .include ${PORT_DBDIR}/Makefile.something
in ports/Mk/bsd.port.mk before

.if defined(OPTIONS)
.if exists(${_OPTIONSFILE}) && !make(rmconfig)
.include "${_OPTIONSFILE}"
.endif
.if exists(${_OPTIONSFILE}.local)
.include "${_OPTIONSFILE}.local"
.endif
.endif




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1078627360.457284.16241.nullmailer>