Date: Sun, 22 Jun 2014 23:02:18 +1000 From: Dewayne Geraghty <dewayne.geraghty@heuristicsystems.com.au> To: freebsd-ports@freebsd.org Subject: Re: Way to make settings in /etc/make.conf effective only for ports Message-ID: <53A6D3DA.1080705@heuristicsystems.com.au> In-Reply-To: <53A6A4A2.7090009@freebsd.org> References: <20140622.164916.109390522.yasu@utahime.org> <alpine.BSF.2.00.1406221114310.22555@fire.magemana.nl> <53A6A4A2.7090009@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 22/06/2014 7:40 PM, Alfred Perlstein wrote: > > On 6/22/14, 2:20 AM, Melvyn Sopacua wrote: >> Hi Yasuhiro, >> >> On Sun, 22 Jun 2014, Yasuhiro KIMURA wrote: >> >>> Recently I found some of settings for ports in /etc/make.conf >>> interfere with other software project. So are there any way to make >>> settings in /etc/make.conf effective only for ports? >> >> You can wrap those settings in .CURDIR check: >> .if !empty(.CURDIR:M/usr/ports/*) >> # port settings here >> .endif > > What about using a check for ../../Mk/bsd.ports.mk or > ../Mk/bsd.ports.mk ? >> >> Alternatively, you can make a different file, say /etc/make.ports.conf >> and then build ports with the environment variable __MAKE_CONF set to >> it. >> -- >> Melvyn >> _______________________________________________ >> freebsd-ports@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-ports >> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" >> > > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" > > Simplest way would be to install ports-mgmt/portconf. The installation appends what's needed to /etc/make.conf Then you need to add to /usr/local/etc/ports.conf to enable what you require the port to do. Something like: databases/mariadb55-client: mariadb_UNSET=MAXKEY X11 GNOMEVFS lang/perl*: OPTIONS_SET=THREADS PERL_64BITINT lang/php5: php5_UNSET=DEBUG MULTIBYTE X11 GNOMEVFS | php5_SET=APACHE SUHOSIN should give you a sense of what you can do. The above is an extract from a script that was used during the transition from WITH_|WITHOUT_ to OPTIONS_SET|OPTIONS_UNSET and ${UNIQUENAME}_SET${UNIQUENAME}_UNSET, but it should serve to give you a clue as to how to make tweaking your ports a lot easier. Then when you want to make a port just make -DBATCH this avoids the dialogue and provides consistency when building a lot of ports across different machines &/or platforms. It also saves cluttering your make.conf. Regards, Dewayne.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A6D3DA.1080705>