aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.options.mk
Commit message (Collapse)AuthorAgeFilesLines
* Add opt_CMAKE_BOOL_OFF, oposite of opt_CMAKE_BOOL.Mathieu Arnold2016-06-261-0/+9
| | | | | | | | PR: 210576 Sponsored by: Absolight Notes: svn path=/head/; revision=417532
* Add an opt_CMAKE_BOOL options helper.Adam Weinberger2016-06-251-0/+10
| | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=417497
* Fix excluding implied options.Bryan Drewery2016-05-031-0/+10
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=414547
* Add MASTER_SITES to options helpers.Mathieu Arnold2016-03-151-3/+4
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=411171
* Add GH_TUPLE to the options flags too.Mathieu Arnold2016-03-021-4/+4
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=409926
* Be consistent.Mathieu Arnold2015-12-291-3/+3
| | | | | | | | Noticed by: amdmi3 Sponsored by: Absolight Notes: svn path=/head/; revision=404763
* Remove unneeded .for loops.Mathieu Arnold2015-12-291-12/+4
| | | | | | | | Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D4484 Notes: svn path=/head/; revision=404759
* Mk/bsd.options.mk: Introduce SELECTED_OPTIONS, DESELECTED_OPTIONSJohn Marino2015-12-141-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=403743
* Refactor the list of all excluded options so that the second place it isMathieu Arnold2015-11-131-3/+5
| | | | | | | | | | | needed is not forgotten any more. PR: 204510 With hat: portmgr Sponsored by: Absolight Notes: svn path=/head/; revision=401514
* Enable TEST option if DEVELOPER is setDmitry Marakasov2015-10-081-0/+4
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=398829
* Add support for opt_TEST_TARGET consistent with opt_{ALL,INSTALL}_TARGETDmitry Marakasov2015-10-051-2/+2
| | | | | | | | Approved by: portmgr (mat) Differential Revision: D3788 Notes: svn path=/head/; revision=398646
* Fix opt_VARS premature expansion.Mathieu Arnold2015-10-011-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=398258
* Implemented complete support for test target.Dmitry Marakasov2015-09-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=398125
* Add PORTEXAMPLES to the options helpers.Mathieu Arnold2015-09-081-2/+3
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=396378
* Add DESKTOP_ENTRIES to the options flags.Mathieu Arnold2015-09-041-9/+10
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=396111
* Use more precise wording, i.e. "set" and "append" instead of "run."Adam Weinberger2015-08-281-4/+4
| | | | | | | Approved by: portmgr (mat) Notes: svn path=/head/; revision=395507
* Add generic opt_VARS/opt_VARS_OFF.Mathieu Arnold2015-08-281-0/+29
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=395468
* Add an optional error message for opt_PREVENTS, opt_PREVENTS_MSG.Mathieu Arnold2015-08-241-0/+2
| | | | | | | | | Reviewed by: bapt Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D3469 Notes: svn path=/head/; revision=395170
* Fix with fmake.Mathieu Arnold2015-08-211-1/+2
| | | | | | | | Noticed by: marck Sponsored by: Absolight Notes: svn path=/head/; revision=394952
* Optimize opt_IMPLIES.Mathieu Arnold2015-08-211-3/+29
| | | | | | | | | PR: 191144 Submitted by: hrs Sponsored by: Absolight Notes: svn path=/head/; revision=394939
* Add EXTRACT_ONLY to the options flags.Mathieu Arnold2015-08-191-8/+8
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=394770
* Introduce <opt>_IMPLIES and <opt>_PREVENTS to register dependencies, orMathieu Arnold2015-08-181-0/+13
| | | | | | | | | | | conflicts, between options. PR: 191144 Submitted by: adamw Sponsored by: Absolight Notes: svn path=/head/; revision=394573
* Add BROKEN and IGNORE to the options flags.Mathieu Arnold2015-08-181-4/+4
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=394569
* Remove UNIQUENAME and LATEST_LINK.Mathieu Arnold2015-08-171-41/+8
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=394508
* Rewrite the target ordering code.Mathieu Arnold2015-08-171-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=394503
* White space fix.Mathieu Arnold2015-07-301-4/+4
| | | | | | | | With hat: portmgr Sponsored by: Absolight Notes: svn path=/head/; revision=393225
* Add GH_* and PORTDOCS top the make variables helpers.Mathieu Arnold2015-07-301-7/+9
| | | | | | | | With hat: portmgr Sponsored by: Absolight Notes: svn path=/head/; revision=393224
* Introduce target option helpers.Mathieu Arnold2015-07-011-0/+17
| | | | | | | | | With hat: portmgr Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D2944 Notes: svn path=/head/; revision=391051
* Add SUB_LIST and SUB_FILES to the helper flags. (and sort the flags)Mathieu Arnold2015-06-011-9/+9
| | | | | | | | With hat: portmgr Sponsored by: Absolight Notes: svn path=/head/; revision=388209
* Mk/bsd.options.mk: Add OPTIONS_EXCLUDE_${OPSYS}John Marino2015-03-261-1/+3
| | | | | | | | | | This simple addition greatly simplifies the removal of options as a function of operating system, e.g. OPTIONS_EXCLUDE_DragonFly. Approved by: portmgr (bdrewery) Notes: svn path=/head/; revision=382333
* Add a ${opt}_USE_OFF option helperAntoine Brodin2015-01-221-0/+8
| | | | | | | | | | PR: 195817 Differential Revision: https://reviews.freebsd.org/D1581 Reviewed by: bapt, mat, jbeich With hat: portmgr Notes: svn path=/head/; revision=377651
* Allow the use of opt_ENABLE= foo=/bar to work like opt_WITH.Mathieu Arnold2014-12-291-1/+1
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=375786
* SpellingBaptiste Daroussin2014-09-221-1/+1
| | | | | | | Submitted by: xmj Notes: svn path=/head/; revision=368865
* Add an option helper for PLIST_SUBAntoine Brodin2014-08-211-2/+2
| | | | | | | | | | | | Rename a few variables to avoid confusion with this new helper Requested by: koobs Reviewed by: mat With hat: portmgr Differential revision: https://reviews.freebsd.org/D665 Notes: svn path=/head/; revision=365573
* Add INFO macro to the helpersBaptiste Daroussin2014-07-211-2/+2
| | | | Notes: svn path=/head/; revision=362510
* - strip optional WITH parameter from argument if OPTION is set to offOlli Hauer2014-06-211-1/+1
| | | | | | | | | | | | | | | FOO_WITH= foo=bar CONFIGURE_ARGS will become now ON: --with-foo=bar OFF: --without-foo PR: 191085 Submitted by: ohauer Approved by: portmgr (antoine) Notes: svn path=/head/; revision=358699
* Switch back to default tabspace: 8Baptiste Daroussin2014-06-181-62/+59
| | | | Notes: svn path=/head/; revision=358213
* Support LIBS like LDFLAGS.Tijl Coosemans2014-06-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add LIBS="${LIBS}" to MAKE_ENV and CONFIGURE_ENV. - Add an option helper for LIBS. - Adjust all ports that already use LIBS. Also remove references to PTHREAD_CFLAGS and PTHREAD_LIBS while here. - Some ports did not support having a LIBS environment variable and required additional patches. Somewhat simplified a linker command line looks like: ${CC} ${src_LDFLAGS} ${LDFLAGS} ${src_LIBS} ${LIBS} where src_LDFLAGS and src_LIBS are controlled by upstream and LDFLAGS and LIBS can be controlled by us. If possible -L and -l flags need to be added to LIBS to make sure they appear after any -L and -l flags set by upstream. Many ports currently add -L${LOCALBASE}/lib to LDFLAGS but this may appear too early on the command line causing installed libraries to be linked in instead of freshly built ones. Additional changes: benchmarks/netio: Replace WITH_IPV6 with an IPV6 option. comms/gnokii: Replace some patches with USES=pathfix. Also remove -fPIC. graphics/gimageview: USES=libtool and install desktop file in DESKTOPDIR. graphics/visionworkbench: Remove FreeBSD 7 support. multimedia/libmovtar: New LIB_DEPENDS syntax. multimedia/opencinematools: Use standard do-build. net/siproxd: USES=libtool:keepla (port actually needs .la files for plugins) net-mgmt/nagios: Remove -fPIC. net-mgmt/nagios4: Remove -fPIC. print/cups-base: Only add -lssp_nonshared on i386 and OSVERSION < 1000036. security/p11-kit: Replace PTHREAD_LIBS in CONFIGURE_ENV with ac_cv_func_pthread_mutexattr_init=no in CONFIGURE_ARGS. This skips a test in configure that falsely detects pthread_mutexattr_init in our libc. sysutils/dar: Fix iconv detection. x11/rxvt-unicode: Remove -lstdc++ and patch configure to remove a FreeBSD hack and use $CXX as linker as on other platforms. PR: 190592 Exp-run by: antoine Approved by: portmgr (antoine) Notes: svn path=/head/; revision=357486
* Convert all :U to :tu and :L to :tlBaptiste Daroussin2014-05-051-1/+1
| | | | | | | | | | | | | | | | | Since FreeBSD 8.4 and FreeBSD 9.1 make(1) do support :tu and :tl as a replacement for :U and :L (which has been marked as deprecated) bmake which is the default on FreeBSD 10+ only support by default :tu/:tl a hack has been added at the time to support :U and :L to ease migration. This hack is now not necessary anymore Note that this makes the ports tree incompatible with make(1) from FreeBSD 8.3 or earlier With hat: portmgr Notes: svn path=/head/; revision=352986
* - Rename check-orphans to check-plist. Keep the old for backwards-compat.Bryan Drewery2014-04-191-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Bug fixes: makeplist/check-plist: - Fix showing directories owned by RUN_DEPENDS/LIB_DEPENDS [1] - Use proper "rmdir PATH" syntax, not "rmdir >/dev/null... PATH" which pkg will not recognize. - Never consider base /etc/mtree/BSD.usr.dist or LOCLABASE Templates/BSD.local.dist as needing @dirrm handling. check-plist: - Fix showing PORTDOCS/PORTEXAMPLES files when the OPTIONS are not set. makeplist will still suggest them. - Fix showing files installed through unselected OPTIONS as orphans, by considering "@comment file" to be ignored. [2] - Fix @sample, @fc, @fcfontsdir, @fontsdir support - Fix return status when orphans are found to be non-zero - Add note when PREFIX=!LOCALBASE - Be more clear when orphans/no orphans are found. - Add a whitelist mechanism for globally approved ignores. - Add *.bak/*.orig to orphan whitelist for now. - Fix false-positive with dirs installed to /, such as with archivers/dpkg creating /var/db/dpkg - Fix false-positive with @dirrm ending in /, such as with ports-mgmt/poudriere with a @dirrmtry share/zsh/ - There are likely still some false-positives. I fixed as many as I could find. Please let me know of others. * One in particular that is not easily fixable is installing a file into a directory owned by another port where that other port is not a run-time dependency. So the leaf port may create all of the parent dirs and never clean them up. Cleaning them up is not proper unless no other package is depending on them. This will be addressed by pkg(8) once pkg_install is EOL, or sooner. - Consider @dirrm of directories owned by run-time dependencies, or /etc/mtree/* or Templates/BSD.local.dist (at LOCALBASE) as fatal errors. These should not be removed in the plist. @comment lines are not considered for this; they will not ignore an error. ===> Checking for directories owned by dependencies or MTREEs Error: Owned by dependency: @dirrmtry share/locale/af/LC_MESSAGES Error: Owned by dependency: @dirrmtry share/locale/af Error: Owned by dependency: @dirrmtry %%PERL5_MAN3%% - Detect files in plist that do not exist in the stagedir. Pkgng already did this, but now we have it unified with this check. @comment lines are not considered for this; they will not ignore an error. ===> Checking for items in pkg-plist which are not in STAGEDIR Error: Missing: foo Error: Missing: @dirrmtry bar - Change orphaned output due to several new errors introduced: ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: foo - Send errors to stderr check_leftovers.sh: - Prefer longer values for PLIST_SUB. bsd.options.mk: - Fix NOPORTDOCS/WITHOUT_NLS/NOPORTEXAMPLES not unsetting their respective OPTIONS. - Mark NOPORTDOCS/NOPORTEXAMPLES deprecated and hook them into the OPTIONS_WARNING to tell users the new format. - check-stagedir.sh refactoring: - Switch to using new PLIST_SUB_SED - Use ! instead of , in sed(1) regex to allow files/dirs with ',' - Rework PORTEXAMPLES/PORTDOCS handling so it acts on PLIST_SUB_SED'd value and not absolutes. Also simplify the regex for these a bit to allow reuse. - No longer need DOCSDIRS/EXAMPLESDIR in env - Wrap long lines - Unset some vars in env when they are done being used to free space for larger sed vars - Cleanup redundant sed regexes - Add a Scripts/plist_sub_sed_sort.sh to prefer longer values when substituting over shorter values. - To make check-plist ignore a file *as an orphan* do one of the following: 1. Install it 2. post-install: ${RM} ${STAGEDIR}file 3. Put the file behind an OPTION with a PLIST_SUB: %%OPTION%%file 4. Add to plist as a @comment [2]: @comment file @comment @dirrmtry dir Reviewed by: mat (much earlier version) Discussed with: mat, antoine, bapt, swills (various bits) With hat: portmgr PR: ports/185561 [1] Reported By: Alexander Yerenkow <yerenkow@gmail.com> [1] Tested with: pkg and pkg_install Reported by: many (false-positives) [2] This is a partial solution, we may still need a plist.ignore too. It doesn't make much sense to add files in main pkg-plist we don't care about, but maybe it does since you'll see and reconsider them being ignored someday. @comment is used as all the OPTION PLIST_SUB deactivations use @comment instead of something like @ignore. Notes: svn path=/head/; revision=351587
* Make option DEBUG work like WITH_DEBUGBaptiste Daroussin2014-03-281-0/+4
| | | | Notes: svn path=/head/; revision=349407
* Have OPTIONS_SUB also fill in SUB_LIST.Mathieu Arnold2014-03-251-0/+8
| | | | | | | | | Fix two ports that would have been broken with this change. With hat: portmgr Notes: svn path=/head/; revision=349166
* Correctly sort the DEPENDS targets.Mathieu Arnold2014-03-031-2/+2
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=346952
* Add CONFLICT{,_BUILD,_INSTALL} to the options helpers.Mathieu Arnold2014-03-031-14/+19
| | | | | | | | | PR: 187226 (based on) Submitted by: adamw Sponsored by: Absolight Notes: svn path=/head/; revision=346951
* Don't output warnings about WITH_DEBUG being on.Mathieu Arnold2014-03-031-1/+2
| | | | | | | | Requested by: eadler Sponsored by: Absolight Notes: svn path=/head/; revision=346911
* Add %%NO_OPT1%% to PLIST_SUB that is enabled when %%OPT1%% is not.Mathieu Arnold2014-02-271-2/+2
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=346379
* Really tell our users that using WITH_/WITHOUT_ to set/unset options isMathieu Arnold2014-02-241-0/+26
| | | | | | | | | deprecated. Sponsored by: Absolight Notes: svn path=/head/; revision=345870
* Use OPTIONS helpers from excluded options tooAntoine Brodin2014-02-151-1/+1
| | | | | | | | Reviewed by: bapt With hat: portmgr Notes: svn path=/head/; revision=344393
* Add two new options helpers:Mathieu Arnold2014-01-271-1/+17
| | | | | | | | | | | | | | ${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 Notes: svn path=/head/; revision=341467
* fmake doesn't like previous commit (which breaks index) [1]Baptiste Daroussin2013-12-151-14/+0
| | | | | | | | | | 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] Notes: svn path=/head/; revision=336596