Commit graph

62 commits

Author SHA1 Message Date
Antoine Brodin
06b10d88b6 Use OPTIONS helpers from excluded options too
Reviewed by:	bapt
With hat:	portmgr
2014-02-15 14:33:39 +00:00
Mathieu Arnold
b765405ad0 Add two new options helpers:
${OPT}_${TYPE}_DEPENDS_OFF=<something> will automatically add:
${TYPE_DEPENDS}+=<something> in case OPT is 'off'

${OPT}_${FLAG}_OFF=<something> will automatically add:
${FLAG}+=<something> in case OPT is 'off'

With hat:	portmgr
Sponsored by:	Absolight
2014-01-27 22:53:24 +00:00
Baptiste Daroussin
31e3c5129c fmake doesn't like previous commit (which breaks index) [1]
Given we do not support for long enough old OPTIONS framework just get
rid of this compat block that doesn't bring anything anymore

Kick by:	cperciva [1]
2013-12-15 23:44:13 +00:00
Baptiste Daroussin
990ef2dec3 Do not set again WITHOUT_NLS in old backward compatibility if NLS is in OPTIONS_UNSET
Reported by:	eadler
2013-12-15 23:31:36 +00:00
Baptiste Daroussin
827dbfd2d3 Stop defining WITHOUT_NLS it not used anymore in the ports tree 2013-12-13 11:28:52 +00:00
Max Brazhnikov
b23b23a180 Add support for ${opt}_QMAKE_ON/${opt}_QMAKE_OFF
Approved by:	portmgr (bapt)
2013-11-22 10:59:03 +00:00
Mathieu Arnold
2cc3335d59 Allow multiple value in ${opt}_USE= FOO=bar,baz.
Which is nice in case you end up with something like :
X11_USE=	xorg=x11 xorg=ice xorg=sm xorg=xext xorg=xineramaproto
		xorg=xinerama xorg=xrandr xorg=xrender xorg=xtst

now you can do :
X11_USE=	xorg=x11,ice,sm,xext,xineramaproto,xinerama,xrandr,xrender,xtst

PR:		ports/183892
Approved by:	bapt
2013-11-12 13:23:14 +00:00
Alex Kozlov
bcaa596bf8 - Remove gratuitous whitespaces
- Use sinclude when possible
- Rewrap overly long list

Approved by:	portmgr (bapt)
2013-10-30 16:54:09 +00:00
William Grzybowski
c7db7eafb3 Allow multiple values for configure ENABLE and WITH options helpers
${opt}_CONFIGURE_ENABLE and ${opt}_CONFIGURE_WITH now accept multiple arguments
and will be expanded accordingly, e.g.:

OPT_CONFIGURE_ENABLE= feature1 feature2  --  will add to CONFIGURE_ARGS:
	OPT enabled: --enable-feature1 --enable-feature2
	OPT disabled: --disable-feature1 --disable-feature2

Approved by:	portmgr (bapt)
2013-10-27 11:58:20 +00:00
Bryan Drewery
324a8df42a - Fix OPTIONS_SUB not including OPTIONS_SLAVE options in PLIST_SUB
With hat:	portmgr
2013-10-04 11:42:38 +00:00
Bryan Drewery
ff427f8d85 - Add option helper opt_USE= FOO=bar -> USE_FOO=bar
Discussed with:	bapt
With hat:	portmgr
2013-10-04 11:38:13 +00:00
Sunpoet Po-Chuan Hsieh
5349651bad - Add more helpers: ALL_TARGET, INSTALL_TARGET and CATEGORIES
- Remove duplicate EXTRA_PATCHES comment
- Minor comment rewording: change "add it to" to "add its content to"
  just like how we describe ${opt}_CMAKE_*

PR:		ports/182626
Submitted by:	sunpoet (myself)
Approved by:	bapt (portmgr)
2013-10-04 10:03:23 +00:00
Bryan Drewery
8d4817e69d - Add support for PATCHFILES and PATCH_SITES
- While here, cleanup r329186 and move EXTRA_PATCHES to common
  section

With hat:	portmgr
2013-10-04 01:52:30 +00:00
Bryan Drewery
ac5b4b49ea - Support {opt}_EXTRA_PATCHES
Reviewed by:	bapt
With hat:	portmgr
2013-10-03 13:32:36 +00:00
Sunpoet Po-Chuan Hsieh
cd19cf50f2 - Add more OPTIONS helpers: MAKE_ARGS, PLIST_FILES, PLIST_DIRS and PLIST_DIRSTRY
- Fix typo

PR:		ports/182514
Submitted by:	sunpoet (myself)
Approved by:	bdrewery (portmgr)
2013-10-01 16:27:52 +00:00
Christian Weisgerber
7bab335511 If ${opt}_CPPFLAGS is defined, its value will be appended to CPPFLAGS
depending on the status of option ${opt}.

Approved by:	bapt
2013-09-24 21:01:06 +00:00
Mathieu Arnold
ba2618cd9d Document the new bsd.options.mk knobs.
PR:		ports/180949
Submitted by:	mat
Approved by:	bapt
2013-08-01 12:32:52 +00:00
Baptiste Daroussin
6def68975b Add new ${OPT}_CONFIGURE_WITH option help
it will handle the --with/--without configure argument dancing based on the value of the OPTION ${OPT}

Requested by:	mandree
2013-07-29 07:01:20 +00:00
Tijl Coosemans
a0ccbe7bed - Document the use of ${OPTIONS_NAME}_(UN)SET(_FORCE).
- Remove options in ${OPTIONS_NAME}_(UN)SET from NEW_OPTIONS list.
- Remove an intermediate sort.
- Add support for ${OPTIONS_NAME}_(UN)SET_FORCE.

Approved by:	bapt
2013-07-25 11:47:11 +00:00
Baptiste Daroussin
35982b23be Replace OPTIONSFILE by OPTIONS_FILE which is a more robust variable with unicity
insurance in its path to avoid collision.

A compatibility layer is available to automatically load and migration from
OPTIONSFILE to OPTIONS_FILE (this is all transparent for users.)

It is recommanded that ports that used to overwrite OPTIONSFILE to prevent the
known bugs should keep the OPTIONSFILE overwrite for a while (6 month) to allow
the migration to happen automatically and users to not lose their old save
options.

New options file is now based on the PKGORIGIN therefor the definition of the
PKGORIGIN has been moved ealier in bsd.port.mk to allow it's usage from withing
bsd.options.mk

PR:		ports/148637
Reviewed by:	bdrewery
2013-06-26 07:22:06 +00:00
Baptiste Daroussin
0e8027e93f Add a forgotten helper:
${OPT}_CMAKE_ON and ${OPT}_CMAKE_OFF
2013-06-14 14:18:45 +00:00
Baptiste Daroussin
67cfdf9034 New macros to help dealing with ports that have options:
OPTIONS_SUB=yes when set in a port, all the option names are automatically
added to the PLIST_SUB with "@comment " value in case the option is off and
empty value in case the options is on.

${OPT}_CONFIGURE_ENABLE=<aname> will automatically add:
CONFIGURE_ARGS+=--enable-<aname> in case OPT is activated
CONFIGURE_ARGS+=--disable-<aname> in case OPT is deactivated

${OPT}_CONFIGURE_ON=<something> will automatically add:
CONFIGURE_ARGS+=<something> in case OPT is activated

${OPT_CONFIGURE_OFF=<something> will automatically add:
CONFIGURE_ARGS+=<something> in case OPT is deactivated

${OPT}_CFLAGS will append the specified new flags to CFLAGS if OPT is 'on'
${OPT}_CXXFLAGS will append the specified new flags to CXXFLAGS if OPT is 'on'
${OPT}_LDFLAGS will append the specified new flags to LDFLAGS if OPT is 'on'

${OPT}_CONFIGURE_ENV will append the specified variables to CONFIGURE_ENV if
OPT is 'on'
${OPT}_MAKE_ENV will append the specified variables to MAKE_ENV if OPT is 'on'

${OPT}_USES will append the speficied uses to USES if OPT is 'on'

${OPT}_DISTFILES will append the specified distiles to DISTFILES if OPT in 'on'

Reviewed and tested by:	bdrewery
2013-06-14 13:41:37 +00:00
Tijl Coosemans
d9f524c45c - Reallign documentation for a tab width of 4.
- Document variables that can be used in make.conf.

Approved by:	bapt
2013-06-14 13:04:32 +00:00
Tijl Coosemans
d48e842cfa Sort PORT_OPTIONS only once and remove some undefines.
Approved by:	bapt
2013-06-14 13:00:48 +00:00
Tijl Coosemans
bdace5957e Let config-conditional take options configured in make.conf into account.
The option dialog will not appear if all options have been configured
before, either using the dialog or in make.conf.  This means you can set
options once for all ports in make.conf and not have dialogs pop up if
those are the only options.

Also let config-conditional run make config instead of do-config.  Make
config handles NO_DIALOG and pre-config.

Discussed with:	danfe
Approved by:	portmgr (bapt)
2013-06-14 12:59:02 +00:00
Baptiste Daroussin
5177ada3c4 Yet more factorisation 2013-06-10 09:27:19 +00:00
Baptiste Daroussin
a67e308fb6 Factorise code 2013-06-10 09:19:38 +00:00
Tijl Coosemans
b1576256fb Append per arch defaults directly to OPTIONS_DEFAULT. Duplicates
are eliminated later.
2013-06-10 08:39:14 +00:00
Tijl Coosemans
15ef88aa2f Exclude options directly from OPTIONS_DEFINE and set ALL_OPTIONS
later. This simplifies the NO_OPTIONS_SORT case.

Approved by:	bapt
2013-06-10 08:37:14 +00:00
Baptiste Daroussin
dfcbb8d250 This should not have been in either 2013-06-10 08:22:34 +00:00
Baptiste Daroussin
4f36e07626 Partial revert of r320440 some things has been committed that shouldn't have yet 2013-06-10 08:20:25 +00:00
Baptiste Daroussin
8a0e32c0aa Removed useless quotes 2013-06-10 07:27:05 +00:00
Tijl Coosemans
861ad53cbf Remove some redundant comments.
Approved by:	bapt
2013-06-09 16:04:04 +00:00
Tijl Coosemans
a96308c51e Eliminate _ALL_EXCLUDE temporary variable and fuse two .for loops.
Approved by:	bapt
2013-06-09 16:02:03 +00:00
Baptiste Daroussin
a639e24276 Do not automatically popup dialog in case only options from global options are defined
Requested by:	many
2013-06-07 08:06:17 +00:00
Baptiste Daroussin
b5f4f56e18 Remove the OPTIONS parsing for real this time 2013-06-07 05:55:24 +00:00
Baptiste Daroussin
0ccc926cc2 Fix exclusion of global options per ports 2013-06-07 05:49:44 +00:00
Baptiste Daroussin
65792bf65b Readd the OPTIONS parser given that apparently someports still haven't been converted, and passed throught the grep that was supposed to find them all
Reported by:	Vincent Hoffman <vince@unsane.co.uk>
2013-06-06 13:58:19 +00:00
Baptiste Daroussin
5cb56c4f98 Remove support for parsing the old OPTIONS macro, the compatibility code to load the old optionsfile and compatibility with WITH_ and WITHOUT_ in make.conf remains for now; 2013-06-06 06:29:00 +00:00
Baptiste Daroussin
7ccb78414d Remove empty radio/single/group/multi options from lists
This can happen due to slave/exclude
2013-06-05 17:21:32 +00:00
Baptiste Daroussin
5306c736d8 Fix NO_OPTIONS_SORT
Reported by:	hrs, osa
2013-05-02 09:14:10 +00:00
Baptiste Daroussin
c564c4d40a Rework OPTIONS_EXCLUDE and OPTIONS_EXCLUDE_${ARCH} so that is also get excluded
from the SINGLE/MULTI/GROUP/RADIO

Add new (OPTIONS|${UNIQUENAME}_(UN)SET_FORCE to force options from make.conf
what ever has been saved via make config [1]

Add new OPTIONS_SLAVE designed to help slaved ports, each options added to
OPTIONS_SLAVE will be removed from master's OPTIONS_DEFINE, and PORT_OPTIONS
will be set as if always on.

Submitted by:	Marco Steinbach <coco@executive-computing.de> [1]
2013-04-29 14:49:18 +00:00
Baptiste Daroussin
c4ef816449 Fix mismatched brackets
Submitted by:	draco@marino.st
2013-03-25 09:15:52 +00:00
Baptiste Daroussin
34d5249610 Extend the options framework providing 2 new macros:
OPTIONS_RADIO: a more user friendly way to allow selecting only 0 or 1 options
               among a list of options
OPTIONS_GROUP: this macros should be used to group options by theme allowing the
               user to select 0 or N options among a list of options

With hat:	portmgr
Reviewed by:	beat
2012-12-10 10:14:05 +00:00
Baptiste Daroussin
8640477bd2 We are in 2012, it is time to activate IPV6 options by default everywhere 2012-10-10 08:48:47 +00:00
Baptiste Daroussin
9a79d8476e Options can now be overridden from command line using
WITH/WITHOUT.

Name has been proprosed by gahr during brainstorming on ports@

PR:		ports/170180
Submitted by:	ohauer
2012-10-05 13:43:45 +00:00
Baptiste Daroussin
45b04c6514 compare options loading from /var/db/port/options and make.conf against the
complete list of options.
COMPLETE_OPTIONS_LIST being OPTIONS_DEFINE + all the OPTIONS_SINGLE_* + all the
OPTIONS_MULTI_*
2012-07-16 22:36:44 +00:00
Baptiste Daroussin
2bf8210563 - Document new options framework in bsd.options.mk
- new OPTIONS_DEFINE_${ARCH} and OPTIONS_DEFAULT_${ARCH} to define and activate
  options per arches.
- No more append to PORT_OPTIONS options that are not in OPTIONS_DEFINE, (in the
  expection of DOCS, NLS, EXAMPLES for compatibility)
2012-07-16 11:38:36 +00:00
Baptiste Daroussin
abb421178b Add new OPTIONS_EXCLUSE_${ARCH} to be able to exclude an option on the given arch
Fix xorg-server on sparc64 by excluing the HAL option on sparc64 has it used to
be before convertion to new options framework [1]

Reported by:	marius@
Tested by:	marius@
Approved by:	kwm [1]
2012-07-13 10:23:57 +00:00
Baptiste Daroussin
5b14163eb5 Do not search for upper case uniquename what setting per ports options 2012-06-06 11:47:29 +00:00