1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-17 03:25:46 +00:00
Commit Graph

128 Commits

Author SHA1 Message Date
Mathieu Arnold
f4c9be1393 Do not enable options that do not exist.
Differential Revision:	https://reviews.freebsd.org/D13953
2018-09-10 14:40:57 +00:00
Mathieu Arnold
2f70fd9e54 Only set %%PORTDOCS%%/%%PORTEXAMPLES%% if a DOCS/EXAMPLES option is defined.
PR:		230864
Submitted by:	mat
exp-runs by:	antoine
Differential Revision:	https://reviews.freebsd.org/D13651
2018-09-10 13:16:27 +00:00
Mathieu Arnold
935f31b1b4 Remove automagic WITH_DEBUG activation with the DEBUG option.
- People keep adding options named DEBUG to enable verbose things in
  their ports and have no idea it also enables WITH_DEBUG.
- We already have WITH_DEBUG_PORTS that can enable WITH_DEBUG on a per
  port basis.

Differential Revision:	https://reviews.freebsd.org/D16829
2018-08-28 12:22:53 +00:00
Richard Gallamore
8035da77dd * Add USE_GITLAB for fetching from www.gitlab.com and GitLab deployed sites.
Reviewed by:	mat
Approved by:	portmgr (mat)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D12162
2018-03-03 06:50:15 +00:00
Mathieu Arnold
bb5196a149 Remove support for variables that have been deprecated for a while.
variables                  deprecation       revision
WITHOUT_NLS                2013-12-13        r336337
WITH_/WITHOUT_             2014-02-24        r345870
NOPORT(DOC|EXAMPLE)S       2014-04-19        r351587
WITH_BDB_VER               2016-05-02        r414444
OVERRIDE_LINUX_BASE_PORT   2016-09-05        r421387
WITH_OPENSSL_(BASE|PORT)   2016-06-16        r416965

While there, add an ERROR variable that works like DEV_ERROR, but for
user facing errors, and move NOPORTDOCS,
NOPORTEXAMPLES and WITHOUT_NLS to it.

Cleanup bsd.sanity.mk a bit.

Fix fallout.

PR:		224613
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D13490
2018-01-09 07:40:55 +00:00
Baptiste Daroussin
dee0383e5f Add an option helper for BINARY_ALIAS 2017-12-20 14:19:04 +00:00
Bryan Drewery
dc656b07fc Follow-up r454266: Sort and remove duplicates for [DE]SELECTED_OPTIONS.
Some ports like graphics/povray-meta do funky things like add the same
option into PORT_OPTIONS twice.  This also avoids a new leading blank
space in some cases.

With hat:	portmgr
2017-11-16 19:41:20 +00:00
Bryan Drewery
44ae07a5c0 Fix [DE]SELECTED_OPTIONS to lazily evaluate as late as possible.
If a port modifies OPTIONS_UNSET after including bsd.port.options.mk
then these values were wrong even though all of 'showconfig',
'pretty-print-config', and the package generated all had the expected
options.

Only Poudriere and synth use these variables for incremental build checks.

Reviewed by:	sjg, bapt
Approved by:	portmgr (bapt)
Differential Revision:	https://reviews.freebsd.org/D13092
2017-11-15 19:13:50 +00:00
Koop Mast
5ae433edd6 Meson is picky about the arguments of build options.
For example a option of the "boolean" type only accepts true/false this
 option is covered by ${opt}_MESON_TRUE/_FALSE.

Add option helpers ${opt}_MESON_YES/_NO for the "combo" type which
 accepts yes and no.

Approved by:		portmgr@ (mat@)
Differential Revision:	https://reviews.freebsd.org/D11078
2017-06-09 18:12:54 +00:00
Koop Mast
1f9f21c80b * Fix MESON_TRUE/MESON_FALSE comment, to mention the actualy meson argument.
* Rework option hanlding to be more clear and to avoid double negative.

Submitted by:	antoine@
Approved by:	antoine@
2017-04-17 20:24:46 +00:00
Koop Mast
e8ad1e183f Introduce new "meson" USES.
This uses will handling building software that uses the meson
build system. Expand the option framework to handle MESON options.

Approved by:	portmgr (swills@)

Differential Revision:	https://reviews.freebsd.org/D104091
2017-04-17 18:55:56 +00:00
Antoine Brodin
6f9a97676e Revert r398829: do not change OPTIONS when DEVELOPER=yes
Having a TEST option is usually a bad idea

With hat:	portmgr
2017-01-07 09:01:02 +00:00
Baptiste Daroussin
dd2c2cb23e Revert r429298 it has some unexpected side effects which I do not have time to
fix yet

Approved by:	portmgr (implicit)
2016-12-25 12:46:14 +00:00
Baptiste Daroussin
709b05ed2d Make the ports infrastructure accept at least 3 level ports
Approved by:	portmgr (rene
Differential Revision:	https://reviews.freebsd.org/D8889
2016-12-24 00:30:21 +00:00
Mathieu Arnold
91476b9329 Add an OPTIONS_EXCLUDE_opsys_osrel.
Sponsored by:	Absolight
2016-11-24 14:45:58 +00:00
Mathieu Arnold
07231789ec Change the way opt_USE is parsed.
This makes it possible to have:
opt_USE=  ldconfig=${PREFIX}/lib/foo/bar

Before this, it would have ended up doing USE_LDCONFIG=/lib/foo/bar,
without ${PREFIX}.

Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D8169
2016-10-12 12:19:55 +00:00
Mathieu Arnold
679f715601 Don't duplicate the list of options helpers.
People who come here can read the code, they will be able to understand
the variable definition.

Sponsored by:	Absolight
2016-08-31 13:28:05 +00:00
Mathieu Arnold
d14923d361 Add GH_SUBDIR to option helpers.
Submitted by:	lightside gmx com
Sponsored by:	Absolight
2016-08-31 12:50:36 +00:00
Mathieu Arnold
2f53697702 Move USE_BDB and PLIST_DIRSTRY to the unsupported section, all the ports
have been converted.

Sponsored by:	Absolight
2016-08-17 12:16:24 +00:00
Mathieu Arnold
6c2e13095d Add opt_CMAKE_BOOL_OFF, oposite of opt_CMAKE_BOOL.
PR:		210576
Sponsored by:	Absolight
2016-06-26 16:23:37 +00:00
Adam Weinberger
5c332ae6cb Add an opt_CMAKE_BOOL options helper.
SOMEOPT_CMAKE_BOOL=	WITH_FOO BAR

expands to:

  -DWITH_FOO:BOOL=true -DBAR:BOOL=true
or
  -DWITH_FOO:BOOL=false -DBAR:BOOL=false

PR:		210576
Approved by:	portmgr (mat)
2016-06-25 22:23:37 +00:00
Bryan Drewery
0e0764a175 Fix excluding implied options.
This fixes the devel/git-lite port to not get PERL despite being excluded.

PR:		207460
PR:		202701
With hat:	portmgr
Differential Revision:	https://reviews.freebsd.org/D5538
2016-05-03 18:36:29 +00:00
Mathieu Arnold
bd732c1ae8 Add MASTER_SITES to options helpers.
Sponsored by:	Absolight
2016-03-15 15:28:50 +00:00
Mathieu Arnold
56245d460d Add GH_TUPLE to the options flags too.
Sponsored by:	Absolight
2016-03-02 11:08:41 +00:00
Mathieu Arnold
64e435f631 Be consistent.
Noticed by:	amdmi3
Sponsored by:	Absolight
2015-12-29 17:01:42 +00:00
Mathieu Arnold
e109535adf Remove unneeded .for loops.
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D4484
2015-12-29 16:19:55 +00:00
John Marino
cb97dd0575 Mk/bsd.options.mk: Introduce SELECTED_OPTIONS, DESELECTED_OPTIONS
Until now, the only way to obtain information on the valid port options
and the current selection states is by using the pretty-print-config
target.  It would look something like this:

  > make -C /usr/ports/lang/gcc5-aux print-print-config
  Standard[ +FORT +OBJC +NLS -TESTSUITE -ALLSTAGES -STATIC ] \
  Bootstrap[ -BOOTSTRAP ]

To process the total options and the selection state of each option
requires additional processing, e.g. with awk and/or sed.  Moreover, if
other information is needed about the port it question, it would require
a second execution of "make" to reveal variable values. There simply is
no other way to obtain the option selection information in a single pass
(this limitation came when options framework was brought in).

This enhancement allows the option selection information to revealed with
make -V so that all port information can be acquired in a single pass.
Moreover, they won't require piping through sed or awk.  Two read-only
variables are introduced:

  SELECTED_OPTIONS   (list of all "on" options)
  DESELECTED_OPTIONS (liss of all "off" options)

Here's an example of a single pass acquisition:

  > make -C /usr/dports/lang/gcc5-aux -V PKGNAME -V SELECTED_OPTIONS \
    -V DESELECTED_OPTIONS
  gcc5-aux-20150716
  NLS OBJC FORT
  BOOTSTRAP STATIC ALLSTAGES TESTSUITE

Obviously the grouping information seen in pretty-print-config is lost,
so these new variables will not help if option group information is
required.

Approved by:	portmgr (bapt)
2015-12-14 22:44:39 +00:00
Mathieu Arnold
6684338e91 Refactor the list of all excluded options so that the second place it is
needed is not forgotten any more.

PR:		204510
With hat:	portmgr
Sponsored by:	Absolight
2015-11-13 13:50:35 +00:00
Dmitry Marakasov
be25d1eef5 Enable TEST option if DEVELOPER is set
TEST option is used when a port needs extra depends or flags for
build phase to enable tests (so TEST_DEPENDS don't work). Enable
it by default for DEVELOPER builds, so interested parties and Q/A
can have all tests available.

Approved by:	portmgr (bapt)
Differential Revision:	D3844
2015-10-08 14:21:10 +00:00
Dmitry Marakasov
bdca2b917a Add support for opt_TEST_TARGET consistent with opt_{ALL,INSTALL}_TARGET
Approved by:	portmgr (mat)
Differential Revision:	D3788
2015-10-05 12:45:29 +00:00
Mathieu Arnold
3818d01826 Fix opt_VARS premature expansion.
Due to the way .for loop work, opt_VARS was being expanded too early
evaluation, which made it impossible to use vars that are set/modifies
afterwards (such as PREFIX or PKGDIR)

Fix this by changing opt_VARS handling logic so that the right side is
not prematurely expanded:

- Loop not by words (each word here is single VAR=val / VAR+=val tuple)
  but by unique left sides of assignments (VAR, VAR+ here)
- Using the left side, extract all corresponding right sides and
  append/assign them to a variable

This changes the way this opt_VARS line work, which behavior is between
invalid and undefined:

opt_VARS= FOO=bar FOO=baz

Before it would end up with "FOO=baz", now it ends up with "FOO=bar baz"

Submitted by:	amdmi3
Reviewed by:	antoine, mat
Approved by:	my portmgr hat
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D3729
2015-10-01 07:56:36 +00:00
Dmitry Marakasov
5c57225987 Implemented complete support for test target.
You can now `make test' on any port to run test sequence, no-op by default.
If a port defines TEST_TARGET, it'll run sub-make with specified target,
usually `check' or `test', useful if upstream supports that. The port may
instead define custom do-test target, as well as usual satellite targets:

  {pre,do,post}-test, {pre,do,post}-test-OPT, {pre,do,post}-test-OPT-off

`make test' builds and stages port first, so test may use both WRKDIR and
STAGEDIR, and both BUILD and RUN depends are available for test target.
Additionally, TEST_DEPENDS is now properly supported and may be used to
define additional depends specifically for testing.

Framework may define default tests for specific cases. For instance,
perl5.mk and cran.mk already provide default test target on their own.

This commit also converts my ports which have tests to this new framework.

Approved by:	portmgr (bapt)
Differential Revision:	D3680
2015-09-28 17:20:42 +00:00
Mathieu Arnold
9f8347ee1b Add PORTEXAMPLES to the options helpers.
Sponsored by:	Absolight
2015-09-08 14:04:30 +00:00
Mathieu Arnold
46c8a181c5 Add DESKTOP_ENTRIES to the options flags.
Sponsored by:	Absolight
2015-09-04 16:35:21 +00:00
Adam Weinberger
84b58a7493 Use more precise wording, i.e. "set" and "append" instead of "run."
Approved by:	portmgr (mat)
2015-08-28 16:18:32 +00:00
Mathieu Arnold
9c517d8878 Add generic opt_VARS/opt_VARS_OFF.
OPT1_VARS=  foo=bar baz+=bam

will set FOO to bar and append bam to BAZ if OPT1 is enabled.  <opt>_VARS_OFF
works the same way, if the option is disabled.

Reviewed by:	bapt
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D3410
2015-08-28 12:28:13 +00:00
Mathieu Arnold
741e1ac058 Add an optional error message for opt_PREVENTS, opt_PREVENTS_MSG.
Reviewed by:	bapt
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D3469
2015-08-24 13:07:31 +00:00
Mathieu Arnold
8d82504fad Fix with fmake.
Noticed by:	marck
Sponsored by:	Absolight
2015-08-21 13:05:20 +00:00
Mathieu Arnold
08da6a6763 Optimize opt_IMPLIES.
PR:		191144
Submitted by:	hrs
Sponsored by:	Absolight
2015-08-21 12:02:50 +00:00
Mathieu Arnold
26c137c376 Add EXTRACT_ONLY to the options flags.
Sponsored by:	Absolight
2015-08-19 09:28:06 +00:00
Mathieu Arnold
bfbc1e51b7 Introduce <opt>_IMPLIES and <opt>_PREVENTS to register dependencies, or
conflicts, between options.

PR:		191144
Submitted by:	adamw
Sponsored by:	Absolight
2015-08-18 11:00:57 +00:00
Mathieu Arnold
ccdb295ce0 Add BROKEN and IGNORE to the options flags.
Sponsored by:	Absolight
2015-08-18 10:39:07 +00:00
Mathieu Arnold
21a283f3be Remove UNIQUENAME and LATEST_LINK.
UNIQUENAME was never unique, it was only used by USE_LDCONFIG and now,
we won't have conflicts there.

Use PKGBASE instead of LATEST_LINK in PKGLATESTFILE, the *only* consumer
is pkg-devel, and it works just fine without LATEST_LINK as pkg-devel
has the correct PKGNAME anyway.

Now that UNIQUENAME is gone, OPTIONSFILE is too. (it's been called
OPTIONS_FILE now.)

Reviewed by:	antoine, bapt
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D3336
2015-08-17 14:20:40 +00:00
Mathieu Arnold
e8796ef612 Rewrite the target ordering code.
The targets now have priority assigned to them, and, when the dependency
ordering magic is done at the end of bsd.port.mk, they are sorted
according to their priority.

This allows USES to add targets easily and have them run whenever they
want without touching bsd.port.mk.

To add a target that runs just before post-configure run, do:

_USES_configure+=  695:my-post-configure
my-post-configure:
	do something

To fine tune when the target is ran, look at the values in the *_SEQ
variables at the end of bsd.port.mk, and the other USES.

Allow ports Makefiles to override the priority of targets with the
TARGET_ORDER_OVERRIDE variable.  For example, to get post-install
running earlier, (its default is 700) do:

TARGET_ORDER_OVERRIDE=	  650:post-install

While there, add options target helpers for the do-* targets when they
exist.

Reviewed by:	antoine, bapt
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D3099
2015-08-17 13:31:25 +00:00
Mathieu Arnold
272ce7fe9b White space fix.
With hat:	portmgr
Sponsored by:	Absolight
2015-07-30 08:51:43 +00:00
Mathieu Arnold
3f028ccd4f Add GH_* and PORTDOCS top the make variables helpers.
With hat:	portmgr
Sponsored by:	Absolight
2015-07-30 08:51:07 +00:00
Mathieu Arnold
fc9ea03981 Introduce target option helpers.
With hat:	portmgr
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D2944
2015-07-01 12:11:16 +00:00
Mathieu Arnold
9b93e0ff17 Add SUB_LIST and SUB_FILES to the helper flags. (and sort the flags)
With hat:	portmgr
Sponsored by:	Absolight
2015-06-01 09:38:54 +00:00
John Marino
b5485e708b Mk/bsd.options.mk: Add OPTIONS_EXCLUDE_${OPSYS}
This simple addition greatly simplifies the removal of options as a
function of operating system, e.g. OPTIONS_EXCLUDE_DragonFly.

Approved by:	portmgr (bdrewery)
2015-03-26 17:31:20 +00:00
Antoine Brodin
7c8e3e3764 Add a ${opt}_USE_OFF option helper
PR:		195817
Differential Revision:	https://reviews.freebsd.org/D1581
Reviewed by:	bapt, mat, jbeich
With hat:	portmgr
2015-01-22 12:18:00 +00:00